curl: make global truly global
—
$ git checkout -f 3b40128b0f11a3dee5524e92768ff18046db20f2
Previous HEAD position was c1372df2e2 ares: destroy channel on shutdown
HEAD is now at 3b40128b0f curl: make global truly global
$ git clean -fdx
Removing Makefile
Removing Makefile.in
Removing aclocal.m4
Removing autom4te.cache/
Removing buildinfo.txt
Removing compile
Removing config.guess
Removing config.log
Removing config.status
Removing config.sub
Removing configure
Removing curl-config
Removing depcomp
Removing docs/Makefile
Removing docs/Makefile.in
Removing docs/cmdline-opts/Makefile
Removing docs/cmdline-opts/Makefile.in
Removing docs/examples/.deps/
Removing docs/examples/Makefile
Removing docs/examples/Makefile.in
Removing docs/libcurl/Makefile
Removing docs/libcurl/Makefile.in
Removing docs/libcurl/opts/Makefile
Removing docs/libcurl/opts/Makefile.in
Removing include/Makefile
Removing include/Makefile.in
Removing include/curl/Makefile
Removing include/curl/Makefile.in
Removing install-sh
Removing lib/.deps/
Removing lib/.libs/
Removing lib/Makefile
Removing lib/Makefile.in
Removing lib/curl_config.h
Removing lib/curl_config.h.in
Removing lib/curlx/.deps/
Removing lib/curlx/.dirstamp
Removing lib/curlx/libcurl_la-base64.lo
Removing lib/curlx/libcurl_la-base64.o
Removing lib/curlx/libcurl_la-dynbuf.lo
Removing lib/curlx/libcurl_la-dynbuf.o
Removing lib/curlx/libcurl_la-inet_ntop.lo
Removing lib/curlx/libcurl_la-inet_ntop.o
Removing lib/curlx/libcurl_la-inet_pton.lo
Removing lib/curlx/libcurl_la-inet_pton.o
Removing lib/curlx/libcurl_la-multibyte.lo
Removing lib/curlx/libcurl_la-multibyte.o
Removing lib/curlx/libcurl_la-nonblock.lo
Removing lib/curlx/libcurl_la-nonblock.o
Removing lib/curlx/libcurl_la-strparse.lo
Removing lib/curlx/libcurl_la-strparse.o
Removing lib/curlx/libcurl_la-timediff.lo
Removing lib/curlx/libcurl_la-timediff.o
Removing lib/curlx/libcurl_la-timeval.lo
Removing lib/curlx/libcurl_la-timeval.o
Removing lib/curlx/libcurl_la-version_win32.lo
Removing lib/curlx/libcurl_la-version_win32.o
Removing lib/curlx/libcurl_la-wait.lo
Removing lib/curlx/libcurl_la-wait.o
Removing lib/curlx/libcurl_la-warnless.lo
Removing lib/curlx/libcurl_la-warnless.o
Removing lib/curlx/libcurl_la-winapi.lo
Removing lib/curlx/libcurl_la-winapi.o
Removing lib/curlx/libcurlu_la-base64.lo
Removing lib/curlx/libcurlu_la-base64.o
Removing lib/curlx/libcurlu_la-dynbuf.lo
Removing lib/curlx/libcurlu_la-dynbuf.o
Removing lib/curlx/libcurlu_la-inet_ntop.lo
Removing lib/curlx/libcurlu_la-inet_ntop.o
Removing lib/curlx/libcurlu_la-inet_pton.lo
Removing lib/curlx/libcurlu_la-inet_pton.o
Removing lib/curlx/libcurlu_la-multibyte.lo
Removing lib/curlx/libcurlu_la-multibyte.o
Removing lib/curlx/libcurlu_la-nonblock.lo
Removing lib/curlx/libcurlu_la-nonblock.o
Removing lib/curlx/libcurlu_la-strparse.lo
Removing lib/curlx/libcurlu_la-strparse.o
Removing lib/curlx/libcurlu_la-timediff.lo
Removing lib/curlx/libcurlu_la-timediff.o
Removing lib/curlx/libcurlu_la-timeval.lo
Removing lib/curlx/libcurlu_la-timeval.o
Removing lib/curlx/libcurlu_la-version_win32.lo
Removing lib/curlx/libcurlu_la-version_win32.o
Removing lib/curlx/libcurlu_la-wait.lo
Removing lib/curlx/libcurlu_la-wait.o
Removing lib/curlx/libcurlu_la-warnless.lo
Removing lib/curlx/libcurlu_la-warnless.o
Removing lib/curlx/libcurlu_la-winapi.lo
Removing lib/curlx/libcurlu_la-winapi.o
Removing lib/libcurl.la
Removing lib/libcurl.vers
Removing lib/libcurl_la-altsvc.lo
Removing lib/libcurl_la-altsvc.o
Removing lib/libcurl_la-amigaos.lo
Removing lib/libcurl_la-amigaos.o
Removing lib/libcurl_la-asyn-ares.lo
Removing lib/libcurl_la-asyn-ares.o
Removing lib/libcurl_la-asyn-base.lo
Removing lib/libcurl_la-asyn-base.o
Removing lib/libcurl_la-asyn-thrdd.lo
Removing lib/libcurl_la-asyn-thrdd.o
Removing lib/libcurl_la-bufq.lo
Removing lib/libcurl_la-bufq.o
Removing lib/libcurl_la-bufref.lo
Removing lib/libcurl_la-bufref.o
Removing lib/libcurl_la-cf-h1-proxy.lo
Removing lib/libcurl_la-cf-h1-proxy.o
Removing lib/libcurl_la-cf-h2-proxy.lo
Removing lib/libcurl_la-cf-h2-proxy.o
Removing lib/libcurl_la-cf-haproxy.lo
Removing lib/libcurl_la-cf-haproxy.o
Removing lib/libcurl_la-cf-https-connect.lo
Removing lib/libcurl_la-cf-https-connect.o
Removing lib/libcurl_la-cf-ip-happy.lo
Removing lib/libcurl_la-cf-ip-happy.o
Removing lib/libcurl_la-cf-socket.lo
Removing lib/libcurl_la-cf-socket.o
Removing lib/libcurl_la-cfilters.lo
Removing lib/libcurl_la-cfilters.o
Removing lib/libcurl_la-conncache.lo
Removing lib/libcurl_la-conncache.o
Removing lib/libcurl_la-connect.lo
Removing lib/libcurl_la-connect.o
Removing lib/libcurl_la-content_encoding.lo
Removing lib/libcurl_la-content_encoding.o
Removing lib/libcurl_la-cookie.lo
Removing lib/libcurl_la-cookie.o
Removing lib/libcurl_la-cshutdn.lo
Removing lib/libcurl_la-cshutdn.o
Removing lib/libcurl_la-curl_addrinfo.lo
Removing lib/libcurl_la-curl_addrinfo.o
Removing lib/libcurl_la-curl_des.lo
Removing lib/libcurl_la-curl_des.o
Removing lib/libcurl_la-curl_endian.lo
Removing lib/libcurl_la-curl_endian.o
Removing lib/libcurl_la-curl_fnmatch.lo
Removing lib/libcurl_la-curl_fnmatch.o
Removing lib/libcurl_la-curl_get_line.lo
Removing lib/libcurl_la-curl_get_line.o
Removing lib/libcurl_la-curl_gethostname.lo
Removing lib/libcurl_la-curl_gethostname.o
Removing lib/libcurl_la-curl_gssapi.lo
Removing lib/libcurl_la-curl_gssapi.o
Removing lib/libcurl_la-curl_memrchr.lo
Removing lib/libcurl_la-curl_memrchr.o
Removing lib/libcurl_la-curl_ntlm_core.lo
Removing lib/libcurl_la-curl_ntlm_core.o
Removing lib/libcurl_la-curl_range.lo
Removing lib/libcurl_la-curl_range.o
Removing lib/libcurl_la-curl_rtmp.lo
Removing lib/libcurl_la-curl_rtmp.o
Removing lib/libcurl_la-curl_sasl.lo
Removing lib/libcurl_la-curl_sasl.o
Removing lib/libcurl_la-curl_sha512_256.lo
Removing lib/libcurl_la-curl_sha512_256.o
Removing lib/libcurl_la-curl_sspi.lo
Removing lib/libcurl_la-curl_sspi.o
Removing lib/libcurl_la-curl_threads.lo
Removing lib/libcurl_la-curl_threads.o
Removing lib/libcurl_la-curl_trc.lo
Removing lib/libcurl_la-curl_trc.o
Removing lib/libcurl_la-cw-out.lo
Removing lib/libcurl_la-cw-out.o
Removing lib/libcurl_la-cw-pause.lo
Removing lib/libcurl_la-cw-pause.o
Removing lib/libcurl_la-dict.lo
Removing lib/libcurl_la-dict.o
Removing lib/libcurl_la-doh.lo
Removing lib/libcurl_la-doh.o
Removing lib/libcurl_la-dynhds.lo
Removing lib/libcurl_la-dynhds.o
Removing lib/libcurl_la-easy.lo
Removing lib/libcurl_la-easy.o
Removing lib/libcurl_la-easygetopt.lo
Removing lib/libcurl_la-easygetopt.o
Removing lib/libcurl_la-easyoptions.lo
Removing lib/libcurl_la-easyoptions.o
Removing lib/libcurl_la-escape.lo
Removing lib/libcurl_la-escape.o
Removing lib/libcurl_la-fake_addrinfo.lo
Removing lib/libcurl_la-fake_addrinfo.o
Removing lib/libcurl_la-file.lo
Removing lib/libcurl_la-file.o
Removing lib/libcurl_la-fileinfo.lo
Removing lib/libcurl_la-fileinfo.o
Removing lib/libcurl_la-fopen.lo
Removing lib/libcurl_la-fopen.o
Removing lib/libcurl_la-formdata.lo
Removing lib/libcurl_la-formdata.o
Removing lib/libcurl_la-ftp.lo
Removing lib/libcurl_la-ftp.o
Removing lib/libcurl_la-ftplistparser.lo
Removing lib/libcurl_la-ftplistparser.o
Removing lib/libcurl_la-getenv.lo
Removing lib/libcurl_la-getenv.o
Removing lib/libcurl_la-getinfo.lo
Removing lib/libcurl_la-getinfo.o
Removing lib/libcurl_la-gopher.lo
Removing lib/libcurl_la-gopher.o
Removing lib/libcurl_la-hash.lo
Removing lib/libcurl_la-hash.o
Removing lib/libcurl_la-headers.lo
Removing lib/libcurl_la-headers.o
Removing lib/libcurl_la-hmac.lo
Removing lib/libcurl_la-hmac.o
Removing lib/libcurl_la-hostip.lo
Removing lib/libcurl_la-hostip.o
Removing lib/libcurl_la-hostip4.lo
Removing lib/libcurl_la-hostip4.o
Removing lib/libcurl_la-hostip6.lo
Removing lib/libcurl_la-hostip6.o
Removing lib/libcurl_la-hsts.lo
Removing lib/libcurl_la-hsts.o
Removing lib/libcurl_la-http.lo
Removing lib/libcurl_la-http.o
Removing lib/libcurl_la-http1.lo
Removing lib/libcurl_la-http1.o
Removing lib/libcurl_la-http2.lo
Removing lib/libcurl_la-http2.o
Removing lib/libcurl_la-http_aws_sigv4.lo
Removing lib/libcurl_la-http_aws_sigv4.o
Removing lib/libcurl_la-http_chunks.lo
Removing lib/libcurl_la-http_chunks.o
Removing lib/libcurl_la-http_digest.lo
Removing lib/libcurl_la-http_digest.o
Removing lib/libcurl_la-http_negotiate.lo
Removing lib/libcurl_la-http_negotiate.o
Removing lib/libcurl_la-http_ntlm.lo
Removing lib/libcurl_la-http_ntlm.o
Removing lib/libcurl_la-http_proxy.lo
Removing lib/libcurl_la-http_proxy.o
Removing lib/libcurl_la-httpsrr.lo
Removing lib/libcurl_la-httpsrr.o
Removing lib/libcurl_la-idn.lo
Removing lib/libcurl_la-idn.o
Removing lib/libcurl_la-if2ip.lo
Removing lib/libcurl_la-if2ip.o
Removing lib/libcurl_la-imap.lo
Removing lib/libcurl_la-imap.o
Removing lib/libcurl_la-krb5.lo
Removing lib/libcurl_la-krb5.o
Removing lib/libcurl_la-ldap.lo
Removing lib/libcurl_la-ldap.o
Removing lib/libcurl_la-llist.lo
Removing lib/libcurl_la-llist.o
Removing lib/libcurl_la-macos.lo
Removing lib/libcurl_la-macos.o
Removing lib/libcurl_la-md4.lo
Removing lib/libcurl_la-md4.o
Removing lib/libcurl_la-md5.lo
Removing lib/libcurl_la-md5.o
Removing lib/libcurl_la-memdebug.lo
Removing lib/libcurl_la-memdebug.o
Removing lib/libcurl_la-mime.lo
Removing lib/libcurl_la-mime.o
Removing lib/libcurl_la-mprintf.lo
Removing lib/libcurl_la-mprintf.o
Removing lib/libcurl_la-mqtt.lo
Removing lib/libcurl_la-mqtt.o
Removing lib/libcurl_la-multi.lo
Removing lib/libcurl_la-multi.o
Removing lib/libcurl_la-multi_ev.lo
Removing lib/libcurl_la-multi_ev.o
Removing lib/libcurl_la-netrc.lo
Removing lib/libcurl_la-netrc.o
Removing lib/libcurl_la-noproxy.lo
Removing lib/libcurl_la-noproxy.o
Removing lib/libcurl_la-openldap.lo
Removing lib/libcurl_la-openldap.o
Removing lib/libcurl_la-parsedate.lo
Removing lib/libcurl_la-parsedate.o
Removing lib/libcurl_la-pingpong.lo
Removing lib/libcurl_la-pingpong.o
Removing lib/libcurl_la-pop3.lo
Removing lib/libcurl_la-pop3.o
Removing lib/libcurl_la-progress.lo
Removing lib/libcurl_la-progress.o
Removing lib/libcurl_la-psl.lo
Removing lib/libcurl_la-psl.o
Removing lib/libcurl_la-rand.lo
Removing lib/libcurl_la-rand.o
Removing lib/libcurl_la-rename.lo
Removing lib/libcurl_la-rename.o
Removing lib/libcurl_la-request.lo
Removing lib/libcurl_la-request.o
Removing lib/libcurl_la-rtsp.lo
Removing lib/libcurl_la-rtsp.o
Removing lib/libcurl_la-select.lo
Removing lib/libcurl_la-select.o
Removing lib/libcurl_la-sendf.lo
Removing lib/libcurl_la-sendf.o
Removing lib/libcurl_la-setopt.lo
Removing lib/libcurl_la-setopt.o
Removing lib/libcurl_la-sha256.lo
Removing lib/libcurl_la-sha256.o
Removing lib/libcurl_la-share.lo
Removing lib/libcurl_la-share.o
Removing lib/libcurl_la-slist.lo
Removing lib/libcurl_la-slist.o
Removing lib/libcurl_la-smb.lo
Removing lib/libcurl_la-smb.o
Removing lib/libcurl_la-smtp.lo
Removing lib/libcurl_la-smtp.o
Removing lib/libcurl_la-socketpair.lo
Removing lib/libcurl_la-socketpair.o
Removing lib/libcurl_la-socks.lo
Removing lib/libcurl_la-socks.o
Removing lib/libcurl_la-socks_gssapi.lo
Removing lib/libcurl_la-socks_gssapi.o
Removing lib/libcurl_la-socks_sspi.lo
Removing lib/libcurl_la-socks_sspi.o
Removing lib/libcurl_la-speedcheck.lo
Removing lib/libcurl_la-speedcheck.o
Removing lib/libcurl_la-splay.lo
Removing lib/libcurl_la-splay.o
Removing lib/libcurl_la-strcase.lo
Removing lib/libcurl_la-strcase.o
Removing lib/libcurl_la-strdup.lo
Removing lib/libcurl_la-strdup.o
Removing lib/libcurl_la-strequal.lo
Removing lib/libcurl_la-strequal.o
Removing lib/libcurl_la-strerror.lo
Removing lib/libcurl_la-strerror.o
Removing lib/libcurl_la-system_win32.lo
Removing lib/libcurl_la-system_win32.o
Removing lib/libcurl_la-telnet.lo
Removing lib/libcurl_la-telnet.o
Removing lib/libcurl_la-tftp.lo
Removing lib/libcurl_la-tftp.o
Removing lib/libcurl_la-transfer.lo
Removing lib/libcurl_la-transfer.o
Removing lib/libcurl_la-uint-bset.lo
Removing lib/libcurl_la-uint-bset.o
Removing lib/libcurl_la-uint-hash.lo
Removing lib/libcurl_la-uint-hash.o
Removing lib/libcurl_la-uint-spbset.lo
Removing lib/libcurl_la-uint-spbset.o
Removing lib/libcurl_la-uint-table.lo
Removing lib/libcurl_la-uint-table.o
Removing lib/libcurl_la-url.lo
Removing lib/libcurl_la-url.o
Removing lib/libcurl_la-urlapi.lo
Removing lib/libcurl_la-urlapi.o
Removing lib/libcurl_la-version.lo
Removing lib/libcurl_la-version.o
Removing lib/libcurl_la-ws.lo
Removing lib/libcurl_la-ws.o
Removing lib/libcurlu.la
Removing lib/libcurlu_la-altsvc.lo
Removing lib/libcurlu_la-altsvc.o
Removing lib/libcurlu_la-amigaos.lo
Removing lib/libcurlu_la-amigaos.o
Removing lib/libcurlu_la-asyn-ares.lo
Removing lib/libcurlu_la-asyn-ares.o
Removing lib/libcurlu_la-asyn-base.lo
Removing lib/libcurlu_la-asyn-base.o
Removing lib/libcurlu_la-asyn-thrdd.lo
Removing lib/libcurlu_la-asyn-thrdd.o
Removing lib/libcurlu_la-bufq.lo
Removing lib/libcurlu_la-bufq.o
Removing lib/libcurlu_la-bufref.lo
Removing lib/libcurlu_la-bufref.o
Removing lib/libcurlu_la-cf-h1-proxy.lo
Removing lib/libcurlu_la-cf-h1-proxy.o
Removing lib/libcurlu_la-cf-h2-proxy.lo
Removing lib/libcurlu_la-cf-h2-proxy.o
Removing lib/libcurlu_la-cf-haproxy.lo
Removing lib/libcurlu_la-cf-haproxy.o
Removing lib/libcurlu_la-cf-https-connect.lo
Removing lib/libcurlu_la-cf-https-connect.o
Removing lib/libcurlu_la-cf-ip-happy.lo
Removing lib/libcurlu_la-cf-ip-happy.o
Removing lib/libcurlu_la-cf-socket.lo
Removing lib/libcurlu_la-cf-socket.o
Removing lib/libcurlu_la-cfilters.lo
Removing lib/libcurlu_la-cfilters.o
Removing lib/libcurlu_la-conncache.lo
Removing lib/libcurlu_la-conncache.o
Removing lib/libcurlu_la-connect.lo
Removing lib/libcurlu_la-connect.o
Removing lib/libcurlu_la-content_encoding.lo
Removing lib/libcurlu_la-content_encoding.o
Removing lib/libcurlu_la-cookie.lo
Removing lib/libcurlu_la-cookie.o
Removing lib/libcurlu_la-cshutdn.lo
Removing lib/libcurlu_la-cshutdn.o
Removing lib/libcurlu_la-curl_addrinfo.lo
Removing lib/libcurlu_la-curl_addrinfo.o
Removing lib/libcurlu_la-curl_des.lo
Removing lib/libcurlu_la-curl_des.o
Removing lib/libcurlu_la-curl_endian.lo
Removing lib/libcurlu_la-curl_endian.o
Removing lib/libcurlu_la-curl_fnmatch.lo
Removing lib/libcurlu_la-curl_fnmatch.o
Removing lib/libcurlu_la-curl_get_line.lo
Removing lib/libcurlu_la-curl_get_line.o
Removing lib/libcurlu_la-curl_gethostname.lo
Removing lib/libcurlu_la-curl_gethostname.o
Removing lib/libcurlu_la-curl_gssapi.lo
Removing lib/libcurlu_la-curl_gssapi.o
Removing lib/libcurlu_la-curl_memrchr.lo
Removing lib/libcurlu_la-curl_memrchr.o
Removing lib/libcurlu_la-curl_ntlm_core.lo
Removing lib/libcurlu_la-curl_ntlm_core.o
Removing lib/libcurlu_la-curl_range.lo
Removing lib/libcurlu_la-curl_range.o
Removing lib/libcurlu_la-curl_rtmp.lo
Removing lib/libcurlu_la-curl_rtmp.o
Removing lib/libcurlu_la-curl_sasl.lo
Removing lib/libcurlu_la-curl_sasl.o
Removing lib/libcurlu_la-curl_sha512_256.lo
Removing lib/libcurlu_la-curl_sha512_256.o
Removing lib/libcurlu_la-curl_sspi.lo
Removing lib/libcurlu_la-curl_sspi.o
Removing lib/libcurlu_la-curl_threads.lo
Removing lib/libcurlu_la-curl_threads.o
Removing lib/libcurlu_la-curl_trc.lo
Removing lib/libcurlu_la-curl_trc.o
Removing lib/libcurlu_la-cw-out.lo
Removing lib/libcurlu_la-cw-out.o
Removing lib/libcurlu_la-cw-pause.lo
Removing lib/libcurlu_la-cw-pause.o
Removing lib/libcurlu_la-dict.lo
Removing lib/libcurlu_la-dict.o
Removing lib/libcurlu_la-doh.lo
Removing lib/libcurlu_la-doh.o
Removing lib/libcurlu_la-dynhds.lo
Removing lib/libcurlu_la-dynhds.o
Removing lib/libcurlu_la-easy.lo
Removing lib/libcurlu_la-easy.o
Removing lib/libcurlu_la-easygetopt.lo
Removing lib/libcurlu_la-easygetopt.o
Removing lib/libcurlu_la-easyoptions.lo
Removing lib/libcurlu_la-easyoptions.o
Removing lib/libcurlu_la-escape.lo
Removing lib/libcurlu_la-escape.o
Removing lib/libcurlu_la-fake_addrinfo.lo
Removing lib/libcurlu_la-fake_addrinfo.o
Removing lib/libcurlu_la-file.lo
Removing lib/libcurlu_la-file.o
Removing lib/libcurlu_la-fileinfo.lo
Removing lib/libcurlu_la-fileinfo.o
Removing lib/libcurlu_la-fopen.lo
Removing lib/libcurlu_la-fopen.o
Removing lib/libcurlu_la-formdata.lo
Removing lib/libcurlu_la-formdata.o
Removing lib/libcurlu_la-ftp.lo
Removing lib/libcurlu_la-ftp.o
Removing lib/libcurlu_la-ftplistparser.lo
Removing lib/libcurlu_la-ftplistparser.o
Removing lib/libcurlu_la-getenv.lo
Removing lib/libcurlu_la-getenv.o
Removing lib/libcurlu_la-getinfo.lo
Removing lib/libcurlu_la-getinfo.o
Removing lib/libcurlu_la-gopher.lo
Removing lib/libcurlu_la-gopher.o
Removing lib/libcurlu_la-hash.lo
Removing lib/libcurlu_la-hash.o
Removing lib/libcurlu_la-headers.lo
Removing lib/libcurlu_la-headers.o
Removing lib/libcurlu_la-hmac.lo
Removing lib/libcurlu_la-hmac.o
Removing lib/libcurlu_la-hostip.lo
Removing lib/libcurlu_la-hostip.o
Removing lib/libcurlu_la-hostip4.lo
Removing lib/libcurlu_la-hostip4.o
Removing lib/libcurlu_la-hostip6.lo
Removing lib/libcurlu_la-hostip6.o
Removing lib/libcurlu_la-hsts.lo
Removing lib/libcurlu_la-hsts.o
Removing lib/libcurlu_la-http.lo
Removing lib/libcurlu_la-http.o
Removing lib/libcurlu_la-http1.lo
Removing lib/libcurlu_la-http1.o
Removing lib/libcurlu_la-http2.lo
Removing lib/libcurlu_la-http2.o
Removing lib/libcurlu_la-http_aws_sigv4.lo
Removing lib/libcurlu_la-http_aws_sigv4.o
Removing lib/libcurlu_la-http_chunks.lo
Removing lib/libcurlu_la-http_chunks.o
Removing lib/libcurlu_la-http_digest.lo
Removing lib/libcurlu_la-http_digest.o
Removing lib/libcurlu_la-http_negotiate.lo
Removing lib/libcurlu_la-http_negotiate.o
Removing lib/libcurlu_la-http_ntlm.lo
Removing lib/libcurlu_la-http_ntlm.o
Removing lib/libcurlu_la-http_proxy.lo
Removing lib/libcurlu_la-http_proxy.o
Removing lib/libcurlu_la-httpsrr.lo
Removing lib/libcurlu_la-httpsrr.o
Removing lib/libcurlu_la-idn.lo
Removing lib/libcurlu_la-idn.o
Removing lib/libcurlu_la-if2ip.lo
Removing lib/libcurlu_la-if2ip.o
Removing lib/libcurlu_la-imap.lo
Removing lib/libcurlu_la-imap.o
Removing lib/libcurlu_la-krb5.lo
Removing lib/libcurlu_la-krb5.o
Removing lib/libcurlu_la-ldap.lo
Removing lib/libcurlu_la-ldap.o
Removing lib/libcurlu_la-llist.lo
Removing lib/libcurlu_la-llist.o
Removing lib/libcurlu_la-macos.lo
Removing lib/libcurlu_la-macos.o
Removing lib/libcurlu_la-md4.lo
Removing lib/libcurlu_la-md4.o
Removing lib/libcurlu_la-md5.lo
Removing lib/libcurlu_la-md5.o
Removing lib/libcurlu_la-memdebug.lo
Removing lib/libcurlu_la-memdebug.o
Removing lib/libcurlu_la-mime.lo
Removing lib/libcurlu_la-mime.o
Removing lib/libcurlu_la-mprintf.lo
Removing lib/libcurlu_la-mprintf.o
Removing lib/libcurlu_la-mqtt.lo
Removing lib/libcurlu_la-mqtt.o
Removing lib/libcurlu_la-multi.lo
Removing lib/libcurlu_la-multi.o
Removing lib/libcurlu_la-multi_ev.lo
Removing lib/libcurlu_la-multi_ev.o
Removing lib/libcurlu_la-netrc.lo
Removing lib/libcurlu_la-netrc.o
Removing lib/libcurlu_la-noproxy.lo
Removing lib/libcurlu_la-noproxy.o
Removing lib/libcurlu_la-openldap.lo
Removing lib/libcurlu_la-openldap.o
Removing lib/libcurlu_la-parsedate.lo
Removing lib/libcurlu_la-parsedate.o
Removing lib/libcurlu_la-pingpong.lo
Removing lib/libcurlu_la-pingpong.o
Removing lib/libcurlu_la-pop3.lo
Removing lib/libcurlu_la-pop3.o
Removing lib/libcurlu_la-progress.lo
Removing lib/libcurlu_la-progress.o
Removing lib/libcurlu_la-psl.lo
Removing lib/libcurlu_la-psl.o
Removing lib/libcurlu_la-rand.lo
Removing lib/libcurlu_la-rand.o
Removing lib/libcurlu_la-rename.lo
Removing lib/libcurlu_la-rename.o
Removing lib/libcurlu_la-request.lo
Removing lib/libcurlu_la-request.o
Removing lib/libcurlu_la-rtsp.lo
Removing lib/libcurlu_la-rtsp.o
Removing lib/libcurlu_la-select.lo
Removing lib/libcurlu_la-select.o
Removing lib/libcurlu_la-sendf.lo
Removing lib/libcurlu_la-sendf.o
Removing lib/libcurlu_la-setopt.lo
Removing lib/libcurlu_la-setopt.o
Removing lib/libcurlu_la-sha256.lo
Removing lib/libcurlu_la-sha256.o
Removing lib/libcurlu_la-share.lo
Removing lib/libcurlu_la-share.o
Removing lib/libcurlu_la-slist.lo
Removing lib/libcurlu_la-slist.o
Removing lib/libcurlu_la-smb.lo
Removing lib/libcurlu_la-smb.o
Removing lib/libcurlu_la-smtp.lo
Removing lib/libcurlu_la-smtp.o
Removing lib/libcurlu_la-socketpair.lo
Removing lib/libcurlu_la-socketpair.o
Removing lib/libcurlu_la-socks.lo
Removing lib/libcurlu_la-socks.o
Removing lib/libcurlu_la-socks_gssapi.lo
Removing lib/libcurlu_la-socks_gssapi.o
Removing lib/libcurlu_la-socks_sspi.lo
Removing lib/libcurlu_la-socks_sspi.o
Removing lib/libcurlu_la-speedcheck.lo
Removing lib/libcurlu_la-speedcheck.o
Removing lib/libcurlu_la-splay.lo
Removing lib/libcurlu_la-splay.o
Removing lib/libcurlu_la-strcase.lo
Removing lib/libcurlu_la-strcase.o
Removing lib/libcurlu_la-strdup.lo
Removing lib/libcurlu_la-strdup.o
Removing lib/libcurlu_la-strequal.lo
Removing lib/libcurlu_la-strequal.o
Removing lib/libcurlu_la-strerror.lo
Removing lib/libcurlu_la-strerror.o
Removing lib/libcurlu_la-system_win32.lo
Removing lib/libcurlu_la-system_win32.o
Removing lib/libcurlu_la-telnet.lo
Removing lib/libcurlu_la-telnet.o
Removing lib/libcurlu_la-tftp.lo
Removing lib/libcurlu_la-tftp.o
Removing lib/libcurlu_la-transfer.lo
Removing lib/libcurlu_la-transfer.o
Removing lib/libcurlu_la-uint-bset.lo
Removing lib/libcurlu_la-uint-bset.o
Removing lib/libcurlu_la-uint-hash.lo
Removing lib/libcurlu_la-uint-hash.o
Removing lib/libcurlu_la-uint-spbset.lo
Removing lib/libcurlu_la-uint-spbset.o
Removing lib/libcurlu_la-uint-table.lo
Removing lib/libcurlu_la-uint-table.o
Removing lib/libcurlu_la-url.lo
Removing lib/libcurlu_la-url.o
Removing lib/libcurlu_la-urlapi.lo
Removing lib/libcurlu_la-urlapi.o
Removing lib/libcurlu_la-version.lo
Removing lib/libcurlu_la-version.o
Removing lib/libcurlu_la-ws.lo
Removing lib/libcurlu_la-ws.o
Removing lib/stamp-h1
Removing lib/vauth/.deps/
Removing lib/vauth/.dirstamp
Removing lib/vauth/libcurl_la-cleartext.lo
Removing lib/vauth/libcurl_la-cleartext.o
Removing lib/vauth/libcurl_la-cram.lo
Removing lib/vauth/libcurl_la-cram.o
Removing lib/vauth/libcurl_la-digest.lo
Removing lib/vauth/libcurl_la-digest.o
Removing lib/vauth/libcurl_la-digest_sspi.lo
Removing lib/vauth/libcurl_la-digest_sspi.o
Removing lib/vauth/libcurl_la-gsasl.lo
Removing lib/vauth/libcurl_la-gsasl.o
Removing lib/vauth/libcurl_la-krb5_gssapi.lo
Removing lib/vauth/libcurl_la-krb5_gssapi.o
Removing lib/vauth/libcurl_la-krb5_sspi.lo
Removing lib/vauth/libcurl_la-krb5_sspi.o
Removing lib/vauth/libcurl_la-ntlm.lo
Removing lib/vauth/libcurl_la-ntlm.o
Removing lib/vauth/libcurl_la-ntlm_sspi.lo
Removing lib/vauth/libcurl_la-ntlm_sspi.o
Removing lib/vauth/libcurl_la-oauth2.lo
Removing lib/vauth/libcurl_la-oauth2.o
Removing lib/vauth/libcurl_la-spnego_gssapi.lo
Removing lib/vauth/libcurl_la-spnego_gssapi.o
Removing lib/vauth/libcurl_la-spnego_sspi.lo
Removing lib/vauth/libcurl_la-spnego_sspi.o
Removing lib/vauth/libcurl_la-vauth.lo
Removing lib/vauth/libcurl_la-vauth.o
Removing lib/vauth/libcurlu_la-cleartext.lo
Removing lib/vauth/libcurlu_la-cleartext.o
Removing lib/vauth/libcurlu_la-cram.lo
Removing lib/vauth/libcurlu_la-cram.o
Removing lib/vauth/libcurlu_la-digest.lo
Removing lib/vauth/libcurlu_la-digest.o
Removing lib/vauth/libcurlu_la-digest_sspi.lo
Removing lib/vauth/libcurlu_la-digest_sspi.o
Removing lib/vauth/libcurlu_la-gsasl.lo
Removing lib/vauth/libcurlu_la-gsasl.o
Removing lib/vauth/libcurlu_la-krb5_gssapi.lo
Removing lib/vauth/libcurlu_la-krb5_gssapi.o
Removing lib/vauth/libcurlu_la-krb5_sspi.lo
Removing lib/vauth/libcurlu_la-krb5_sspi.o
Removing lib/vauth/libcurlu_la-ntlm.lo
Removing lib/vauth/libcurlu_la-ntlm.o
Removing lib/vauth/libcurlu_la-ntlm_sspi.lo
Removing lib/vauth/libcurlu_la-ntlm_sspi.o
Removing lib/vauth/libcurlu_la-oauth2.lo
Removing lib/vauth/libcurlu_la-oauth2.o
Removing lib/vauth/libcurlu_la-spnego_gssapi.lo
Removing lib/vauth/libcurlu_la-spnego_gssapi.o
Removing lib/vauth/libcurlu_la-spnego_sspi.lo
Removing lib/vauth/libcurlu_la-spnego_sspi.o
Removing lib/vauth/libcurlu_la-vauth.lo
Removing lib/vauth/libcurlu_la-vauth.o
Removing lib/vquic/.deps/
Removing lib/vquic/.dirstamp
Removing lib/vquic/libcurl_la-curl_ngtcp2.lo
Removing lib/vquic/libcurl_la-curl_ngtcp2.o
Removing lib/vquic/libcurl_la-curl_osslq.lo
Removing lib/vquic/libcurl_la-curl_osslq.o
Removing lib/vquic/libcurl_la-curl_quiche.lo
Removing lib/vquic/libcurl_la-curl_quiche.o
Removing lib/vquic/libcurl_la-vquic-tls.lo
Removing lib/vquic/libcurl_la-vquic-tls.o
Removing lib/vquic/libcurl_la-vquic.lo
Removing lib/vquic/libcurl_la-vquic.o
Removing lib/vquic/libcurlu_la-curl_ngtcp2.lo
Removing lib/vquic/libcurlu_la-curl_ngtcp2.o
Removing lib/vquic/libcurlu_la-curl_osslq.lo
Removing lib/vquic/libcurlu_la-curl_osslq.o
Removing lib/vquic/libcurlu_la-curl_quiche.lo
Removing lib/vquic/libcurlu_la-curl_quiche.o
Removing lib/vquic/libcurlu_la-vquic-tls.lo
Removing lib/vquic/libcurlu_la-vquic-tls.o
Removing lib/vquic/libcurlu_la-vquic.lo
Removing lib/vquic/libcurlu_la-vquic.o
Removing lib/vssh/.deps/
Removing lib/vssh/.dirstamp
Removing lib/vssh/libcurl_la-curl_path.lo
Removing lib/vssh/libcurl_la-curl_path.o
Removing lib/vssh/libcurl_la-libssh.lo
Removing lib/vssh/libcurl_la-libssh.o
Removing lib/vssh/libcurl_la-libssh2.lo
Removing lib/vssh/libcurl_la-libssh2.o
Removing lib/vssh/libcurl_la-wolfssh.lo
Removing lib/vssh/libcurl_la-wolfssh.o
Removing lib/vssh/libcurlu_la-curl_path.lo
Removing lib/vssh/libcurlu_la-curl_path.o
Removing lib/vssh/libcurlu_la-libssh.lo
Removing lib/vssh/libcurlu_la-libssh.o
Removing lib/vssh/libcurlu_la-libssh2.lo
Removing lib/vssh/libcurlu_la-libssh2.o
Removing lib/vssh/libcurlu_la-wolfssh.lo
Removing lib/vssh/libcurlu_la-wolfssh.o
Removing lib/vtls/.deps/
Removing lib/vtls/.dirstamp
Removing lib/vtls/libcurl_la-cipher_suite.lo
Removing lib/vtls/libcurl_la-cipher_suite.o
Removing lib/vtls/libcurl_la-gtls.lo
Removing lib/vtls/libcurl_la-gtls.o
Removing lib/vtls/libcurl_la-hostcheck.lo
Removing lib/vtls/libcurl_la-hostcheck.o
Removing lib/vtls/libcurl_la-keylog.lo
Removing lib/vtls/libcurl_la-keylog.o
Removing lib/vtls/libcurl_la-mbedtls.lo
Removing lib/vtls/libcurl_la-mbedtls.o
Removing lib/vtls/libcurl_la-mbedtls_threadlock.lo
Removing lib/vtls/libcurl_la-mbedtls_threadlock.o
Removing lib/vtls/libcurl_la-openssl.lo
Removing lib/vtls/libcurl_la-openssl.o
Removing lib/vtls/libcurl_la-rustls.lo
Removing lib/vtls/libcurl_la-rustls.o
Removing lib/vtls/libcurl_la-schannel.lo
Removing lib/vtls/libcurl_la-schannel.o
Removing lib/vtls/libcurl_la-schannel_verify.lo
Removing lib/vtls/libcurl_la-schannel_verify.o
Removing lib/vtls/libcurl_la-vtls.lo
Removing lib/vtls/libcurl_la-vtls.o
Removing lib/vtls/libcurl_la-vtls_scache.lo
Removing lib/vtls/libcurl_la-vtls_scache.o
Removing lib/vtls/libcurl_la-vtls_spack.lo
Removing lib/vtls/libcurl_la-vtls_spack.o
Removing lib/vtls/libcurl_la-wolfssl.lo
Removing lib/vtls/libcurl_la-wolfssl.o
Removing lib/vtls/libcurl_la-x509asn1.lo
Removing lib/vtls/libcurl_la-x509asn1.o
Removing lib/vtls/libcurlu_la-cipher_suite.lo
Removing lib/vtls/libcurlu_la-cipher_suite.o
Removing lib/vtls/libcurlu_la-gtls.lo
Removing lib/vtls/libcurlu_la-gtls.o
Removing lib/vtls/libcurlu_la-hostcheck.lo
Removing lib/vtls/libcurlu_la-hostcheck.o
Removing lib/vtls/libcurlu_la-keylog.lo
Removing lib/vtls/libcurlu_la-keylog.o
Removing lib/vtls/libcurlu_la-mbedtls.lo
Removing lib/vtls/libcurlu_la-mbedtls.o
Removing lib/vtls/libcurlu_la-mbedtls_threadlock.lo
Removing lib/vtls/libcurlu_la-mbedtls_threadlock.o
Removing lib/vtls/libcurlu_la-openssl.lo
Removing lib/vtls/libcurlu_la-openssl.o
Removing lib/vtls/libcurlu_la-rustls.lo
Removing lib/vtls/libcurlu_la-rustls.o
Removing lib/vtls/libcurlu_la-schannel.lo
Removing lib/vtls/libcurlu_la-schannel.o
Removing lib/vtls/libcurlu_la-schannel_verify.lo
Removing lib/vtls/libcurlu_la-schannel_verify.o
Removing lib/vtls/libcurlu_la-vtls.lo
Removing lib/vtls/libcurlu_la-vtls.o
Removing lib/vtls/libcurlu_la-vtls_scache.lo
Removing lib/vtls/libcurlu_la-vtls_scache.o
Removing lib/vtls/libcurlu_la-vtls_spack.lo
Removing lib/vtls/libcurlu_la-vtls_spack.o
Removing lib/vtls/libcurlu_la-wolfssl.lo
Removing lib/vtls/libcurlu_la-wolfssl.o
Removing lib/vtls/libcurlu_la-x509asn1.lo
Removing lib/vtls/libcurlu_la-x509asn1.o
Removing libcurl.pc
Removing libtool
Removing ltmain.sh
Removing m4/libtool.m4
Removing m4/ltoptions.m4
Removing m4/ltsugar.m4
Removing m4/ltversion.m4
Removing m4/lt~obsolete.m4
Removing missing
Removing packages/Makefile
Removing packages/Makefile.in
Removing packages/vms/Makefile
Removing packages/vms/Makefile.in
Removing scripts/Makefile
Removing scripts/Makefile.in
Removing src/.deps/
Removing src/.libs/
Removing src/Makefile
Removing src/Makefile.in
Removing src/curl
Removing src/curl-config2setopts.o
Removing src/curl-slist_wc.o
Removing src/curl-terminal.o
Removing src/curl-tool_bname.o
Removing src/curl-tool_ca_embed.o
Removing src/curl-tool_cb_dbg.o
Removing src/curl-tool_cb_hdr.o
Removing src/curl-tool_cb_prg.o
Removing src/curl-tool_cb_rea.o
Removing src/curl-tool_cb_see.o
Removing src/curl-tool_cb_soc.o
Removing src/curl-tool_cb_wrt.o
Removing src/curl-tool_cfgable.o
Removing src/curl-tool_dirhie.o
Removing src/curl-tool_doswin.o
Removing src/curl-tool_easysrc.o
Removing src/curl-tool_filetime.o
Removing src/curl-tool_findfile.o
Removing src/curl-tool_formparse.o
Removing src/curl-tool_getparam.o
Removing src/curl-tool_getpass.o
Removing src/curl-tool_help.o
Removing src/curl-tool_helpers.o
Removing src/curl-tool_hugehelp.o
Removing src/curl-tool_ipfs.o
Removing src/curl-tool_libinfo.o
Removing src/curl-tool_listhelp.o
Removing src/curl-tool_main.o
Removing src/curl-tool_msgs.o
Removing src/curl-tool_operate.o
Removing src/curl-tool_operhlp.o
Removing src/curl-tool_paramhlp.o
Removing src/curl-tool_parsecfg.o
Removing src/curl-tool_progress.o
Removing src/curl-tool_setopt.o
Removing src/curl-tool_ssls.o
Removing src/curl-tool_stderr.o
Removing src/curl-tool_strdup.o
Removing src/curl-tool_urlglob.o
Removing src/curl-tool_util.o
Removing src/curl-tool_vms.o
Removing src/curl-tool_writeout.o
Removing src/curl-tool_writeout_json.o
Removing src/curl-tool_xattr.o
Removing src/curl-var.o
Removing src/curlinfo
Removing src/curlinfo.o
Removing src/libcurltool.la
Removing src/libcurltool_la-config2setopts.lo
Removing src/libcurltool_la-config2setopts.o
Removing src/libcurltool_la-slist_wc.lo
Removing src/libcurltool_la-slist_wc.o
Removing src/libcurltool_la-terminal.lo
Removing src/libcurltool_la-terminal.o
Removing src/libcurltool_la-tool_bname.lo
Removing src/libcurltool_la-tool_bname.o
Removing src/libcurltool_la-tool_cb_dbg.lo
Removing src/libcurltool_la-tool_cb_dbg.o
Removing src/libcurltool_la-tool_cb_hdr.lo
Removing src/libcurltool_la-tool_cb_hdr.o
Removing src/libcurltool_la-tool_cb_prg.lo
Removing src/libcurltool_la-tool_cb_prg.o
Removing src/libcurltool_la-tool_cb_rea.lo
Removing src/libcurltool_la-tool_cb_rea.o
Removing src/libcurltool_la-tool_cb_see.lo
Removing src/libcurltool_la-tool_cb_see.o
Removing src/libcurltool_la-tool_cb_soc.lo
Removing src/libcurltool_la-tool_cb_soc.o
Removing src/libcurltool_la-tool_cb_wrt.lo
Removing src/libcurltool_la-tool_cb_wrt.o
Removing src/libcurltool_la-tool_cfgable.lo
Removing src/libcurltool_la-tool_cfgable.o
Removing src/libcurltool_la-tool_dirhie.lo
Removing src/libcurltool_la-tool_dirhie.o
Removing src/libcurltool_la-tool_doswin.lo
Removing src/libcurltool_la-tool_doswin.o
Removing src/libcurltool_la-tool_easysrc.lo
Removing src/libcurltool_la-tool_easysrc.o
Removing src/libcurltool_la-tool_filetime.lo
Removing src/libcurltool_la-tool_filetime.o
Removing src/libcurltool_la-tool_findfile.lo
Removing src/libcurltool_la-tool_findfile.o
Removing src/libcurltool_la-tool_formparse.lo
Removing src/libcurltool_la-tool_formparse.o
Removing src/libcurltool_la-tool_getparam.lo
Removing src/libcurltool_la-tool_getparam.o
Removing src/libcurltool_la-tool_getpass.lo
Removing src/libcurltool_la-tool_getpass.o
Removing src/libcurltool_la-tool_help.lo
Removing src/libcurltool_la-tool_help.o
Removing src/libcurltool_la-tool_helpers.lo
Removing src/libcurltool_la-tool_helpers.o
Removing src/libcurltool_la-tool_ipfs.lo
Removing src/libcurltool_la-tool_ipfs.o
Removing src/libcurltool_la-tool_libinfo.lo
Removing src/libcurltool_la-tool_libinfo.o
Removing src/libcurltool_la-tool_listhelp.lo
Removing src/libcurltool_la-tool_listhelp.o
Removing src/libcurltool_la-tool_main.lo
Removing src/libcurltool_la-tool_main.o
Removing src/libcurltool_la-tool_msgs.lo
Removing src/libcurltool_la-tool_msgs.o
Removing src/libcurltool_la-tool_operate.lo
Removing src/libcurltool_la-tool_operate.o
Removing src/libcurltool_la-tool_operhlp.lo
Removing src/libcurltool_la-tool_operhlp.o
Removing src/libcurltool_la-tool_paramhlp.lo
Removing src/libcurltool_la-tool_paramhlp.o
Removing src/libcurltool_la-tool_parsecfg.lo
Removing src/libcurltool_la-tool_parsecfg.o
Removing src/libcurltool_la-tool_progress.lo
Removing src/libcurltool_la-tool_progress.o
Removing src/libcurltool_la-tool_setopt.lo
Removing src/libcurltool_la-tool_setopt.o
Removing src/libcurltool_la-tool_ssls.lo
Removing src/libcurltool_la-tool_ssls.o
Removing src/libcurltool_la-tool_stderr.lo
Removing src/libcurltool_la-tool_stderr.o
Removing src/libcurltool_la-tool_strdup.lo
Removing src/libcurltool_la-tool_strdup.o
Removing src/libcurltool_la-tool_urlglob.lo
Removing src/libcurltool_la-tool_urlglob.o
Removing src/libcurltool_la-tool_util.lo
Removing src/libcurltool_la-tool_util.o
Removing src/libcurltool_la-tool_vms.lo
Removing src/libcurltool_la-tool_vms.o
Removing src/libcurltool_la-tool_writeout.lo
Removing src/libcurltool_la-tool_writeout.o
Removing src/libcurltool_la-tool_writeout_json.lo
Removing src/libcurltool_la-tool_writeout_json.o
Removing src/libcurltool_la-tool_xattr.lo
Removing src/libcurltool_la-tool_xattr.o
Removing src/libcurltool_la-var.lo
Removing src/libcurltool_la-var.o
Removing src/tool_ca_embed.c
Removing src/tool_hugehelp.c
Removing tests/Makefile
Removing tests/Makefile.in
Removing tests/certs/Makefile
Removing tests/certs/Makefile.in
Removing tests/config
Removing tests/configurehelp.pm
Removing tests/data/Makefile
Removing tests/data/Makefile.in
Removing tests/http/Makefile
Removing tests/http/Makefile.in
Removing tests/http/config.ini
Removing tests/libtest/.deps/
Removing tests/libtest/Makefile
Removing tests/libtest/Makefile.in
Removing tests/server/.deps/
Removing tests/server/Makefile
Removing tests/server/Makefile.in
Removing tests/tunit/.deps/
Removing tests/tunit/Makefile
Removing tests/tunit/Makefile.in
Removing tests/unit/.deps/
Removing tests/unit/Makefile
Removing tests/unit/Makefile.in
$ autoreconf -fi
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:128: installing './compile'
configure.ac:452: installing './config.guess'
configure.ac:452: installing './config.sub'
configure.ac:128: installing './install-sh'
configure.ac:134: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
$ bash -c find . -name config.guess -exec cp /usr/share/misc/config.guess {} \;
$ bash -c find . -name config.sub -exec cp /usr/share/misc/config.sub {} \;
$ chmod +x configure
$ ./configure --disable-shared --without-ssl --disable-docs
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable HTTPSRR support... no
checking whether to enable ECH support... no
checking whether to enable SSL session export support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking that grep -E works... yes
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... ccache gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether ccache gcc accepts -g... yes
checking for ccache gcc option to enable C11 features... none needed
checking whether ccache gcc understands -c and -o together... yes
checking how to run the C preprocessor... ccache gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdatomic.h... yes
checking if _Atomic is available... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of ccache gcc... gcc3
checking curl version... 8.16.0-DEV
checking for perl... /usr/bin/perl
checking for httpd... no
checking for apache2... no
checking for apxs... no
configure: httpd/apache2 not in PATH, http tests disabled
configure: apxs not in PATH, http tests disabled
checking for danted... no
checking for danted... no
checking for nghttpx... no
checking for caddy... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... no
checking if _REENTRANT is actually needed... no
checking if _REENTRANT is onwards defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by ccache gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from ccache gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if ccache gcc supports -fno-rtti -fno-exceptions... no
checking for ccache gcc option to produce PIC... -fPIC -DPIC
checking if ccache gcc PIC flag -fPIC -DPIC works... yes
checking if ccache gcc static flag -static works... yes
checking if ccache gcc supports -c -o file.o... yes
checking if ccache gcc supports -c -o file.o... (cached) yes
checking whether the ccache gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... no
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... yes
checking whether to build shared libraries only... no
checking whether to build static libraries only... yes
checking for windres... no
checking if cpp -P is needed... yes
checking if cpp -P works... yes
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking compiler version... gcc '1100' (raw: '11')
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking whether build target is a native Windows one... no
checking if compiler accepts some basic options... yes
configure: compiler options added: -Werror-implicit-function-declaration
checking if compiler optimizer assumed setting might be used... yes
checking if compiler accepts optimizer enabling options... yes
configure: compiler options added: -O2
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
checking whether build target supports Win32 crypto API... no
checking whether to build libcurl and curl in "unity" mode... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support IPFS... yes
checking whether to support ldap... yes
checking whether to support ldaps... yes
checking whether to support rtsp... yes
checking whether to support proxies... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to support pop3... yes
checking whether to support imap... yes
checking whether to support smb... yes
checking whether to support smtp... yes
checking whether to support gopher... yes
checking whether to support mqtt... no
checking whether to provide built-in manual... yes
checking whether to build documentation... no
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... yes
checking whether build target is a native Windows one... (cached) no
checking for proto/bsdsocket.h... no
checking for connect in libraries... yes
checking for sys/types.h... (cached) yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking if monotonic clock_gettime works... yes
checking for sys/types.h... (cached) yes
checking for raw monotonic clock_gettime... yes
checking for pkg-config... /usr/bin/pkg-config
checking for zlib options with pkg-config... found
checking for zlib.h... yes
configure: found both libz and libz.h header
checking for BrotliDecoderDecompress in -lbrotlidec... no
checking for brotli/decode.h... no
checking for ZSTD_createDStream in -lzstd... no
checking for zstd.h... no
checking whether to enable IPv6... yes
checking if struct sockaddr_in6 has sin6_scope_id member... yes
checking if argv can be written to... yes
checking if GSS-API support is requested... no
checking whether to enable Windows native SSL/TLS... no
checking whether to enable Amiga native SSL/TLS (AmiSSL v5)... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libpsl options with pkg-config... found
checking for psl_builtin in -lpsl... yes
checking for libpsl.h... yes
checking for library containing gsasl_init... no
checking for lber.h... no
checking for ldap.h... no
checking for ldap_ssl.h... no
checking for LDAP libraries... cannot find LDAP libraries
checking for RTMP_Init in -lrtmp... no
checking whether versioned symbols are wanted... no
checking whether to build with libidn2... (assumed) yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libidn2 options with pkg-config... no
configure: IDN_LIBS: "-lidn2"
configure: IDN_LDFLAGS: ""
configure: IDN_CPPFLAGS: ""
configure: IDN_DIR: ""
checking if idn2_lookup_ul can be linked... no
checking for idn2.h... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libnghttp2 options with pkg-config... no
checking for nghttp2_session_get_stream_local_window_size in -lnghttp2... no
checking for sys/types.h... (cached) yes
checking for sys/select.h... yes
checking for sys/ioctl.h... yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for net/if.h... yes
checking for netinet/in.h... yes
checking for netinet/in6.h... no
checking for sys/un.h... yes
checking for linux/tcp.h... yes
checking for netinet/tcp.h... yes
checking for netinet/udp.h... yes
checking for netdb.h... yes
checking for sys/sockio.h... no
checking for sys/param.h... yes
checking for termios.h... yes
checking for termio.h... yes
checking for fcntl.h... yes
checking for io.h... no
checking for pwd.h... yes
checking for utime.h... yes
checking for sys/utime.h... no
checking for sys/poll.h... yes
checking for poll.h... yes
checking for sys/resource.h... yes
checking for libgen.h... yes
checking for locale.h... yes
checking for stdbool.h... yes
checking for stdint.h... (cached) yes
checking for sys/filio.h... no
checking for sys/eventfd.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for sys/types.h... (cached) yes
checking for struct timeval... yes
checking run-time libs availability... fine
checking size of size_t... 8
checking size of long... 8
checking size of int... 4
checking size of time_t... 8
checking size of off_t... 8
checking size of curl_off_t... 8
checking size of curl_socket_t... 4
checking for long long... yes
checking for ssize_t... yes
checking for bool... yes
checking for sa_family_t... yes
checking for suseconds_t... yes
checking if time_t is unsigned... no
checking for struct sockaddr_storage... yes
checking for sys/select.h... (cached) yes
checking for select... yes
checking for sys/types.h... (cached) yes
checking for recv... yes
checking for sys/types.h... (cached) yes
checking for send... yes
checking for sys/types.h... (cached) yes
checking for MSG_NOSIGNAL... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking if alarm can be linked... yes
checking if alarm is prototyped... yes
checking if alarm is compilable... yes
checking if alarm usage allowed... yes
checking if alarm might be used... yes
checking for sys/types.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for libgen.h... (cached) yes
checking if basename can be linked... yes
checking if basename is prototyped... yes
checking if basename is compilable... yes
checking if basename usage allowed... yes
checking if basename might be used... yes
checking if closesocket can be linked... no
checking if closesocket might be used... no
checking for sys/types.h... (cached) yes
checking if CloseSocket can be linked... no
checking if CloseSocket might be used... no
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for fcntl.h... (cached) yes
checking if fcntl can be linked... yes
checking if fcntl is prototyped... yes
checking if fcntl is compilable... yes
checking if fcntl usage allowed... yes
checking if fcntl might be used... yes
checking if fcntl O_NONBLOCK is compilable... yes
checking if fcntl O_NONBLOCK usage allowed... yes
checking if fcntl O_NONBLOCK might be used... yes
checking whether build target is a native Windows one... (cached) no
checking for sys/types.h... (cached) yes
checking for netdb.h... (cached) yes
checking if freeaddrinfo can be linked... yes
checking if freeaddrinfo is prototyped... yes
checking if freeaddrinfo is compilable... yes
checking if freeaddrinfo usage allowed... yes
checking if freeaddrinfo might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/xattr.h... yes
checking if fsetxattr can be linked... yes
checking if fsetxattr is prototyped... yes
checking if fsetxattr takes 5 args.... yes
checking if fsetxattr is compilable... yes
checking if fsetxattr usage allowed... yes
checking if fsetxattr might be used... yes
checking if ftruncate can be linked... yes
checking if ftruncate is prototyped... yes
checking if ftruncate is compilable... yes
checking if ftruncate usage allowed... yes
checking if ftruncate might be used... yes
checking for sys/types.h... (cached) yes
checking if getaddrinfo can be linked... yes
checking if getaddrinfo is prototyped... yes
checking if getaddrinfo is compilable... yes
checking if getaddrinfo seems to work... yes
checking if getaddrinfo usage allowed... yes
checking if getaddrinfo might be used... yes
checking if getaddrinfo is threadsafe... yes
checking if gethostbyname_r can be linked... yes
checking if gethostbyname_r is prototyped... yes
checking if gethostbyname_r takes 3 args.... no
checking if gethostbyname_r takes 5 args.... no
checking if gethostbyname_r takes 6 args.... yes
checking if gethostbyname_r is compilable... yes
checking if gethostbyname_r usage allowed... yes
checking if gethostbyname_r might be used... yes
checking if gethostname can be linked... yes
checking if gethostname is prototyped... yes
checking if gethostname is compilable... yes
checking for gethostname arg 2 data type... size_t
checking if gethostname usage allowed... yes
checking if gethostname might be used... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for ifaddrs.h... yes
checking if getifaddrs can be linked... yes
checking if getifaddrs is prototyped... yes
checking if getifaddrs is compilable... yes
checking if getifaddrs seems to work... yes
checking if getifaddrs usage allowed... yes
checking if getifaddrs might be used... yes
checking if getpeername can be linked... yes
checking if getpeername is prototyped... yes
checking if getpeername is compilable... yes
checking if getpeername usage allowed... yes
checking if getpeername might be used... yes
checking if getsockname can be linked... yes
checking if getsockname is prototyped... yes
checking if getsockname is compilable... yes
checking if getsockname usage allowed... yes
checking if getsockname might be used... yes
checking for sys/types.h... (cached) yes
checking if gmtime_r can be linked... yes
checking if gmtime_r is prototyped... yes
checking if gmtime_r is compilable... yes
checking if gmtime_r seems to work... yes
checking if gmtime_r usage allowed... yes
checking if gmtime_r might be used... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for stropts.h... no
checking if ioctl can be linked... yes
checking if ioctl is prototyped... yes
checking if ioctl is compilable... yes
checking if ioctl usage allowed... yes
checking if ioctl might be used... yes
checking if ioctl FIONBIO is compilable... yes
checking if ioctl FIONBIO usage allowed... yes
checking if ioctl FIONBIO might be used... yes
checking if ioctl SIOCGIFADDR is compilable... yes
checking if ioctl SIOCGIFADDR usage allowed... yes
checking if ioctl SIOCGIFADDR might be used... yes
checking if ioctlsocket can be linked... no
checking if ioctlsocket might be used... no
checking if IoctlSocket can be linked... no
checking if IoctlSocket might be used... no
checking if memrchr can be linked... yes
checking if memrchr is prototyped... yes
checking if memrchr is compilable... yes
checking if memrchr usage allowed... yes
checking if memrchr might be used... yes
checking for sys/types.h... (cached) yes
checking if sigaction can be linked... yes
checking if sigaction is prototyped... yes
checking if sigaction is compilable... yes
checking if sigaction usage allowed... yes
checking if sigaction might be used... yes
checking if siginterrupt can be linked... yes
checking if siginterrupt is prototyped... yes
checking if siginterrupt is compilable... yes
checking if siginterrupt usage allowed... yes
checking if siginterrupt might be used... yes
checking if signal can be linked... yes
checking if signal is prototyped... yes
checking if signal is compilable... yes
checking if signal usage allowed... yes
checking if signal might be used... yes
checking for sys/types.h... (cached) yes
checking if sigsetjmp can be linked... no
checking if sigsetjmp seems a macro... yes
checking if sigsetjmp is compilable... yes
checking if sigsetjmp usage allowed... yes
checking if sigsetjmp might be used... yes
checking if socket can be linked... yes
checking if socket is prototyped... yes
checking if socket is compilable... yes
checking if socket usage allowed... yes
checking if socket might be used... yes
checking if socketpair can be linked... yes
checking if socketpair is prototyped... yes
checking if socketpair is compilable... yes
checking if socketpair usage allowed... yes
checking if socketpair might be used... yes
checking if strdup can be linked... yes
checking if strdup is prototyped... yes
checking if strdup is compilable... yes
checking if strdup usage allowed... yes
checking if strdup might be used... yes
checking if strerror_r can be linked... yes
checking if strerror_r is prototyped... yes
checking if strerror_r is compilable... yes
checking if strerror_r is glibc like... yes
checking if strerror_r seems to work... yes
checking if strerror_r usage allowed... yes
checking if strerror_r might be used... yes
checking for accept4... yes
checking for eventfd... yes
checking for fnmatch... yes
checking for geteuid... yes
checking for getpass_r... no
checking for getppid... yes
checking for getpwuid... yes
checking for getpwuid_r... yes
checking for getrlimit... yes
checking for gettimeofday... yes
checking for mach_absolute_time... no
checking for pipe... yes
checking for pipe2... yes
checking for poll... yes
checking for sendmmsg... yes
checking for sendmsg... yes
checking for setlocale... yes
checking for setrlimit... yes
checking for snprintf... yes
checking for utime... yes
checking for utimes... yes
checking for if_nametoindex... yes
checking for realpath... yes
checking for sched_yield... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking if inet_ntop can be linked... yes
checking if inet_ntop is prototyped... yes
checking if inet_ntop is compilable... yes
checking if inet_ntop seems to work... yes
checking if inet_ntop usage allowed... yes
checking if inet_ntop might be used... yes
checking if inet_pton can be linked... yes
checking if inet_pton is prototyped... yes
checking if inet_pton is compilable... yes
checking if inet_pton seems to work... yes
checking if inet_pton usage allowed... yes
checking if inet_pton might be used... yes
checking if strcasecmp can be linked... yes
checking if strcasecmp is prototyped... yes
checking if strcasecmp is compilable... yes
checking if strcasecmp usage allowed... yes
checking if strcasecmp might be used... yes
checking if strcmpi can be linked... no
checking if strcmpi might be used... no
checking if stricmp can be linked... no
checking if stricmp might be used... no
checking for setmode... no
checking for arc4random... no
checking for fseeko... yes
checking for ccache gcc options needed to detect all undeclared functions... none needed
checking whether fseeko is declared... yes
checking how to set a socket into non-blocking mode... fcntl O_NONBLOCK
checking whether to enable the threaded resolver... yes
checking for pthread.h... yes
checking for pthread_create... yes
checking for dirent.h... yes
checking for opendir... yes
checking convert -I options to -isystem... yes
checking whether to enable verbose strings... yes
checking whether to enable SSPI support (Windows native builds only)... no
checking whether to enable basic authentication method... yes
checking whether to enable bearer authentication method... yes
checking whether to enable digest authentication method... yes
checking whether to enable kerberos authentication method... yes
checking whether to enable negotiate authentication method... yes
checking whether to enable aws sig methods... yes
checking whether to support NTLM... yes
checking whether to enable TLS-SRP authentication... yes
checking whether to enable Unix domain sockets... auto
checking for struct sockaddr_un.sun_path... yes
checking whether to support cookies... yes
checking whether to support socketpair... yes
checking whether to support HTTP authentication... yes
checking whether to support DoH... yes
checking whether to support the MIME API... yes
checking whether to support binding connections locally... yes
checking whether to support the form API... yes
checking whether to support date parsing... yes
checking whether to support netrc parsing... yes
checking whether to support progress-meter... yes
checking whether to support the SHA-512/256 hash algorithm... yes
checking whether to support DNS shuffling... yes
checking whether to support curl_easy_option*... yes
checking whether to support alt-svc... yes
checking whether to support headers-api... yes
configure: disables HSTS due to lack of SSL
checking whether to enable HTTPS-RR support... no
checking whether to support WebSockets... yes
checking whether hiding of library internal symbols will actually happen... yes
checking if this build supports HTTPS-proxy... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/examples/Makefile
config.status: creating docs/libcurl/Makefile
config.status: creating docs/libcurl/opts/Makefile
config.status: creating docs/cmdline-opts/Makefile
config.status: creating include/Makefile
config.status: creating include/curl/Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating scripts/Makefile
config.status: creating lib/libcurl.vers
config.status: creating tests/Makefile
config.status: creating tests/config
config.status: creating tests/configurehelp.pm
config.status: creating tests/certs/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/tunit/Makefile
config.status: creating tests/http/config.ini
config.status: creating tests/http/Makefile
config.status: creating packages/Makefile
config.status: creating packages/vms/Makefile
config.status: creating curl-config
config.status: creating libcurl.pc
config.status: creating lib/curl_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Configured to build curl/libcurl:
Host setup: x86_64-pc-linux-gnu
Install prefix: /usr/local
Compiler: ccache gcc
CFLAGS: -Werror-implicit-function-declaration -O2 -Wno-system-headers
CFLAGS extras:
CPPFLAGS: -D_GNU_SOURCE
LDFLAGS:
curl-config:
LIBS: -lpsl -lz
curl version: 8.16.0-DEV
SSL: no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,amissl,rustls} )
SSH: no (--with-{libssh,libssh2})
zlib: enabled
brotli: no (--with-brotli)
zstd: no (--with-zstd)
GSS-API: no (--with-gssapi)
GSASL: no (libgsasl not found)
TLS-SRP: no (--enable-tls-srp)
resolver: POSIX threaded
IPv6: enabled
Unix sockets: enabled
IDN: no (--with-{libidn2,winidn})
Build docs: no
Build libcurl: Shared=no, Static=yes
Built-in manual: no (--enable-manual)
--libcurl option: enabled (--disable-libcurl-option)
Verbose errors: enabled (--disable-verbose)
Code coverage: disabled
SSPI: no (--enable-sspi)
ca cert bundle: no
ca cert path:
ca cert embed: no
ca fallback:
LDAP: no (--enable-ldap / --with-ldap-lib / --with-lber-lib)
LDAPS: no (--enable-ldaps)
IPFS/IPNS: enabled
RTSP: enabled
RTMP: no (--with-librtmp)
PSL: enabled
Alt-svc: enabled (--disable-alt-svc)
Headers API: enabled (--disable-headers-api)
HSTS: no (--enable-hsts)
HTTP1: enabled (internal)
HTTP2: no (--with-nghttp2)
HTTP3: no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic)
ECH: no (--enable-ech)
HTTPS RR: no (--enable-httpsrr)
SSLS-EXPORT: no (--enable-ssls-export)
Protocols: dict file ftp gopher http imap ipfs ipns mqtt pop3 rtsp smtp telnet tftp ws
Features: alt-svc AsynchDNS IPv6 Largefile libz PSL threadsafe UnixSockets
configure: WARNING: libgsasl was not found
configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
configure: WARNING: Cannot find libidn2
$ make -j3
Making all in lib
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
make all-am
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
CC libcurl_la-altsvc.lo
CC libcurl_la-amigaos.lo
CC libcurl_la-asyn-ares.lo
CC libcurl_la-asyn-base.lo
CC libcurl_la-asyn-thrdd.lo
CC libcurl_la-bufq.lo
CC libcurl_la-bufref.lo
CC libcurl_la-cf-h1-proxy.lo
CC libcurl_la-cf-h2-proxy.lo
CC libcurl_la-cf-haproxy.lo
CC libcurl_la-cf-https-connect.lo
CC libcurl_la-cf-ip-happy.lo
CC libcurl_la-cf-socket.lo
CC libcurl_la-cfilters.lo
CC libcurl_la-conncache.lo
CC libcurl_la-connect.lo
CC libcurl_la-content_encoding.lo
CC libcurl_la-cookie.lo
CC libcurl_la-cshutdn.lo
CC libcurl_la-curl_addrinfo.lo
CC libcurl_la-curl_des.lo
CC libcurl_la-curl_endian.lo
CC libcurl_la-curl_fnmatch.lo
CC libcurl_la-curl_get_line.lo
CC libcurl_la-curl_gethostname.lo
CC libcurl_la-curl_gssapi.lo
CC libcurl_la-curl_memrchr.lo
CC libcurl_la-curl_ntlm_core.lo
CC libcurl_la-curl_range.lo
CC libcurl_la-curl_rtmp.lo
CC libcurl_la-curl_sasl.lo
CC libcurl_la-curl_sha512_256.lo
CC libcurl_la-curl_sspi.lo
CC libcurl_la-curl_threads.lo
CC libcurl_la-curl_trc.lo
CC libcurl_la-cw-out.lo
CC libcurl_la-cw-pause.lo
CC libcurl_la-dict.lo
CC libcurl_la-doh.lo
CC libcurl_la-dynhds.lo
CC libcurl_la-easy.lo
CC libcurl_la-easygetopt.lo
CC libcurl_la-easyoptions.lo
CC libcurl_la-escape.lo
CC libcurl_la-fake_addrinfo.lo
CC libcurl_la-file.lo
CC libcurl_la-fileinfo.lo
CC libcurl_la-fopen.lo
CC libcurl_la-formdata.lo
CC libcurl_la-ftp.lo
CC libcurl_la-ftplistparser.lo
CC libcurl_la-getenv.lo
CC libcurl_la-getinfo.lo
CC libcurl_la-gopher.lo
CC libcurl_la-hash.lo
CC libcurl_la-headers.lo
CC libcurl_la-hmac.lo
CC libcurl_la-hostip.lo
CC libcurl_la-hostip4.lo
CC libcurl_la-hostip6.lo
CC libcurl_la-http.lo
CC libcurl_la-http1.lo
CC libcurl_la-hsts.lo
CC libcurl_la-http2.lo
CC libcurl_la-http_aws_sigv4.lo
CC libcurl_la-http_chunks.lo
CC libcurl_la-http_digest.lo
CC libcurl_la-http_negotiate.lo
CC libcurl_la-http_ntlm.lo
CC libcurl_la-http_proxy.lo
CC libcurl_la-httpsrr.lo
CC libcurl_la-idn.lo
CC libcurl_la-if2ip.lo
CC libcurl_la-imap.lo
CC libcurl_la-krb5.lo
CC libcurl_la-ldap.lo
CC libcurl_la-llist.lo
CC libcurl_la-macos.lo
CC libcurl_la-md4.lo
CC libcurl_la-md5.lo
CC libcurl_la-memdebug.lo
CC libcurl_la-mime.lo
CC libcurl_la-mprintf.lo
CC libcurl_la-mqtt.lo
CC libcurl_la-multi.lo
CC libcurl_la-multi_ev.lo
CC libcurl_la-netrc.lo
CC libcurl_la-noproxy.lo
CC libcurl_la-openldap.lo
CC libcurl_la-parsedate.lo
CC libcurl_la-pingpong.lo
CC libcurl_la-pop3.lo
CC libcurl_la-progress.lo
CC libcurl_la-psl.lo
CC libcurl_la-rand.lo
CC libcurl_la-rename.lo
CC libcurl_la-request.lo
CC libcurl_la-rtsp.lo
CC libcurl_la-select.lo
CC libcurl_la-sendf.lo
CC libcurl_la-setopt.lo
CC libcurl_la-sha256.lo
CC libcurl_la-share.lo
CC libcurl_la-slist.lo
CC libcurl_la-smb.lo
CC libcurl_la-smtp.lo
CC libcurl_la-socketpair.lo
CC libcurl_la-socks.lo
CC libcurl_la-socks_gssapi.lo
CC libcurl_la-socks_sspi.lo
CC libcurl_la-speedcheck.lo
CC libcurl_la-splay.lo
CC libcurl_la-strcase.lo
CC libcurl_la-strdup.lo
CC libcurl_la-strequal.lo
CC libcurl_la-strerror.lo
CC libcurl_la-system_win32.lo
CC libcurl_la-telnet.lo
CC libcurl_la-tftp.lo
CC libcurl_la-transfer.lo
CC libcurl_la-uint-bset.lo
CC libcurl_la-uint-hash.lo
CC libcurl_la-uint-table.lo
CC libcurl_la-uint-spbset.lo
CC libcurl_la-url.lo
CC libcurl_la-version.lo
CC libcurl_la-urlapi.lo
CC libcurl_la-ws.lo
CC libcurlu_la-altsvc.lo
CC libcurlu_la-amigaos.lo
CC libcurlu_la-asyn-ares.lo
CC libcurlu_la-asyn-base.lo
CC libcurlu_la-asyn-thrdd.lo
CC libcurlu_la-bufq.lo
CC libcurlu_la-bufref.lo
CC libcurlu_la-cf-h1-proxy.lo
CC libcurlu_la-cf-h2-proxy.lo
CC libcurlu_la-cf-haproxy.lo
CC libcurlu_la-cf-https-connect.lo
CC libcurlu_la-cf-ip-happy.lo
CC libcurlu_la-cf-socket.lo
CC libcurlu_la-cfilters.lo
CC libcurlu_la-conncache.lo
CC libcurlu_la-connect.lo
CC libcurlu_la-content_encoding.lo
CC libcurlu_la-cookie.lo
CC libcurlu_la-cshutdn.lo
CC libcurlu_la-curl_addrinfo.lo
CC libcurlu_la-curl_des.lo
CC libcurlu_la-curl_endian.lo
CC libcurlu_la-curl_fnmatch.lo
CC libcurlu_la-curl_get_line.lo
CC libcurlu_la-curl_gethostname.lo
CC libcurlu_la-curl_gssapi.lo
CC libcurlu_la-curl_memrchr.lo
CC libcurlu_la-curl_ntlm_core.lo
CC libcurlu_la-curl_range.lo
CC libcurlu_la-curl_rtmp.lo
CC libcurlu_la-curl_sasl.lo
CC libcurlu_la-curl_sha512_256.lo
CC libcurlu_la-curl_sspi.lo
CC libcurlu_la-curl_threads.lo
CC libcurlu_la-curl_trc.lo
CC libcurlu_la-cw-out.lo
CC libcurlu_la-cw-pause.lo
CC libcurlu_la-dict.lo
CC libcurlu_la-doh.lo
CC libcurlu_la-dynhds.lo
CC libcurlu_la-easy.lo
CC libcurlu_la-easygetopt.lo
CC libcurlu_la-easyoptions.lo
CC libcurlu_la-escape.lo
CC libcurlu_la-fake_addrinfo.lo
CC libcurlu_la-file.lo
CC libcurlu_la-fileinfo.lo
CC libcurlu_la-fopen.lo
CC libcurlu_la-formdata.lo
CC libcurlu_la-ftp.lo
CC libcurlu_la-ftplistparser.lo
CC libcurlu_la-getenv.lo
CC libcurlu_la-getinfo.lo
CC libcurlu_la-gopher.lo
CC libcurlu_la-hash.lo
CC libcurlu_la-headers.lo
CC libcurlu_la-hmac.lo
CC libcurlu_la-hostip.lo
CC libcurlu_la-hostip4.lo
CC libcurlu_la-hostip6.lo
CC libcurlu_la-hsts.lo
CC libcurlu_la-http.lo
CC libcurlu_la-http1.lo
CC libcurlu_la-http2.lo
CC libcurlu_la-http_aws_sigv4.lo
CC libcurlu_la-http_chunks.lo
CC libcurlu_la-http_digest.lo
CC libcurlu_la-http_negotiate.lo
CC libcurlu_la-http_ntlm.lo
CC libcurlu_la-http_proxy.lo
CC libcurlu_la-httpsrr.lo
CC libcurlu_la-idn.lo
CC libcurlu_la-if2ip.lo
CC libcurlu_la-imap.lo
CC libcurlu_la-krb5.lo
CC libcurlu_la-llist.lo
CC libcurlu_la-ldap.lo
CC libcurlu_la-macos.lo
CC libcurlu_la-md4.lo
CC libcurlu_la-md5.lo
CC libcurlu_la-memdebug.lo
CC libcurlu_la-mime.lo
CC libcurlu_la-mprintf.lo
CC libcurlu_la-mqtt.lo
CC libcurlu_la-multi.lo
CC libcurlu_la-multi_ev.lo
CC libcurlu_la-netrc.lo
CC libcurlu_la-noproxy.lo
CC libcurlu_la-openldap.lo
CC libcurlu_la-parsedate.lo
CC libcurlu_la-pingpong.lo
CC libcurlu_la-pop3.lo
CC libcurlu_la-progress.lo
CC libcurlu_la-psl.lo
CC libcurlu_la-rename.lo
CC libcurlu_la-rand.lo
CC libcurlu_la-request.lo
CC libcurlu_la-rtsp.lo
CC libcurlu_la-select.lo
CC libcurlu_la-sendf.lo
CC libcurlu_la-setopt.lo
CC libcurlu_la-sha256.lo
CC libcurlu_la-share.lo
CC libcurlu_la-slist.lo
CC libcurlu_la-smb.lo
CC libcurlu_la-smtp.lo
CC libcurlu_la-socketpair.lo
CC libcurlu_la-socks.lo
CC libcurlu_la-socks_gssapi.lo
CC libcurlu_la-socks_sspi.lo
CC libcurlu_la-speedcheck.lo
CC libcurlu_la-splay.lo
CC libcurlu_la-strcase.lo
CC libcurlu_la-strdup.lo
CC libcurlu_la-strequal.lo
CC libcurlu_la-strerror.lo
CC libcurlu_la-system_win32.lo
CC libcurlu_la-telnet.lo
CC libcurlu_la-tftp.lo
CC libcurlu_la-transfer.lo
CC libcurlu_la-uint-bset.lo
CC libcurlu_la-uint-hash.lo
CC libcurlu_la-uint-spbset.lo
CC libcurlu_la-uint-table.lo
CC libcurlu_la-url.lo
CC libcurlu_la-urlapi.lo
CC libcurlu_la-version.lo
CC libcurlu_la-ws.lo
CC vauth/libcurlu_la-cleartext.lo
CC vauth/libcurlu_la-cram.lo
CC vauth/libcurlu_la-digest.lo
CC vauth/libcurlu_la-digest_sspi.lo
CC vauth/libcurlu_la-gsasl.lo
CC vauth/libcurlu_la-krb5_gssapi.lo
CC vauth/libcurlu_la-krb5_sspi.lo
CC vauth/libcurlu_la-ntlm.lo
CC vauth/libcurlu_la-ntlm_sspi.lo
CC vauth/libcurlu_la-oauth2.lo
CC vauth/libcurlu_la-spnego_gssapi.lo
CC vauth/libcurlu_la-spnego_sspi.lo
CC vauth/libcurlu_la-vauth.lo
CC vtls/libcurlu_la-cipher_suite.lo
CC vtls/libcurlu_la-gtls.lo
CC vtls/libcurlu_la-hostcheck.lo
CC vtls/libcurlu_la-keylog.lo
CC vtls/libcurlu_la-mbedtls.lo
CC vtls/libcurlu_la-mbedtls_threadlock.lo
CC vtls/libcurlu_la-openssl.lo
CC vtls/libcurlu_la-rustls.lo
CC vtls/libcurlu_la-schannel.lo
CC vtls/libcurlu_la-schannel_verify.lo
CC vtls/libcurlu_la-vtls.lo
CC vtls/libcurlu_la-vtls_scache.lo
CC vtls/libcurlu_la-vtls_spack.lo
CC vtls/libcurlu_la-wolfssl.lo
CC vtls/libcurlu_la-x509asn1.lo
CC vquic/libcurlu_la-curl_ngtcp2.lo
CC vquic/libcurlu_la-curl_osslq.lo
CC vquic/libcurlu_la-curl_quiche.lo
CC vquic/libcurlu_la-vquic.lo
CC vquic/libcurlu_la-vquic-tls.lo
CC vssh/libcurlu_la-libssh.lo
CC vssh/libcurlu_la-libssh2.lo
CC vssh/libcurlu_la-curl_path.lo
CC vssh/libcurlu_la-wolfssh.lo
CC curlx/libcurlu_la-base64.lo
CC curlx/libcurlu_la-dynbuf.lo
CC curlx/libcurlu_la-inet_ntop.lo
CC curlx/libcurlu_la-inet_pton.lo
CC curlx/libcurlu_la-multibyte.lo
CC curlx/libcurlu_la-nonblock.lo
CC curlx/libcurlu_la-strparse.lo
CC curlx/libcurlu_la-timediff.lo
CC curlx/libcurlu_la-timeval.lo
CC curlx/libcurlu_la-version_win32.lo
CC curlx/libcurlu_la-wait.lo
CC curlx/libcurlu_la-warnless.lo
CC curlx/libcurlu_la-winapi.lo
CC vauth/libcurl_la-cleartext.lo
CC vauth/libcurl_la-cram.lo
CC vauth/libcurl_la-digest.lo
CC vauth/libcurl_la-digest_sspi.lo
CC vauth/libcurl_la-gsasl.lo
CC vauth/libcurl_la-krb5_gssapi.lo
CC vauth/libcurl_la-krb5_sspi.lo
CC vauth/libcurl_la-ntlm.lo
CC vauth/libcurl_la-ntlm_sspi.lo
CC vauth/libcurl_la-oauth2.lo
CC vauth/libcurl_la-spnego_gssapi.lo
CC vauth/libcurl_la-spnego_sspi.lo
CC vauth/libcurl_la-vauth.lo
CC vtls/libcurl_la-cipher_suite.lo
CC vtls/libcurl_la-gtls.lo
CC vtls/libcurl_la-keylog.lo
CC vtls/libcurl_la-hostcheck.lo
CC vtls/libcurl_la-mbedtls.lo
CC vtls/libcurl_la-mbedtls_threadlock.lo
CC vtls/libcurl_la-openssl.lo
CC vtls/libcurl_la-rustls.lo
CC vtls/libcurl_la-schannel.lo
CC vtls/libcurl_la-schannel_verify.lo
CC vtls/libcurl_la-vtls.lo
CC vtls/libcurl_la-vtls_scache.lo
CC vtls/libcurl_la-vtls_spack.lo
CC vtls/libcurl_la-wolfssl.lo
CC vtls/libcurl_la-x509asn1.lo
CC vquic/libcurl_la-curl_ngtcp2.lo
CC vquic/libcurl_la-curl_osslq.lo
CC vquic/libcurl_la-curl_quiche.lo
CC vquic/libcurl_la-vquic.lo
CC vquic/libcurl_la-vquic-tls.lo
CC vssh/libcurl_la-libssh.lo
CC vssh/libcurl_la-libssh2.lo
CC vssh/libcurl_la-curl_path.lo
CC vssh/libcurl_la-wolfssh.lo
CC curlx/libcurl_la-base64.lo
CC curlx/libcurl_la-dynbuf.lo
CC curlx/libcurl_la-inet_ntop.lo
CC curlx/libcurl_la-inet_pton.lo
CC curlx/libcurl_la-multibyte.lo
CC curlx/libcurl_la-nonblock.lo
CC curlx/libcurl_la-strparse.lo
CC curlx/libcurl_la-timediff.lo
CC curlx/libcurl_la-timeval.lo
CC curlx/libcurl_la-version_win32.lo
CC curlx/libcurl_la-wait.lo
CC curlx/libcurl_la-warnless.lo
CC curlx/libcurl_la-winapi.lo
CCLD libcurlu.la
CCLD libcurl.la
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/lib'
Making all in docs
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in .
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in cmdline-opts
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/cmdline-opts'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/cmdline-opts'
Making all in libcurl
make[2]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
Making all in opts
make[3]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl/opts'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl/opts'
make[3]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[2]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs/libcurl'
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/docs'
Making all in src
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/src'
CC curl-config2setopts.o
CC curl-slist_wc.o
CC curl-terminal.o
CC curl-tool_bname.o
CC curl-tool_cb_dbg.o
CC curl-tool_cb_hdr.o
CC curl-tool_cb_prg.o
CC curl-tool_cb_rea.o
CC curl-tool_cb_see.o
CC curl-tool_cb_soc.o
CC curl-tool_cb_wrt.o
CC curl-tool_cfgable.o
CC curl-tool_dirhie.o
CC curl-tool_doswin.o
CC curl-tool_easysrc.o
CC curl-tool_filetime.o
CC curl-tool_findfile.o
CC curl-tool_formparse.o
CC curl-tool_getparam.o
CC curl-tool_getpass.o
CC curl-tool_help.o
CC curl-tool_helpers.o
CC curl-tool_ipfs.o
CC curl-tool_libinfo.o
CC curl-tool_listhelp.o
CC curl-tool_main.o
CC curl-tool_msgs.o
CC curl-tool_operate.o
CC curl-tool_operhlp.o
CC curl-tool_paramhlp.o
CC curl-tool_parsecfg.o
CC curl-tool_progress.o
CC curl-tool_setopt.o
CC curl-tool_ssls.o
CC curl-tool_stderr.o
CC curl-tool_strdup.o
CC curl-tool_urlglob.o
CC curl-tool_util.o
CC curl-tool_vms.o
CC curl-tool_writeout.o
CC curl-tool_writeout_json.o
CC curl-tool_xattr.o
CC curl-var.o
echo '/* !checksrc! disable COPYRIGHT all */' > tool_hugehelp.c; \
echo '#include "tool_hugehelp.h"' >> tool_hugehelp.c
echo '/* !checksrc! disable COPYRIGHT all */' > tool_ca_embed.c
echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' >> tool_ca_embed.c
CC curlinfo.o
CC libcurltool_la-config2setopts.lo
CC libcurltool_la-slist_wc.lo
CC libcurltool_la-terminal.lo
CC libcurltool_la-tool_bname.lo
CC libcurltool_la-tool_cb_dbg.lo
CC libcurltool_la-tool_cb_hdr.lo
CC libcurltool_la-tool_cb_prg.lo
CC libcurltool_la-tool_cb_rea.lo
CC libcurltool_la-tool_cb_see.lo
CC libcurltool_la-tool_cb_soc.lo
CC libcurltool_la-tool_cb_wrt.lo
CC libcurltool_la-tool_cfgable.lo
CC libcurltool_la-tool_dirhie.lo
CC libcurltool_la-tool_doswin.lo
CC libcurltool_la-tool_easysrc.lo
CC libcurltool_la-tool_filetime.lo
CC libcurltool_la-tool_findfile.lo
CC libcurltool_la-tool_formparse.lo
CC libcurltool_la-tool_getparam.lo
CC libcurltool_la-tool_getpass.lo
CC libcurltool_la-tool_help.lo
CC libcurltool_la-tool_helpers.lo
CC libcurltool_la-tool_ipfs.lo
CC libcurltool_la-tool_libinfo.lo
CC libcurltool_la-tool_listhelp.lo
CC libcurltool_la-tool_main.lo
CC libcurltool_la-tool_msgs.lo
CC libcurltool_la-tool_operate.lo
CC libcurltool_la-tool_operhlp.lo
CC libcurltool_la-tool_paramhlp.lo
CC libcurltool_la-tool_parsecfg.lo
CC libcurltool_la-tool_progress.lo
CC libcurltool_la-tool_setopt.lo
CC libcurltool_la-tool_ssls.lo
CC libcurltool_la-tool_stderr.lo
CC libcurltool_la-tool_strdup.lo
CC libcurltool_la-tool_urlglob.lo
CC libcurltool_la-tool_util.lo
CC libcurltool_la-tool_vms.lo
CC libcurltool_la-tool_writeout.lo
CC libcurltool_la-tool_writeout_json.lo
CC libcurltool_la-tool_xattr.lo
CC libcurltool_la-var.lo
CC curl-tool_hugehelp.o
CC curl-tool_ca_embed.o
CCLD curlinfo
CCLD curl
CCLD libcurltool.la
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/src'
Making all in scripts
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0/scripts'
make[1]: Entering directory '/root/asi_db/builds/curl/_worktrees/w0'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/root/asi_db/builds/curl/_worktrees/w0'
| @@ -87,8 +87,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd, | |
| } | |
| if(result < 0) { | |
| int error = errno; | |
| - | warnf(config->global, |
| - | "Setting type of service to %d failed with errno %d: %s;\n", |
| + | warnf("Setting type of service to %d failed with errno %d: %s", |
| tos, error, strerror(error)); | |
| } | |
| } | |
| @@ -97,9 +96,9 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd, | |
| if(config->vlan_priority > 0) { | |
| int priority = (int)config->vlan_priority; | |
| if(setsockopt(curlfd, SOL_SOCKET, SO_PRIORITY, | |
| - | (void *)&priority, sizeof(priority)) != 0) { |
| + | (void *)&priority, sizeof(priority)) != 0) { |
| int error = errno; | |
| - | warnf(config->global, "VLAN priority %d failed with errno %d: %s;\n", |
| + | warnf("VLAN priority %d failed with errno %d: %s", |
| priority, error, strerror(error)); | |
| } | |
| } | |
| @@ -173,7 +172,6 @@ static CURLcode url_proto_and_rewrite(char **url, | |
| static CURLcode ssh_setopts(struct OperationConfig *config, CURL *curl) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| CURLcode result; | |
| /* SSH and SSL private key uses same command-line option */ | |
| @@ -213,11 +211,11 @@ static CURLcode ssh_setopts(struct OperationConfig *config, CURL *curl) | |
| global->knownhosts = known; | |
| } | |
| else if(!config->hostpubmd5 && !config->hostpubsha256) { | |
| - | errorf(global, "Couldn't find a known_hosts file"); |
| + | errorf("Couldn't find a known_hosts file"); |
| return CURLE_FAILED_INIT; | |
| } | |
| else | |
| - | warnf(global, "Couldn't find a known_hosts file"); |
| + | warnf("Couldn't find a known_hosts file"); |
| } | |
| return CURLE_OK; /* ignore if SHA256 did not work */ | |
| } | |
| @@ -279,7 +277,6 @@ static long tlsversion(unsigned char mintls, | |
| /* only called if libcurl supports TLS */ | |
| static CURLcode ssl_setopts(struct OperationConfig *config, CURL *curl) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| CURLcode result = CURLE_OK; | |
| if(config->cacert) | |
| @@ -301,7 +298,7 @@ static CURLcode ssl_setopts(struct OperationConfig *config, CURL *curl) | |
| if((result == CURLE_NOT_BUILT_IN) || | |
| (result == CURLE_UNKNOWN_OPTION)) { | |
| if(config->proxy_capath) { | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| config->proxy_capath ? "--proxy-capath" : "--capath", | |
| ssl_backend()); | |
| } | |
| @@ -316,12 +313,10 @@ static CURLcode ssl_setopts(struct OperationConfig *config, CURL *curl) | |
| blob.data = CURL_UNCONST(curl_ca_embed); | |
| blob.len = strlen((const char *)curl_ca_embed); | |
| blob.flags = CURL_BLOB_NOCOPY; | |
| - | notef(config->global, |
| - | "Using embedded CA bundle (%zu bytes)", |
| - | blob.len); |
| + | notef("Using embedded CA bundle (%zu bytes)", blob.len); |
| result = curl_easy_setopt(curl, CURLOPT_CAINFO_BLOB, &blob); | |
| if(result == CURLE_NOT_BUILT_IN) { | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "embedded CA bundle", ssl_backend()); | |
| } | |
| } | |
| @@ -330,12 +325,10 @@ static CURLcode ssl_setopts(struct OperationConfig *config, CURL *curl) | |
| blob.data = CURL_UNCONST(curl_ca_embed); | |
| blob.len = strlen((const char *)curl_ca_embed); | |
| blob.flags = CURL_BLOB_NOCOPY; | |
| - | notef(config->global, |
| - | "Using embedded CA bundle, for proxies (%zu bytes)", |
| - | blob.len); |
| + | notef("Using embedded CA bundle, for proxies (%zu bytes)", blob.len); |
| result = curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO_BLOB, &blob); | |
| if(result == CURLE_NOT_BUILT_IN) { | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "embedded CA bundle", ssl_backend()); | |
| } | |
| } | |
| @@ -352,14 +345,14 @@ static CURLcode ssl_setopts(struct OperationConfig *config, CURL *curl) | |
| result = my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, | |
| config->pinnedpubkey); | |
| if(result == CURLE_NOT_BUILT_IN) | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "--pinnedpubkey", ssl_backend()); | |
| } | |
| if(config->proxy_pinnedpubkey) { | |
| result = my_setopt_str(curl, CURLOPT_PROXY_PINNEDPUBLICKEY, | |
| config->proxy_pinnedpubkey); | |
| if(result == CURLE_NOT_BUILT_IN) | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "--proxy-pinnedpubkey", ssl_backend()); | |
| } | |
| @@ -441,28 +434,28 @@ static CURLcode ssl_setopts(struct OperationConfig *config, CURL *curl) | |
| result = my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, | |
| config->cipher_list); | |
| if(result == CURLE_NOT_BUILT_IN) | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "--ciphers", ssl_backend()); | |
| } | |
| if(config->proxy_cipher_list) { | |
| result = my_setopt_str(curl, CURLOPT_PROXY_SSL_CIPHER_LIST, | |
| config->proxy_cipher_list); | |
| if(result == CURLE_NOT_BUILT_IN) | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "--proxy-ciphers", ssl_backend()); | |
| } | |
| if(config->cipher13_list) { | |
| result = my_setopt_str(curl, CURLOPT_TLS13_CIPHERS, | |
| config->cipher13_list); | |
| if(result == CURLE_NOT_BUILT_IN) | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "--tls13-ciphers", ssl_backend()); | |
| } | |
| if(config->proxy_cipher13_list) { | |
| result = my_setopt_str(curl, CURLOPT_PROXY_TLS13_CIPHERS, | |
| config->proxy_cipher13_list); | |
| if(result == CURLE_NOT_BUILT_IN) | |
| - | warnf(global, "ignoring %s, not supported by libcurl with %s", |
| + | warnf("ignoring %s, not supported by libcurl with %s", |
| "--proxy-tls13-ciphers", ssl_backend()); | |
| } | |
| @@ -581,8 +574,7 @@ static CURLcode cookie_setopts(struct OperationConfig *config, CURL *curl) | |
| result = curlx_dyn_addf(&cookies, ";%s", cl->data); | |
| if(result) { | |
| - | warnf(config->global, |
| - | "skipped provided cookie, the cookie header " |
| + | warnf("skipped provided cookie, the cookie header " |
| "would go over %u bytes", MAX_COOKIE_LINE); | |
| return result; | |
| } | |
| @@ -675,7 +667,7 @@ static CURLcode ftp_setopts(struct OperationConfig *config, CURL *curl) | |
| static void gen_trace_setopts(struct OperationConfig *config, CURL *curl) | |
| { | |
| - | if(config->global->tracetype != TRACE_NONE) { |
| + | if(global->tracetype != TRACE_NONE) { |
| my_setopt(curl, CURLOPT_DEBUGFUNCTION, tool_debug_cb); | |
| my_setopt(curl, CURLOPT_DEBUGDATA, config); | |
| my_setopt_long(curl, CURLOPT_VERBOSE, 1L); | |
| @@ -686,8 +678,8 @@ static void gen_cb_setopts(struct OperationConfig *config, | |
| struct per_transfer *per, | |
| CURL *curl) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| - | (void)config; |
| + | (void)config; /* when --libcurl is disabled */ |
| + | |
| /* where to store */ | |
| my_setopt(curl, CURLOPT_WRITEDATA, per); | |
| my_setopt(curl, CURLOPT_INTERLEAVEDATA, per); | |
| @@ -729,7 +721,7 @@ static CURLcode proxy_setopts(struct OperationConfig *config, CURL *curl) | |
| CURLcode result = my_setopt_str(curl, CURLOPT_PROXY, config->proxy); | |
| if(result) { | |
| - | errorf(config->global, "proxy support is disabled in this libcurl"); |
| + | errorf("proxy support is disabled in this libcurl"); |
| config->synthetic_error = TRUE; | |
| return CURLE_NOT_BUILT_IN; | |
| } | |
| @@ -806,7 +798,6 @@ CURLcode config2setopts(struct OperationConfig *config, | |
| CURL *curl, | |
| CURLSH *share) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| const char *use_proto; | |
| CURLcode result = url_proto_and_rewrite(&per->url, config, &use_proto); | |
| @@ -887,7 +878,7 @@ CURLcode config2setopts(struct OperationConfig *config, | |
| switch(config->httpreq) { | |
| case TOOL_HTTPREQ_SIMPLEPOST: | |
| if(config->resume_from) { | |
| - | errorf(global, "cannot mix --continue-at with --data"); |
| + | errorf("cannot mix --continue-at with --data"); |
| result = CURLE_FAILED_INIT; | |
| } | |
| else { | |
| @@ -902,7 +893,7 @@ CURLcode config2setopts(struct OperationConfig *config, | |
| curl_mime_free(config->mimepost); | |
| config->mimepost = NULL; | |
| if(config->resume_from) { | |
| - | errorf(global, "cannot mix --continue-at with --form"); |
| + | errorf("cannot mix --continue-at with --form"); |
| result = CURLE_FAILED_INIT; | |
| } | |
| else { | |
| @@ -985,7 +976,7 @@ CURLcode config2setopts(struct OperationConfig *config, | |
| my_setopt_enum(curl, CURLOPT_TIMECONDITION, config->timecond); | |
| my_setopt_offt(curl, CURLOPT_TIMEVALUE_LARGE, config->condtime); | |
| my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest); | |
| - | customrequest_helper(config, config->httpreq, config->customrequest); |
| + | customrequest_helper(config->httpreq, config->customrequest); |
| my_setopt(curl, CURLOPT_STDERR, tool_stderr); | |
| my_setopt_str(curl, CURLOPT_INTERFACE, config->iface); | |
| my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel); | |
| @@ -1080,13 +1071,11 @@ CURLcode config2setopts(struct OperationConfig *config, | |
| my_setopt(curl, CURLOPT_SOCKOPTDATA, config); | |
| #else | |
| if(config->ip_tos > 0) { | |
| - | errorf(config->global, |
| - | "Type of service is not supported in this build."); |
| + | errorf("Type of service is not supported in this build."); |
| result = CURLE_NOT_BUILT_IN; | |
| } | |
| if(config->vlan_priority > 0) { | |
| - | errorf(config->global, |
| - | "VLAN priority is not supported in this build."); |
| + | errorf("VLAN priority is not supported in this build."); |
| result = CURLE_NOT_BUILT_IN; | |
| } | |
| #endif | |
| @@ -79,8 +79,6 @@ int tool_debug_cb(CURL *handle, curl_infotype type, | |
| char *data, size_t size, | |
| void *userdata) | |
| { | |
| - | struct OperationConfig *operation = userdata; |
| - | struct GlobalConfig *global = operation->global; |
| FILE *output = tool_stderr; | |
| const char *text; | |
| struct timeval tv; | |
| @@ -94,6 +92,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, | |
| curl_off_t xfer_id, conn_id; | |
| (void)handle; /* not used */ | |
| + | (void)userdata; |
| if(global->tracetime) { | |
| tv = tvrealnow(); | |
| @@ -134,7 +133,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, | |
| output = global->trace_stream; | |
| if(!output) { | |
| - | warnf(global, "Failed to create/open output"); |
| + | warnf("Failed to create/open output"); |
| return 0; | |
| } | |
| @@ -99,7 +99,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) | |
| #ifdef DEBUGBUILD | |
| if(size * nmemb > (size_t)CURL_MAX_HTTP_HEADER) { | |
| - | warnf(per->config->global, "Header data exceeds write limit"); |
| + | warnf("Header data exceeds write limit"); |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| #endif | |
| @@ -120,8 +120,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) | |
| return rc; | |
| /* flush the stream to send off what we got earlier */ | |
| if(fflush(heads->stream)) { | |
| - | errorf(per->config->global, "Failed writing headers to %s", |
| - | per->config->headerfile); |
| + | errorf("Failed writing headers to %s", per->config->headerfile); |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| } | |
| @@ -286,11 +285,11 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata) | |
| if(!outs->stream && !tool_create_output_file(outs, per->config)) | |
| return CURL_WRITEFUNC_ERROR; | |
| - | if(hdrcbdata->config->global->isatty && |
| + | if(global->isatty && |
| #ifdef _WIN32 | |
| tool_term_has_bold && | |
| #endif | |
| - | hdrcbdata->config->global->styled_output) |
| + | global->styled_output) |
| value = memchr(ptr, ':', cb); | |
| if(value) { | |
| size_t namelen = value - ptr; | |
| @@ -103,7 +103,7 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) | |
| rc = 0; | |
| } | |
| #else | |
| - | warnf(per->config->global, "per->infd != 0: FD == %d. This behavior" |
| + | warnf("per->infd != 0: FD == %d. This behavior" |
| " is only supported on desktop Windows", per->infd); | |
| #endif | |
| } | |
| @@ -123,7 +123,7 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) | |
| (per->uploadedsofar + rc > per->uploadfilesize)) { | |
| /* do not allow uploading more than originally set out to do */ | |
| curl_off_t delta = per->uploadedsofar + rc - per->uploadfilesize; | |
| - | warnf(per->config->global, "File size larger in the end than when " |
| + | warnf("File size larger in the end than when " |
| "started. Dropping at least %" CURL_FORMAT_CURL_OFF_T " bytes", | |
| delta); | |
| rc = (ssize_t)(per->uploadfilesize - per->uploadedsofar); | |
| @@ -45,12 +45,10 @@ | |
| bool tool_create_output_file(struct OutStruct *outs, | |
| struct OperationConfig *config) | |
| { | |
| - | struct GlobalConfig *global; |
| FILE *file = NULL; | |
| const char *fname = outs->filename; | |
| DEBUGASSERT(outs); | |
| DEBUGASSERT(config); | |
| - | global = config->global; |
| DEBUGASSERT(fname && *fname); | |
| if(config->file_clobber_mode == CLOBBER_ALWAYS || | |
| @@ -101,8 +99,7 @@ bool tool_create_output_file(struct OutStruct *outs, | |
| } | |
| if(!file) { | |
| - | warnf(global, "Failed to open the file %s: %s", fname, |
| - | strerror(errno)); |
| + | warnf("Failed to open the file %s: %s", fname, strerror(errno)); |
| return FALSE; | |
| } | |
| outs->s_isreg = TRUE; | |
| @@ -248,7 +245,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) | |
| struct OutStruct *outs = &per->outs; | |
| struct OperationConfig *config = per->config; | |
| size_t bytes = sz * nmemb; | |
| - | bool is_tty = config->global->isatty; |
| + | bool is_tty = global->isatty; |
| #if defined(_WIN32) && !defined(UNDER_CE) | |
| CONSOLE_SCREEN_BUFFER_INFO console_info; | |
| intptr_t fhnd; | |
| @@ -268,13 +265,13 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) | |
| if(config->show_headers) { | |
| if(bytes > (size_t)CURL_MAX_HTTP_HEADER) { | |
| - | warnf(config->global, "Header data size exceeds write limit"); |
| + | warnf("Header data size exceeds write limit"); |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| } | |
| else { | |
| if(bytes > (size_t)CURL_MAX_WRITE_SIZE) { | |
| - | warnf(config->global, "Data size exceeds write limit"); |
| + | warnf("Data size exceeds write limit"); |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| } | |
| @@ -303,7 +300,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) | |
| check_fails = TRUE; | |
| } | |
| if(check_fails) { | |
| - | warnf(config->global, "Invalid output struct data for write callback"); |
| + | warnf("Invalid output struct data for write callback"); |
| return CURL_WRITEFUNC_ERROR; | |
| } | |
| } | |
| @@ -315,7 +312,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) | |
| if(is_tty && (outs->bytes < 2000) && !config->terminal_binary_ok) { | |
| /* binary output to terminal? */ | |
| if(memchr(buffer, 0, bytes)) { | |
| - | warnf(config->global, "Binary output can mess up your terminal. " |
| + | warnf("Binary output can mess up your terminal. " |
| "Use \"--output -\" to tell curl to output it to your terminal " | |
| "anyway, or consider \"--output <FILE>\" to save to a file."); | |
| config->synthetic_error = TRUE; | |
| @@ -27,16 +27,19 @@ | |
| #include "tool_formparse.h" | |
| #include "tool_paramhlp.h" | |
| #include "tool_main.h" | |
| + | #include "tool_msgs.h" |
| #include "memdebug.h" /* keep this as LAST include */ | |
| - | struct OperationConfig *config_alloc(struct GlobalConfig *global) |
| + | static struct GlobalConfig globalconf; |
| + | struct GlobalConfig *global; |
| + | |
| + | struct OperationConfig *config_alloc(void) |
| { | |
| struct OperationConfig *config = | |
| calloc(1, sizeof(struct OperationConfig)); | |
| if(!config) | |
| return NULL; | |
| - | config->global = global; |
| config->use_httpget = FALSE; | |
| config->create_dirs = FALSE; | |
| config->maxredirs = DEFAULT_MAXREDIRS; | |
| @@ -202,3 +205,78 @@ void config_free(struct OperationConfig *config) | |
| last = prev; | |
| } | |
| } | |
| + | |
| + | /* |
| + | * 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 globalconf_init(void) |
| + | { |
| + | CURLcode result = CURLE_OK; |
| + | global = &globalconf; |
| + | |
| + | #ifdef __DJGPP__ |
| + | /* stop stat() wasting time */ |
| + | _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE; |
| + | #endif |
| + | |
| + | /* Initialise the global config */ |
| + | global->showerror = FALSE; /* show errors when silent */ |
| + | global->styled_output = TRUE; /* enable detection */ |
| + | global->parallel_max = PARALLEL_DEFAULT; |
| + | |
| + | /* Allocate the initial operate config */ |
| + | global->first = global->last = config_alloc(); |
| + | if(global->first) { |
| + | /* Perform the libcurl initialization */ |
| + | result = curl_global_init(CURL_GLOBAL_DEFAULT); |
| + | if(!result) { |
| + | /* Get information about libcurl */ |
| + | result = get_libcurl_info(); |
| + | |
| + | if(result) { |
| + | errorf("error retrieving curl library information"); |
| + | free(global->first); |
| + | } |
| + | } |
| + | else { |
| + | errorf("error initializing curl library"); |
| + | free(global->first); |
| + | } |
| + | } |
| + | else { |
| + | errorf("error initializing curl"); |
| + | result = CURLE_FAILED_INIT; |
| + | } |
| + | |
| + | return result; |
| + | } |
| + | |
| + | static void free_globalconfig(void) |
| + | { |
| + | tool_safefree(global->trace_dump); |
| + | |
| + | if(global->trace_fopened && global->trace_stream) |
| + | fclose(global->trace_stream); |
| + | global->trace_stream = NULL; |
| + | |
| + | tool_safefree(global->libcurl); |
| + | } |
| + | |
| + | /* |
| + | * This is the main global destructor for the app. Call this after _all_ |
| + | * libcurl usage is done. |
| + | */ |
| + | void globalconf_free(void) |
| + | { |
| + | /* Cleanup the easy handle */ |
| + | /* Main cleanup */ |
| + | curl_global_cleanup(); |
| + | free_globalconfig(); |
| + | |
| + | /* Free the OperationConfig structures */ |
| + | config_free(global->last); |
| + | global->first = NULL; |
| + | global->last = NULL; |
| + | } |
| @@ -62,7 +62,7 @@ | |
| #define tool_safefree(ptr) \ | |
| do { free((ptr)); (ptr) = NULL;} while(0) | |
| - | struct GlobalConfig; |
| + | extern struct GlobalConfig *global; |
| struct State { | |
| struct getout *urlnode; | |
| @@ -188,7 +188,6 @@ struct OperationConfig { | |
| char *ech; /* Config set by --ech keywords */ | |
| char *ech_config; /* Config set by "--ech esl:" option */ | |
| char *ech_public; /* Config set by "--ech pn:" option */ | |
| - | struct GlobalConfig *global; |
| struct OperationConfig *prev; | |
| struct OperationConfig *next; /* Always last in the struct */ | |
| curl_off_t condtime; | |
| @@ -377,7 +376,9 @@ struct GlobalConfig { | |
| BIT(isatty); /* Updated internally if output is a tty */ | |
| }; | |
| - | struct OperationConfig *config_alloc(struct GlobalConfig *global); |
| + | struct OperationConfig *config_alloc(void); |
| void config_free(struct OperationConfig *config); | |
| + | CURLcode globalconf_init(void); |
| + | void globalconf_free(void); |
| #endif /* HEADER_CURL_TOOL_CFGABLE_H */ | |
| @@ -39,39 +39,39 @@ | |
| # endif | |
| #endif | |
| - | static void show_dir_errno(struct GlobalConfig *global, const char *name) |
| + | static void show_dir_errno(const char *name) |
| { | |
| switch(errno) { | |
| #ifdef EACCES | |
| /* !checksrc! disable ERRNOVAR 1 */ | |
| case EACCES: | |
| - | errorf(global, "You do not have permission to create %s", name); |
| + | errorf("You do not have permission to create %s", name); |
| break; | |
| #endif | |
| #ifdef ENAMETOOLONG | |
| case ENAMETOOLONG: | |
| - | errorf(global, "The directory name %s is too long", name); |
| + | errorf("The directory name %s is too long", name); |
| break; | |
| #endif | |
| #ifdef EROFS | |
| case EROFS: | |
| - | errorf(global, "%s resides on a read-only file system", name); |
| + | errorf("%s resides on a read-only file system", name); |
| break; | |
| #endif | |
| #ifdef ENOSPC | |
| case ENOSPC: | |
| - | errorf(global, "No space left on the file system that will " |
| + | errorf("No space left on the file system that will " |
| "contain the directory %s", name); | |
| break; | |
| #endif | |
| #ifdef EDQUOT | |
| case EDQUOT: | |
| - | errorf(global, "Cannot create directory %s because you " |
| + | errorf("Cannot create directory %s because you " |
| "exceeded your quota", name); | |
| break; | |
| #endif | |
| default: | |
| - | errorf(global, "Error creating directory %s", name); |
| + | errorf("Error creating directory %s", name); |
| break; | |
| } | |
| } | |
| @@ -90,7 +90,7 @@ static void show_dir_errno(struct GlobalConfig *global, const char *name) | |
| #define PATH_DELIMITERS DIR_CHAR | |
| #endif | |
| - | CURLcode create_dir_hierarchy(const char *outfile, struct GlobalConfig *global) |
| + | CURLcode create_dir_hierarchy(const char *outfile) |
| { | |
| CURLcode result = CURLE_OK; | |
| size_t outlen = strlen(outfile); | |
| @@ -128,7 +128,7 @@ CURLcode create_dir_hierarchy(const char *outfile, struct GlobalConfig *global) | |
| /* !checksrc! disable ERRNOVAR 1 */ | |
| if(!skip && (mkdir(curlx_dyn_ptr(&dirbuf), (mode_t)0000750) == -1) && | |
| (errno != EACCES) && (errno != EEXIST)) { | |
| - | show_dir_errno(global, curlx_dyn_ptr(&dirbuf)); |
| + | show_dir_errno(curlx_dyn_ptr(&dirbuf)); |
| result = CURLE_WRITE_ERROR; | |
| break; /* get out of loop */ | |
| } | |
| @@ -26,7 +26,6 @@ | |
| #include "tool_setup.h" | |
| #include "tool_cfgable.h" | |
| - | CURLcode create_dir_hierarchy(const char *outfile, |
| - | struct GlobalConfig *global); |
| + | CURLcode create_dir_hierarchy(const char *outfileo); |
| #endif /* HEADER_CURL_TOOL_DIRHIE_H */ | |
| @@ -746,13 +746,11 @@ CURLcode win32_init(void) | |
| by nmap and ncat (https://nmap.org/ncat/) */ | |
| struct win_thread_data { | |
| /* This is a copy of the true stdin file handle before any redirection. It is | |
| - | read by the thread. */ |
| + | read by the thread. */ |
| HANDLE stdin_handle; | |
| /* This is the listen socket for the thread. It is closed after the first | |
| - | connection. */ |
| + | connection. */ |
| curl_socket_t socket_l; | |
| - | /* This is the global config - used for printing errors and so forth */ |
| - | struct GlobalConfig *global; |
| }; | |
| static DWORD WINAPI win_stdin_thread_func(void *thread_data) | |
| @@ -770,14 +768,14 @@ static DWORD WINAPI win_stdin_thread_func(void *thread_data) | |
| &clientAddrLen); | |
| if(socket_w == CURL_SOCKET_BAD) { | |
| - | errorf(tdata->global, "accept error: %08lx\n", GetLastError()); |
| + | errorf("accept error: %08lx", GetLastError()); |
| goto ThreadCleanup; | |
| } | |
| closesocket(tdata->socket_l); /* sclose here fails test 1498 */ | |
| tdata->socket_l = CURL_SOCKET_BAD; | |
| if(shutdown(socket_w, SD_RECEIVE) == SOCKET_ERROR) { | |
| - | errorf(tdata->global, "shutdown error: %08lx\n", GetLastError()); |
| + | errorf("shutdown error: %08lx", GetLastError()); |
| goto ThreadCleanup; | |
| } | |
| for(;;) { | |
| @@ -813,7 +811,7 @@ ThreadCleanup: | |
| static HANDLE stdin_thread = NULL; | |
| static curl_socket_t socket_r = CURL_SOCKET_BAD; | |
| - | curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) |
| + | curl_socket_t win32_stdin_read_thread(void) |
| { | |
| int result; | |
| bool r; | |
| @@ -831,7 +829,7 @@ curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) | |
| /* Prepare handles for thread */ | |
| tdata = (struct win_thread_data*)calloc(1, sizeof(struct win_thread_data)); | |
| if(!tdata) { | |
| - | errorf(global, "calloc() error"); |
| + | errorf("calloc() error"); |
| break; | |
| } | |
| /* Create the listening socket for the thread. When it starts, it will | |
| @@ -840,7 +838,7 @@ curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) | |
| IPPROTO_TCP, NULL, 0, WSA_FLAG_OVERLAPPED); | |
| if(tdata->socket_l == CURL_SOCKET_BAD) { | |
| - | errorf(global, "WSASocketW error: %08lx", GetLastError()); |
| + | errorf("WSASocketW error: %08lx", GetLastError()); |
| break; | |
| } | |
| @@ -851,20 +849,20 @@ curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) | |
| /* Bind to any available loopback port */ | |
| result = bind(tdata->socket_l, (SOCKADDR*)&selfaddr, socksize); | |
| if(result == SOCKET_ERROR) { | |
| - | errorf(global, "bind error: %08lx", GetLastError()); |
| + | errorf("bind error: %08lx", GetLastError()); |
| break; | |
| } | |
| /* Bind to any available loopback port */ | |
| result = getsockname(tdata->socket_l, (SOCKADDR*)&selfaddr, &socksize); | |
| if(result == SOCKET_ERROR) { | |
| - | errorf(global, "getsockname error: %08lx", GetLastError()); |
| + | errorf("getsockname error: %08lx", GetLastError()); |
| break; | |
| } | |
| result = listen(tdata->socket_l, 1); | |
| if(result == SOCKET_ERROR) { | |
| - | errorf(global, "listen error: %08lx\n", GetLastError()); |
| + | errorf("listen error: %08lx", GetLastError()); |
| break; | |
| } | |
| @@ -874,7 +872,7 @@ curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) | |
| 0, FALSE, DUPLICATE_SAME_ACCESS); | |
| if(!r) { | |
| - | errorf(global, "DuplicateHandle error: %08lx", GetLastError()); |
| + | errorf("DuplicateHandle error: %08lx", GetLastError()); |
| break; | |
| } | |
| @@ -885,14 +883,14 @@ curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) | |
| stdin_thread = CreateThread(NULL, 0, win_stdin_thread_func, | |
| tdata, 0, NULL); | |
| if(!stdin_thread) { | |
| - | errorf(global, "CreateThread error: %08lx", GetLastError()); |
| + | errorf("CreateThread error: %08lx", GetLastError()); |
| break; | |
| } | |
| /* Connect to the thread and rearrange our own STDIN handles */ | |
| socket_r = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); | |
| if(socket_r == CURL_SOCKET_BAD) { | |
| - | errorf(global, "socket error: %08lx", GetLastError()); |
| + | errorf("socket error: %08lx", GetLastError()); |
| break; | |
| } | |
| @@ -900,18 +898,18 @@ curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global) | |
| setsockopt(socket_r, SOL_SOCKET, SO_DONTLINGER, 0, 0); | |
| if(connect(socket_r, (SOCKADDR*)&selfaddr, socksize) == SOCKET_ERROR) { | |
| - | errorf(global, "connect error: %08lx", GetLastError()); |
| + | errorf("connect error: %08lx", GetLastError()); |
| break; | |
| } | |
| if(shutdown(socket_r, SD_SEND) == SOCKET_ERROR) { | |
| - | errorf(global, "shutdown error: %08lx", GetLastError()); |
| + | errorf("shutdown error: %08lx", GetLastError()); |
| break; | |
| } | |
| /* Set the stdin handle to read from the socket. */ | |
| if(SetStdHandle(STD_INPUT_HANDLE, (HANDLE)socket_r) == 0) { | |
| - | errorf(global, "SetStdHandle error: %08lx", GetLastError()); |
| + | errorf("SetStdHandle error: %08lx", GetLastError()); |
| break; | |
| } | |
| @@ -56,7 +56,7 @@ struct curl_slist *GetLoadedModulePaths(void); | |
| CURLcode win32_init(void); | |
| #if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) | |
| - | curl_socket_t win32_stdin_read_thread(struct GlobalConfig *global); |
| + | curl_socket_t win32_stdin_read_thread(void); |
| #endif /* !CURL_WINDOWS_UWP && !UNDER_CE */ | |
| #endif /* _WIN32 */ | |
| @@ -170,7 +170,7 @@ CURLcode easysrc_cleanup(void) | |
| return ret; | |
| } | |
| - | void dumpeasysrc(struct GlobalConfig *global) |
| + | void dumpeasysrc(void) |
| { | |
| struct curl_slist *ptr; | |
| char *o = global->libcurl; | |
| @@ -184,7 +184,7 @@ void dumpeasysrc(struct GlobalConfig *global) | |
| else | |
| out = stdout; | |
| if(!out) | |
| - | warnf(global, "Failed to open %s to write libcurl code", o); |
| + | warnf("Failed to open %s to write libcurl code", o); |
| else { | |
| int i; | |
| const char *c; | |
| @@ -43,8 +43,7 @@ extern CURLcode easysrc_addf(struct slist_wc **plist, | |
| const char *fmt, ...) CURL_PRINTF(2, 3); | |
| extern CURLcode easysrc_perform(void); | |
| extern CURLcode easysrc_cleanup(void); | |
| - | |
| - | void dumpeasysrc(struct GlobalConfig *global); |
| + | void dumpeasysrc(void); |
| #else /* CURL_DISABLE_LIBCURL_OPTION is defined */ | |
| @@ -32,8 +32,7 @@ | |
| #endif | |
| /* Returns 0 on success, non-zero on file problems */ | |
| - | int getfiletime(const char *filename, struct GlobalConfig *global, |
| - | curl_off_t *stamp) |
| + | int getfiletime(const char *filename, curl_off_t *stamp) |
| { | |
| int rc = 1; | |
| @@ -56,21 +55,21 @@ int getfiletime(const char *filename, struct GlobalConfig *global, | |
| | ((curl_off_t)ft.dwHighDateTime) << 32; | |
| if(converted < 116444736000000000) | |
| - | warnf(global, "Failed to get filetime: underflow"); |
| + | warnf("Failed to get filetime: underflow"); |
| else { | |
| *stamp = (converted - 116444736000000000) / 10000000; | |
| rc = 0; | |
| } | |
| } | |
| else { | |
| - | warnf(global, "Failed to get filetime: " |
| + | warnf("Failed to get filetime: " |
| "GetFileTime failed: GetLastError %u", | |
| (unsigned int)GetLastError()); | |
| } | |
| CloseHandle(hfile); | |
| } | |
| else if(GetLastError() != ERROR_FILE_NOT_FOUND) { | |
| - | warnf(global, "Failed to get filetime: " |
| + | warnf("Failed to get filetime: " |
| "CreateFile failed: GetLastError %u", | |
| (unsigned int)GetLastError()); | |
| } | |
| @@ -81,14 +80,13 @@ int getfiletime(const char *filename, struct GlobalConfig *global, | |
| rc = 0; | |
| } | |
| else | |
| - | warnf(global, "Failed to get filetime: %s", strerror(errno)); |
| + | warnf("Failed to get filetime: %s", strerror(errno)); |
| #endif | |
| return rc; | |
| } | |
| #if defined(HAVE_UTIME) || defined(HAVE_UTIMES) || defined(_WIN32) | |
| - | void setfiletime(curl_off_t filetime, const char *filename, |
| - | struct GlobalConfig *global) |
| + | void setfiletime(curl_off_t filetime, const char *filename) |
| { | |
| if(filetime >= 0) { | |
| /* Windows utime() may attempt to adjust the Unix GMT file time by a daylight | |
| @@ -101,7 +99,7 @@ void setfiletime(curl_off_t filetime, const char *filename, | |
| /* 910670515199 is the maximum Unix filetime that can be used as a | |
| Windows FILETIME without overflow: 30827-12-31T23:59:59. */ | |
| if(filetime > 910670515199) { | |
| - | warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| + | warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| " on outfile: overflow", filetime); | |
| curlx_unicodefree(tchar_filename); | |
| return; | |
| @@ -119,14 +117,14 @@ void setfiletime(curl_off_t filetime, const char *filename, | |
| ft.dwLowDateTime = (DWORD)(converted & 0xFFFFFFFF); | |
| ft.dwHighDateTime = (DWORD)(converted >> 32); | |
| if(!SetFileTime(hfile, NULL, &ft, &ft)) { | |
| - | warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| + | warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| " on outfile: SetFileTime failed: GetLastError %u", | |
| filetime, (unsigned int)GetLastError()); | |
| } | |
| CloseHandle(hfile); | |
| } | |
| else { | |
| - | warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| + | warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| " on outfile: CreateFile failed: GetLastError %u", | |
| filetime, (unsigned int)GetLastError()); | |
| } | |
| @@ -136,7 +134,7 @@ void setfiletime(curl_off_t filetime, const char *filename, | |
| times[0].tv_sec = times[1].tv_sec = (time_t)filetime; | |
| times[0].tv_usec = times[1].tv_usec = 0; | |
| if(utimes(filename, times)) { | |
| - | warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| + | warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| " on '%s': %s", filetime, filename, strerror(errno)); | |
| } | |
| @@ -145,7 +143,7 @@ void setfiletime(curl_off_t filetime, const char *filename, | |
| times.actime = (time_t)filetime; | |
| times.modtime = (time_t)filetime; | |
| if(utime(filename, ×)) { | |
| - | warnf(global, "Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| + | warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T |
| " on '%s': %s", filetime, filename, strerror(errno)); | |
| } | |
| #endif | |
| @@ -25,15 +25,11 @@ | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| - | struct GlobalConfig; |
| - | |
| - | int getfiletime(const char *filename, struct GlobalConfig *global, |
| - | curl_off_t *stamp); |
| + | int getfiletime(const char *filename, curl_off_t *stamp); |
| #if defined(HAVE_UTIME) || defined(HAVE_UTIMES) || \ | |
| (defined(_WIN32) && (SIZEOF_CURL_OFF_T >= 8)) | |
| - | void setfiletime(curl_off_t filetime, const char *filename, |
| - | struct GlobalConfig *global); |
| + | void setfiletime(curl_off_t filetime, const char *filename); |
| #else | |
| #define setfiletime(a,b,c) tool_nop_stmt | |
| #endif | |
| @@ -223,10 +223,7 @@ size_t tool_mime_stdin_read(char *buffer, | |
| nitems = fread(buffer, 1, nitems, stdin); | |
| if(ferror(stdin)) { | |
| /* Show error only once. */ | |
| - | if(sip->global) { |
| - | warnf(sip->global, "stdin: %s", strerror(errno)); |
| - | sip->global = NULL; |
| - | } |
| + | warnf("stdin: %s", strerror(errno)); |
| return CURL_READFUNC_ABORT; | |
| } | |
| } | |
| @@ -348,8 +345,7 @@ CURLcode tool2curlmime(CURL *curl, struct tool_mime *m, curl_mime **mime) | |
| * after call get_param_word, str either point to string end | |
| * or point to any of end chars. | |
| */ | |
| - | static char *get_param_word(struct OperationConfig *config, char **str, |
| - | char **end_pos, char endchar) |
| + | static char *get_param_word(char **str, char **end_pos, char endchar) |
| { | |
| char *ptr = *str; | |
| /* the first non-space char is here */ | |
| @@ -391,7 +387,7 @@ static char *get_param_word(struct OperationConfig *config, char **str, | |
| ++ptr; | |
| } | |
| if(trailing_data) | |
| - | warnf(config->global, "Trailing data after quoted form parameter"); |
| + | warnf("Trailing data after quoted form parameter"); |
| *str = ptr; | |
| return word_begin + 1; | |
| } | |
| @@ -420,8 +416,7 @@ static int slist_append(struct curl_slist **plist, const char *data) | |
| } | |
| /* Read headers from a file and append to list. */ | |
| - | static int read_field_headers(struct OperationConfig *config, |
| - | const char *filename, FILE *fp, |
| + | static int read_field_headers(const char *filename, FILE *fp, |
| struct curl_slist **pheaders) | |
| { | |
| size_t hdrlen = 0; | |
| @@ -439,7 +434,7 @@ static int read_field_headers(struct OperationConfig *config, | |
| if(hdrlen) { | |
| hdrbuf[hdrlen] = '\0'; | |
| if(slist_append(pheaders, hdrbuf)) { | |
| - | errorf(config->global, "Out of memory for field headers"); |
| + | errorf("Out of memory for field headers"); |
| return -1; | |
| } | |
| hdrlen = 0; | |
| @@ -449,7 +444,7 @@ static int read_field_headers(struct OperationConfig *config, | |
| switch(c) { | |
| case EOF: | |
| if(ferror(fp)) { | |
| - | errorf(config->global, "Header file %s read error: %s", filename, |
| + | errorf("Header file %s read error: %s", filename, |
| strerror(errno)); | |
| return -1; | |
| } | |
| @@ -470,7 +465,7 @@ static int read_field_headers(struct OperationConfig *config, | |
| pos++; | |
| if(!incomment) { | |
| if(hdrlen == sizeof(hdrbuf) - 1) { | |
| - | warnf(config->global, "File %s line %d: header too long (truncated)", |
| + | warnf("File %s line %d: header too long (truncated)", |
| filename, lineno); | |
| c = ' '; | |
| } | |
| @@ -481,7 +476,7 @@ static int read_field_headers(struct OperationConfig *config, | |
| /* NOTREACHED */ | |
| } | |
| - | static int get_param_part(struct OperationConfig *config, char endchar, |
| + | static int get_param_part(char endchar, |
| char **str, char **pdata, char **ptype, | |
| char **pfilename, char **pencoder, | |
| struct curl_slist **pheaders) | |
| @@ -507,7 +502,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| while(ISBLANK(*p)) | |
| p++; | |
| tp = p; | |
| - | *pdata = get_param_word(config, &p, &endpos, endchar); |
| + | *pdata = get_param_word(&p, &endpos, endchar); |
| /* If not quoted, strip trailing spaces. */ | |
| if(*pdata == tp) | |
| while(endpos > *pdata && ISBLANK(endpos[-1])) | |
| @@ -539,7 +534,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| for(p += 9; ISBLANK(*p); p++) | |
| ; | |
| tp = p; | |
| - | filename = get_param_word(config, &p, &endpos, endchar); |
| + | filename = get_param_word(&p, &endpos, endchar); |
| /* If not quoted, strip trailing spaces. */ | |
| if(filename == tp) | |
| while(endpos > filename && ISBLANK(endpos[-1])) | |
| @@ -561,7 +556,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| p++; | |
| } while(ISBLANK(*p)); | |
| tp = p; | |
| - | hdrfile = get_param_word(config, &p, &endpos, endchar); |
| + | hdrfile = get_param_word(&p, &endpos, endchar); |
| /* If not quoted, strip trailing spaces. */ | |
| if(hdrfile == tp) | |
| while(endpos > hdrfile && ISBLANK(endpos[-1])) | |
| @@ -570,10 +565,10 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| *endpos = '\0'; | |
| fp = fopen(hdrfile, FOPEN_READTEXT); | |
| if(!fp) | |
| - | warnf(config->global, "Cannot read from %s: %s", hdrfile, |
| + | warnf("Cannot read from %s: %s", hdrfile, |
| strerror(errno)); | |
| else { | |
| - | int i = read_field_headers(config, hdrfile, fp, &headers); |
| + | int i = read_field_headers(hdrfile, fp, &headers); |
| fclose(fp); | |
| if(i) { | |
| @@ -588,7 +583,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| while(ISBLANK(*p)) | |
| p++; | |
| tp = p; | |
| - | hdr = get_param_word(config, &p, &endpos, endchar); |
| + | hdr = get_param_word(&p, &endpos, endchar); |
| /* If not quoted, strip trailing spaces. */ | |
| if(hdr == tp) | |
| while(endpos > hdr && ISBLANK(endpos[-1])) | |
| @@ -596,7 +591,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| sep = *p; | |
| *endpos = '\0'; | |
| if(slist_append(&headers, hdr)) { | |
| - | errorf(config->global, "Out of memory for field header"); |
| + | errorf("Out of memory for field header"); |
| curl_slist_free_all(headers); | |
| return -1; | |
| } | |
| @@ -610,7 +605,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| for(p += 8; ISBLANK(*p); p++) | |
| ; | |
| tp = p; | |
| - | encoder = get_param_word(config, &p, &endpos, endchar); |
| + | encoder = get_param_word(&p, &endpos, endchar); |
| /* If not quoted, strip trailing spaces. */ | |
| if(encoder == tp) | |
| while(endpos > encoder && ISSPACE(endpos[-1])) | |
| @@ -627,12 +622,12 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| } | |
| else { | |
| /* unknown prefix, skip to next block */ | |
| - | char *unknown = get_param_word(config, &p, &endpos, endchar); |
| + | char *unknown = get_param_word(&p, &endpos, endchar); |
| sep = *p; | |
| *endpos = '\0'; | |
| if(*unknown) | |
| - | warnf(config->global, "skip unknown form field: %s", unknown); |
| + | warnf("skip unknown form field: %s", unknown); |
| } | |
| } | |
| @@ -643,25 +638,22 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| if(ptype) | |
| *ptype = type; | |
| else if(type) | |
| - | warnf(config->global, "Field content type not allowed here: %s", type); |
| + | warnf("Field content type not allowed here: %s", type); |
| if(pfilename) | |
| *pfilename = filename; | |
| else if(filename) | |
| - | warnf(config->global, |
| - | "Field filename not allowed here: %s", filename); |
| + | warnf("Field filename not allowed here: %s", filename); |
| if(pencoder) | |
| *pencoder = encoder; | |
| else if(encoder) | |
| - | warnf(config->global, |
| - | "Field encoder not allowed here: %s", encoder); |
| + | warnf("Field encoder not allowed here: %s", encoder); |
| if(pheaders) | |
| *pheaders = headers; | |
| else if(headers) { | |
| - | warnf(config->global, |
| - | "Field headers not allowed here: %s", headers->data); |
| + | warnf("Field headers not allowed here: %s", headers->data); |
| curl_slist_free_all(headers); | |
| } | |
| @@ -726,8 +718,7 @@ static int get_param_part(struct OperationConfig *config, char endchar, | |
| } \ | |
| } while(0) | |
| - | int formparse(struct OperationConfig *config, |
| - | const char *input, |
| + | int formparse(const char *input, |
| struct tool_mime **mimeroot, | |
| struct tool_mime **mimecurrent, | |
| bool literal_value) | |
| @@ -769,8 +760,7 @@ int formparse(struct OperationConfig *config, | |
| if(*contp == '(' && !literal_value) { | |
| /* Starting a multipart. */ | |
| - | sep = get_param_part(config, '\0', |
| - | &contp, &data, &type, NULL, NULL, &headers); |
| + | sep = get_param_part('\0', &contp, &data, &type, NULL, NULL, &headers); |
| if(sep < 0) | |
| goto fail; | |
| part = tool_mime_new_parts(*mimecurrent); | |
| @@ -784,7 +774,7 @@ int formparse(struct OperationConfig *config, | |
| else if(!name && !strcmp(contp, ")") && !literal_value) { | |
| /* Ending a multipart. */ | |
| if(*mimecurrent == *mimeroot) { | |
| - | warnf(config->global, "no multipart to terminate"); |
| + | warnf("no multipart to terminate"); |
| goto fail; | |
| } | |
| *mimecurrent = (*mimecurrent)->parent; | |
| @@ -799,7 +789,7 @@ int formparse(struct OperationConfig *config, | |
| /* since this was a file, it may have a content-type specifier | |
| at the end too, or a filename. Or both. */ | |
| ++contp; | |
| - | sep = get_param_part(config, ',', &contp, |
| + | sep = get_param_part(',', &contp, |
| &data, &type, &filename, &encoder, &headers); | |
| if(sep < 0) { | |
| goto fail; | |
| @@ -823,14 +813,12 @@ int formparse(struct OperationConfig *config, | |
| goto fail; | |
| part->headers = headers; | |
| headers = NULL; | |
| - | part->global = config->global; |
| if(res == CURLE_READ_ERROR) { | |
| /* An error occurred while reading stdin: if read has started, | |
| issue the error now. Else, delay it until processed by | |
| libcurl. */ | |
| if(part->size > 0) { | |
| - | warnf(config->global, |
| - | "error while reading standard input"); |
| + | warnf("error while reading standard input"); |
| goto fail; | |
| } | |
| tool_safefree(part->data); | |
| @@ -848,7 +836,7 @@ int formparse(struct OperationConfig *config, | |
| else { | |
| if(*contp == '<' && !literal_value) { | |
| ++contp; | |
| - | sep = get_param_part(config, '\0', &contp, |
| + | sep = get_param_part('\0', &contp, |
| &data, &type, NULL, &encoder, &headers); | |
| if(sep < 0) | |
| goto fail; | |
| @@ -859,14 +847,12 @@ int formparse(struct OperationConfig *config, | |
| goto fail; | |
| part->headers = headers; | |
| headers = NULL; | |
| - | part->global = config->global; |
| if(res == CURLE_READ_ERROR) { | |
| /* An error occurred while reading stdin: if read has started, | |
| issue the error now. Else, delay it until processed by | |
| libcurl. */ | |
| if(part->size > 0) { | |
| - | warnf(config->global, |
| - | "error while reading standard input"); |
| + | warnf("error while reading standard input"); |
| goto fail; | |
| } | |
| tool_safefree(part->data); | |
| @@ -878,7 +864,7 @@ int formparse(struct OperationConfig *config, | |
| if(literal_value) | |
| data = contp; | |
| else { | |
| - | sep = get_param_part(config, '\0', &contp, |
| + | sep = get_param_part('\0', &contp, |
| &data, &type, &filename, &encoder, &headers); | |
| if(sep < 0) | |
| goto fail; | |
| @@ -897,8 +883,7 @@ int formparse(struct OperationConfig *config, | |
| if(sep) { | |
| *contp = (char) sep; | |
| - | warnf(config->global, |
| - | "garbage at end of field specification: %s", contp); |
| + | warnf("garbage at end of field specification: %s", contp); |
| } | |
| } | |
| @@ -906,7 +891,7 @@ int formparse(struct OperationConfig *config, | |
| SET_TOOL_MIME_PTR(part, name); | |
| } | |
| else { | |
| - | warnf(config->global, "Illegally formatted input field"); |
| + | warnf("Illegally formatted input field"); |
| goto fail; | |
| } | |
| err = 0; | |
| @@ -55,15 +55,13 @@ struct tool_mime { | |
| curl_off_t origin; /* Stdin read origin offset. */ | |
| curl_off_t size; /* Stdin data size. */ | |
| curl_off_t curpos; /* Stdin current read position. */ | |
| - | struct GlobalConfig *global; /* For access from callback. */ |
| }; | |
| size_t tool_mime_stdin_read(char *buffer, | |
| size_t size, size_t nitems, void *arg); | |
| int tool_mime_stdin_seek(void *instream, curl_off_t offset, int whence); | |
| - | int formparse(struct OperationConfig *config, |
| - | const char *input, |
| + | int formparse(const char *input, |
| struct tool_mime **mimeroot, | |
| struct tool_mime **mimecurrent, | |
| bool literal_value); | |
| @@ -523,8 +523,7 @@ GetFileAndPassword(const char *nextarg, char **file, char **password) | |
| /* Get a size parameter for '--limit-rate' or '--max-filesize'. | |
| * We support a 'G', 'M' or 'K' suffix too. | |
| */ | |
| - | static ParameterError GetSizeParameter(struct GlobalConfig *global, |
| - | const char *arg, |
| + | static ParameterError GetSizeParameter(const char *arg, |
| const char *which, | |
| curl_off_t *value_out) | |
| { | |
| @@ -532,7 +531,7 @@ static ParameterError GetSizeParameter(struct GlobalConfig *global, | |
| curl_off_t value; | |
| if(curlx_str_number(&unit, &value, CURL_OFF_T_MAX)) { | |
| - | warnf(global, "invalid number specified for %s", which); |
| + | warnf("invalid number specified for %s", which); |
| return PARAM_BAD_USE; | |
| } | |
| @@ -565,7 +564,7 @@ static ParameterError GetSizeParameter(struct GlobalConfig *global, | |
| /* for plain bytes, leave as-is */ | |
| break; | |
| default: | |
| - | warnf(global, "unsupported %s unit. Use G, M, K or B", which); |
| + | warnf("unsupported %s unit. Use G, M, K or B", which); |
| return PARAM_BAD_USE; | |
| } | |
| *value_out = value; | |
| @@ -591,8 +590,7 @@ static void cleanarg(char *str) | |
| #define MAX_DATAURLENCODE (500*1024*1024) | |
| /* --data-urlencode */ | |
| - | static ParameterError data_urlencode(struct GlobalConfig *global, |
| - | const char *nextarg, |
| + | static ParameterError data_urlencode(const char *nextarg, |
| char **postp, | |
| size_t *lenp) | |
| { | |
| @@ -631,7 +629,7 @@ static ParameterError data_urlencode(struct GlobalConfig *global, | |
| else { | |
| file = fopen(p, "rb"); | |
| if(!file) { | |
| - | errorf(global, "Failed to open %s", p); |
| + | errorf("Failed to open %s", p); |
| return PARAM_READ_ERROR; | |
| } | |
| } | |
| @@ -698,13 +696,12 @@ static void sethttpver(struct OperationConfig *config, | |
| { | |
| if(config->httpversion && | |
| (config->httpversion != httpversion)) | |
| - | warnf(config->global, "Overrides previous HTTP version option"); |
| + | warnf("Overrides previous HTTP version option"); |
| config->httpversion = httpversion; | |
| } | |
| - | static CURLcode set_trace_config(struct GlobalConfig *global, |
| - | const char *token) |
| + | static CURLcode set_trace_config(const char *token) |
| { | |
| CURLcode result = CURLE_OK; | |
| const char *next, *name; | |
| @@ -858,7 +855,7 @@ static ParameterError url_query(const char *nextarg, | |
| err = PARAM_NO_MEM; | |
| } | |
| else | |
| - | err = data_urlencode(config->global, nextarg, &query, &size); |
| + | err = data_urlencode(nextarg, &query, &size); |
| if(!err) { | |
| if(config->query) { | |
| @@ -885,10 +882,9 @@ static ParameterError set_data(cmdline_t cmd, | |
| FILE *file; | |
| size_t size = 0; | |
| ParameterError err = PARAM_OK; | |
| - | struct GlobalConfig *global = config->global; |
| if(cmd == C_DATA_URLENCODE) { /* --data-urlencode */ | |
| - | err = data_urlencode(global, nextarg, &postdata, &size); |
| + | err = data_urlencode(nextarg, &postdata, &size); |
| if(err) | |
| return err; | |
| } | |
| @@ -905,7 +901,7 @@ static ParameterError set_data(cmdline_t cmd, | |
| else { | |
| file = fopen(nextarg, "rb"); | |
| if(!file) { | |
| - | errorf(global, "Failed to open %s", nextarg); |
| + | errorf("Failed to open %s", nextarg); |
| return PARAM_READ_ERROR; | |
| } | |
| } | |
| @@ -958,8 +954,7 @@ static ParameterError set_data(cmdline_t cmd, | |
| return err; | |
| } | |
| - | static ParameterError set_rate(struct GlobalConfig *global, |
| - | const char *nextarg) |
| + | static ParameterError set_rate(const char *nextarg) |
| { | |
| /* --rate */ | |
| /* support a few different suffixes, extract the suffix first, then | |
| @@ -1007,14 +1002,14 @@ static ParameterError set_rate(struct GlobalConfig *global, | |
| numerator = 24*60*60*1000; | |
| break; | |
| default: | |
| - | errorf(global, "unsupported --rate unit"); |
| + | errorf("unsupported --rate unit"); |
| err = PARAM_BAD_USE; | |
| break; | |
| } | |
| if((LONG_MAX / numerator) < numunits) { | |
| /* overflow, too large number */ | |
| - | errorf(global, "too large --rate unit"); |
| + | errorf("too large --rate unit"); |
| err = PARAM_NUMBER_TOO_LARGE; | |
| } | |
| /* this typecast is okay based on the check above */ | |
| @@ -1076,7 +1071,7 @@ static ParameterError add_url(struct OperationConfig *config, | |
| url->useremote = url->noglob = TRUE; | |
| if(!err && (++config->num_urls > 1) && | |
| (config->etag_save_file || config->etag_compare_file)) { | |
| - | errorf(config->global, "The etag options only work on a single URL"); |
| + | errorf("The etag options only work on a single URL"); |
| return PARAM_BAD_USE; | |
| } | |
| } | |
| @@ -1159,20 +1154,17 @@ static ParameterError parse_localport(struct OperationConfig *config, | |
| static ParameterError parse_continue_at(struct OperationConfig *config, | |
| const char *nextarg) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| ParameterError err = PARAM_OK; | |
| if(config->range) { | |
| - | errorf(global, "--continue-at is mutually exclusive with --range"); |
| + | errorf("--continue-at is mutually exclusive with --range"); |
| return PARAM_BAD_USE; | |
| } | |
| if(config->rm_partial) { | |
| - | errorf(config->global, |
| - | "--continue-at is mutually exclusive with --remove-on-error"); |
| + | errorf("--continue-at is mutually exclusive with --remove-on-error"); |
| return PARAM_BAD_USE; | |
| } | |
| if(config->file_clobber_mode == CLOBBER_NEVER) { | |
| - | errorf(config->global, |
| - | "--continue-at is mutually exclusive with --no-clobber"); |
| + | errorf("--continue-at is mutually exclusive with --no-clobber"); |
| return PARAM_BAD_USE; | |
| } | |
| /* This makes us continue an ftp transfer at given position */ | |
| @@ -1216,8 +1208,7 @@ static ParameterError parse_ech(struct OperationConfig *config, | |
| file = fopen(nextarg, FOPEN_READTEXT); | |
| } | |
| if(!file) { | |
| - | warnf(config->global, |
| - | "Couldn't read file \"%s\" " |
| + | warnf("Couldn't read file \"%s\" " |
| "specified for \"--ech ecl:\" option", | |
| nextarg); | |
| return PARAM_BAD_USE; /* */ | |
| @@ -1252,7 +1243,7 @@ static ParameterError parse_header(struct OperationConfig *config, | |
| bool use_stdin = !strcmp(&nextarg[1], "-"); | |
| FILE *file = use_stdin ? stdin : fopen(&nextarg[1], FOPEN_READTEXT); | |
| if(!file) { | |
| - | errorf(config->global, "Failed to open %s", &nextarg[1]); |
| + | errorf("Failed to open %s", &nextarg[1]); |
| err = PARAM_READ_ERROR; | |
| } | |
| else { | |
| @@ -1392,10 +1383,9 @@ static ParameterError parse_range(struct OperationConfig *config, | |
| ParameterError err = PARAM_OK; | |
| curl_off_t value; | |
| const char *orig = nextarg; | |
| - | struct GlobalConfig *global = config->global; |
| if(config->use_resume) { | |
| - | errorf(global, "--continue-at is mutually exclusive with --range"); |
| + | errorf("--continue-at is mutually exclusive with --range"); |
| return PARAM_BAD_USE; | |
| } | |
| if(!curlx_str_number(&nextarg, &value, CURL_OFF_T_MAX) && | |
| @@ -1405,7 +1395,7 @@ static ParameterError parse_range(struct OperationConfig *config, | |
| claimed that to be a good way, why this code is added to work-around | |
| it. */ | |
| char buffer[32]; | |
| - | warnf(global, "A specified range MUST include at least one dash (-). " |
| + | warnf("A specified range MUST include at least one dash (-). " |
| "Appending one for you"); | |
| msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", | |
| value); | |
| @@ -1418,7 +1408,7 @@ static ParameterError parse_range(struct OperationConfig *config, | |
| /* byte range requested */ | |
| while(*nextarg) { | |
| if(!ISDIGIT(*nextarg) && *nextarg != '-' && *nextarg != ',') { | |
| - | warnf(global, "Invalid character is found in given range. " |
| + | warnf("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."); | |
| @@ -1471,8 +1461,7 @@ static ParameterError parse_upload_file(struct OperationConfig *config, | |
| static size_t verbose_nopts; | |
| - | static ParameterError parse_verbose(struct GlobalConfig *global, |
| - | bool toggle) |
| + | static ParameterError parse_verbose(bool toggle) |
| { | |
| ParameterError err = PARAM_OK; | |
| @@ -1480,7 +1469,7 @@ static ParameterError parse_verbose(struct GlobalConfig *global, | |
| * more than once in the same argument flag, like `-vvv`. */ | |
| if(!toggle) { | |
| global->verbosity = 0; | |
| - | if(set_trace_config(global, "-all")) |
| + | if(set_trace_config("-all")) |
| err = PARAM_NO_MEM; | |
| global->tracetype = TRACE_NONE; | |
| return err; | |
| @@ -1488,7 +1477,7 @@ static ParameterError parse_verbose(struct GlobalConfig *global, | |
| else if(!verbose_nopts) { | |
| /* fist `-v` in an argument resets to base verbosity */ | |
| global->verbosity = 0; | |
| - | if(set_trace_config(global, "-all")) |
| + | if(set_trace_config("-all")) |
| return PARAM_NO_MEM; | |
| } | |
| /* the '%' thing here will cause the trace get sent to stderr */ | |
| @@ -1501,25 +1490,24 @@ static ParameterError parse_verbose(struct GlobalConfig *global, | |
| err = PARAM_NO_MEM; | |
| else { | |
| if(global->tracetype && (global->tracetype != TRACE_PLAIN)) | |
| - | warnf(global, |
| - | "-v, --verbose overrides an earlier trace option"); |
| + | warnf("-v, --verbose overrides an earlier trace option"); |
| global->tracetype = TRACE_PLAIN; | |
| } | |
| break; | |
| case 1: | |
| global->verbosity = 2; | |
| - | if(set_trace_config(global, "ids,time,protocol")) |
| + | if(set_trace_config("ids,time,protocol")) |
| err = PARAM_NO_MEM; | |
| break; | |
| case 2: | |
| global->verbosity = 3; | |
| global->tracetype = TRACE_ASCII; | |
| - | if(set_trace_config(global, "ssl,read,write")) |
| + | if(set_trace_config("ssl,read,write")) |
| err = PARAM_NO_MEM; | |
| break; | |
| case 3: | |
| global->verbosity = 4; | |
| - | if(set_trace_config(global, "network")) |
| + | if(set_trace_config("network")) |
| err = PARAM_NO_MEM; | |
| break; | |
| default: | |
| @@ -1549,7 +1537,7 @@ static ParameterError parse_writeout(struct OperationConfig *config, | |
| fname = nextarg; | |
| file = fopen(fname, FOPEN_READTEXT); | |
| if(!file) { | |
| - | errorf(config->global, "Failed to open %s", fname); |
| + | errorf("Failed to open %s", fname); |
| return PARAM_READ_ERROR; | |
| } | |
| } | |
| @@ -1560,7 +1548,7 @@ static ParameterError parse_writeout(struct OperationConfig *config, | |
| if(err) | |
| return err; | |
| if(!config->writeout) | |
| - | warnf(config->global, "Failed to read %s", fname); |
| + | warnf("Failed to read %s", fname); |
| } | |
| else | |
| err = getstr(&config->writeout, nextarg, ALLOW_BLANK); | |
| @@ -1596,15 +1584,14 @@ static ParameterError parse_time_cond(struct OperationConfig *config, | |
| if(config->condtime == -1) { | |
| curl_off_t value; | |
| /* now let's see if it is a filename to get the time from instead! */ | |
| - | int rc = getfiletime(nextarg, config->global, &value); |
| + | int rc = getfiletime(nextarg, &value); |
| if(!rc) | |
| /* pull the time out from the file */ | |
| config->condtime = value; | |
| else { | |
| /* failed, remove time condition */ | |
| config->timecond = CURL_TIMECOND_NONE; | |
| - | warnf(config->global, |
| - | "Illegal date format for -z, --time-cond (and not " |
| + | warnf("Illegal date format for -z, --time-cond (and not " |
| "a filename). Disabling time condition. " | |
| "See curl_getdate(3) for valid date syntax."); | |
| } | |
| @@ -1684,10 +1671,9 @@ static void togglebit(bool toggle, unsigned long *modify, unsigned long bits) | |
| } | |
| /* opt_depr is the function that handles ARG_DEPR options */ | |
| - | static void opt_depr(struct GlobalConfig *global, |
| - | const struct LongShort *a) |
| + | static void opt_depr(const struct LongShort *a) |
| { | |
| - | warnf(global, "--%s is deprecated and has no function anymore", a->lname); |
| + | warnf("--%s is deprecated and has no function anymore", a->lname); |
| } | |
| static ParameterError opt_sslver(struct OperationConfig *config, | |
| @@ -1695,7 +1681,7 @@ static ParameterError opt_sslver(struct OperationConfig *config, | |
| { | |
| if(config->ssl_version_max && | |
| (config->ssl_version_max < ver)) { | |
| - | errorf(config->global, "Minimum TLS version set higher than max"); |
| + | errorf("Minimum TLS version set higher than max"); |
| return PARAM_BAD_USE; | |
| } | |
| config->ssl_version = ver; | |
| @@ -1787,7 +1773,6 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| const struct LongShort *a, | |
| bool toggle) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| switch(a->cmd) { | |
| case C_ALPN: /* --alpn */ | |
| config->noalpn = !toggle; | |
| @@ -1864,7 +1849,7 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| case C_SSL: /* --ssl */ | |
| config->ftp_ssl = toggle; | |
| if(config->ftp_ssl) | |
| - | warnf(global, "--%s is an insecure option, consider --ssl-reqd instead", |
| + | warnf("--%s is an insecure option, consider --ssl-reqd instead", |
| a->lname); | |
| break; | |
| case C_FTP_SSL_CCC: /* --ftp-ssl-ccc */ | |
| @@ -2011,7 +1996,7 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| config->doh_verifystatus = toggle; | |
| break; | |
| case C_FALSE_START: /* --false-start */ | |
| - | opt_depr(global, a); |
| + | opt_depr(a); |
| break; | |
| case C_SSL_NO_REVOKE: /* --ssl-no-revoke */ | |
| config->ssl_no_revoke = toggle; | |
| @@ -2046,15 +2031,14 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| case C_FAIL_WITH_BODY: /* --fail-with-body */ | |
| config->failwithbody = toggle; | |
| if(config->failonerror && config->failwithbody) { | |
| - | errorf(config->global, "You must select either --fail or " |
| + | errorf("You must select either --fail or " |
| "--fail-with-body, not both."); | |
| return PARAM_BAD_USE; | |
| } | |
| break; | |
| case C_REMOVE_ON_ERROR: /* --remove-on-error */ | |
| if(config->use_resume && toggle) { | |
| - | errorf(config->global, |
| - | "--continue-at is mutually exclusive with --remove-on-error"); |
| + | errorf("--continue-at is mutually exclusive with --remove-on-error"); |
| return PARAM_BAD_USE; | |
| } | |
| config->rm_partial = toggle; | |
| @@ -2062,7 +2046,7 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| case C_FAIL: /* --fail */ | |
| config->failonerror = toggle; | |
| if(config->failonerror && config->failwithbody) { | |
| - | errorf(config->global, "You must select either --fail or " |
| + | errorf("You must select either --fail or " |
| "--fail-with-body, not both."); | |
| return PARAM_BAD_USE; | |
| } | |
| @@ -2083,7 +2067,7 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| case C_HEAD: /* --head */ | |
| config->no_body = toggle; | |
| config->show_headers = toggle; | |
| - | if(SetHTTPrequest(config, (config->no_body) ? TOOL_HTTPREQ_HEAD : |
| + | if(SetHTTPrequest((config->no_body) ? TOOL_HTTPREQ_HEAD : |
| TOOL_HTTPREQ_GET, &config->httpreq)) | |
| return PARAM_BAD_USE; | |
| break; | |
| @@ -2117,8 +2101,7 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| break; | |
| case C_CLOBBER: /* --clobber */ | |
| if(config->use_resume && !toggle) { | |
| - | errorf(config->global, |
| - | "--continue-at is mutually exclusive with --no-clobber"); |
| + | errorf("--continue-at is mutually exclusive with --no-clobber"); |
| return PARAM_BAD_USE; | |
| } | |
| config->file_clobber_mode = toggle ? CLOBBER_ALWAYS : CLOBBER_NEVER; | |
| @@ -2146,7 +2129,7 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| global->showerror = toggle; | |
| break; | |
| case C_VERBOSE: /* --verbose */ | |
| - | return parse_verbose(global, toggle); |
| + | return parse_verbose(toggle); |
| break; | |
| case C_VERSION: /* --version */ | |
| if(toggle) /* --no-version yields no output! */ | |
| @@ -2166,12 +2149,12 @@ static ParameterError opt_bool(struct OperationConfig *config, | |
| FALLTHROUGH(); | |
| case C_LOCATION: /* --location */ | |
| if(config->followlocation == CURLFOLLOW_OBEYCODE) | |
| - | warnf(global, "--location overrides --follow"); |
| + | warnf("--location overrides --follow"); |
| config->followlocation = toggle ? CURLFOLLOW_ALL : 0; | |
| break; | |
| case C_FOLLOW: /* --follow */ | |
| if(config->followlocation == CURLFOLLOW_ALL) | |
| - | warnf(global, "--follow overrides --location"); |
| + | warnf("--follow overrides --location"); |
| config->followlocation = toggle ? CURLFOLLOW_OBEYCODE : 0; | |
| break; | |
| default: | |
| @@ -2189,7 +2172,6 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| ParameterError err = PARAM_OK; | |
| curl_off_t value; | |
| long val; | |
| - | struct GlobalConfig *global = config->global; |
| static const char *redir_protos[] = { | |
| "http", | |
| "https", | |
| @@ -2249,7 +2231,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| err = getstr(&global->trace_dump, nextarg, DENY_BLANK); | |
| if(!err) { | |
| if(global->tracetype && (global->tracetype != TRACE_BIN)) | |
| - | warnf(global, "--trace overrides an earlier trace/verbose option"); |
| + | warnf("--trace overrides an earlier trace/verbose option"); |
| global->tracetype = TRACE_BIN; | |
| } | |
| break; | |
| @@ -2257,20 +2239,19 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| err = getstr(&global->trace_dump, nextarg, DENY_BLANK); | |
| if(!err) { | |
| if(global->tracetype && (global->tracetype != TRACE_ASCII)) | |
| - | warnf(global, |
| - | "--trace-ascii overrides an earlier trace/verbose option"); |
| + | warnf("--trace-ascii overrides an earlier trace/verbose option"); |
| global->tracetype = TRACE_ASCII; | |
| } | |
| break; | |
| case C_LIMIT_RATE: /* --limit-rate */ | |
| - | err = GetSizeParameter(global, nextarg, "rate", &value); |
| + | err = GetSizeParameter(nextarg, "rate", &value); |
| if(!err) { | |
| config->recvpersecond = value; | |
| config->sendpersecond = value; | |
| } | |
| break; | |
| case C_RATE: | |
| - | err = set_rate(global, nextarg); |
| + | err = set_rate(nextarg); |
| break; | |
| case C_CREATE_FILE_MODE: /* --create-file-mode */ | |
| err = oct2nummax(&config->create_file_mode, nextarg, 0777); | |
| @@ -2292,7 +2273,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| err = getstr(&config->aws_sigv4, nextarg, ALLOW_BLANK); | |
| break; | |
| case C_STDERR: /* --stderr */ | |
| - | tool_set_stderr_file(global, nextarg); |
| + | tool_set_stderr_file(nextarg); |
| break; | |
| case C_INTERFACE: /* --interface */ | |
| /* interface */ | |
| @@ -2309,7 +2290,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| err = getstr(&config->haproxy_clientip, nextarg, DENY_BLANK); | |
| break; | |
| case C_MAX_FILESIZE: /* --max-filesize */ | |
| - | err = GetSizeParameter(global, nextarg, "max-filesize", &value); |
| + | err = GetSizeParameter(nextarg, "max-filesize", &value); |
| if(!err) | |
| config->max_filesize = value; | |
| break; | |
| @@ -2363,7 +2344,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| err = getstr(&config->ftp_account, nextarg, DENY_BLANK); | |
| break; | |
| case C_FTP_METHOD: /* --ftp-method */ | |
| - | config->ftp_filemethod = ftpfilemethod(config, nextarg); |
| + | config->ftp_filemethod = ftpfilemethod(nextarg); |
| break; | |
| case C_LOCAL_PORT: /* --local-port */ | |
| err = parse_localport(config, nextarg); | |
| @@ -2373,8 +2354,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| break; | |
| case C_LIBCURL: /* --libcurl */ | |
| #ifdef CURL_DISABLE_LIBCURL_OPTION | |
| - | warnf(global, |
| - | "--libcurl option was disabled at build-time"); |
| + | warnf("--libcurl option was disabled at build-time"); |
| err = PARAM_OPTION_UNKNOWN; | |
| #else | |
| err = getstr(&global->libcurl, nextarg, DENY_BLANK); | |
| @@ -2407,19 +2387,18 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| break; | |
| case C_PROTO: /* --proto */ | |
| config->proto_present = TRUE; | |
| - | err = proto2num(config, built_in_protos, &config->proto_str, nextarg); |
| + | err = proto2num(built_in_protos, &config->proto_str, nextarg); |
| break; | |
| case C_PROTO_REDIR: /* --proto-redir */ | |
| config->proto_redir_present = TRUE; | |
| - | if(proto2num(config, redir_protos, &config->proto_redir_str, |
| - | nextarg)) |
| + | if(proto2num(redir_protos, &config->proto_redir_str, nextarg)) |
| err = PARAM_BAD_USE; | |
| break; | |
| case C_RESOLVE: /* --resolve */ | |
| err = add2list(&config->resolve, nextarg); | |
| break; | |
| case C_DELEGATION: /* --delegation */ | |
| - | config->gssapi_delegation = delegation(config, nextarg); |
| + | config->gssapi_delegation = delegation(nextarg); |
| break; | |
| case C_MAIL_AUTH: /* --mail-auth */ | |
| err = getstr(&config->mail_auth, nextarg, DENY_BLANK); | |
| @@ -2455,7 +2434,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| case C_TLS_MAX: /* --tls-max */ | |
| err = str2tls_max(&config->ssl_version_max, nextarg); | |
| if(!err && (config->ssl_version_max < config->ssl_version)) { | |
| - | errorf(global, "--tls-max set lower than minimum accepted version"); |
| + | errorf("--tls-max set lower than minimum accepted version"); |
| err = PARAM_BAD_USE; | |
| } | |
| break; | |
| @@ -2464,11 +2443,11 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| /* 0 is a valid value for this timeout */ | |
| break; | |
| case C_TRACE_CONFIG: /* --trace-config */ | |
| - | if(set_trace_config(global, nextarg)) |
| + | if(set_trace_config(nextarg)) |
| err = PARAM_NO_MEM; | |
| break; | |
| case C_VARIABLE: /* --variable */ | |
| - | err = setvariable(global, nextarg); |
| + | err = setvariable(nextarg); |
| break; | |
| case C_TLS13_CIPHERS: /* --tls13-ciphers */ | |
| err = getstr(&config->cipher13_list, nextarg, DENY_BLANK); | |
| @@ -2678,7 +2657,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| break; | |
| case C_ETAG_SAVE: /* --etag-save */ | |
| if(config->num_urls > 1) { | |
| - | errorf(global, "The etag options only work on a single URL"); |
| + | errorf("The etag options only work on a single URL"); |
| err = PARAM_BAD_USE; | |
| } | |
| else | |
| @@ -2686,7 +2665,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| break; | |
| case C_ETAG_COMPARE: /* --etag-compare */ | |
| if(config->num_urls > 1) { | |
| - | errorf(global, "The etag options only work on a single URL"); |
| + | errorf("The etag options only work on a single URL"); |
| err = PARAM_BAD_USE; | |
| } | |
| else | |
| @@ -2702,13 +2681,10 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| case C_FORM_STRING: /* --form-string */ | |
| /* "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->mimeroot, |
| - | &config->mimecurrent, |
| + | if(formparse(nextarg, &config->mimeroot, &config->mimecurrent, |
| (a->cmd == C_FORM_STRING))) /* literal string */ | |
| err = PARAM_BAD_USE; | |
| - | else if(SetHTTPrequest(config, TOOL_HTTPREQ_MIMEPOST, &config->httpreq)) |
| + | else if(SetHTTPrequest(TOOL_HTTPREQ_MIMEPOST, &config->httpreq)) |
| err = PARAM_BAD_USE; | |
| break; | |
| case C_REQUEST_TARGET: /* --request-target */ | |
| @@ -2719,8 +2695,8 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| err = parse_header(config, (cmdline_t)a->cmd, nextarg); | |
| break; | |
| case C_CONFIG: /* --config */ | |
| - | if(parseconfig(nextarg, global)) { |
| - | errorf(global, "cannot read config from '%s'", nextarg); |
| + | if(parseconfig(nextarg)) { |
| + | errorf("cannot read config from '%s'", nextarg); |
| err = PARAM_READ_ERROR; | |
| } | |
| break; | |
| @@ -2747,7 +2723,7 @@ static ParameterError opt_filestring(struct OperationConfig *config, | |
| break; | |
| case C_FTP_SSL_CCC_MODE: /* --ftp-ssl-ccc-mode */ | |
| config->ftp_ssl_ccc = TRUE; | |
| - | config->ftp_ssl_ccc_mode = ftpcccmethod(config, nextarg); |
| + | config->ftp_ssl_ccc_mode = ftpcccmethod(nextarg); |
| break; | |
| case C_QUOTE: /* --quote */ | |
| err = parse_quote(config, nextarg); | |
| @@ -2849,7 +2825,6 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ | |
| bool nextalloc = FALSE; /* if nextarg is allocated */ | |
| bool consumearg = TRUE; /* the argument comes separate */ | |
| const struct LongShort *a = NULL; | |
| - | struct GlobalConfig *global = config->global; |
| verbose_nopts = 0; /* options processed in `flag`*/ | |
| *usedarg = FALSE; /* default is that we do not use the arg */ | |
| @@ -2911,7 +2886,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ | |
| err = PARAM_EXPAND_ERROR; | |
| goto error; | |
| } | |
| - | err = varexpand(global, nextarg, &nbuf, &replaced); |
| + | err = varexpand(nextarg, &nbuf, &replaced); |
| if(err) { | |
| curlx_dyn_free(&nbuf); | |
| goto error; | |
| @@ -2961,18 +2936,18 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ | |
| *usedarg = consumearg; /* mark it as used */ | |
| } | |
| if(a->desc & ARG_DEPR) { | |
| - | opt_depr(global, a); |
| + | opt_depr(a); |
| break; | |
| } | |
| if((ARGTYPE(a->desc) == ARG_FILE) && | |
| (nextarg[0] == '-') && nextarg[1]) { | |
| /* if the filename looks like a command line option */ | |
| - | warnf(global, "The filename argument '%s' looks like a flag.", |
| + | warnf("The filename argument '%s' looks like a flag.", |
| nextarg); | |
| } | |
| else if(!strncmp("\xe2\x80\x9c", nextarg, 3)) { | |
| - | warnf(global, "The argument '%s' starts with a Unicode quote where " |
| + | warnf("The argument '%s' starts with a Unicode quote where " |
| "maybe an ASCII \" was intended?", | |
| nextarg); | |
| } | |
| @@ -2983,7 +2958,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ | |
| } | |
| else { | |
| if(a->desc & ARG_DEPR) { | |
| - | opt_depr(global, a); |
| + | opt_depr(a); |
| break; | |
| } | |
| /* ARG_NONE | ARG_BOOL */ | |
| @@ -3003,8 +2978,7 @@ error: | |
| return err; | |
| } | |
| - | ParameterError parse_args(struct GlobalConfig *global, int argc, |
| - | argv_item_t argv[]) |
| + | ParameterError parse_args(int argc, argv_item_t argv[]) |
| { | |
| int i; | |
| bool stillflags; | |
| @@ -3045,7 +3019,7 @@ ParameterError parse_args(struct GlobalConfig *global, int argc, | |
| if(config->url_list && config->url_list->url) { | |
| /* Allocate the next config */ | |
| - | config->next = config_alloc(global); |
| + | config->next = config_alloc(); |
| if(config->next) { | |
| /* Update the last config pointer */ | |
| global->last = config->next; | |
| @@ -3058,7 +3032,7 @@ ParameterError parse_args(struct GlobalConfig *global, int argc, | |
| result = PARAM_NO_MEM; | |
| } | |
| else { | |
| - | errorf(global, "missing URL before --next"); |
| + | errorf("missing URL before --next"); |
| result = PARAM_BAD_USE; | |
| } | |
| } | |
| @@ -360,7 +360,6 @@ typedef enum { | |
| PARAM_LAST | |
| } ParameterError; | |
| - | struct GlobalConfig; |
| struct OperationConfig; | |
| const struct LongShort *findlongopt(const char *opt); | |
| @@ -376,8 +375,7 @@ void parse_cert_parameter(const char *cert_parameter, | |
| char **passphrase); | |
| #endif | |
| - | ParameterError parse_args(struct GlobalConfig *global, int argc, |
| - | argv_item_t argv[]); |
| + | ParameterError parse_args(int argc, argv_item_t argv[]); |
| #if defined(UNICODE) && defined(_WIN32) && !defined(UNDER_CE) | |
| @@ -75,7 +75,7 @@ const char *param2text(ParameterError error) | |
| } | |
| } | |
| - | int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store) |
| + | int SetHTTPrequest(HttpReq req, HttpReq *store) |
| { | |
| /* this mirrors the HttpReq enum in tool_sdecls.h */ | |
| const char *reqname[]= { | |
| @@ -92,15 +92,14 @@ int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store) | |
| *store = req; | |
| return 0; | |
| } | |
| - | warnf(config->global, "You can only select one HTTP request method! " |
| + | warnf("You can only select one HTTP request method! " |
| "You asked for both %s and %s.", | |
| reqname[req], reqname[*store]); | |
| return 1; | |
| } | |
| - | void customrequest_helper(struct OperationConfig *config, HttpReq req, |
| - | char *method) |
| + | void customrequest_helper(HttpReq req, char *method) |
| { | |
| /* this mirrors the HttpReq enum in tool_sdecls.h */ | |
| const char *dflt[]= { | |
| @@ -115,12 +114,11 @@ void customrequest_helper(struct OperationConfig *config, HttpReq req, | |
| if(!method) | |
| ; | |
| else if(curl_strequal(method, dflt[req])) { | |
| - | notef(config->global, "Unnecessary use of -X or --request, %s is already " |
| + | notef("Unnecessary use of -X or --request, %s is already " |
| "inferred.", dflt[req]); | |
| } | |
| else if(curl_strequal(method, "head")) { | |
| - | warnf(config->global, |
| - | "Setting custom HTTP method to HEAD with -X/--request may not work " |
| + | warnf("Setting custom HTTP method to HEAD with -X/--request may not work " |
| "the way you want. Consider using -I/--head instead."); | |
| } | |
| } | |
| @@ -26,11 +26,7 @@ | |
| #include "tool_setup.h" | |
| const char *param2text(ParameterError error); | |
| - | |
| - | int SetHTTPrequest(struct OperationConfig *config, HttpReq req, |
| - | HttpReq *store); |
| - | |
| - | void customrequest_helper(struct OperationConfig *config, HttpReq req, |
| - | char *method); |
| + | int SetHTTPrequest(HttpReq req, HttpReq *store); |
| + | void customrequest_helper(HttpReq req, char *method); |
| #endif /* HEADER_CURL_TOOL_HELPERS_H */ | |
| @@ -140,80 +140,6 @@ static void memory_tracking_init(void) | |
| # define memory_tracking_init() tool_nop_stmt | |
| #endif | |
| - | /* |
| - | * 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(struct GlobalConfig *global) |
| - | { |
| - | CURLcode result = CURLE_OK; |
| - | |
| - | #ifdef __DJGPP__ |
| - | /* stop stat() wasting time */ |
| - | _djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE; |
| - | #endif |
| - | |
| - | /* Initialise the global config */ |
| - | global->showerror = FALSE; /* show errors when silent */ |
| - | global->styled_output = TRUE; /* enable detection */ |
| - | global->parallel_max = PARALLEL_DEFAULT; |
| - | |
| - | /* Allocate the initial operate config */ |
| - | global->first = global->last = config_alloc(global); |
| - | if(global->first) { |
| - | /* Perform the libcurl initialization */ |
| - | result = curl_global_init(CURL_GLOBAL_DEFAULT); |
| - | if(!result) { |
| - | /* Get information about libcurl */ |
| - | result = get_libcurl_info(); |
| - | |
| - | if(result) { |
| - | errorf(global, "error retrieving curl library information"); |
| - | free(global->first); |
| - | } |
| - | } |
| - | else { |
| - | errorf(global, "error initializing curl library"); |
| - | free(global->first); |
| - | } |
| - | } |
| - | else { |
| - | errorf(global, "error initializing curl"); |
| - | result = CURLE_FAILED_INIT; |
| - | } |
| - | |
| - | return result; |
| - | } |
| - | |
| - | static void free_globalconfig(struct GlobalConfig *global) |
| - | { |
| - | tool_safefree(global->trace_dump); |
| - | |
| - | if(global->trace_fopened && global->trace_stream) |
| - | fclose(global->trace_stream); |
| - | global->trace_stream = NULL; |
| - | |
| - | tool_safefree(global->libcurl); |
| - | } |
| - | |
| - | /* |
| - | * This is the main global destructor for the app. Call this after _all_ |
| - | * libcurl usage is done. |
| - | */ |
| - | static void main_free(struct GlobalConfig *global) |
| - | { |
| - | /* Cleanup the easy handle */ |
| - | /* Main cleanup */ |
| - | curl_global_cleanup(); |
| - | free_globalconfig(global); |
| - | |
| - | /* Free the OperationConfig structures */ |
| - | config_free(global->last); |
| - | global->first = NULL; |
| - | global->last = NULL; |
| - | } |
| - | |
| /* | |
| ** curl tool main function. | |
| */ | |
| @@ -230,8 +156,6 @@ int main(int argc, char *argv[]) | |
| #endif | |
| { | |
| CURLcode result = CURLE_OK; | |
| - | struct GlobalConfig global; |
| - | memset(&global, 0, sizeof(global)); |
| tool_init_stderr(); | |
| @@ -250,13 +174,13 @@ int main(int argc, char *argv[]) | |
| /* win32_init must be called before other init routines. */ | |
| result = win32_init(); | |
| if(result) { | |
| - | errorf(&global, "(%d) Windows-specific init failed", result); |
| + | errorf("(%d) Windows-specific init failed", result); |
| return (int)result; | |
| } | |
| #endif | |
| if(main_checkfds()) { | |
| - | errorf(&global, "out of file descriptors"); |
| + | errorf("out of file descriptors"); |
| return CURLE_FAILED_INIT; | |
| } | |
| @@ -269,13 +193,13 @@ int main(int argc, char *argv[]) | |
| /* Initialize the curl library - do not call any libcurl functions before | |
| this point */ | |
| - | result = main_init(&global); |
| + | result = globalconf_init(); |
| if(!result) { | |
| /* Start our curl operation */ | |
| - | result = operate(&global, argc, argv); |
| + | result = operate(argc, argv); |
| /* Perform the main cleanup */ | |
| - | main_free(&global); |
| + | globalconf_free(); |
| } | |
| #ifdef _WIN32 | |
| @@ -34,13 +34,11 @@ | |
| #define NOTE_PREFIX "Note: " | |
| #define ERROR_PREFIX "curl: " | |
| - | static void voutf(struct GlobalConfig *global, |
| - | const char *prefix, |
| + | static void voutf(const char *prefix, |
| const char *fmt, | |
| - | va_list ap) CURL_PRINTF(3, 0); |
| + | va_list ap) CURL_PRINTF(2, 0); |
| - | static void voutf(struct GlobalConfig *global, |
| - | const char *prefix, |
| + | static void voutf(const char *prefix, |
| const char *fmt, | |
| va_list ap) | |
| { | |
| @@ -90,12 +88,12 @@ static void voutf(struct GlobalConfig *global, | |
| * Emit 'note' formatted message on configured 'errors' stream, if verbose was | |
| * selected. | |
| */ | |
| - | void notef(struct GlobalConfig *global, const char *fmt, ...) |
| + | void notef(const char *fmt, ...) |
| { | |
| va_list ap; | |
| va_start(ap, fmt); | |
| if(global->tracetype) | |
| - | voutf(global, NOTE_PREFIX, fmt, ap); |
| + | voutf(NOTE_PREFIX, fmt, ap); |
| va_end(ap); | |
| } | |
| @@ -103,11 +101,11 @@ void notef(struct GlobalConfig *global, const char *fmt, ...) | |
| * Emit warning formatted message on configured 'errors' stream unless | |
| * mute (--silent) was selected. | |
| */ | |
| - | void warnf(struct GlobalConfig *global, const char *fmt, ...) |
| + | void warnf(const char *fmt, ...) |
| { | |
| va_list ap; | |
| va_start(ap, fmt); | |
| - | voutf(global, WARN_PREFIX, fmt, ap); |
| + | voutf(WARN_PREFIX, fmt, ap); |
| va_end(ap); | |
| } | |
| @@ -137,12 +135,12 @@ void helpf(FILE *errors, const char *fmt, ...) | |
| * Emit error message on error stream if not muted. When errors are not tied | |
| * to command line arguments, use helpf() for such errors. | |
| */ | |
| - | void errorf(struct GlobalConfig *global, const char *fmt, ...) |
| + | void errorf(const char *fmt, ...) |
| { | |
| if(!global->silent || global->showerror) { | |
| va_list ap; | |
| va_start(ap, fmt); | |
| - | voutf(global, ERROR_PREFIX, fmt, ap); |
| + | voutf(ERROR_PREFIX, fmt, ap); |
| va_end(ap); | |
| } | |
| } | |
| @@ -26,13 +26,13 @@ | |
| #include "tool_setup.h" | |
| #include "tool_cfgable.h" | |
| - | void warnf(struct GlobalConfig *global, const char *fmt, ...) |
| - | CURL_PRINTF(2, 3); |
| - | void notef(struct GlobalConfig *global, const char *fmt, ...) |
| - | CURL_PRINTF(2, 3); |
| + | void warnf(const char *fmt, ...) |
| + | CURL_PRINTF(1, 2); |
| + | void notef(const char *fmt, ...) |
| + | CURL_PRINTF(1, 2); |
| void helpf(FILE *errors, const char *fmt, ...) | |
| CURL_PRINTF(2, 3); | |
| - | void errorf(struct GlobalConfig *global, const char *fmt, ...) |
| - | CURL_PRINTF(2, 3); |
| + | void errorf(const char *fmt, ...) |
| + | CURL_PRINTF(1, 2); |
| #endif /* HEADER_CURL_TOOL_MSGS_H */ | |
| @@ -114,8 +114,7 @@ static CURLcode single_transfer(struct OperationConfig *config, | |
| CURLSH *share, | |
| bool *added, | |
| bool *skipped); | |
| - | static CURLcode create_transfer(struct GlobalConfig *global, |
| - | CURLSH *share, |
| + | static CURLcode create_transfer(CURLSH *share, |
| bool *added, | |
| bool *skipped); | |
| @@ -265,9 +264,6 @@ static CURLcode pre_transfer(struct per_transfer *per) | |
| curl_off_t uploadfilesize = -1; | |
| struct_stat fileinfo; | |
| CURLcode result = CURLE_OK; | |
| - | #ifndef CURL_DISABLE_LIBCURL_OPTION |
| - | struct OperationConfig *config = per->config; |
| - | #endif |
| if(per->uploadfile && !stdin_upload(per->uploadfile)) { | |
| /* VMS Note: | |
| @@ -467,7 +463,7 @@ static CURLcode retrycheck(struct OperationConfig *config, | |
| if((CURL_OFF_T_MAX - sleeptime < ms) || | |
| (ms + sleeptime > config->retry_maxtime_ms)) { | |
| - | warnf(config->global, "The Retry-After: time would " |
| + | warnf("The Retry-After: time would " |
| "make this command line exceed the maximum allowed time " | |
| "for retries."); | |
| *retryp = FALSE; | |
| @@ -476,7 +472,7 @@ static CURLcode retrycheck(struct OperationConfig *config, | |
| } | |
| } | |
| } | |
| - | warnf(config->global, "Problem %s. " |
| + | warnf("Problem %s. " |
| "Will retry in %ld second%s. " | |
| "%ld retr%s left.", | |
| m[retry], sleeptime/1000L, | |
| @@ -506,8 +502,7 @@ static CURLcode retrycheck(struct OperationConfig *config, | |
| int rc; | |
| /* We have written data to an output file, we truncate file */ | |
| fflush(outs->stream); | |
| - | notef(config->global, |
| - | "Throwing away %" CURL_FORMAT_CURL_OFF_T " bytes", |
| + | notef("Throwing away %" CURL_FORMAT_CURL_OFF_T " bytes", |
| outs->bytes); | |
| /* truncate file at the position where we started appending */ | |
| #if defined(HAVE_FTRUNCATE) && !defined(__DJGPP__) && !defined(__AMIGA__) && \ | |
| @@ -515,7 +510,7 @@ static CURLcode retrycheck(struct OperationConfig *config, | |
| if(ftruncate(fileno(outs->stream), outs->init)) { | |
| /* when truncate fails, we cannot just append as then we will | |
| create something strange, bail out */ | |
| - | errorf(config->global, "Failed to truncate file"); |
| + | errorf("Failed to truncate file"); |
| return CURLE_WRITE_ERROR; | |
| } | |
| /* now seek to the end of the file, the position where we | |
| @@ -529,7 +524,7 @@ static CURLcode retrycheck(struct OperationConfig *config, | |
| rc = fseek(outs->stream, (long)outs->init, SEEK_SET); | |
| #endif | |
| if(rc) { | |
| - | errorf(config->global, "Failed seeking to end of file"); |
| + | errorf("Failed seeking to end of file"); |
| return CURLE_WRITE_ERROR; | |
| } | |
| outs->bytes = 0; /* clear for next round */ | |
| @@ -547,8 +542,7 @@ static CURLcode retrycheck(struct OperationConfig *config, | |
| /* | |
| * Call this after a transfer has completed. | |
| */ | |
| - | static CURLcode post_per_transfer(struct GlobalConfig *global, |
| - | struct per_transfer *per, |
| + | static CURLcode post_per_transfer(struct per_transfer *per, |
| CURLcode result, | |
| bool *retryp, | |
| long *delay) /* milliseconds! */ | |
| @@ -569,7 +563,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, | |
| #if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) | |
| sclose(per->infd); | |
| #else | |
| - | warnf(per->config->global, "Closing per->infd != 0: FD == " |
| + | warnf("Closing per->infd != 0: FD == " |
| "%d. This behavior is only supported on desktop " | |
| " Windows", per->infd); | |
| #endif | |
| @@ -616,7 +610,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, | |
| if(!result && config->xattr && outs->fopened && outs->stream) { | |
| rc = fwrite_xattr(curl, per->url, fileno(outs->stream)); | |
| if(rc) | |
| - | warnf(config->global, "Error setting extended attributes on '%s': %s", |
| + | warnf("Error setting extended attributes on '%s': %s", |
| outs->filename, strerror(errno)); | |
| } | |
| @@ -638,7 +632,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, | |
| if(!result && rc) { | |
| /* something went wrong in the writing process */ | |
| result = CURLE_WRITE_ERROR; | |
| - | errorf(global, "Failed writing body"); |
| + | errorf("Failed writing body"); |
| } | |
| } | |
| @@ -671,19 +665,19 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, | |
| if(!result && rc) { | |
| /* something went wrong in the writing process */ | |
| result = CURLE_WRITE_ERROR; | |
| - | errorf(config->global, "curl: (%d) Failed writing body", result); |
| + | errorf("curl: (%d) Failed writing body", result); |
| } | |
| if(result && config->rm_partial) { | |
| struct_stat st; | |
| if(!stat(outs->filename, &st) && | |
| S_ISREG(st.st_mode)) { | |
| if(!unlink(outs->filename)) | |
| - | notef(global, "Removed output file: %s", outs->filename); |
| + | notef("Removed output file: %s", outs->filename); |
| else | |
| - | warnf(global, "Failed removing: %s", outs->filename); |
| + | warnf("Failed removing: %s", outs->filename); |
| } | |
| else | |
| - | warnf(global, "Skipping removal; not a regular file: %s", |
| + | warnf("Skipping removal; not a regular file: %s", |
| outs->filename); | |
| } | |
| } | |
| @@ -693,7 +687,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global, | |
| /* Ask libcurl if we got a remote file time */ | |
| curl_off_t filetime = -1; | |
| curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime); | |
| - | setfiletime(filetime, outs->filename, global); |
| + | setfiletime(filetime, outs->filename); |
| } | |
| skip: | |
| /* Write the --write-out data before cleanup but after result is final */ | |
| @@ -778,7 +772,7 @@ static CURLcode append2query(struct OperationConfig *config, | |
| CURLU_GUESS_SCHEME); | |
| if(uerr) { | |
| result = urlerr_cvt(uerr); | |
| - | errorf(config->global, "(%d) Could not parse the URL, " |
| + | errorf("(%d) Could not parse the URL, " |
| "failed to set query", result); | |
| config->synthetic_error = TRUE; | |
| } | |
| @@ -810,7 +804,7 @@ static CURLcode etag_compare(struct OperationConfig *config) | |
| /* open file for reading: */ | |
| FILE *file = fopen(config->etag_compare_file, FOPEN_READTEXT); | |
| if(!file) | |
| - | warnf(config->global, "Failed to open %s: %s", config->etag_compare_file, |
| + | warnf("Failed to open %s: %s", config->etag_compare_file, |
| strerror(errno)); | |
| if((PARAM_OK == file2string(&etag_from_file, file)) && | |
| @@ -824,8 +818,7 @@ static CURLcode etag_compare(struct OperationConfig *config) | |
| if(!header) { | |
| if(file) | |
| fclose(file); | |
| - | errorf(config->global, |
| - | "Failed to allocate memory for custom etag header"); |
| + | errorf("Failed to allocate memory for custom etag header"); |
| return CURLE_OUT_OF_MEMORY; | |
| } | |
| @@ -845,8 +838,7 @@ static CURLcode etag_store(struct OperationConfig *config, | |
| bool *skip) | |
| { | |
| if(config->create_dirs) { | |
| - | CURLcode result = create_dir_hierarchy(config->etag_save_file, |
| - | config->global); |
| + | CURLcode result = create_dir_hierarchy(config->etag_save_file); |
| if(result) | |
| return result; | |
| } | |
| @@ -856,7 +848,7 @@ static CURLcode etag_store(struct OperationConfig *config, | |
| FILE *newfile = fopen(config->etag_save_file, "ab"); | |
| if(!newfile) { | |
| struct State *state = &config->state; | |
| - | warnf(config->global, "Failed creating file for saving etags: \"%s\". " |
| + | warnf("Failed creating file for saving etags: \"%s\". " |
| "Skip this transfer", config->etag_save_file); | |
| state->outfiles = NULL; | |
| glob_cleanup(&state->urlglob); | |
| @@ -900,8 +892,7 @@ static CURLcode setup_headerfile(struct OperationConfig *config, | |
| * that it does not need to be opened/closed for every transfer. | |
| */ | |
| if(config->create_dirs) { | |
| - | CURLcode result = create_dir_hierarchy(config->headerfile, |
| - | config->global); |
| + | CURLcode result = create_dir_hierarchy(config->headerfile); |
| /* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */ | |
| if(result) | |
| return result; | |
| @@ -914,7 +905,7 @@ static CURLcode setup_headerfile(struct OperationConfig *config, | |
| newfile = fopen(config->headerfile, "ab"); | |
| if(!newfile) { | |
| - | errorf(config->global, "Failed to open %s", config->headerfile); |
| + | errorf("Failed to open %s", config->headerfile); |
| return CURLE_WRITE_ERROR; | |
| } | |
| else { | |
| @@ -941,13 +932,12 @@ static CURLcode setup_outfile(struct OperationConfig *config, | |
| * decided we want to use the remote filename. | |
| */ | |
| struct State *state = &config->state; | |
| - | struct GlobalConfig *global = config->global; |
| if(!per->outfile) { | |
| /* extract the filename from the URL */ | |
| - | CURLcode result = get_url_file_name(global, &per->outfile, per->url); |
| + | CURLcode result = get_url_file_name(&per->outfile, per->url); |
| if(result) { | |
| - | errorf(global, "Failed to extract a filename" |
| + | errorf("Failed to extract a filename" |
| " from the URL to use for storage"); | |
| return result; | |
| } | |
| @@ -960,11 +950,11 @@ static CURLcode setup_outfile(struct OperationConfig *config, | |
| tool_safefree(storefile); | |
| if(result) { | |
| /* bad globbing */ | |
| - | warnf(global, "bad output glob"); |
| + | warnf("bad output glob"); |
| return result; | |
| } | |
| if(!*per->outfile) { | |
| - | warnf(global, "output glob produces empty string"); |
| + | warnf("output glob produces empty string"); |
| return CURLE_WRITE_ERROR; | |
| } | |
| } | |
| @@ -981,7 +971,7 @@ static CURLcode setup_outfile(struct OperationConfig *config, | |
| file output call */ | |
| if(config->create_dirs) { | |
| - | CURLcode result = create_dir_hierarchy(per->outfile, global); |
| + | CURLcode result = create_dir_hierarchy(per->outfile); |
| /* create_dir_hierarchy shows error upon CURLE_WRITE_ERROR */ | |
| if(result) | |
| return result; | |
| @@ -991,8 +981,7 @@ static CURLcode setup_outfile(struct OperationConfig *config, | |
| struct_stat fileinfo; | |
| if(!stat(per->outfile, &fileinfo)) { | |
| /* file is present */ | |
| - | notef(global, "skips transfer, \"%s\" exists locally", |
| - | per->outfile); |
| + | notef("skips transfer, \"%s\" exists locally", per->outfile); |
| per->skip = TRUE; | |
| *skipped = TRUE; | |
| } | |
| @@ -1022,7 +1011,7 @@ static CURLcode setup_outfile(struct OperationConfig *config, | |
| FILE *file = fopen(per->outfile, "ab"); | |
| #endif | |
| if(!file) { | |
| - | errorf(global, "cannot open '%s'", per->outfile); |
| + | errorf("cannot open '%s'", per->outfile); |
| return CURLE_WRITE_ERROR; | |
| } | |
| outs->fopened = TRUE; | |
| @@ -1040,7 +1029,6 @@ static CURLcode setup_outfile(struct OperationConfig *config, | |
| static void check_stdin_upload(struct OperationConfig *config, | |
| struct per_transfer *per) | |
| { | |
| - | struct GlobalConfig *global = config->global; |
| /* count to see if there are more than one auth bit set | |
| in the authtype field */ | |
| int authbits = 0; | |
| @@ -1060,8 +1048,7 @@ static void check_stdin_upload(struct OperationConfig *config, | |
| * we should warn them. | |
| */ | |
| if(config->proxyanyauth || (authbits > 1)) { | |
| - | warnf(global, |
| - | "Using --anyauth or --proxy-anyauth with upload from stdin" |
| + | warnf("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"); | |
| } | |
| @@ -1075,13 +1062,13 @@ static void check_stdin_upload(struct OperationConfig *config, | |
| /* non-blocking stdin behavior on Windows is challenging | |
| Spawn a new thread that will read from stdin and write | |
| out to a socket */ | |
| - | curl_socket_t f = win32_stdin_read_thread(global); |
| + | curl_socket_t f = win32_stdin_read_thread(); |
| if(f == CURL_SOCKET_BAD) | |
| - | warnf(global, "win32_stdin_read_thread returned INVALID_SOCKET " |
| + | warnf("win32_stdin_read_thread returned INVALID_SOCKET " |
| "falling back to blocking mode"); | |
| else if(f > INT_MAX) { | |
| - | warnf(global, "win32_stdin_read_thread returned identifier " |
| + | warnf("win32_stdin_read_thread returned identifier " |
| "larger than INT_MAX. This should not happen unless " | |
| "the upper 32 bits of a Windows socket have started " | |
| "being used for something... falling back to blocking " | |
| @@ -1092,8 +1079,7 @@ static void check_stdin_upload(struct OperationConfig *config, | |
| per->infd = (int)f; | |
| #endif | |
| if(curlx_nonblock((curl_socket_t)per->infd, TRUE) < 0) | |
| - | warnf(global, |
| - | "fcntl failed on fd=%d: %s", per->infd, strerror(errno)); |
| + | warnf("fcntl failed on fd=%d: %s", per->infd, strerror(errno)); |
| } | |
| } | |
| @@ -1104,7 +1090,6 @@ static CURLcode single_transfer(struct OperationConfig *config, | |
| bool *skipped) | |
| { | |
| CURLcode result = CURLE_OK; | |
| - | struct GlobalConfig *global = config->global; |
| bool orig_noprogress = global->noprogress; | |
| bool orig_isatty = global->isatty; | |
| struct State *state = &config->state; | |
| @@ -1118,12 +1103,12 @@ static CURLcode single_transfer(struct OperationConfig *config, | |
| /* Use the postfields data for an HTTP get */ | |
| httpgetfields = state->httpgetfields = config->postfields; | |
| config->postfields = NULL; | |
| - | if(SetHTTPrequest(config, (config->no_body ? TOOL_HTTPREQ_HEAD : |
| - | TOOL_HTTPREQ_GET), &config->httpreq)) |
| + | if(SetHTTPrequest((config->no_body ? TOOL_HTTPREQ_HEAD : |
| + | TOOL_HTTPREQ_GET), &config->httpreq)) |
| return CURLE_FAILED_INIT; | |
| } | |
| } | |
| - | else if(SetHTTPrequest(config, TOOL_HTTPREQ_SIMPLEPOST, &config->httpreq)) |
| + | else if(SetHTTPrequest(TOOL_HTTPREQ_SIMPLEPOST, &config->httpreq)) |
| return CURLE_FAILED_INIT; | |
| } | |
| @@ -1143,7 +1128,7 @@ static CURLcode single_transfer(struct OperationConfig *config, | |
| /* u->url is the full URL or NULL */ | |
| if(!u->url) { | |
| /* This node has no URL. End of the road. */ | |
| - | warnf(config->global, "Got more output options than URLs"); |
| + | warnf("Got more output options than URLs"); |
| break; | |
| } | |
| @@ -1166,7 +1151,7 @@ static CURLcode single_transfer(struct OperationConfig *config, | |
| if(glob_inuse(&state->inglob)) { | |
| result = glob_next_url(&state->uploadfile, &state->inglob); | |
| if(result == CURLE_OUT_OF_MEMORY) | |
| - | errorf(global, "out of memory"); |
| + | errorf("out of memory"); |
| } | |
| else if(!state->up) { | |
| /* copy the allocated string */ | |
| @@ -1235,7 +1220,7 @@ static CURLcode single_transfer(struct OperationConfig *config, | |
| if(state->uploadfile) { | |
| per->uploadfile = strdup(state->uploadfile); | |
| if(!per->uploadfile || | |
| - | SetHTTPrequest(config, TOOL_HTTPREQ_PUT, &config->httpreq)) { |
| + | SetHTTPrequest(TOOL_HTTPREQ_PUT, &config->httpreq)) { |
| tool_safefree(per->uploadfile); | |
| curl_easy_cleanup(curl); | |
| return CURLE_FAILED_INIT; | |
| @@ -1402,11 +1387,8 @@ static long all_added; /* number of easy handles currently added */ | |
| * to add even after this call returns. sets 'addedp' to TRUE if one or more | |
| * transfers were added. | |
| */ | |
| - | static CURLcode add_parallel_transfers(struct GlobalConfig *global, |
| - | CURLM *multi, |
| - | CURLSH *share, |
| - | bool *morep, |
| - | bool *addedp) |
| + | static CURLcode add_parallel_transfers(CURLM *multi, CURLSH *share, |
| + | bool *morep, bool *addedp) |
| { | |
| struct per_transfer *per; | |
| CURLcode result = CURLE_OK; | |
| @@ -1426,7 +1408,7 @@ static CURLcode add_parallel_transfers(struct GlobalConfig *global, | |
| if(nxfers < (curl_off_t)(global->parallel_max*2)) { | |
| bool skipped = FALSE; | |
| do { | |
| - | result = create_transfer(global, share, addedp, &skipped); |
| + | result = create_transfer(share, addedp, &skipped); |
| if(result) | |
| return result; | |
| } while(skipped); | |
| @@ -1476,7 +1458,7 @@ static CURLcode add_parallel_transfers(struct GlobalConfig *global, | |
| bool getadded = FALSE; | |
| bool skipped = FALSE; | |
| do { | |
| - | result = create_transfer(global, share, &getadded, &skipped); |
| + | result = create_transfer(share, &getadded, &skipped); |
| if(result) | |
| break; | |
| } while(skipped); | |
| @@ -1497,7 +1479,6 @@ static CURLcode add_parallel_transfers(struct GlobalConfig *global, | |
| } | |
| struct parastate { | |
| - | struct GlobalConfig *global; |
| CURLM *multi; | |
| CURLSH *share; | |
| CURLMcode mcode; | |
| @@ -1541,8 +1522,7 @@ static void check_multi_info(struct datauv *uv) | |
| uv->s->result = result; | |
| if(uv->s->more_transfers) { | |
| - | result = add_parallel_transfers(uv->s->global, uv->s->multi, |
| - | uv->s->share, |
| + | result = add_parallel_transfers(uv->s->multi, uv->s->share, |
| &uv->s->more_transfers, | |
| &uv->s->added_transfers); | |
| if(result && !uv->s->result) | |
| @@ -1691,7 +1671,7 @@ static CURLcode parallel_event(struct parastate *s) | |
| curl_multi_setopt(s->multi, CURLMOPT_TIMERFUNCTION, cb_timeout); | |
| curl_multi_setopt(s->multi, CURLMOPT_TIMERDATA, &uv); | |
| curl_multi_setopt(s->multi, CURLMOPT_MAX_HOST_CONNECTIONS, | |
| - | s->global->parallel_host); |
| + | global->parallel_host); |
| /* kickstart the thing */ | |
| curl_multi_socket_action(s->multi, CURL_SOCKET_TIMEOUT, 0, | |
| @@ -1725,8 +1705,8 @@ static CURLcode parallel_event(struct parastate *s) | |
| } | |
| if(s->more_transfers) { | |
| - | result = add_parallel_transfers(s->global, s->multi, s->share, |
| - | &s->more_transfers, &s->added_transfers); |
| + | result = add_parallel_transfers(s->multi, s->share, &s->more_transfers, |
| + | &s->added_transfers); |
| if(result && !s->result) | |
| s->result = result; | |
| } | |
| @@ -1762,8 +1742,7 @@ static CURLcode check_finished(struct parastate *s) | |
| int rc; | |
| CURLMsg *msg; | |
| bool checkmore = FALSE; | |
| - | struct GlobalConfig *global = s->global; |
| - | progress_meter(global, s->multi, &s->start, FALSE); |
| + | progress_meter(s->multi, &s->start, FALSE); |
| do { | |
| msg = curl_multi_info_read(s->multi, &rc); | |
| if(msg) { | |
| @@ -1781,7 +1760,7 @@ static CURLcode check_finished(struct parastate *s) | |
| "Transfer aborted due to critical error " | |
| "in another transfer"); | |
| } | |
| - | tres = post_per_transfer(global, ended, tres, &retry, &delay); |
| + | tres = post_per_transfer(ended, tres, &retry, &delay); |
| progress_finalize(ended); /* before it goes away */ | |
| all_added--; /* one fewer added */ | |
| checkmore = TRUE; | |
| @@ -1811,8 +1790,7 @@ static CURLcode check_finished(struct parastate *s) | |
| } | |
| if(checkmore) { | |
| /* one or more transfers completed, add more! */ | |
| - | CURLcode tres = add_parallel_transfers(global, |
| - | s->multi, s->share, |
| + | CURLcode tres = add_parallel_transfers(s->multi, s->share, |
| &s->more_transfers, | |
| &s->added_transfers); | |
| if(tres) | |
| @@ -1827,8 +1805,7 @@ static CURLcode check_finished(struct parastate *s) | |
| return result; | |
| } | |
| - | static CURLcode parallel_transfers(struct GlobalConfig *global, |
| - | CURLSH *share) |
| + | static CURLcode parallel_transfers(CURLSH *share) |
| { | |
| CURLcode result; | |
| struct parastate p; | |
| @@ -1841,12 +1818,11 @@ static CURLcode parallel_transfers(struct GlobalConfig *global, | |
| s->wrapitup = FALSE; | |
| s->wrapitup_processed = FALSE; | |
| s->tick = time(NULL); | |
| - | s->global = global; |
| s->multi = curl_multi_init(); | |
| if(!s->multi) | |
| return CURLE_OUT_OF_MEMORY; | |
| - | result = add_parallel_transfers(global, s->multi, s->share, |
| + | result = add_parallel_transfers(s->multi, s->share, |
| &s->more_transfers, &s->added_transfers); | |
| if(result) { | |
| curl_multi_cleanup(s->multi); | |
| @@ -1858,7 +1834,7 @@ static CURLcode parallel_transfers(struct GlobalConfig *global, | |
| #ifdef USE_LIBUV | |
| return parallel_event(s); | |
| #else | |
| - | errorf(global, "Testing --parallel event-based requires libuv"); |
| + | errorf("Testing --parallel event-based requires libuv"); |
| #endif | |
| else | |
| #endif | |
| @@ -1888,7 +1864,7 @@ static CURLcode parallel_transfers(struct GlobalConfig *global, | |
| result = check_finished(s); | |
| } | |
| - | (void)progress_meter(global, s->multi, &s->start, TRUE); |
| + | (void)progress_meter(s->multi, &s->start, TRUE); |
| } | |
| /* Make sure to return some kind of error if there was a multi problem */ | |
| @@ -1904,8 +1880,7 @@ static CURLcode parallel_transfers(struct GlobalConfig *global, | |
| return result; | |
| } | |
| - | static CURLcode serial_transfers(struct GlobalConfig *global, |
| - | CURLSH *share) |
| + | static CURLcode serial_transfers(CURLSH *share) |
| { | |
| CURLcode returncode = CURLE_OK; | |
| CURLcode result = CURLE_OK; | |
| @@ -1913,11 +1888,11 @@ static CURLcode serial_transfers(struct GlobalConfig *global, | |
| bool added = FALSE; | |
| bool skipped = FALSE; | |
| - | result = create_transfer(global, share, &added, &skipped); |
| + | result = create_transfer(share, &added, &skipped); |
| if(result) | |
| return result; | |
| if(!added) { | |
| - | errorf(global, "no transfer performed"); |
| + | errorf("no transfer performed"); |
| return CURLE_READ_ERROR; | |
| } | |
| for(per = transfers; per;) { | |
| @@ -1960,7 +1935,7 @@ static CURLcode serial_transfers(struct GlobalConfig *global, | |
| result = curl_easy_perform(per->curl); | |
| } | |
| - | returncode = post_per_transfer(global, per, result, &retry, &delay_ms); |
| + | returncode = post_per_transfer(per, result, &retry, &delay_ms); |
| if(retry) { | |
| curlx_wait_ms(delay_ms); | |
| continue; | |
| @@ -1972,7 +1947,7 @@ static CURLcode serial_transfers(struct GlobalConfig *global, | |
| else { | |
| do { | |
| /* setup the next one just before we delete this */ | |
| - | result = create_transfer(global, share, &added, &skipped); |
| + | result = create_transfer(share, &added, &skipped); |
| if(result) { | |
| returncode = result; | |
| bailout = TRUE; | |
| @@ -1991,8 +1966,8 @@ static CURLcode serial_transfers(struct GlobalConfig *global, | |
| milliseconds */ | |
| timediff_t milli = curlx_timediff(curlx_now(), start); | |
| if(milli < global->ms_per_transfer) { | |
| - | notef(global, "Transfer took %" CURL_FORMAT_CURL_OFF_T " ms, " |
| - | "waits %ldms as set by --rate", |
| + | notef("Transfer took %" CURL_FORMAT_CURL_OFF_T " ms, " |
| + | "waits %ldms as set by --rate", |
| milli, (long)(global->ms_per_transfer - milli)); | |
| /* The transfer took less time than wanted. Wait a little. */ | |
| curlx_wait_ms((long)(global->ms_per_transfer - milli)); | |
| @@ -2149,8 +2124,7 @@ static CURLcode transfer_per_config(struct OperationConfig *config, | |
| * 'create_transfer' gets the details and sets up a new transfer if 'added' | |
| * returns TRUE. | |
| */ | |
| - | static CURLcode create_transfer(struct GlobalConfig *global, |
| - | CURLSH *share, |
| + | static CURLcode create_transfer(CURLSH *share, |
| bool *added, | |
| bool *skipped) | |
| { | |
| @@ -2168,8 +2142,7 @@ static CURLcode create_transfer(struct GlobalConfig *global, | |
| return result; | |
| } | |
| - | static CURLcode run_all_transfers(struct GlobalConfig *global, |
| - | CURLSH *share, |
| + | static CURLcode run_all_transfers(CURLSH *share, |
| CURLcode result) | |
| { | |
| /* Save the values of noprogress and isatty to restore them later on */ | |
| @@ -2180,16 +2153,16 @@ static CURLcode run_all_transfers(struct GlobalConfig *global, | |
| /* Time to actually do the transfers */ | |
| if(!result) { | |
| if(global->parallel) | |
| - | result = parallel_transfers(global, share); |
| + | result = parallel_transfers(share); |
| else | |
| - | result = serial_transfers(global, share); |
| + | result = serial_transfers(share); |
| } | |
| /* cleanup if there are any left */ | |
| for(per = transfers; per;) { | |
| bool retry; | |
| long delay; | |
| - | CURLcode result2 = post_per_transfer(global, per, result, &retry, &delay); |
| + | CURLcode result2 = post_per_transfer(per, result, &retry, &delay); |
| if(!result) | |
| /* do not overwrite the original error */ | |
| result = result2; | |
| @@ -2208,7 +2181,7 @@ static CURLcode run_all_transfers(struct GlobalConfig *global, | |
| return result; | |
| } | |
| - | CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) |
| + | CURLcode operate(int argc, argv_item_t argv[]) |
| { | |
| CURLcode result = CURLE_OK; | |
| const char *first_arg; | |
| @@ -2228,7 +2201,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) | |
| if((argc == 1) || | |
| (first_arg && strncmp(first_arg, "-q", 2) && | |
| strcmp(first_arg, "--disable"))) { | |
| - | parseconfig(NULL, global); /* ignore possible failure */ |
| + | parseconfig(NULL); /* ignore possible failure */ |
| /* If we had no arguments then make sure a url was specified in .curlrc */ | |
| if((argc < 2) && (!global->first->url_list)) { | |
| @@ -2241,7 +2214,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) | |
| if(!result) { | |
| /* Parse the command line arguments */ | |
| - | ParameterError res = parse_args(global, argc, argv); |
| + | ParameterError res = parse_args(argc, argv); |
| if(res) { | |
| result = CURLE_OK; | |
| @@ -2253,8 +2226,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) | |
| #ifdef USE_MANUAL | |
| hugehelp(); | |
| #else | |
| - | warnf(global, |
| - | "built-in manual was disabled at build-time"); |
| + | warnf("built-in manual was disabled at build-time"); |
| #endif | |
| } | |
| /* Check if we were asked for the version information */ | |
| @@ -2322,7 +2294,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) | |
| global->current = global->first; | |
| /* now run! */ | |
| - | result = run_all_transfers(global, share, result); |
| + | result = run_all_transfers(share, result); |
| if(global->ssl_sessions && feature_ssls_export) { | |
| CURLcode r2 = tool_ssls_save(global->first, share, | |
| @@ -2338,16 +2310,16 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) | |
| easysrc_cleanup(); | |
| /* Dump the libcurl code if previously enabled */ | |
| - | dumpeasysrc(global); |
| + | dumpeasysrc(); |
| } | |
| } | |
| } | |
| else | |
| - | errorf(global, "out of memory"); |
| + | errorf("out of memory"); |
| } | |
| } | |
| - | varcleanup(global); |
| + | varcleanup(); |
| curl_free(global->knownhosts); | |
| return result; | |
| @@ -79,7 +79,7 @@ struct per_transfer { | |
| BIT(skip); /* considered already done */ | |
| }; | |
| - | CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]); |
| + | CURLcode operate(int argc, argv_item_t argv[]); |
| void single_transfer_cleanup(struct OperationConfig *config); | |
| extern struct per_transfer *transfers; /* first node */ | |
| @@ -173,8 +173,7 @@ fail: | |
| * 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(struct GlobalConfig *global, |
| - | char **filename, const char *url) |
| + | CURLcode get_url_file_name(char **filename, const char *url) |
| { | |
| CURLU *uh = curl_url(); | |
| char *path = NULL; | |
| @@ -212,7 +211,7 @@ CURLcode get_url_file_name(struct GlobalConfig *global, | |
| else { | |
| /* no slash => empty string, use default */ | |
| *filename = strdup("curl_response"); | |
| - | warnf(global, "No remote file name, uses \"%s\"", *filename); |
| + | warnf("No remote file name, uses \"%s\"", *filename); |
| } | |
| curl_free(path); | |
| @@ -28,16 +28,10 @@ | |
| struct OperationConfig; | |
| void clean_getout(struct OperationConfig *config); | |
| - | |
| bool output_expected(const char *url, const char *uploadfile); | |
| - | |
| bool stdin_upload(const char *uploadfile); | |
| - | |
| CURLcode add_file_name_to_url(CURL *curl, char **inurlp, const char *filename); | |
| - | |
| - | CURLcode get_url_file_name(struct GlobalConfig *global, |
| - | char **filename, const char *url); |
| - | |
| + | CURLcode get_url_file_name(char **filename, const char *url); |
| CURLcode urlerr_cvt(CURLUcode ucode); | |
| #endif /* HEADER_CURL_TOOL_OPERHLP_H */ | |
| @@ -405,8 +405,7 @@ static void protoset_clear(const char **protoset, const char *proto) | |
| #define MAX_PROTOSTRING (64*11) /* Enough room for 64 10-chars proto names. */ | |
| - | ParameterError proto2num(struct OperationConfig *config, |
| - | const char * const *val, char **ostr, const char *str) |
| + | ParameterError proto2num(const char * const *val, char **ostr, const char *str) |
| { | |
| const char **protoset; | |
| struct dynbuf obuf; | |
| @@ -497,7 +496,7 @@ ParameterError proto2num(struct OperationConfig *config, | |
| if no protocols are allowed */ | |
| if(action == set) | |
| protoset[0] = NULL; | |
| - | warnf(config->global, "unrecognized protocol '%s'", buffer); |
| + | warnf("unrecognized protocol '%s'", buffer); |
| } | |
| } | |
| if(next) | |
| @@ -620,7 +619,7 @@ ParameterError add2list(struct curl_slist **list, const char *ptr) | |
| return PARAM_OK; | |
| } | |
| - | long ftpfilemethod(struct OperationConfig *config, const char *str) |
| + | long ftpfilemethod(const char *str) |
| { | |
| if(curl_strequal("singlecwd", str)) | |
| return CURLFTPMETHOD_SINGLECWD; | |
| @@ -629,26 +628,24 @@ long ftpfilemethod(struct OperationConfig *config, const char *str) | |
| if(curl_strequal("multicwd", str)) | |
| return CURLFTPMETHOD_MULTICWD; | |
| - | warnf(config->global, "unrecognized ftp file method '%s', using default", |
| - | str); |
| + | warnf("unrecognized ftp file method '%s', using default", str); |
| return CURLFTPMETHOD_MULTICWD; | |
| } | |
| - | long ftpcccmethod(struct OperationConfig *config, const char *str) |
| + | long ftpcccmethod(const char *str) |
| { | |
| if(curl_strequal("passive", str)) | |
| return CURLFTPSSL_CCC_PASSIVE; | |
| if(curl_strequal("active", str)) | |
| return CURLFTPSSL_CCC_ACTIVE; | |
| - | warnf(config->global, "unrecognized ftp CCC method '%s', using default", |
| - | str); |
| + | warnf("unrecognized ftp CCC method '%s', using default", str); |
| return CURLFTPSSL_CCC_PASSIVE; | |
| } | |
| - | long delegation(struct OperationConfig *config, const char *str) |
| + | long delegation(const char *str) |
| { | |
| if(curl_strequal("none", str)) | |
| return CURLGSSAPI_DELEGATION_NONE; | |
| @@ -657,8 +654,7 @@ long delegation(struct OperationConfig *config, const char *str) | |
| if(curl_strequal("always", str)) | |
| return CURLGSSAPI_DELEGATION_FLAG; | |
| - | warnf(config->global, "unrecognized delegation method '%s', using none", |
| - | str); |
| + | warnf("unrecognized delegation method '%s', using none", str); |
| return CURLGSSAPI_DELEGATION_NONE; | |
| } | |
| @@ -722,7 +718,7 @@ CURLcode get_args(struct OperationConfig *config, const size_t i) | |
| if(!result && !config->useragent) { | |
| config->useragent = my_useragent(); | |
| if(!config->useragent) { | |
| - | errorf(config->global, "out of memory"); |
| + | errorf("out of memory"); |
| result = CURLE_OUT_OF_MEMORY; | |
| } | |
| } | |
| @@ -45,24 +45,15 @@ ParameterError str2unum(long *val, const char *str); | |
| ParameterError oct2nummax(long *val, const char *str, long max); | |
| ParameterError str2unummax(long *val, const char *str, long max); | |
| ParameterError secs2ms(long *val, const char *str); | |
| - | |
| - | ParameterError proto2num(struct OperationConfig *config, |
| - | const char * const *val, char **obuf, |
| + | ParameterError proto2num(const char * const *val, char **obuf, |
| const char *str); | |
| - | |
| ParameterError check_protocol(const char *str); | |
| - | |
| ParameterError str2offset(curl_off_t *val, const char *str); | |
| - | |
| CURLcode get_args(struct OperationConfig *config, const size_t i); | |
| - | |
| ParameterError add2list(struct curl_slist **list, const char *ptr); | |
| - | |
| - | long ftpfilemethod(struct OperationConfig *config, const char *str); |
| - | |
| - | long ftpcccmethod(struct OperationConfig *config, const char *str); |
| - | |
| - | long delegation(struct OperationConfig *config, const char *str); |
| + | long ftpfilemethod(const char *str); |
| + | long ftpcccmethod(const char *str); |
| + | long delegation(const char *str); |
| ParameterError str2tls_max(unsigned char *val, const char *str); | |
| @@ -41,7 +41,7 @@ static const char *unslashquote(const char *line, char *param); | |
| #define MAX_CONFIG_LINE_LENGTH (10*1024*1024) | |
| /* return 0 on everything-is-fine, and non-zero otherwise */ | |
| - | int parseconfig(const char *filename, struct GlobalConfig *global) |
| + | int parseconfig(const char *filename) |
| { | |
| FILE *file = NULL; | |
| bool usedarg = FALSE; | |
| @@ -156,9 +156,9 @@ int parseconfig(const char *filename, struct GlobalConfig *global) | |
| case '#': /* comment */ | |
| break; | |
| default: | |
| - | warnf(config->global, "%s:%d: warning: '%s' uses unquoted " |
| + | warnf("%s:%d: warning: '%s' uses unquoted " |
| "whitespace", filename, lineno, option); | |
| - | warnf(config->global, "This may cause side-effects. " |
| + | warnf("This may cause side-effects. " |
| "Consider using double quotes?"); | |
| } | |
| } | |
| @@ -181,7 +181,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global) | |
| if(res == PARAM_NEXT_OPERATION) { | |
| if(config->url_list && config->url_list->url) { | |
| /* Allocate the next config */ | |
| - | config->next = config_alloc(global); |
| + | config->next = config_alloc(); |
| if(config->next) { | |
| /* Update the last operation pointer */ | |
| global->last = config->next; | |
| @@ -206,7 +206,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global) | |
| res != PARAM_ENGINES_REQUESTED && | |
| res != PARAM_CA_EMBED_REQUESTED) { | |
| const char *reason = param2text(res); | |
| - | errorf(config->global, "%s:%d: '%s' %s", |
| + | errorf("%s:%d: '%s' %s", |
| filename, lineno, option, reason); | |
| rc = (int)res; | |
| } | |
| @@ -25,8 +25,7 @@ | |
| ***************************************************************************/ | |
| #include "tool_setup.h" | |
| - | int parseconfig(const char *filename, struct GlobalConfig *global); |
| - | |
| + | int parseconfig(const char *filename); |
| bool my_get_line(FILE *fp, struct dynbuf *db, bool *error); | |
| #endif /* HEADER_CURL_TOOL_PARSECFG_H */ | |
| @@ -148,8 +148,7 @@ static struct speedcount speedstore[SPEEDCNT]; | |
| |DL% UL% Dled Uled Xfers Live Total Current Left Speed | |
| | 6 -- 9.9G 0 2 2 0:00:40 0:00:02 0:00:37 4087M | |
| */ | |
| - | bool progress_meter(struct GlobalConfig *global, |
| - | CURLM *multi, |
| + | bool progress_meter(CURLM *multi, |
| struct curltime *start, | |
| bool final) | |
| { | |
| @@ -31,8 +31,7 @@ int xferinfo_cb(void *clientp, | |
| curl_off_t ultotal, | |
| curl_off_t ulnow); | |
| - | bool progress_meter(struct GlobalConfig *global, |
| - | CURLM *multi, |
| + | bool progress_meter(CURLM *multi, |
| struct curltime *start, | |
| bool final); | |
| void progress_finalize(struct per_transfer *per); | |
| @@ -231,8 +231,7 @@ static char *c_escape(const char *str, curl_off_t len) | |
| } | |
| /* setopt wrapper for enum types */ | |
| - | CURLcode tool_setopt_enum(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_enum(CURL *curl, const char *name, CURLoption tag, |
| const struct NameValue *nvlist, long lval) | |
| { | |
| CURLcode ret = CURLE_OK; | |
| @@ -242,7 +241,7 @@ CURLcode tool_setopt_enum(CURL *curl, struct OperationConfig *config, | |
| if(!lval) | |
| skip = TRUE; | |
| - | if(config->global->libcurl && !skip && !ret) { |
| + | if(global->libcurl && !skip && !ret) { |
| /* we only use this for real if --libcurl was used */ | |
| const struct NameValue *nv = NULL; | |
| for(nv = nvlist; nv->name; nv++) { | |
| @@ -264,14 +263,13 @@ CURLcode tool_setopt_enum(CURL *curl, struct OperationConfig *config, | |
| #ifdef DEBUGBUILD | |
| if(ret) | |
| - | warnf(config->global, "option %s returned error (%d)", name, (int)ret); |
| + | warnf("option %s returned error (%d)", name, (int)ret); |
| #endif | |
| return ret; | |
| } | |
| /* setopt wrapper for CURLOPT_SSLVERSION */ | |
| - | CURLcode tool_setopt_SSLVERSION(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_SSLVERSION(CURL *curl, const char *name, CURLoption tag, |
| long lval) | |
| { | |
| CURLcode ret = CURLE_OK; | |
| @@ -281,7 +279,7 @@ CURLcode tool_setopt_SSLVERSION(CURL *curl, struct OperationConfig *config, | |
| if(!lval) | |
| skip = TRUE; | |
| - | if(config->global->libcurl && !skip && !ret) { |
| + | if(global->libcurl && !skip && !ret) { |
| /* we only use this for real if --libcurl was used */ | |
| const struct NameValue *nv = NULL; | |
| const struct NameValue *nv2 = NULL; | |
| @@ -316,14 +314,13 @@ CURLcode tool_setopt_SSLVERSION(CURL *curl, struct OperationConfig *config, | |
| #ifdef DEBUGBUILD | |
| if(ret) | |
| - | warnf(config->global, "option %s returned error (%d)", name, (int)ret); |
| + | warnf("option %s returned error (%d)", name, (int)ret); |
| #endif | |
| return ret; | |
| } | |
| /* setopt wrapper for bitmasks */ | |
| - | CURLcode tool_setopt_bitmask(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_bitmask(CURL *curl, const char *name, CURLoption tag, |
| const struct NameValueUnsigned *nvlist, | |
| long lval) | |
| { | |
| @@ -332,7 +329,7 @@ CURLcode tool_setopt_bitmask(CURL *curl, struct OperationConfig *config, | |
| if(!lval) | |
| skip = TRUE; | |
| - | if(config->global->libcurl && !skip && !ret) { |
| + | if(global->libcurl && !skip && !ret) { |
| /* we only use this for real if --libcurl was used */ | |
| char preamble[80]; | |
| unsigned long rest = (unsigned long)lval; | |
| @@ -558,7 +555,7 @@ CURLcode tool_setopt_mimepost(CURL *curl, struct OperationConfig *config, | |
| CURLcode ret = curl_easy_setopt(curl, tag, mimepost); | |
| int mimeno = 0; | |
| - | if(!ret && config->global->libcurl) { |
| + | if(!ret && global->libcurl) { |
| ret = libcurl_generate_mime(curl, config, config->mimeroot, &mimeno); | |
| if(!ret) | |
| @@ -570,15 +567,14 @@ CURLcode tool_setopt_mimepost(CURL *curl, struct OperationConfig *config, | |
| } | |
| /* setopt wrapper for curl_slist options */ | |
| - | CURLcode tool_setopt_slist(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_slist(CURL *curl, const char *name, CURLoption tag, |
| struct curl_slist *list) | |
| { | |
| CURLcode ret = CURLE_OK; | |
| ret = curl_easy_setopt(curl, tag, list); | |
| - | if(config->global->libcurl && list && !ret) { |
| + | if(global->libcurl && list && !ret) { |
| int i; | |
| ret = libcurl_generate_slist(list, &i); | |
| @@ -591,8 +587,7 @@ CURLcode tool_setopt_slist(CURL *curl, struct OperationConfig *config, | |
| } | |
| /* options that set long */ | |
| - | CURLcode tool_setopt_long(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_long(CURL *curl, const char *name, CURLoption tag, |
| long lval) | |
| { | |
| long defval = 0L; | |
| @@ -608,7 +603,7 @@ CURLcode tool_setopt_long(CURL *curl, struct OperationConfig *config, | |
| } | |
| ret = curl_easy_setopt(curl, tag, lval); | |
| - | if((lval != defval) && config->global->libcurl && !ret) { |
| + | if((lval != defval) && global->libcurl && !ret) { |
| /* we only use this for real if --libcurl was used */ | |
| ret = easysrc_addf(&easysrc_code, "curl_easy_setopt(hnd, %s, %ldL);", | |
| name, lval); | |
| @@ -617,15 +612,14 @@ CURLcode tool_setopt_long(CURL *curl, struct OperationConfig *config, | |
| } | |
| /* options that set curl_off_t */ | |
| - | CURLcode tool_setopt_offt(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_offt(CURL *curl, const char *name, CURLoption tag, |
| curl_off_t lval) | |
| { | |
| CURLcode ret = CURLE_OK; | |
| DEBUGASSERT((tag >= CURLOPTTYPE_OFF_T) && (tag < CURLOPTTYPE_BLOB)); | |
| ret = curl_easy_setopt(curl, tag, lval); | |
| - | if(config->global->libcurl && !ret && lval) { |
| + | if(global->libcurl && !ret && lval) { |
| /* we only use this for real if --libcurl was used */ | |
| ret = easysrc_addf(&easysrc_code, "curl_easy_setopt(hnd, %s, (curl_off_t)%" | |
| CURL_FORMAT_CURL_OFF_T ");", name, lval); | |
| @@ -635,8 +629,9 @@ CURLcode tool_setopt_offt(CURL *curl, struct OperationConfig *config, | |
| } | |
| /* setopt wrapper for setting object and function pointer options */ | |
| - | CURLcode tool_setopt(CURL *curl, bool str, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, ...) |
| + | CURLcode tool_setopt(CURL *curl, struct OperationConfig *config, |
| + | bool str, const char *name, CURLoption tag, |
| + | ...) |
| { | |
| va_list arg; | |
| CURLcode ret = CURLE_OK; | |
| @@ -657,7 +652,7 @@ CURLcode tool_setopt(CURL *curl, bool str, struct OperationConfig *config, | |
| va_end(arg); | |
| - | if(config->global->libcurl && pval && !ret) { |
| + | if(global->libcurl && pval && !ret) { |
| /* we only use this if --libcurl was used */ | |
| if(!str) { | |
| @@ -76,60 +76,55 @@ extern const struct NameValueUnsigned setopt_nv_CURLHSTS[]; | |
| /* Intercept setopt calls for --libcurl */ | |
| - | CURLcode tool_setopt_enum(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_enum(CURL *curl, const char *name, CURLoption tag, |
| const struct NameValue *nv, long lval); | |
| - | CURLcode tool_setopt_SSLVERSION(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_SSLVERSION(CURL *curl, const char *name, CURLoption tag, |
| long lval); | |
| CURLcode tool_setopt_flags(CURL *curl, struct OperationConfig *config, | |
| const char *name, CURLoption tag, | |
| const struct NameValue *nv, long lval); | |
| - | CURLcode tool_setopt_bitmask(CURL *curl, struct OperationConfig *config, |
| + | CURLcode tool_setopt_bitmask(CURL *curl, |
| const char *name, CURLoption tag, | |
| const struct NameValueUnsigned *nv, long lval); | |
| CURLcode tool_setopt_mimepost(CURL *curl, struct OperationConfig *config, | |
| const char *name, CURLoption tag, | |
| curl_mime *mimepost); | |
| - | CURLcode tool_setopt_slist(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_slist(CURL *curl, const char *name, CURLoption tag, |
| struct curl_slist *list); | |
| - | CURLcode tool_setopt_long(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_long(CURL *curl, const char *name, CURLoption tag, |
| long lval); | |
| - | CURLcode tool_setopt_offt(CURL *curl, struct OperationConfig *config, |
| - | const char *name, CURLoption tag, |
| + | CURLcode tool_setopt_offt(CURL *curl, const char *name, CURLoption tag, |
| curl_off_t lval); | |
| - | CURLcode tool_setopt(CURL *curl, bool str, |
| - | struct OperationConfig *config, |
| - | const char *name, CURLoption tag, ...); |
| + | CURLcode tool_setopt(CURL *curl, struct OperationConfig *config, |
| + | bool str, const char *name, CURLoption tag, |
| + | ...); |
| #define my_setopt(x,y,z) \ | |
| - | tool_setopt(x, FALSE, config, #y, y, z) |
| + | tool_setopt(x, config, FALSE, #y, y, z) |
| #define my_setopt_long(x,y,z) \ | |
| - | tool_setopt_long(x, config, #y, y, z) |
| + | tool_setopt_long(x, #y, y, z) |
| #define my_setopt_offt(x,y,z) \ | |
| - | tool_setopt_offt(x, config, #y, y, z) |
| + | tool_setopt_offt(x, #y, y, z) |
| #define my_setopt_str(x,y,z) \ | |
| - | tool_setopt(x, TRUE, config, #y, y, z) |
| + | tool_setopt(x, config, TRUE, #y, y, z) |
| #define my_setopt_enum(x,y,z) \ | |
| - | tool_setopt_enum(x, config, #y, y, setopt_nv_ ## y, z) |
| + | tool_setopt_enum(x, #y, y, setopt_nv_ ## y, z) |
| #define my_setopt_SSLVERSION(x,y,z) \ | |
| - | tool_setopt_SSLVERSION(x, config, #y, y, z) |
| + | tool_setopt_SSLVERSION(x, #y, y, z) |
| #define my_setopt_bitmask(x,y,z) \ | |
| - | tool_setopt_bitmask(x, config, #y, y, setopt_nv_ ## y, z) |
| + | tool_setopt_bitmask(x, #y, y, setopt_nv_ ## y, z) |
| #define my_setopt_mimepost(x,y,z) \ | |
| tool_setopt_mimepost(x, config, #y, y, z) | |
| #define my_setopt_slist(x,y,z) \ | |
| - | tool_setopt_slist(x, config, #y, y, z) |
| + | tool_setopt_slist(x, #y, y, z) |
| #else /* CURL_DISABLE_LIBCURL_OPTION */ | |
| @@ -38,7 +38,6 @@ static CURLcode tool_ssls_easy(struct OperationConfig *config, | |
| CURLSH *share, CURL **peasy) | |
| { | |
| CURLcode result = CURLE_OK; | |
| - | struct GlobalConfig *global = config->global; |
| *peasy = curl_easy_init(); | |
| if(!*peasy) | |
| @@ -65,12 +64,11 @@ CURLcode tool_ssls_load(struct OperationConfig *config, | |
| CURLcode r = CURLE_OK; | |
| int i, imported; | |
| bool error = FALSE; | |
| - | struct GlobalConfig *global = config->global; |
| curlx_dyn_init(&buf, MAX_SSLS_LINE); | |
| fp = fopen(filename, FOPEN_READTEXT); | |
| if(!fp) { /* ok if it does not exist */ | |
| - | notef(global, "SSL session file does not exist (yet?): %s", filename); |
| + | notef("SSL session file does not exist (yet?): %s", filename); |
| goto out; | |
| } | |
| @@ -87,14 +85,13 @@ CURLcode tool_ssls_load(struct OperationConfig *config, | |
| c = memchr(line, ':', strlen(line)); | |
| if(!c) { | |
| - | warnf(global, "unrecognized line %d in ssl session file %s", |
| - | i, filename); |
| + | warnf("unrecognized line %d in ssl session file %s", i, filename); |
| continue; | |
| } | |
| *c = '\0'; | |
| r = curlx_base64_decode(line, &shmac, &shmac_len); | |
| if(r) { | |
| - | warnf(global, "invalid shmax base64 encoding in line %d", i); |
| + | warnf("invalid shmax base64 encoding in line %d", i); |
| continue; | |
| } | |
| line = c + 1; | |
| @@ -105,13 +102,13 @@ CURLcode tool_ssls_load(struct OperationConfig *config, | |
| } | |
| r = curlx_base64_decode(line, &sdata, &sdata_len); | |
| if(r) { | |
| - | warnf(global, "invalid sdata base64 encoding in line %d: %s", i, line); |
| + | warnf("invalid sdata base64 encoding in line %d: %s", i, line); |
| continue; | |
| } | |
| r = curl_easy_ssls_import(easy, NULL, shmac, shmac_len, sdata, sdata_len); | |
| if(r) { | |
| - | warnf(global, "import of session from line %d rejected(%d)", i, r); |
| + | warnf("import of session from line %d rejected(%d)", i, r); |
| continue; | |
| } | |
| ++imported; | |
| @@ -133,7 +130,6 @@ out: | |
| } | |
| struct tool_ssls_ctx { | |
| - | struct GlobalConfig *global; |
| FILE *fp; | |
| int exported; | |
| }; | |
| @@ -181,8 +177,7 @@ static CURLcode tool_ssls_exp(CURL *easy, void *userptr, | |
| ctx->exported++; | |
| out: | |
| if(r) | |
| - | warnf(ctx->global, "Warning: error saving SSL session for '%s': %d", |
| - | session_key, r); |
| + | warnf("Warning: error saving SSL session for '%s': %d", session_key, r); |
| curl_free(enc); | |
| return r; | |
| } | |
| @@ -194,11 +189,10 @@ CURLcode tool_ssls_save(struct OperationConfig *config, | |
| CURL *easy = NULL; | |
| CURLcode r = CURLE_OK; | |
| - | ctx.global = config->global; |
| ctx.exported = 0; | |
| ctx.fp = fopen(filename, FOPEN_WRITETEXT); | |
| if(!ctx.fp) { | |
| - | warnf(config->global, "Warning: Failed to create SSL session file %s", |
| + | warnf("Warning: Failed to create SSL session file %s", |
| filename); | |
| goto out; | |
| } | |
| @@ -36,7 +36,7 @@ void tool_init_stderr(void) | |
| tool_stderr = stderr; | |
| } | |
| - | void tool_set_stderr_file(struct GlobalConfig *global, const char *filename) |
| + | void tool_set_stderr_file(const char *filename) |
| { | |
| FILE *fp; | |
| @@ -52,7 +52,7 @@ void tool_set_stderr_file(struct GlobalConfig *global, const char *filename) | |
| subsequent freopen will fail. */ | |
| fp = fopen(filename, FOPEN_WRITETEXT); | |
| if(!fp) { | |
| - | warnf(global, "Warning: Failed to open %s", filename); |
| + | warnf("Warning: Failed to open %s", filename); |
| return; | |
| } | |
| fclose(fp); | |
| @@ -27,6 +27,6 @@ | |
| #include "tool_cfgable.h" | |
| void tool_init_stderr(void); | |
| - | void tool_set_stderr_file(struct GlobalConfig *global, const char *filename); |
| + | void tool_set_stderr_file(const char *filename); |
| #endif /* HEADER_CURL_TOOL_STDERR_H */ | |
| @@ -39,7 +39,7 @@ | |
| #define MAX_VAR_LEN 128 /* max length of a name */ | |
| /* free everything */ | |
| - | void varcleanup(struct GlobalConfig *global) |
| + | void varcleanup(void) |
| { | |
| struct tool_var *list = global->variables; | |
| while(list) { | |
| @@ -50,8 +50,7 @@ void varcleanup(struct GlobalConfig *global) | |
| } | |
| } | |
| - | static const struct tool_var *varcontent(struct GlobalConfig *global, |
| - | const char *name, size_t nlen) |
| + | static const struct tool_var *varcontent(const char *name, size_t nlen) |
| { | |
| struct tool_var *list = global->variables; | |
| while(list) { | |
| @@ -79,8 +78,7 @@ static const struct tool_var *varcontent(struct GlobalConfig *global, | |
| #define FUNC_64DEC "64dec" /* base64 decode */ | |
| #define FUNC_64DEC_LEN (sizeof(FUNC_64DEC) - 1) | |
| - | static ParameterError varfunc(struct GlobalConfig *global, |
| - | char *c, /* content */ |
| + | static ParameterError varfunc(char *c, /* content */ |
| size_t clen, /* content length */ | |
| char *f, /* functions */ | |
| size_t flen, /* function string length */ | |
| @@ -189,8 +187,7 @@ static ParameterError varfunc(struct GlobalConfig *global, | |
| } | |
| else { | |
| /* unsupported function */ | |
| - | errorf(global, "unknown variable function in '%.*s'", |
| - | (int)flen, finput); |
| + | errorf("unknown variable function in '%.*s'", (int)flen, finput); |
| err = PARAM_EXPAND_ERROR; | |
| break; | |
| } | |
| @@ -212,8 +209,7 @@ static ParameterError varfunc(struct GlobalConfig *global, | |
| return err; | |
| } | |
| - | ParameterError varexpand(struct GlobalConfig *global, |
| - | const char *line, struct dynbuf *out, |
| + | ParameterError varexpand(const char *line, struct dynbuf *out, |
| bool *replaced) | |
| { | |
| CURLcode result; | |
| @@ -248,7 +244,7 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| if(!clp) { | |
| /* uneven braces */ | |
| - | warnf(global, "missing close '}}' in '%s'", input); |
| + | warnf("missing close '}}' in '%s'", input); |
| break; | |
| } | |
| @@ -262,7 +258,7 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| else | |
| nlen = clp - envp; | |
| if(!nlen || (nlen >= sizeof(name))) { | |
| - | warnf(global, "bad variable name length '%s'", input); |
| + | warnf("bad variable name length '%s'", input); |
| /* insert the text as-is since this is not an env variable */ | |
| result = curlx_dyn_addn(out, line, clp - line + prefix); | |
| if(result) | |
| @@ -282,7 +278,7 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| for(i = 0; (i < nlen) && | |
| (ISALNUM(name[i]) || (name[i] == '_')); i++); | |
| if(i != nlen) { | |
| - | warnf(global, "bad variable name: %s", name); |
| + | warnf("bad variable name: %s", name); |
| /* insert the text as-is since this is not an env variable */ | |
| result = curlx_dyn_addn(out, envp - prefix, | |
| clp - envp + prefix + 2); | |
| @@ -293,7 +289,7 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| char *value; | |
| size_t vlen = 0; | |
| struct dynbuf buf; | |
| - | const struct tool_var *v = varcontent(global, name, nlen); |
| + | const struct tool_var *v = varcontent(name, nlen); |
| if(v) { | |
| value = (char *)CURL_UNCONST(v->content); | |
| vlen = v->clen; | |
| @@ -305,8 +301,7 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| if(funcp) { | |
| /* apply the list of functions on the value */ | |
| size_t flen = clp - funcp; | |
| - | ParameterError err = varfunc(global, value, vlen, funcp, flen, |
| - | &buf); |
| + | ParameterError err = varfunc(value, vlen, funcp, flen, &buf); |
| if(err) | |
| return err; | |
| value = curlx_dyn_ptr(&buf); | |
| @@ -318,7 +313,7 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| using normal means, this is an error. */ | |
| char *nb = memchr(value, '\0', vlen); | |
| if(nb) { | |
| - | errorf(global, "variable contains null byte"); |
| + | errorf("variable contains null byte"); |
| return PARAM_EXPAND_ERROR; | |
| } | |
| } | |
| @@ -352,18 +347,17 @@ ParameterError varexpand(struct GlobalConfig *global, | |
| * that we can improve this if we want better performance when managing many | |
| * at a later point. | |
| */ | |
| - | static ParameterError addvariable(struct GlobalConfig *global, |
| - | const char *name, |
| + | static ParameterError addvariable(const char *name, |
| size_t nlen, | |
| const char *content, | |
| size_t clen, | |
| bool contalloc) | |
| { | |
| struct tool_var *p; | |
| - | const struct tool_var *check = varcontent(global, name, nlen); |
| + | const struct tool_var *check = varcontent(name, nlen); |
| DEBUGASSERT(nlen); | |
| if(check) | |
| - | notef(global, "Overwriting variable '%s'", check->name); |
| + | notef("Overwriting variable '%s'", check->name); |
| p = calloc(1, sizeof(struct tool_var) + nlen); | |
| if(p) { | |
| @@ -384,8 +378,7 @@ static ParameterError addvariable(struct GlobalConfig *global, | |
| #define MAX_FILENAME 10000 | |
| - | ParameterError setvariable(struct GlobalConfig *global, |
| - | const char *input) |
| + | ParameterError setvariable(const char *input) |
| { | |
| const char *name; | |
| size_t nlen; | |
| @@ -409,7 +402,7 @@ ParameterError setvariable(struct GlobalConfig *global, | |
| line++; | |
| nlen = line - name; | |
| if(!nlen || (nlen >= MAX_VAR_LEN)) { | |
| - | warnf(global, "Bad variable name length (%zd), skipping", nlen); |
| + | warnf("Bad variable name length (%zd), skipping", nlen); |
| return PARAM_OK; | |
| } | |
| if(import) { | |
| @@ -424,7 +417,7 @@ ParameterError setvariable(struct GlobalConfig *global, | |
| ge = getenv(name); | |
| if(!*line && !ge) { | |
| /* no assign, no variable, fail */ | |
| - | errorf(global, "Variable '%s' import fail, not set", name); |
| + | errorf("Variable '%s' import fail, not set", name); |
| return PARAM_EXPAND_ERROR; | |
| } | |
| else if(ge) { | |
| @@ -464,8 +457,7 @@ ParameterError setvariable(struct GlobalConfig *global, | |
| else { | |
| file = fopen(line, "rb"); | |
| if(!file) { | |
| - | errorf(global, "Failed to open %s: %s", line, |
| - | strerror(errno)); |
| + | errorf("Failed to open %s: %s", line, strerror(errno)); |
| err = PARAM_READ_ERROR; | |
| } | |
| } | |
| @@ -499,10 +491,10 @@ ParameterError setvariable(struct GlobalConfig *global, | |
| } | |
| } | |
| else { | |
| - | warnf(global, "Bad --variable syntax, skipping: %s", input); |
| + | warnf("Bad --variable syntax, skipping: %s", input); |
| return PARAM_OK; | |
| } | |
| - | err = addvariable(global, name, nlen, content, clen, contalloc); |
| + | err = addvariable(name, nlen, content, clen, contalloc); |
| if(err) { | |
| if(contalloc) | |
| free(content); | |
| @@ -33,14 +33,11 @@ struct tool_var { | |
| char name[1]; /* allocated as part of the struct */ | |
| }; | |
| - | struct GlobalConfig; |
| - | |
| - | ParameterError setvariable(struct GlobalConfig *global, const char *input); |
| - | ParameterError varexpand(struct GlobalConfig *global, |
| - | const char *line, struct dynbuf *out, |
| + | ParameterError setvariable(const char *input); |
| + | ParameterError varexpand(const char *line, struct dynbuf *out, |
| bool *replaced); | |
| /* free everything */ | |
| - | void varcleanup(struct GlobalConfig *global); |
| + | void varcleanup(void); |
| #endif /* HEADER_CURL_VAR_H */ | |
| @@ -36,6 +36,7 @@ MEM tool_paramhlp.c | |
| MEM tool_cfgable.c | |
| MEM tool_cfgable.c | |
| MEM tool_cfgable.c | |
| + | MEM tool_cfgable.c |
| </file> | |
| <stripfile> | |
| $_ = '' if((($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/)) | |