← Commit list

2a292c3984

Viktor Szakats
Viktor Szakats
2025-02-21
SUCCESS Duration: 80s

Subject

build: add Windows CE / CeGCC support, with CI jobs

Binary

Download Binary (875 KB)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

$ git checkout -f 2a292c39846107228201674d686be5b3ed96674d
Previous HEAD position was bd9f9b085a configure: silence compiler warnings in feature checks, drop duplicates
HEAD is now at 2a292c3984 build: add Windows CE / CeGCC support, with CI jobs

$ 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/.dirstamp
Removing lib/.libs/
Removing lib/Makefile
Removing lib/Makefile.in
Removing lib/curl-base64.o
Removing lib/curl-curl_multibyte.o
Removing lib/curl-dynbuf.o
Removing lib/curl-nonblock.o
Removing lib/curl-strcase.o
Removing lib/curl-strparse.o
Removing lib/curl-strtoofft.o
Removing lib/curl-timediff.o
Removing lib/curl-version_win32.o
Removing lib/curl-warnless.o
Removing lib/curl_config.h
Removing lib/curl_config.h.in
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-thread.lo
Removing lib/libcurl_la-asyn-thread.o
Removing lib/libcurl_la-base64.lo
Removing lib/libcurl_la-base64.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-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-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_multibyte.lo
Removing lib/libcurl_la-curl_multibyte.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-dllmain.lo
Removing lib/libcurl_la-dllmain.o
Removing lib/libcurl_la-doh.lo
Removing lib/libcurl_la-doh.o
Removing lib/libcurl_la-dynbuf.lo
Removing lib/libcurl_la-dynbuf.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-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-hostasyn.lo
Removing lib/libcurl_la-hostasyn.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-hostsyn.lo
Removing lib/libcurl_la-hostsyn.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-inet_ntop.lo
Removing lib/libcurl_la-inet_ntop.o
Removing lib/libcurl_la-inet_pton.lo
Removing lib/libcurl_la-inet_pton.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-netrc.lo
Removing lib/libcurl_la-netrc.o
Removing lib/libcurl_la-nonblock.lo
Removing lib/libcurl_la-nonblock.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-strparse.lo
Removing lib/libcurl_la-strparse.o
Removing lib/libcurl_la-strtoofft.lo
Removing lib/libcurl_la-strtoofft.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-timediff.lo
Removing lib/libcurl_la-timediff.o
Removing lib/libcurl_la-timeval.lo
Removing lib/libcurl_la-timeval.o
Removing lib/libcurl_la-transfer.lo
Removing lib/libcurl_la-transfer.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-version_win32.lo
Removing lib/libcurl_la-version_win32.o
Removing lib/libcurl_la-warnless.lo
Removing lib/libcurl_la-warnless.o
Removing lib/libcurl_la-ws.lo
Removing lib/libcurl_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/vquic/.deps/
Removing lib/vquic/.dirstamp
Removing lib/vquic/libcurl_la-curl_msh3.lo
Removing lib/vquic/libcurl_la-curl_msh3.o
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/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/vtls/.deps/
Removing lib/vtls/.dirstamp
Removing lib/vtls/libcurl_la-bearssl.lo
Removing lib/vtls/libcurl_la-bearssl.o
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-sectransp.lo
Removing lib/vtls/libcurl_la-sectransp.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 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-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_sleep.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/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/certs/scripts/Makefile
Removing tests/certs/scripts/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/clients/.deps/
Removing tests/http/clients/Makefile
Removing tests/http/clients/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/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:126: installing './compile'
configure.ac:422: installing './config.guess'
configure.ac:422: installing './config.sub'
configure.ac:126: installing './install-sh'
configure.ac:132: 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.13.0-DEV
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 nghttpx... no
checking for caddy... /usr/bin/caddy
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 build tests into single-binary bundles... 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 sys/time.h... 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 sys/time.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 for lber.h... no
checking for ldap.h... no
checking for ldap_ssl.h... no
checking for LDAP libraries... cannot find LDAP libraries
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 Secure Transport... 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 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/time.h... (cached) yes
checking for sys/select.h... yes
checking for sys/socket.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/stat.h... (cached) yes
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 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 sys/time.h... (cached) yes
checking for sys/socket.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 sys/socket.h... (cached) yes
checking for select... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for recv... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for send... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.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 for sys/socket.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 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 for sys/socket.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 for sys/types.h... (cached) yes
checking for sys/time.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 sys/socket.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 for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/socket.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 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 poll... yes
checking for sendmsg... yes
checking for sendmmsg... 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 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 for perl... /usr/bin/perl
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 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/certs/scripts/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/http/config.ini
config.status: creating tests/http/Makefile
config.status: creating tests/http/clients/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.13.0-DEV
  SSL:              no      (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,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, --with-msh3)
  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: Cannot find libraries for LDAP support: LDAP disabled
configure: WARNING: libgsasl was not found
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-thread.lo
  CC       libcurl_la-base64.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-cfilters.lo
  CC       libcurl_la-cf-socket.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-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_multibyte.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-dllmain.lo
  CC       libcurl_la-doh.lo
  CC       libcurl_la-dynbuf.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-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-hostasyn.lo
  CC       libcurl_la-hostip.lo
  CC       libcurl_la-hostip4.lo
  CC       libcurl_la-hostip6.lo
  CC       libcurl_la-hostsyn.lo
  CC       libcurl_la-hsts.lo
  CC       libcurl_la-http.lo
  CC       libcurl_la-http1.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-inet_ntop.lo
  CC       libcurl_la-inet_pton.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-netrc.lo
  CC       libcurl_la-nonblock.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-strparse.lo
  CC       libcurl_la-strtoofft.lo
  CC       libcurl_la-system_win32.lo
  CC       libcurl_la-telnet.lo
  CC       libcurl_la-tftp.lo
  CC       libcurl_la-timediff.lo
  CC       libcurl_la-timeval.lo
  CC       libcurl_la-transfer.lo
  CC       libcurl_la-url.lo
  CC       libcurl_la-urlapi.lo
  CC       libcurl_la-version.lo
  CC       libcurl_la-version_win32.lo
  CC       libcurl_la-warnless.lo
  CC       libcurl_la-ws.lo
  CC       vauth/libcurl_la-cleartext.lo
  CC       vauth/libcurl_la-digest.lo
  CC       vauth/libcurl_la-cram.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-bearssl.lo
  CC       vtls/libcurl_la-cipher_suite.lo
  CC       vtls/libcurl_la-gtls.lo
  CC       vtls/libcurl_la-hostcheck.lo
  CC       vtls/libcurl_la-keylog.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-sectransp.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_msh3.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
  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-slist_wc.o
  CC       curl-terminal.o
  CC       curl-tool_bname.o
  CC       curl-tool_cb_dbg.o
  CC       curl-tool_cb_prg.o
  CC       curl-tool_cb_hdr.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_ipfs.o
  CC       curl-tool_helpers.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_parsecfg.o
  CC       curl-tool_paramhlp.o
  CC       curl-tool_progress.o
  CC       curl-tool_setopt.o
  CC       curl-tool_sleep.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 '#include "tool_hugehelp.h"' >> tool_hugehelp.c
echo 'extern const void *curl_ca_embed; const void *curl_ca_embed;' > tool_ca_embed.c
  CC       curl-tool_hugehelp.o
  CC       curl-tool_ca_embed.o
  CC       ../lib/curl-base64.o
  CC       ../lib/curl-curl_multibyte.o
  CC       ../lib/curl-dynbuf.o
  CC       ../lib/curl-nonblock.o
  CC       ../lib/curl-strtoofft.o
  CC       ../lib/curl-strparse.o
  CC       ../lib/curl-strcase.o
  CC       ../lib/curl-timediff.o
  CC       ../lib/curl-version_win32.o
  CC       ../lib/curl-warnless.o
  CCLD     curl
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'

Commit Diff GitHub →

.github/workflows/windows.yml +105 -0CMake/CurlSymbolHiding.cmake +1 -1CMake/win32-cache.cmake +17 -0CMakeLists.txt +72 -20acinclude.m4 +18 -10configure.ac +57 -9docs/examples/anyauthput.c +4 -0docs/examples/block_ip.c +2 -2docs/examples/externalsocket.c +4 -0docs/examples/fileupload.c +4 -0docs/examples/ftpupload.c +4 -0docs/examples/ftpuploadresume.c +2 -0docs/examples/http2-download.c +4 -0docs/examples/http2-upload.c +4 -0docs/examples/sftpuploadresume.c +3 -1include/curl/curl.h +1 -4include/curl/system.h +16 -7lib/asyn-thread.c +3 -3lib/cf-socket.c +2 -2lib/config-win32.h +13 -9lib/connect.c +1 -1lib/curl_multibyte.c +7 -3lib/curl_setup.h +23 -1lib/curl_setup_once.h +3 -1lib/curl_sspi.c +1 -1lib/curl_sspi.h +245 -0lib/curl_threads.c +8 -7lib/curl_threads.h +1 -1lib/easy.c +1 -1lib/file.c +1 -1lib/fopen.c +7 -1lib/ftp.c +1 -1lib/getenv.c +1 -1lib/hostip.c +2 -0lib/inet_ntop.c +4 -4lib/inet_pton.c +1 -1lib/memdebug.c +1 -1lib/mprintf.c +2 -2lib/rename.c +1 -1lib/socketpair.c +2 -0lib/strerror.c +10 -10lib/strerror.h +1 -1lib/system_win32.c +9 -3lib/transfer.c +2 -0lib/urlapi.c +0 -1lib/vtls/rustls.c +0 -1lib/vtls/schannel.c +19 -6lib/vtls/schannel_verify.c +83 -4lib/vtls/vtls_scache.c +4 -1src/CMakeLists.txt +1 -1src/terminal.c +1 -1src/tool_cb_hdr.c +1 -1src/tool_cb_rea.c +1 -1src/tool_cb_see.c +1 -1src/tool_cb_wrt.c +2 -2src/tool_dirhie.c +1 -1src/tool_doswin.c +4 -4src/tool_doswin.h +1 -1src/tool_formparse.c +4 -0src/tool_getparam.c +9 -1src/tool_getpass.c +3 -3src/tool_main.c +7 -3src/tool_operate.c +10 -3src/tool_paramhlp.c +3 -3src/tool_parsecfg.c +1 -1src/tool_setup.h +14 -3src/tool_urlglob.c +4 -4src/tool_util.c +2 -4src/tool_util.h +1 -1tests/http/clients/h2-upgrade-extreme.c +0 -2tests/http/clients/tls-session-reuse.c +0 -2tests/libtest/lib3026.c +3 -3tests/libtest/lib3207.c +1 -1tests/libtest/lib505.c +4 -0tests/libtest/lib525.c +4 -0tests/libtest/lib541.c +4 -0tests/libtest/lib556.c +4 -0tests/libtest/lib582.c +4 -0tests/libtest/testutil.c +1 -1tests/server/Makefile.inc +3 -1tests/server/mqttd.c +2 -0tests/server/resolve.c +0 -1tests/server/rtspd.c +3 -1tests/server/sockfilt.c +31 -21tests/server/socksd.c +2 -0tests/server/sws.c +3 -1tests/server/tftpd.c +2 -0tests/server/util.c +24 -37tests/unit/unit2600.c +0 -3
.github/workflows/windows.yml+105 -0
@@ -590,6 +590,111 @@ jobs:
make -C bld -j5 examples
fi
+ wince:
+ name: "mingw32ce, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} 4.4.0-arm schannel"
+ runs-on: 'macos-latest'
+ timeout-minutes: 10
+ env:
+ toolchain-version: '0.59.1'
+ strategy:
+ matrix:
+ build: [autotools, cmake]
+ fail-fast: false
+ steps:
+ - name: 'install packages'
+ if: ${{ matrix.build == 'autotools' }}
+ run: |
+ echo automake libtool | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
+ while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
+
+ - name: 'cache compiler (mingw32ce)'
+ uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
+ id: cache-compiler
+ with:
+ path: ~/opt/mingw32ce
+ key: ${{ runner.os }}-mingw32ce-${{ env.toolchain-version }}-amd64
+
+ - name: 'install compiler (mingw32ce)'
+ if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }}
+ run: |
+ cd "${HOME}" || exit 1
+ curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 --retry-connrefused --proto-redir =https \
+ --location 'https://downloads.sourceforge.net/cegcc/cegcc/${{ env.toolchain-version }}/cegcc_mingw32ce_snowleopard_r1397.tar.bz2' | tar -x
+ ls -l
+
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+
+ - name: 'configure'
+ run: |
+ MINGW32CE_ROOT="${HOME}/opt/mingw32ce"
+ if [ '${{ matrix.build }}' = 'cmake' ]; then
+ cmake -B bld \
+ -DCMAKE_SYSTEM_NAME=WindowsCE \
+ -DCMAKE_SYSTEM_VERSION=8.0 \
+ -DCMAKE_SYSTEM_PROCESSOR=arm \
+ -DCMAKE_C_COMPILER_TARGET=arm-wince-mingw32ce \
+ -DCMAKE_C_COMPILER="${MINGW32CE_ROOT}/bin/arm-mingw32ce-gcc" \
+ -DCMAKE_RC_COMPILER="${MINGW32CE_ROOT}/bin/arm-mingw32ce-windres" \
+ -DMINGW32CE_LIBRARY_DIR="${MINGW32CE_ROOT}/arm-mingw32ce/lib" \
+ -DCMAKE_IGNORE_PREFIX_PATH="$(brew --prefix)" \
+ -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
+ -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DBUILD_STATIC_CURL=OFF \
+ -DCURL_WERROR=ON \
+ -DCURL_USE_SCHANNEL=ON \
+ -DCURL_USE_LIBPSL=OFF
+ else
+ autoreconf -fi
+ mkdir bld && cd bld && ../configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
+ ac_cv_prog_cc_c99=no \
+ CC="${MINGW32CE_ROOT}/bin/arm-mingw32ce-gcc" \
+ AR="${MINGW32CE_ROOT}/bin/arm-mingw32ce-ar" \
+ RANLIB="${MINGW32CE_ROOT}/bin/arm-mingw32ce-ranlib" \
+ RC="${MINGW32CE_ROOT}/bin/arm-mingw32ce-windres" \
+ --host=arm-wince-mingw32ce \
+ --with-schannel \
+ --without-libpsl \
+ --disable-shared
+ fi
+
+ - name: 'configure log'
+ if: ${{ !cancelled() }}
+ run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
+
+ - name: 'curl_config.h'
+ run: |
+ echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
+ grep -F '#define' bld/lib/curl_config.h | sort || true
+
+ - name: 'build'
+ run: |
+ if [ '${{ matrix.build }}' = 'cmake' ]; then
+ cmake --build bld
+ else
+ make -j5 -C bld
+ fi
+
+ - name: 'curl info'
+ run: |
+ find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
+
+ - name: 'build tests'
+ if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time
+ run: |
+ if [ '${{ matrix.build }}' = 'cmake' ]; then
+ cmake --build bld --target testdeps
+ else
+ make -j5 -C bld -C tests
+ fi
+
+ - name: 'build examples'
+ if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time
+ run: |
+ if [ '${{ matrix.build }}' = 'cmake' ]; then
+ cmake --build bld --target curl-examples
+ else
+ make -j5 -C bld examples
+ fi
+
msvc:
name: 'msvc, CM ${{ matrix.arch }}-${{ matrix.plat }} ${{ matrix.name }}'
runs-on: windows-latest
CMake/CurlSymbolHiding.cmake+1 -1
@@ -29,7 +29,7 @@ if(WIN32 AND (ENABLE_DEBUG OR ENABLE_CURLDEBUG))
# e.g. curl_easy_perform_ev() or curl_dbg_*(),
# so disable symbol hiding for debug builds and for memory tracking.
set(CURL_HIDDEN_SYMBOLS OFF)
-elseif(DOS OR AMIGA)
+elseif(DOS OR AMIGA OR MINGW32CE)
set(CURL_HIDDEN_SYMBOLS OFF)
endif()
CMake/win32-cache.cmake+17 -0
@@ -44,6 +44,10 @@ if(MINGW)
set(HAVE_UTIME_H 1) # wrapper to sys/utime.h
set(HAVE_DIRENT_H 1)
set(HAVE_OPENDIR 1)
+ if(MINGW32CE)
+ set(HAVE_STRTOK_R 0)
+ set(HAVE_FILE_OFFSET_BITS 0)
+ endif()
else()
set(HAVE_LIBGEN_H 0)
set(HAVE_FTRUNCATE 0)
@@ -191,3 +195,16 @@ set(STDC_HEADERS 1)
set(HAVE_SIZEOF_SUSECONDS_T 0)
set(HAVE_SIZEOF_SA_FAMILY_T 0)
+
+if(WINCE) # Windows CE exceptions
+ set(HAVE_LOCALE_H 0)
+ set(HAVE_GETADDRINFO 0)
+ set(HAVE_FREEADDRINFO 0)
+ set(HAVE_SETLOCALE 0)
+ set(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 0)
+ set(HAVE_SIGNAL 0)
+ set(HAVE_SETMODE 0)
+ if(MINGW32CE)
+ set(HAVE__SETMODE 0)
+ endif()
+endif()
CMakeLists.txt+72 -20
@@ -91,6 +91,33 @@ if(WINDOWS_STORE AND MINGW) # mingw UWP build
# CMake (as of v3.31.2) gets confused and applies the MSVC rc.exe command-line
# template to windres. Reset it to the windres template via 'Modules/Platform/Windows-windres.cmake':
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
+elseif(WIN32 AND WINCE AND CMAKE_COMPILER_IS_GNUCC) # mingw32ce build
+ if(NOT MINGW32CE_LIBRARY_DIR)
+ message(FATAL_ERROR "Set MINGW32CE_LIBRARY_DIR variable to the mingw32ce platform library directory.")
+ endif()
+
+ set(MINGW 1)
+ set(MINGW32CE 1)
+
+ # Build implib with libcurl DLL. Copied from CMake's 'Modules/Platform/Windows-GNU.cmake'.
+ set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS>")
+ string(APPEND CMAKE_C_CREATE_SHARED_LIBRARY " <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB>")
+ string(APPEND CMAKE_C_CREATE_SHARED_LIBRARY " ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
+
+ # Build resources. Copied from CMake's 'Modules/Platform/Windows-windres.cmake'.
+ set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
+ enable_language(RC)
+
+ set(CMAKE_C_COMPILE_OPTIONS_PIC "") # CMake sets it to '-fPIC', confusing the toolchain and breaking builds. Zap it.
+
+ set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+ set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+ set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
+ set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
+ set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
+ set(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
+ set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
elseif(DOS AND CMAKE_COMPILER_IS_GNUCC) # DJGPP
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
@@ -119,6 +146,9 @@ endif()
if(WIN32)
string(APPEND _target_flags " WIN32")
endif()
+if(WINCE)
+ string(APPEND _target_flags " WINCE")
+endif()
if(WINDOWS_STORE)
string(APPEND _target_flags " UWP")
endif()
@@ -195,12 +225,12 @@ if(WIN32)
endif()
option(ENABLE_UNICODE "Use the Unicode version of the Windows API functions" OFF)
- if(WINDOWS_STORE)
+ if(WINDOWS_STORE OR WINCE)
set(ENABLE_UNICODE ON)
endif()
if(ENABLE_UNICODE)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "UNICODE" "_UNICODE")
- if(MINGW)
+ if(MINGW AND NOT MINGW32CE)
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "-municode")
endif()
endif()
@@ -476,7 +506,7 @@ if(HTTP_ONLY)
set(CURL_DISABLE_TFTP ON)
endif()
-if(WINDOWS_STORE)
+if(WINDOWS_STORE OR WINCE)
set(CURL_DISABLE_TELNET ON) # telnet code needs fixing to compile for UWP.
endif()
@@ -567,7 +597,19 @@ if(ENABLE_THREADED_RESOLVER)
endif()
# Check for all needed libraries
-if(DOS)
+if(WIN32)
+ if(WINCE)
+ set(_win32_winsock "ws2")
+ else()
+ set(_win32_winsock "ws2_32")
+ endif()
+ set(_win32_crypt32 "crypt32")
+
+ if(MINGW32CE) # FIXME upstream: must specify the full path to avoid CMake converting "ws2" to "ws2.lib"
+ set(_win32_winsock "${MINGW32CE_LIBRARY_DIR}/lib${_win32_winsock}.a")
+ set(_win32_crypt32 "${MINGW32CE_LIBRARY_DIR}/lib${_win32_crypt32}.a")
+ endif()
+elseif(DOS)
if(WATT_ROOT)
set(USE_WATT32 ON)
# FIXME upstream: must specify the full path to avoid CMake converting "watt" to "watt.lib"
@@ -588,7 +630,7 @@ elseif(AMIGA)
set(CURL_USE_OPENSSL ON)
set(CURL_CA_FALLBACK ON CACHE BOOL "")
endif()
-elseif(NOT WIN32 AND NOT APPLE)
+elseif(NOT APPLE)
check_library_exists("socket" "connect" "" HAVE_LIBSOCKET)
if(HAVE_LIBSOCKET)
set(CURL_LIBS "socket" ${CURL_LIBS})
@@ -623,7 +665,7 @@ if(ENABLE_IPV6)
endif()
endif()
endif()
-if(ENABLE_IPV6)
+if(ENABLE_IPV6 AND NOT WINCE)
set(USE_IPV6 ON)
endif()
@@ -954,8 +996,8 @@ macro(curl_openssl_check_exists)
if(HAVE_LIBZ)
list(APPEND CMAKE_REQUIRED_LIBRARIES ZLIB::ZLIB)
endif()
- if(WIN32)
- list(APPEND CMAKE_REQUIRED_LIBRARIES "ws2_32")
+ if(WIN32 AND NOT WINCE)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${_win32_winsock}")
list(APPEND CMAKE_REQUIRED_LIBRARIES "bcrypt") # for OpenSSL/LibreSSL
endif()
endif()
@@ -967,7 +1009,7 @@ macro(curl_openssl_check_exists)
list(APPEND CMAKE_REQUIRED_LIBRARIES ZLIB::ZLIB) # Public wolfSSL headers also require zlib headers
endif()
if(WIN32)
- list(APPEND CMAKE_REQUIRED_LIBRARIES "ws2_32" "crypt32")
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${_win32_winsock}" "${_win32_crypt32}")
endif()
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-DHAVE_UINTPTR_T") # to pull in stdint.h (as of wolfSSL v5.5.4)
endif()
@@ -1174,7 +1216,7 @@ if(NOT CURL_DISABLE_SRP AND (HAVE_GNUTLS_SRP OR HAVE_OPENSSL_SRP))
endif()
if(NOT CURL_DISABLE_LDAP)
- if(WIN32 AND NOT WINDOWS_STORE)
+ if(WIN32 AND NOT WINDOWS_STORE AND NOT WINCE)
option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
if(USE_WIN32_LDAP)
list(APPEND CURL_LIBS "wldap32")
@@ -1460,7 +1502,7 @@ if(USE_LIBRTMP)
endif()
option(ENABLE_UNIX_SOCKETS "Enable Unix domain sockets support" ON)
-if(ENABLE_UNIX_SOCKETS)
+if(ENABLE_UNIX_SOCKETS AND NOT WINCE)
if(WIN32 OR DOS)
set(USE_UNIX_SOCKETS ON)
else()
@@ -1571,13 +1613,13 @@ if(WIN32)
list(APPEND CURL_INCLUDES "ws2tcpip.h")
if(HAVE_WIN32_WINNT)
- if(HAVE_WIN32_WINNT LESS 0x0501)
+ if(HAVE_WIN32_WINNT LESS 0x0501 AND NOT WINCE)
# Windows XP is required for freeaddrinfo, getaddrinfo
message(FATAL_ERROR "Building for Windows XP or newer is required.")
endif()
# Pre-fill detection results based on target OS version
- if(MINGW OR MSVC)
+ if(MINGW OR MSVC OR WINCE)
if(HAVE_WIN32_WINNT LESS 0x0600)
set(HAVE_INET_NTOP 0)
set(HAVE_INET_PTON 0)
@@ -1685,7 +1727,7 @@ endif()
# Apply to all feature checks
if(WIN32)
- list(APPEND CMAKE_REQUIRED_LIBRARIES "ws2_32")
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${_win32_winsock}")
elseif(HAVE_LIBSOCKET)
list(APPEND CMAKE_REQUIRED_LIBRARIES "socket")
elseif(DOS)
@@ -1737,7 +1779,6 @@ check_symbol_exists("getpeername" "${CURL_INCLUDES}" HAVE_GETPEERNAME) # wi
check_symbol_exists("getsockname" "${CURL_INCLUDES}" HAVE_GETSOCKNAME) # winsock2.h unistd.h proto/bsdsocket.h
check_function_exists("getrlimit" HAVE_GETRLIMIT)
check_function_exists("setlocale" HAVE_SETLOCALE)
-check_function_exists("setmode" HAVE_SETMODE)
check_function_exists("setrlimit" HAVE_SETRLIMIT)
if(NOT WIN32)
@@ -1749,8 +1790,11 @@ if(NOT WIN32)
check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
endif()
-if(WIN32 OR CYGWIN)
- check_function_exists("_setmode" HAVE__SETMODE)
+if(NOT MINGW32CE) # Avoid false detections
+ check_function_exists("setmode" HAVE_SETMODE)
+ if(WIN32 OR CYGWIN)
+ check_function_exists("_setmode" HAVE__SETMODE)
+ endif()
endif()
if(AMIGA)
@@ -1930,9 +1974,14 @@ include(CMake/OtherTests.cmake)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "HAVE_CONFIG_H")
if(WIN32)
- list(APPEND CURL_LIBS "ws2_32" "bcrypt")
+ list(APPEND CURL_LIBS "${_win32_winsock}")
+ if(NOT WINCE)
+ list(APPEND CURL_LIBS "bcrypt")
+ endif()
- set(USE_WIN32_LARGE_FILES ON)
+ if(NOT WINCE)
+ set(USE_WIN32_LARGE_FILES ON)
+ endif()
# Use the manifest embedded in the Windows Resource
string(APPEND CMAKE_RC_FLAGS " -DCURL_EMBED_MANIFEST")
@@ -1944,7 +1993,10 @@ if(WIN32)
# Link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
if(USE_WIN32_CRYPTO OR USE_SCHANNEL)
- list(APPEND CURL_LIBS "advapi32" "crypt32")
+ if(NOT WINCE)
+ list(APPEND CURL_LIBS "advapi32")
+ endif()
+ list(APPEND CURL_LIBS "${_win32_crypt32}")
endif()
endif()
acinclude.m4+18 -10
@@ -1310,16 +1310,13 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
if test "$curl_cv_native_windows" = 'yes'; then
AC_MSG_CHECKING([whether build target supports Win32 large files])
- case $host_os in
- mingw32ce*|cegcc*)
- dnl Windows CE does not support large files
- curl_win32_has_largefile='no'
- ;;
- *)
- dnl All mingw-w64 versions support large files
- curl_win32_has_largefile='yes'
- ;;
- esac
+ if test "$curl_cv_wince" = 'yes'; then
+ dnl Windows CE does not support large files
+ curl_win32_has_largefile='no'
+ else
+ dnl All mingw-w64 versions support large files
+ curl_win32_has_largefile='yes'
+ fi
case "$curl_win32_has_largefile" in
yes)
if test x"$enable_largefile" = 'xno'; then
@@ -1476,9 +1473,20 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
if test "$curl_cv_native_windows" = 'yes'; then
curl_pflags="${curl_pflags} WIN32"
fi
+ if test "$curl_cv_wince" = 'yes'; then
+ curl_pflags="${curl_pflags} WINCE"
+ fi
if test "$curl_cv_winuwp" = 'yes'; then
curl_pflags="${curl_pflags} UWP"
fi
+ case $host in
+ *-*-*bsd*|*-*-aix*|*-*-hpux*|*-*-interix*|*-*-irix*|*-*-linux*|*-*-solaris*|*-*-sunos*|*-apple-*|*-*-cygwin*|*-*-msys*)
+ curl_pflags="${curl_pflags} UNIX";;
+ esac
+ case $host in
+ *-*-*bsd*)
+ curl_pflags="${curl_pflags} BSD";;
+ esac
if test "$curl_cv_cygwin" = 'yes'; then
curl_pflags="${curl_pflags} CYGWIN"
fi
configure.ac+57 -9
@@ -493,8 +493,12 @@ dnl **********************************************************************
CURL_CHECK_COMPILER
CURL_CHECK_NATIVE_WINDOWS
+curl_cv_wince='no'
curl_cv_winuwp='no'
if test "$curl_cv_native_windows" = "yes"; then
+ case $host_os in
+ mingw32ce*) curl_cv_wince='yes';;
+ esac
case "$CPPFLAGS" in
*-DWINSTORECOMPAT*) curl_cv_winuwp='yes';;
esac
@@ -883,7 +887,7 @@ AS_HELP_STRING([--disable-telnet],[Disable TELNET support]),
AC_MSG_RESULT(yes)
)
-if test "$curl_cv_winuwp" = 'yes'; then
+if test "$curl_cv_winuwp" = 'yes' -o "$curl_cv_wince" = 'yes'; then
AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
CURL_DISABLE_TELNET=1
fi
@@ -1161,11 +1165,42 @@ if test "$HAVE_GETHOSTBYNAME" != "1"; then
])
fi
+if test "$HAVE_GETHOSTBYNAME" != "1"; then
+ if test "$curl_cv_wince" = 'yes'; then
+ dnl This is for Windows CE systems
+ winsock_LIB="-lws2"
+ if test ! -z "$winsock_LIB"; then
+ my_ac_save_LIBS=$LIBS
+ LIBS="$winsock_LIB $LIBS"
+ AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+ #ifdef _WIN32
+ #ifndef WIN32_LEAN_AND_MEAN
+ #define WIN32_LEAN_AND_MEAN
+ #endif
+ #include <winsock2.h>
+ #endif
+ ]],[[
+ gethostbyname("localhost");
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ HAVE_GETHOSTBYNAME="1"
+ ],[
+ AC_MSG_RESULT([no])
+ winsock_LIB=""
+ LIBS=$my_ac_save_LIBS
+ ])
+ fi
+ fi
+fi
+
# In UWP mode gethostbyname gets detected via the core libs, but some
# code (in6addr_any) still need ws2_32, so let us detect and add it.
if test "$HAVE_GETHOSTBYNAME" != "1" -o "$curl_cv_winuwp" = "yes"; then
- dnl This is for Winsock systems
if test "$curl_cv_native_windows" = "yes"; then
+ dnl This is for Winsock systems
winsock_LIB="-lws2_32"
if test ! -z "$winsock_LIB"; then
my_ac_save_LIBS=$LIBS
@@ -1733,6 +1768,10 @@ AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
)
)
+if test "$curl_cv_wince" = 'yes'; then
+ ipv6=no
+fi
+
if test "$ipv6" = yes; then
curl_ipv6_msg="enabled"
AC_DEFINE(USE_IPV6, 1, [Define if you want to enable IPv6 support])
@@ -2062,11 +2101,14 @@ CURL_WITH_RUSTLS
dnl link required libraries for USE_WIN32_CRYPTO or SCHANNEL_ENABLED
if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$SCHANNEL_ENABLED" = "x1"; then
- LIBS="-ladvapi32 -lcrypt32 $LIBS"
+ LIBS="-lcrypt32 $LIBS"
+ if test "$curl_cv_wince" = 'no'; then
+ LIBS="-ladvapi32 $LIBS"
+ fi
fi
dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
-if test "x$curl_cv_native_windows" = "xyes"; then
+if test "x$curl_cv_native_windows" = "xyes" -a "$curl_cv_wince" = 'no'; then
LIBS="-lbcrypt $LIBS"
fi
@@ -2611,7 +2653,11 @@ dnl ----------------------------
dnl check Windows Unicode option
dnl ----------------------------
-want_winuni="no"
+if test "$curl_cv_wince" = 'yes'; then
+ want_winuni="yes"
+else
+ want_winuni="no"
+fi
if test "$curl_cv_native_windows" = "yes"; then
if test "$curl_cv_winuwp" = 'yes'; then
want_winuni="yes"
@@ -4068,7 +4114,6 @@ AC_CHECK_FUNCS([\
sendmsg \
sendmmsg \
setlocale \
- setmode \
setrlimit \
snprintf \
utime \
@@ -4086,8 +4131,11 @@ if test "$curl_cv_native_windows" != 'yes'; then
CURL_CHECK_FUNC_STRICMP
fi
-if test "$curl_cv_native_windows" = 'yes' -o "$curl_cv_cygwin" = 'yes'; then
- AC_CHECK_FUNCS([_setmode])
+if test "$curl_cv_wince" = 'no'; then
+ AC_CHECK_FUNCS([setmode])
+ if test "$curl_cv_native_windows" = 'yes' -o "$curl_cv_cygwin" = 'yes'; then
+ AC_CHECK_FUNCS([_setmode])
+ fi
fi
if test -z "$ssl_backends"; then
@@ -4467,7 +4515,7 @@ AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
want_unix_sockets=auto
]
)
-if test "x$want_unix_sockets" != "xno"; then
+if test "x$want_unix_sockets" != "xno" -a "$curl_cv_wince" = 'no'; then
if test "x$curl_cv_native_windows" = "xyes"; then
USE_UNIX_SOCKETS=1
AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
docs/examples/anyauthput.c+4 -0
@@ -103,7 +103,11 @@ int main(int argc, char **argv)
if(!fp)
return 2;
+#ifdef UNDER_CE
+ stat(file, &file_info);
+#else
fstat(fileno(fp), &file_info);
+#endif
/* In Windows, this inits the Winsock stuff */
curl_global_init(CURL_GLOBAL_ALL);
docs/examples/block_ip.c+2 -2
@@ -29,9 +29,9 @@
* filter IP addresses.
*/
-#ifdef __AMIGA__
+#if defined(__AMIGA__) || defined(UNDER_CE)
#include <stdio.h>
-int main(void) { printf("AmigaOS is not supported.\n"); return 1; }
+int main(void) { printf("Platform not supported.\n"); return 1; }
#else
#ifdef _WIN32
docs/examples/externalsocket.c+4 -0
@@ -46,7 +46,11 @@
#include <unistd.h> /* misc. Unix functions */
#endif
+#ifdef UNDER_CE
+#define strerror(e) "?"
+#else
#include <errno.h>
+#endif
/* The IP address and port number to connect to */
#define IPADDR "127.0.0.1"
docs/examples/fileupload.c+4 -0
@@ -51,7 +51,11 @@ int main(void)
return 1; /* cannot continue */
/* to get the file size */
+#ifdef UNDER_CE
+ if(stat("debugit", &file_info) != 0) {
+#else
if(fstat(fileno(fd), &file_info) != 0) {
+#endif
fclose(fd);
return 1; /* cannot continue */
}
docs/examples/ftpupload.c+4 -0
@@ -28,7 +28,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef UNDER_CE
+#define strerror(e) "?"
+#else
#include <errno.h>
+#endif
#ifdef _WIN32
#include <io.h>
#undef stat
docs/examples/ftpuploadresume.c+2 -0
@@ -77,7 +77,9 @@ static int upload(CURL *curlhandle, const char *remotepath,
f = fopen(localpath, "rb");
if(!f) {
+#ifndef UNDER_CE
perror(NULL);
+#endif
return 0;
}
docs/examples/http2-download.c+4 -0
@@ -28,7 +28,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef UNDER_CE
+#define strerror(e) "?"
+#else
#include <errno.h>
+#endif
/* curl stuff */
#include <curl/curl.h>
docs/examples/http2-upload.c+4 -0
@@ -30,7 +30,11 @@
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
+#ifdef UNDER_CE
+#define strerror(e) "?"
+#else
#include <errno.h>
+#endif
/* somewhat Unix-specific */
#ifndef _MSC_VER
docs/examples/sftpuploadresume.c+3 -1
@@ -90,7 +90,9 @@ static int sftpResumeUpload(CURL *curlhandle, const char *remotepath,
f = fopen(localpath, "rb");
if(!f) {
+#ifndef UNDER_CE
perror(NULL);
+#endif
return 0;
}
@@ -99,7 +101,7 @@ static int sftpResumeUpload(CURL *curlhandle, const char *remotepath,
curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
_fseeki64(f, remoteFileSizeByte, SEEK_SET);
#else
fseek(f, (long)remoteFileSizeByte, SEEK_SET);
include/curl/curl.h+1 -4
@@ -97,11 +97,8 @@
#include <sys/select.h>
#endif
-#if !defined(_WIN32) && !defined(_WIN32_WCE)
-#include <sys/socket.h>
-#endif
-
#if !defined(_WIN32)
+#include <sys/socket.h>
#include <sys/time.h>
#endif
include/curl/system.h+16 -7
@@ -137,13 +137,22 @@
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
# endif
-#elif defined(_WIN32_WCE)
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
+#elif defined(UNDER_CE)
+# if defined(__MINGW32CE__)
+# define CURL_TYPEOF_CURL_OFF_T long long
+# define CURL_FORMAT_CURL_OFF_T "lld"
+# define CURL_FORMAT_CURL_OFF_TU "llu"
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# else
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# endif
#elif defined(__MINGW32__)
# include <inttypes.h>
lib/asyn-thread.c+3 -3
@@ -259,7 +259,7 @@ static CURLcode getaddrinfo_complete(struct Curl_easy *data)
* and wait on it.
*/
static
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
DWORD
#else
unsigned int
@@ -318,7 +318,7 @@ CURL_STDCALL getaddrinfo_thread(void *arg)
* gethostbyname_thread() resolves a name and then exits.
*/
static
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
DWORD
#else
unsigned int
@@ -477,7 +477,7 @@ err_exit:
destroy_async_data(data);
errno_exit:
- errno = err;
+ CURL_SETERRNO(err);
return FALSE;
}
lib/cf-socket.c+2 -2
@@ -843,7 +843,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
* Someone got to verify this on Win-NT 4.0, 2000."
*/
-#ifdef _WIN32_WCE
+#ifdef UNDER_CE
Sleep(0);
#else
SleepEx(0, FALSE);
@@ -853,7 +853,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
if(0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
err = SOCKERRNO;
-#ifdef _WIN32_WCE
+#ifdef UNDER_CE
/* Old Windows CE versions do not support SO_ERROR */
if(WSAENOPROTOOPT == err) {
SET_SOCKERRNO(0);
lib/config-win32.h+13 -9
@@ -35,15 +35,17 @@
/* Define if you have the <arpa/inet.h> header file. */
/* #define HAVE_ARPA_INET_H 1 */
+#ifndef UNDER_CE
+
/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
+#define HAVE_FCNTL_H 1 /* exists on __MINGW32CE__ */
/* Define if you have the <io.h> header file. */
-#define HAVE_IO_H 1
+#define HAVE_IO_H 1 /* exists on __MINGW32CE__ */
/* Define if you have the <locale.h> header file. */
-#ifndef UNDER_CE
#define HAVE_LOCALE_H 1
+
#endif
/* Define if you have the <netdb.h> header file. */
@@ -53,8 +55,10 @@
/* #define HAVE_NETINET_IN_H 1 */
/* Define to 1 if you have the <stdbool.h> header file. */
+#ifndef UNDER_CE
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
-#define HAVE_STDBOOL_H 1
+#define HAVE_STDBOOL_H 1 /* exists on __MINGW32CE__ */
+#endif
#endif
/* Define if you have the <sys/param.h> header file. */
@@ -109,8 +113,10 @@
#define STDC_HEADERS 1
/* Define to 1 if bool is an available type. */
+#ifndef UNDER_CE
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
-#define HAVE_BOOL_T 1
+#define HAVE_BOOL_T 1 /* exists on __MINGW32CE__ */
+#endif
#endif
/* ---------------------------------------------------------------- */
@@ -499,11 +505,9 @@ Vista
#define CURL_DISABLE_TELNET 1
#define CURL_DISABLE_LDAP 1
-#define ENOSPC 1
-#define ENOMEM 2
-#define EAGAIN 3
-
+#ifndef _MSC_VER
extern int stat(const char *path, struct stat *buffer);
+#endif
#endif /* UNDER_CE */
lib/connect.c+1 -1
@@ -301,7 +301,7 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
addr[0] = '\0';
*port = 0;
- errno = EAFNOSUPPORT;
+ CURL_SETERRNO(EAFNOSUPPORT);
return FALSE;
}
lib/curl_multibyte.c+7 -3
@@ -84,6 +84,8 @@ char *curlx_convert_wchar_to_UTF8(const wchar_t *str_w)
return str_utf8;
}
+#ifndef UNDER_CE
+
/* declare GetFullPathNameW for mingw-w64 UWP builds targeting old windows */
#if defined(CURL_WINDOWS_UWP) && defined(__MINGW32__) && \
(_WIN32_WINNT < _WIN32_WINNT_WIN10)
@@ -267,7 +269,7 @@ int curlx_win32_open(const char *filename, int oflag, ...)
curlx_unicodefree(filename_w);
}
else
- errno = EINVAL;
+ CURL_SETERRNO(EINVAL);
#else
if(fix_excessive_path(filename, &fixed))
target = fixed;
@@ -297,7 +299,7 @@ FILE *curlx_win32_fopen(const char *filename, const char *mode)
result = _wfopen(target, mode_w);
}
else
- errno = EINVAL;
+ CURL_SETERRNO(EINVAL);
curlx_unicodefree(filename_w);
curlx_unicodefree(mode_w);
#else
@@ -333,7 +335,7 @@ int curlx_win32_stat(const char *path, struct_stat *buffer)
curlx_unicodefree(path_w);
}
else
- errno = EINVAL;
+ CURL_SETERRNO(EINVAL);
#else
if(fix_excessive_path(path, &fixed))
target = fixed;
@@ -350,4 +352,6 @@ int curlx_win32_stat(const char *path, struct_stat *buffer)
return result;
}
+#endif /* UNDER_CE */
+
#endif /* _WIN32 */
lib/curl_setup.h+23 -1
@@ -465,7 +465,9 @@
*/
#ifdef USE_WIN32_LARGE_FILES
+# ifdef HAVE_IO_H
# include <io.h>
+# endif
# include <sys/types.h>
# include <sys/stat.h>
# undef lseek
@@ -496,10 +498,12 @@
*/
#if defined(_WIN32) && !defined(USE_WIN32_LARGE_FILES)
+# ifdef HAVE_IO_H
# include <io.h>
+# endif
# include <sys/types.h>
# include <sys/stat.h>
-# ifndef _WIN32_WCE
+# ifndef UNDER_CE
# undef lseek
# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
# define fstat(fdes,stp) _fstat(fdes, stp)
@@ -829,6 +833,24 @@
#include "curl_setup_once.h"
#endif
+#ifdef UNDER_CE
+#define getenv curl_getenv /* Windows CE does not support getenv() */
+#define raise(s) ((void)(s))
+/* Terrible workarounds to make Windows CE compile */
+#define errno 0
+#define CURL_SETERRNO(x) ((void)(x))
+#define EAGAIN 11
+#define ENOMEM 12
+#define EACCES 13
+#define EEXIST 17
+#define EISDIR 21
+#define ENOSPC 28
+#define ERANGE 34
+#define strerror(x) "?"
+#else
+#define CURL_SETERRNO(x) (errno = (x))
+#endif
+
/*
* Definition of our NOP statement Object-like macro
*/
lib/curl_setup_once.h+3 -1
@@ -33,7 +33,9 @@
#include <string.h>
#include <stdarg.h>
#include <time.h>
+#ifndef UNDER_CE
#include <errno.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -390,7 +392,7 @@ typedef unsigned int bit;
#ifdef __VMS
#define argv_item_t __char_ptr32
-#elif defined(_UNICODE)
+#elif defined(_UNICODE) && !defined(UNDER_CE)
#define argv_item_t wchar_t *
#else
#define argv_item_t char *
lib/curl_sspi.c+1 -1
@@ -42,7 +42,7 @@ typedef PSecurityFunctionTable (APIENTRY *INITSECURITYINTERFACE_FN)(VOID);
/* See definition of SECURITY_ENTRYPOINT in sspi.h */
#ifdef UNICODE
-# ifdef _WIN32_WCE
+# ifdef UNDER_CE
# define SECURITYENTRYPOINT L"InitSecurityInterfaceW"
# else
# define SECURITYENTRYPOINT "InitSecurityInterfaceW"
lib/curl_sspi.h+245 -0
@@ -70,6 +70,225 @@ extern PSecurityFunctionTable Curl_pSecFn;
#define ISC_REQ_USE_HTTP_STYLE 0x01000000
#endif
+#ifdef __MINGW32CE__
+#ifndef ISC_RET_REPLAY_DETECT
+#define ISC_RET_REPLAY_DETECT 0x00000004
+#endif
+#ifndef ISC_RET_SEQUENCE_DETECT
+#define ISC_RET_SEQUENCE_DETECT 0x00000008
+#endif
+#ifndef ISC_RET_CONFIDENTIALITY
+#define ISC_RET_CONFIDENTIALITY 0x00000010
+#endif
+#ifndef ISC_RET_ALLOCATED_MEMORY
+#define ISC_RET_ALLOCATED_MEMORY 0x00000100
+#endif
+#ifndef ISC_RET_STREAM
+#define ISC_RET_STREAM 0x00008000
+#endif
+
+#ifndef SEC_E_INSUFFICIENT_MEMORY
+#define SEC_E_INSUFFICIENT_MEMORY ((HRESULT)0x80090300L)
+#endif
+#ifndef SEC_E_INVALID_HANDLE
+#define SEC_E_INVALID_HANDLE ((HRESULT)0x80090301L)
+#endif
+#ifndef SEC_E_UNSUPPORTED_FUNCTION
+#define SEC_E_UNSUPPORTED_FUNCTION ((HRESULT)0x80090302L)
+#endif
+#ifndef SEC_E_TARGET_UNKNOWN
+#define SEC_E_TARGET_UNKNOWN ((HRESULT)0x80090303L)
+#endif
+#ifndef SEC_E_INTERNAL_ERROR
+#define SEC_E_INTERNAL_ERROR ((HRESULT)0x80090304L)
+#endif
+#ifndef SEC_E_SECPKG_NOT_FOUND
+#define SEC_E_SECPKG_NOT_FOUND ((HRESULT)0x80090305L)
+#endif
+#ifndef SEC_E_NOT_OWNER
+#define SEC_E_NOT_OWNER ((HRESULT)0x80090306L)
+#endif
+#ifndef SEC_E_CANNOT_INSTALL
+#define SEC_E_CANNOT_INSTALL ((HRESULT)0x80090307L)
+#endif
+#ifndef SEC_E_INVALID_TOKEN
+#define SEC_E_INVALID_TOKEN ((HRESULT)0x80090308L)
+#endif
+#ifndef SEC_E_CANNOT_PACK
+#define SEC_E_CANNOT_PACK ((HRESULT)0x80090309L)
+#endif
+#ifndef SEC_E_QOP_NOT_SUPPORTED
+#define SEC_E_QOP_NOT_SUPPORTED ((HRESULT)0x8009030AL)
+#endif
+#ifndef SEC_E_NO_IMPERSONATION
+#define SEC_E_NO_IMPERSONATION ((HRESULT)0x8009030BL)
+#endif
+#ifndef SEC_E_LOGON_DENIED
+#define SEC_E_LOGON_DENIED ((HRESULT)0x8009030CL)
+#endif
+#ifndef SEC_E_UNKNOWN_CREDENTIALS
+#define SEC_E_UNKNOWN_CREDENTIALS ((HRESULT)0x8009030DL)
+#endif
+#ifndef SEC_E_NO_CREDENTIALS
+#define SEC_E_NO_CREDENTIALS ((HRESULT)0x8009030EL)
+#endif
+#ifndef SEC_E_MESSAGE_ALTERED
+#define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL)
+#endif
+#ifndef SEC_E_OUT_OF_SEQUENCE
+#define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L)
+#endif
+#ifndef SEC_E_NO_AUTHENTICATING_AUTHORITY
+#define SEC_E_NO_AUTHENTICATING_AUTHORITY ((HRESULT)0x80090311L)
+#endif
+#ifndef SEC_E_BAD_PKGID
+#define SEC_E_BAD_PKGID ((HRESULT)0x80090316L)
+#endif
+#ifndef SEC_E_CONTEXT_EXPIRED
+#define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
+#endif
+#ifndef SEC_E_INCOMPLETE_MESSAGE
+#define SEC_E_INCOMPLETE_MESSAGE ((HRESULT)0x80090318L)
+#endif
+#ifndef SEC_E_INCOMPLETE_CREDENTIALS
+#define SEC_E_INCOMPLETE_CREDENTIALS ((HRESULT)0x80090320L)
+#endif
+#ifndef SEC_E_BUFFER_TOO_SMALL
+#define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
+#endif
+#ifndef SEC_E_WRONG_PRINCIPAL
+#define SEC_E_WRONG_PRINCIPAL ((HRESULT)0x80090322L)
+#endif
+#ifndef SEC_E_TIME_SKEW
+#define SEC_E_TIME_SKEW ((HRESULT)0x80090324L)
+#endif
+#ifndef SEC_E_UNTRUSTED_ROOT
+#define SEC_E_UNTRUSTED_ROOT ((HRESULT)0x80090325L)
+#endif
+#ifndef SEC_E_ILLEGAL_MESSAGE
+#define SEC_E_ILLEGAL_MESSAGE ((HRESULT)0x80090326L)
+#endif
+#ifndef SEC_E_CERT_UNKNOWN
+#define SEC_E_CERT_UNKNOWN ((HRESULT)0x80090327L)
+#endif
+#ifndef SEC_E_CERT_EXPIRED
+#define SEC_E_CERT_EXPIRED ((HRESULT)0x80090328L)
+#endif
+#ifndef SEC_E_ENCRYPT_FAILURE
+#define SEC_E_ENCRYPT_FAILURE ((HRESULT)0x80090329L)
+#endif
+#ifndef SEC_E_DECRYPT_FAILURE
+#define SEC_E_DECRYPT_FAILURE ((HRESULT)0x80090330L)
+#endif
+#ifndef SEC_E_ALGORITHM_MISMATCH
+#define SEC_E_ALGORITHM_MISMATCH ((HRESULT)0x80090331L)
+#endif
+#ifndef SEC_E_SECURITY_QOS_FAILED
+#define SEC_E_SECURITY_QOS_FAILED ((HRESULT)0x80090332L)
+#endif
+#ifndef SEC_E_UNFINISHED_CONTEXT_DELETED
+#define SEC_E_UNFINISHED_CONTEXT_DELETED ((HRESULT)0x80090333L)
+#endif
+#ifndef SEC_E_NO_TGT_REPLY
+#define SEC_E_NO_TGT_REPLY ((HRESULT)0x80090334L)
+#endif
+#ifndef SEC_E_NO_IP_ADDRESSES
+#define SEC_E_NO_IP_ADDRESSES ((HRESULT)0x80090335L)
+#endif
+#ifndef SEC_E_WRONG_CREDENTIAL_HANDLE
+#define SEC_E_WRONG_CREDENTIAL_HANDLE ((HRESULT)0x80090336L)
+#endif
+#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
+#define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
+#endif
+#ifndef SEC_E_MAX_REFERRALS_EXCEEDED
+#define SEC_E_MAX_REFERRALS_EXCEEDED ((HRESULT)0x80090338L)
+#endif
+#ifndef SEC_E_MUST_BE_KDC
+#define SEC_E_MUST_BE_KDC ((HRESULT)0x80090339L)
+#endif
+#ifndef SEC_E_STRONG_CRYPTO_NOT_SUPPORTED
+#define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED ((HRESULT)0x8009033AL)
+#endif
+#ifndef SEC_E_TOO_MANY_PRINCIPALS
+#define SEC_E_TOO_MANY_PRINCIPALS ((HRESULT)0x8009033BL)
+#endif
+#ifndef SEC_E_NO_PA_DATA
+#define SEC_E_NO_PA_DATA ((HRESULT)0x8009033CL)
+#endif
+#ifndef SEC_E_PKINIT_NAME_MISMATCH
+#define SEC_E_PKINIT_NAME_MISMATCH ((HRESULT)0x8009033DL)
+#endif
+#ifndef SEC_E_SMARTCARD_LOGON_REQUIRED
+#define SEC_E_SMARTCARD_LOGON_REQUIRED ((HRESULT)0x8009033EL)
+#endif
+#ifndef SEC_E_SHUTDOWN_IN_PROGRESS
+#define SEC_E_SHUTDOWN_IN_PROGRESS ((HRESULT)0x8009033FL)
+#endif
+#ifndef SEC_E_KDC_INVALID_REQUEST
+#define SEC_E_KDC_INVALID_REQUEST ((HRESULT)0x80090340L)
+#endif
+#ifndef SEC_E_KDC_UNABLE_TO_REFER
+#define SEC_E_KDC_UNABLE_TO_REFER ((HRESULT)0x80090341L)
+#endif
+#ifndef SEC_E_KDC_UNKNOWN_ETYPE
+#define SEC_E_KDC_UNKNOWN_ETYPE ((HRESULT)0x80090342L)
+#endif
+#ifndef SEC_E_UNSUPPORTED_PREAUTH
+#define SEC_E_UNSUPPORTED_PREAUTH ((HRESULT)0x80090343L)
+#endif
+#ifndef SEC_E_DELEGATION_REQUIRED
+#define SEC_E_DELEGATION_REQUIRED ((HRESULT)0x80090345L)
+#endif
+#ifndef SEC_E_BAD_BINDINGS
+#define SEC_E_BAD_BINDINGS ((HRESULT)0x80090346L)
+#endif
+#ifndef SEC_E_MULTIPLE_ACCOUNTS
+#define SEC_E_MULTIPLE_ACCOUNTS ((HRESULT)0x80090347L)
+#endif
+#ifndef SEC_E_NO_KERB_KEY
+#define SEC_E_NO_KERB_KEY ((HRESULT)0x80090348L)
+#endif
+#ifndef SEC_E_CERT_WRONG_USAGE
+#define SEC_E_CERT_WRONG_USAGE ((HRESULT)0x80090349L)
+#endif
+#ifndef SEC_E_DOWNGRADE_DETECTED
+#define SEC_E_DOWNGRADE_DETECTED ((HRESULT)0x80090350L)
+#endif
+#ifndef SEC_E_SMARTCARD_CERT_REVOKED
+#define SEC_E_SMARTCARD_CERT_REVOKED ((HRESULT)0x80090351L)
+#endif
+#ifndef SEC_E_ISSUING_CA_UNTRUSTED
+#define SEC_E_ISSUING_CA_UNTRUSTED ((HRESULT)0x80090352L)
+#endif
+#ifndef SEC_E_REVOCATION_OFFLINE_C
+#define SEC_E_REVOCATION_OFFLINE_C ((HRESULT)0x80090353L)
+#endif
+#ifndef SEC_E_PKINIT_CLIENT_FAILURE
+#define SEC_E_PKINIT_CLIENT_FAILURE ((HRESULT)0x80090354L)
+#endif
+#ifndef SEC_E_SMARTCARD_CERT_EXPIRED
+#define SEC_E_SMARTCARD_CERT_EXPIRED ((HRESULT)0x80090355L)
+#endif
+#ifndef SEC_E_NO_S4U_PROT_SUPPORT
+#define SEC_E_NO_S4U_PROT_SUPPORT ((HRESULT)0x80090356L)
+#endif
+#ifndef SEC_E_CROSSREALM_DELEGATION_FAILURE
+#define SEC_E_CROSSREALM_DELEGATION_FAILURE ((HRESULT)0x80090357L)
+#endif
+#ifndef SEC_E_REVOCATION_OFFLINE_KDC
+#define SEC_E_REVOCATION_OFFLINE_KDC ((HRESULT)0x80090358L)
+#endif
+#ifndef SEC_E_ISSUING_CA_UNTRUSTED_KDC
+#define SEC_E_ISSUING_CA_UNTRUSTED_KDC ((HRESULT)0x80090359L)
+#endif
+#ifndef SEC_E_KDC_CERT_EXPIRED
+#define SEC_E_KDC_CERT_EXPIRED ((HRESULT)0x8009035AL)
+#endif
+#ifndef SEC_E_KDC_CERT_REVOKED
+#define SEC_E_KDC_CERT_REVOKED ((HRESULT)0x8009035BL)
+#endif
+#endif /* __MINGW32CE__ */
#ifndef SEC_E_INVALID_PARAMETER
# define SEC_E_INVALID_PARAMETER ((HRESULT)0x8009035DL)
#endif
@@ -80,6 +299,32 @@ extern PSecurityFunctionTable Curl_pSecFn;
# define SEC_E_POLICY_NLTM_ONLY ((HRESULT)0x8009035FL)
#endif
+#ifdef __MINGW32CE__
+#ifndef SEC_I_CONTINUE_NEEDED
+#define SEC_I_CONTINUE_NEEDED ((HRESULT)0x00090312L)
+#endif
+#ifndef SEC_I_COMPLETE_NEEDED
+#define SEC_I_COMPLETE_NEEDED ((HRESULT)0x00090313L)
+#endif
+#ifndef SEC_I_COMPLETE_AND_CONTINUE
+#define SEC_I_COMPLETE_AND_CONTINUE ((HRESULT)0x00090314L)
+#endif
+#ifndef SEC_I_LOCAL_LOGON
+#define SEC_I_LOCAL_LOGON ((HRESULT)0x00090315L)
+#endif
+#ifndef SEC_I_CONTEXT_EXPIRED
+#define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
+#endif
+#ifndef SEC_I_INCOMPLETE_CREDENTIALS
+#define SEC_I_INCOMPLETE_CREDENTIALS ((HRESULT)0x00090320L)
+#endif
+#ifndef SEC_I_RENEGOTIATE
+#define SEC_I_RENEGOTIATE ((HRESULT)0x00090321L)
+#endif
+#ifndef SEC_I_NO_LSA_CONTEXT
+#define SEC_I_NO_LSA_CONTEXT ((HRESULT)0x00090323L)
+#endif
+#endif /* __MINGW32CE__ */
#ifndef SEC_I_SIGNATURE_NEEDED
#define SEC_I_SIGNATURE_NEEDED ((HRESULT)0x0009035CL)
#endif
lib/curl_threads.c+8 -7
@@ -103,7 +103,7 @@ int Curl_thread_join(curl_thread_t *hnd)
#elif defined(USE_THREADS_WIN32)
curl_thread_t Curl_thread_create(
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
DWORD
#else
unsigned int
@@ -111,25 +111,26 @@ curl_thread_t Curl_thread_create(
(CURL_STDCALL *func) (void *),
void *arg)
{
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
typedef HANDLE curl_win_thread_handle_t;
#else
typedef uintptr_t curl_win_thread_handle_t;
#endif
curl_thread_t t;
curl_win_thread_handle_t thread_handle;
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
thread_handle = CreateThread(NULL, 0, func, arg, 0, NULL);
#else
thread_handle = _beginthreadex(NULL, 0, func, arg, 0, NULL);
#endif
t = (curl_thread_t)thread_handle;
if((t == 0) || (t == LongToHandle(-1L))) {
-#ifdef _WIN32_WCE
+#ifdef UNDER_CE
DWORD gle = GetLastError();
- errno = ((gle == ERROR_ACCESS_DENIED ||
- gle == ERROR_NOT_ENOUGH_MEMORY) ?
- EACCES : EINVAL);
+ int err = (gle == ERROR_ACCESS_DENIED ||
+ gle == ERROR_NOT_ENOUGH_MEMORY) ?
+ EACCES : EINVAL;
+ CURL_SETERRNO(err);
#endif
return curl_thread_t_null;
}
lib/curl_threads.h+1 -1
@@ -53,7 +53,7 @@
#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
curl_thread_t Curl_thread_create(
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
DWORD
#else
unsigned int
lib/easy.c+1 -1
@@ -105,7 +105,7 @@ static curl_simple_lock s_lock = CURL_SIMPLE_LOCK_INIT;
* ways, but at this point it must be defined as the system-supplied strdup
* so the callback pointer is initialized correctly.
*/
-#if defined(_WIN32_WCE)
+#if defined(UNDER_CE)
#define system_strdup _strdup
#elif !defined(HAVE_STRDUP)
#define system_strdup Curl_strdup
lib/file.c+1 -1
@@ -547,7 +547,7 @@ static CURLcode file_do(struct Curl_easy *data, bool *done)
if(data->state.resume_from) {
if(!S_ISDIR(statbuf.st_mode)) {
-#ifdef __AMIGA__
+#if defined(__AMIGA__) || defined(__MINGW32CE__)
if(data->state.resume_from !=
lseek(fd, (off_t)data->state.resume_from, SEEK_SET))
#else
lib/fopen.c+7 -1
@@ -105,7 +105,13 @@ CURLcode Curl_fopen(struct Curl_easy *data, const char *filename,
*fh = fopen(filename, FOPEN_WRITETEXT);
if(!*fh)
goto fail;
- if(fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode)) {
+ if(
+#ifdef UNDER_CE
+ stat(filename, &sb) == -1
+#else
+ fstat(fileno(*fh), &sb) == -1
+#endif
+ || !S_ISREG(sb.st_mode)) {
return CURLE_OK;
}
fclose(*fh);
lib/ftp.c+1 -1
@@ -3290,7 +3290,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
/* shut down the socket to inform the server we are done */
-#ifdef _WIN32_WCE
+#ifdef UNDER_CE
shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */
#endif
lib/getenv.c+1 -1
@@ -31,7 +31,7 @@
static char *GetEnv(const char *variable)
{
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP) || \
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE) || \
defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
(void)variable;
return NULL;
lib/hostip.c+2 -0
@@ -42,7 +42,9 @@
#endif
#include <setjmp.h>
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#include "urldata.h"
#include "sendf.h"
lib/inet_ntop.c+4 -4
@@ -74,7 +74,7 @@ static char *inet_ntop4(const unsigned char *src, char *dst, size_t size)
len = strlen(tmp);
if(len == 0 || len >= size) {
- errno = ENOSPC;
+ CURL_SETERRNO(ENOSPC);
return NULL;
}
strcpy(dst, tmp);
@@ -153,7 +153,7 @@ static char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
if(i == 6 && best.base == 0 &&
(best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
if(!inet_ntop4(src + 12, tp, sizeof(tmp) - (tp - tmp))) {
- errno = ENOSPC;
+ CURL_SETERRNO(ENOSPC);
return NULL;
}
tp += strlen(tp);
@@ -171,7 +171,7 @@ static char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
/* Check for overflow, copy, and we are done.
*/
if((size_t)(tp - tmp) > size) {
- errno = ENOSPC;
+ CURL_SETERRNO(ENOSPC);
return NULL;
}
strcpy(dst, tmp);
@@ -197,7 +197,7 @@ char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size)
case AF_INET6:
return inet_ntop6((const unsigned char *)src, buf, size);
default:
- errno = EAFNOSUPPORT;
+ CURL_SETERRNO(EAFNOSUPPORT);
return NULL;
}
}
lib/inet_pton.c+1 -1
@@ -80,7 +80,7 @@ Curl_inet_pton(int af, const char *src, void *dst)
case AF_INET6:
return inet_pton6(src, (unsigned char *)dst);
default:
- errno = EAFNOSUPPORT;
+ CURL_SETERRNO(EAFNOSUPPORT);
return -1;
}
/* NOTREACHED */
lib/memdebug.c+1 -1
@@ -117,7 +117,7 @@ static bool countcheck(const char *func, int line, const char *source)
fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
source, line, func);
fflush(curl_dbg_logfile); /* because it might crash now */
- errno = ENOMEM;
+ CURL_SETERRNO(ENOMEM);
return TRUE; /* RETURN ERROR! */
}
else
lib/mprintf.c+2 -2
@@ -337,7 +337,7 @@ static int parsefmt(const char *format,
case 'h':
flags |= FLAGS_SHORT;
break;
-#if defined(_WIN32) || defined(_WIN32_WCE)
+#ifdef _WIN32
case 'I':
/* Non-ANSI integer extensions I32 I64 */
if((fmt[0] == '3') && (fmt[1] == '2')) {
@@ -356,7 +356,7 @@ static int parsefmt(const char *format,
#endif
}
break;
-#endif /* _WIN32 || _WIN32_WCE */
+#endif /* _WIN32 */
case 'l':
if(flags & FLAGS_LONG)
flags |= FLAGS_LONGLONG;
lib/rename.c+1 -1
@@ -40,7 +40,7 @@
/* return 0 on success, 1 on error */
int Curl_rename(const char *oldpath, const char *newpath)
{
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
/* rename() on Windows does not overwrite, so we cannot use it here.
MoveFileEx() will overwrite and is usually atomic, however it fails
when there are open handles to the file. */
lib/socketpair.c+2 -0
@@ -103,7 +103,9 @@ int Curl_socketpair(int domain, int type, int protocol,
* This is a socketpair() implementation for Windows.
*/
#include <string.h>
+#ifdef HAVE_IO_H
#include <io.h>
+#endif
#else
#ifdef HAVE_NETDB_H
#include <netdb.h>
lib/strerror.c+10 -10
@@ -48,7 +48,7 @@
#include "curl_memory.h"
#include "memdebug.h"
-#if defined(_WIN32) || defined(_WIN32_WCE)
+#ifdef _WIN32
#define PRESERVE_WINDOWS_ERROR_CODE
#endif
@@ -768,7 +768,7 @@ get_winsock_error(int err, char *buf, size_t len)
}
#endif /* USE_WINSOCK */
-#if defined(_WIN32) || defined(_WIN32_WCE)
+#ifdef _WIN32
/* This is a helper function for Curl_strerror that converts Windows API error
* codes (GetLastError) to error messages.
* Returns NULL if no error message was found for error code.
@@ -810,7 +810,7 @@ get_winapi_error(int err, char *buf, size_t buflen)
return *buf ? buf : NULL;
}
-#endif /* _WIN32 || _WIN32_WCE */
+#endif /* _WIN32 */
/*
* Our thread-safe and smart strerror() replacement.
@@ -848,8 +848,8 @@ const char *Curl_strerror(int err, char *buf, size_t buflen)
*buf = '\0';
-#if defined(_WIN32) || defined(_WIN32_WCE)
-#if defined(_WIN32)
+#ifdef _WIN32
+#ifndef UNDER_CE
/* 'sys_nerr' is the maximum errno number, it is not widely portable */
if(err >= 0 && err < sys_nerr)
msnprintf(buf, buflen, "%s", sys_errlist[err]);
@@ -911,7 +911,7 @@ const char *Curl_strerror(int err, char *buf, size_t buflen)
*p = '\0';
if(errno != old_errno)
- errno = old_errno;
+ CURL_SETERRNO(old_errno);
#ifdef PRESERVE_WINDOWS_ERROR_CODE
if(old_win_err != GetLastError())
@@ -925,7 +925,7 @@ const char *Curl_strerror(int err, char *buf, size_t buflen)
* Curl_winapi_strerror:
* Variant of Curl_strerror if the error code is definitely Windows API.
*/
-#if defined(_WIN32) || defined(_WIN32_WCE)
+#ifdef _WIN32
const char *Curl_winapi_strerror(DWORD err, char *buf, size_t buflen)
{
#ifdef PRESERVE_WINDOWS_ERROR_CODE
@@ -951,7 +951,7 @@ const char *Curl_winapi_strerror(DWORD err, char *buf, size_t buflen)
#endif
if(errno != old_errno)
- errno = old_errno;
+ CURL_SETERRNO(old_errno);
#ifdef PRESERVE_WINDOWS_ERROR_CODE
if(old_win_err != GetLastError())
@@ -960,7 +960,7 @@ const char *Curl_winapi_strerror(DWORD err, char *buf, size_t buflen)
return buf;
}
-#endif /* _WIN32 || _WIN32_WCE */
+#endif /* _WIN32 */
#ifdef USE_WINDOWS_SSPI
/*
@@ -1100,7 +1100,7 @@ const char *Curl_sspi_strerror(int err, char *buf, size_t buflen)
#endif
if(errno != old_errno)
- errno = old_errno;
+ CURL_SETERRNO(old_errno);
#ifdef PRESERVE_WINDOWS_ERROR_CODE
if(old_win_err != GetLastError())
lib/strerror.h+1 -1
@@ -29,7 +29,7 @@
#define STRERROR_LEN 256 /* a suitable length */
const char *Curl_strerror(int err, char *buf, size_t buflen);
-#if defined(_WIN32) || defined(_WIN32_WCE)
+#ifdef _WIN32
const char *Curl_winapi_strerror(DWORD err, char *buf, size_t buflen);
#endif
#ifdef USE_WINDOWS_SSPI
lib/system_win32.c+9 -3
@@ -96,9 +96,15 @@ CURLcode Curl_win32_init(long flags)
s_hIpHlpApiDll = Curl_load_library(TEXT("iphlpapi.dll"));
if(s_hIpHlpApiDll) {
/* Get the address of the if_nametoindex function */
+#ifdef UNDER_CE
+ #define CURL_TEXT(n) TEXT(n)
+#else
+ #define CURL_TEXT(n) (n)
+#endif
IF_NAMETOINDEX_FN pIfNameToIndex =
CURLX_FUNCTION_CAST(IF_NAMETOINDEX_FN,
- (GetProcAddress(s_hIpHlpApiDll, "if_nametoindex")));
+ (GetProcAddress(s_hIpHlpApiDll,
+ CURL_TEXT("if_nametoindex"))));
if(pIfNameToIndex)
Curl_if_nametoindex = pIfNameToIndex;
@@ -150,7 +156,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
/* See function definitions in winbase.h */
#ifdef UNICODE
-# ifdef _WIN32_WCE
+# ifdef UNDER_CE
# define LOADLIBARYEX L"LoadLibraryExW"
# else
# define LOADLIBARYEX "LoadLibraryExW"
@@ -175,7 +181,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
*/
HMODULE Curl_load_library(LPCTSTR filename)
{
-#ifndef CURL_WINDOWS_UWP
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
HMODULE hModule = NULL;
LOADLIBRARYEX_FN pLoadLibraryEx = NULL;
lib/transfer.c+2 -0
@@ -39,7 +39,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
lib/urlapi.c+0 -1
@@ -602,7 +602,6 @@ static int ipv4_normalize(struct dynbuf *host)
if(*c == '[')
return HOST_IPV6;
- errno = 0; /* for strtoul */
while(!done) {
int rc;
curl_off_t l;
lib/vtls/rustls.c+0 -1
@@ -29,7 +29,6 @@
#include "curl_printf.h"
-#include <errno.h>
#include <rustls.h>
#include "inet_pton.h"
lib/vtls/schannel.c+19 -6
@@ -141,6 +141,12 @@
#define CALG_SHA_256 0x0000800c
#endif
+/* Work around typo in CeGCC (as of 0.59.1) w32api headers */
+#if defined(__MINGW32CE__) && \
+ !defined(ALG_CLASS_DHASH) && defined(ALG_CLASS_HASH)
+#define ALG_CLASS_DHASH ALG_CLASS_HASH
+#endif
+
#ifndef PKCS12_NO_PERSIST_KEY
#define PKCS12_NO_PERSIST_KEY 0x00008000
#endif
@@ -150,7 +156,7 @@
https://technet.microsoft.com/en-us/library/hh831771%28v=ws.11%29.aspx
Or mingw-w64 9.0 or upper.
*/
-#if (defined(__MINGW32__) && __MINGW64_VERSION_MAJOR >= 9) || \
+#if (defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 9) || \
(defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(_USING_V110_SDK71_))
#define HAS_ALPN_SCHANNEL
static bool s_win_has_alpn;
@@ -880,7 +886,9 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
struct ssl_connect_data *connssl = cf->ctx;
struct schannel_ssl_backend_data *backend =
(struct schannel_ssl_backend_data *)connssl->backend;
+#ifndef UNDER_CE
struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
+#endif
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
SecBuffer outbuf;
SecBufferDesc outbuf_desc;
@@ -912,9 +920,9 @@ schannel_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
backend->use_alpn = FALSE;
#endif
-#ifdef _WIN32_WCE
+#ifdef UNDER_CE
#ifdef HAS_MANUAL_VERIFY_API
- /* certificate validation on CE does not seem to work right; we will
+ /* certificate validation on Windows CE does not seem to work right; we will
* do it following a more manual process. */
backend->use_manual_cred_validation = TRUE;
#else
@@ -2373,7 +2381,7 @@ static void schannel_close(struct Curl_cfilter *cf, struct Curl_easy *data)
static int schannel_init(void)
{
-#ifdef HAS_ALPN_SCHANNEL
+#if defined(HAS_ALPN_SCHANNEL) && !defined(UNDER_CE)
bool wine = FALSE;
bool wine_has_alpn = FALSE;
@@ -2383,7 +2391,7 @@ static int schannel_init(void)
Assume no WINE because WINE has no UWP support. */
WINE_GET_VERSION_FN p_wine_get_version =
CURLX_FUNCTION_CAST(WINE_GET_VERSION_FN,
- (GetProcAddress(GetModuleHandle(TEXT("ntdll")),
+ (GetProcAddress(GetModuleHandleA("ntdll"),
"wine_get_version")));
wine = !!p_wine_get_version;
if(wine) {
@@ -2399,7 +2407,7 @@ static int schannel_init(void)
s_win_has_alpn = curlx_verify_windows_version(6, 3, 0, PLATFORM_WINNT,
VERSION_GREATER_THAN_EQUAL);
}
-#endif /* HAS_ALPN_SCHANNEL */
+#endif /* HAS_ALPN_SCHANNEL && !UNDER_CE */
return Curl_sspi_global_init() == CURLE_OK ? 1 : 0;
}
@@ -2524,7 +2532,12 @@ static void schannel_checksum(const unsigned char *input,
if(!CryptCreateHash(hProv, algId, 0, 0, &hHash))
break; /* failed */
+#ifdef __MINGW32CE__
+ /* workaround for CeGCC, should be (const BYTE*) */
+ if(!CryptHashData(hHash, (BYTE*)input, (DWORD)inputlen, 0))
+#else
if(!CryptHashData(hHash, input, (DWORD)inputlen, 0))
+#endif
break; /* failed */
/* get hash size */
lib/vtls/schannel_verify.c+83 -4
@@ -57,6 +57,22 @@
#ifdef HAS_MANUAL_VERIFY_API
+#ifdef __MINGW32CE__
+#define CERT_QUERY_OBJECT_BLOB 0x00000002
+#define CERT_QUERY_CONTENT_CERT 1
+#define CERT_QUERY_CONTENT_FLAG_CERT (1 << CERT_QUERY_CONTENT_CERT)
+#define CERT_QUERY_FORMAT_BINARY 1
+#define CERT_QUERY_FORMAT_BASE64_ENCODED 2
+#define CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED 3
+#define CERT_QUERY_FORMAT_FLAG_ALL \
+ (1 << CERT_QUERY_FORMAT_BINARY) | \
+ (1 << CERT_QUERY_FORMAT_BASE64_ENCODED) | \
+ (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED)
+#define CERT_CHAIN_REVOCATION_CHECK_CHAIN 0x20000000
+#define CERT_NAME_DISABLE_IE4_UTF8_FLAG 0x00010000
+#define CERT_TRUST_IS_OFFLINE_REVOCATION 0x01000000
+#endif /* __MINGW32CE__ */
+
#define MAX_CAFILE_SIZE 1048576 /* 1 MiB */
#define BEGIN_CERT "-----BEGIN CERTIFICATE-----"
#define END_CERT "\n-----END CERTIFICATE-----"
@@ -76,6 +92,7 @@ struct cert_chain_engine_config_win7 {
HCERTSTORE hExclusiveTrustedPeople;
};
+#ifndef UNDER_CE
static int is_cr_or_lf(char c)
{
return c == '\r' || c == '\n';
@@ -330,9 +347,11 @@ cleanup:
return result;
}
+#endif
#endif /* HAS_MANUAL_VERIFY_API */
+#ifndef UNDER_CE
/*
* Returns the number of characters necessary to populate all the host_names.
* If host_names is not NULL, populate it with all the hostnames. Each string
@@ -511,15 +530,68 @@ static bool get_alt_name_info(struct Curl_easy *data,
#endif
return result;
}
+#endif /* !UNDER_CE */
/* Verify the server's hostname */
CURLcode Curl_verify_host(struct Curl_cfilter *cf,
struct Curl_easy *data)
{
- struct ssl_connect_data *connssl = cf->ctx;
- SECURITY_STATUS sspi_status;
CURLcode result = CURLE_PEER_FAILED_VERIFICATION;
+ struct ssl_connect_data *connssl = cf->ctx;
CERT_CONTEXT *pCertContextServer = NULL;
+#ifdef UNDER_CE
+ TCHAR cert_hostname_buff[256];
+ DWORD len;
+
+ /* This code does not support certificates with multiple alternative names.
+ * Right now we are only asking for the first preferred alternative name.
+ * Instead we would need to do all via CERT_NAME_SEARCH_ALL_NAMES_FLAG
+ * (If Windows CE supports that?) and run this section in a loop for each.
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/aa376086.aspx
+ * curl: (51) schannel: CertGetNameString() certificate hostname
+ * (.google.com) did not match connection (google.com)
+ */
+ len = CertGetNameString(pCertContextServer,
+ CERT_NAME_DNS_TYPE,
+ CERT_NAME_DISABLE_IE4_UTF8_FLAG,
+ NULL,
+ cert_hostname_buff,
+ 256);
+ if(len > 0) {
+ /* Comparing the cert name and the connection hostname encoded as UTF-8
+ * is acceptable since both values are assumed to use ASCII
+ * (or some equivalent) encoding
+ */
+ char *cert_hostname = curlx_convert_tchar_to_UTF8(cert_hostname_buff);
+ if(!cert_hostname) {
+ result = CURLE_OUT_OF_MEMORY;
+ }
+ else{
+ const char *conn_hostname = connssl->peer.hostname;
+ if(Curl_cert_hostcheck(cert_hostname, strlen(cert_hostname),
+ conn_hostname, strlen(conn_hostname))) {
+ infof(data,
+ "schannel: connection hostname (%s) validated "
+ "against certificate name (%s)\n",
+ conn_hostname, cert_hostname);
+ result = CURLE_OK;
+ }
+ else{
+ failf(data,
+ "schannel: connection hostname (%s) "
+ "does not match certificate name (%s)",
+ conn_hostname, cert_hostname);
+ }
+ Curl_safefree(cert_hostname);
+ }
+ }
+ else {
+ failf(data,
+ "schannel: CertGetNameString did not provide any "
+ "certificate name information");
+ }
+#else
+ SECURITY_STATUS sspi_status;
TCHAR *cert_hostname_buff = NULL;
size_t cert_hostname_buff_index = 0;
const char *conn_hostname = connssl->peer.hostname;
@@ -664,6 +736,7 @@ cleanup:
if(pCertContextServer)
CertFreeCertificateContext(pCertContextServer);
+#endif /* !UNDER_CE */
return result;
}
@@ -681,15 +754,17 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
CERT_CONTEXT *pCertContextServer = NULL;
const CERT_CHAIN_CONTEXT *pChainContext = NULL;
HCERTCHAINENGINE cert_chain_engine = NULL;
+#ifndef UNDER_CE
HCERTSTORE trust_store = NULL;
HCERTSTORE own_trust_store = NULL;
+#endif /* !UNDER_CE */
DEBUGASSERT(BACKEND);
sspi_status =
Curl_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle,
- SECPKG_ATTR_REMOTE_CERT_CONTEXT,
- &pCertContextServer);
+ SECPKG_ATTR_REMOTE_CERT_CONTEXT,
+ &pCertContextServer);
if((sspi_status != SEC_E_OK) || !pCertContextServer) {
char buffer[STRERROR_LEN];
@@ -698,6 +773,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
result = CURLE_PEER_FAILED_VERIFICATION;
}
+#ifndef UNDER_CE
if(result == CURLE_OK &&
(conn_config->CAfile || conn_config->ca_info_blob) &&
BACKEND->use_manual_cred_validation) {
@@ -782,6 +858,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
}
}
}
+#endif /* !UNDER_CE */
if(result == CURLE_OK) {
CERT_CHAIN_PARA ChainPara;
@@ -848,6 +925,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
}
}
+#ifndef UNDER_CE
if(cert_chain_engine) {
CertFreeCertificateChainEngine(cert_chain_engine);
}
@@ -855,6 +933,7 @@ CURLcode Curl_verify_certificate(struct Curl_cfilter *cf,
if(own_trust_store) {
CertCloseStore(own_trust_store, 0);
}
+#endif /* !UNDER_CE */
if(pChainContext)
CertFreeCertificateChain(pChainContext);
lib/vtls/vtls_scache.c+4 -1
@@ -385,7 +385,10 @@ static CURLcode cf_ssl_peer_key_add_path(struct dynbuf *buf,
* valid when used in another process with different CWD. However,
* when a path does not exist, this does not work. Then, we add
* the path as is. */
-#ifdef _WIN32
+#ifdef UNDER_CE
+ (void)is_local;
+ return Curl_dyn_addf(buf, ":%s-%s", name, path);
+#elif defined(_WIN32)
char abspath[_MAX_PATH];
if(_fullpath(abspath, path, _MAX_PATH))
return Curl_dyn_addf(buf, ":%s-%s", name, abspath);
src/CMakeLists.txt+1 -1
@@ -107,7 +107,7 @@ if(CURL_HAS_LTO)
set_target_properties(${EXE_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
-if(ENABLE_UNICODE AND MINGW)
+if(ENABLE_UNICODE AND MINGW AND NOT MINGW32CE)
target_link_libraries(${EXE_NAME} "-municode")
endif()
src/terminal.c+1 -1
@@ -66,7 +66,7 @@ unsigned int get_terminal_columns(void)
struct winsize ts;
if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts))
cols = (int)ts.ws_col;
-#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
+#elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
{
HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO console_info;
src/tool_cb_hdr.c+1 -1
@@ -158,7 +158,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
/*
* Truncate the etag save stream, it can have an existing etag value.
*/
-#ifdef HAVE_FTRUNCATE
+#if defined(HAVE_FTRUNCATE) && !defined(__MINGW32CE__)
if(ftruncate(fileno(etag_save->stream), 0)) {
return CURL_WRITEFUNC_ERROR;
}
src/tool_cb_rea.c+1 -1
@@ -91,7 +91,7 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
rc = read(per->infd, buffer, sz*nmemb);
if(rc < 0) {
if(errno == EAGAIN) {
- errno = 0;
+ CURL_SETERRNO(0);
config->readbusy = TRUE;
return CURL_READFUNC_PAUSE;
}
src/tool_cb_see.c+1 -1
@@ -80,7 +80,7 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
}
#endif
-#ifdef __AMIGA__
+#if defined(__AMIGA__) || defined(__MINGW32CE__)
if(LSEEK_ERROR == lseek(per->infd, (off_t)offset, whence))
#else
if(LSEEK_ERROR == lseek(per->infd, offset, whence))
src/tool_cb_wrt.c+2 -2
@@ -138,7 +138,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
struct OperationConfig *config = per->config;
size_t bytes = sz * nmemb;
bool is_tty = config->global->isatty;
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
CONSOLE_SCREEN_BUFFER_INFO console_info;
intptr_t fhnd;
#endif
@@ -210,7 +210,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
}
}
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
fhnd = _get_osfhandle(fileno(outs->stream));
/* if Windows console then UTF-8 must be converted to UTF-16 */
if(isatty(fileno(outs->stream)) &&
src/tool_dirhie.c+1 -1
@@ -25,7 +25,7 @@
#include <sys/stat.h>
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
# include <direct.h>
#endif
src/tool_doswin.c+4 -4
@@ -561,7 +561,7 @@ char **__crt0_glob_function(char *arg)
#ifdef _WIN32
-#if !defined(CURL_WINDOWS_UWP) && \
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
!defined(CURL_DISABLE_CA_SEARCH) && !defined(CURL_CA_SEARCH_SAFE)
/* Search and set the CA cert file for Windows.
*
@@ -613,7 +613,7 @@ CURLcode FindWin32CACert(struct OperationConfig *config,
struct curl_slist *GetLoadedModulePaths(void)
{
struct curl_slist *slist = NULL;
-#if !defined(CURL_WINDOWS_UWP)
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
HANDLE hnd = INVALID_HANDLE_VALUE;
MODULEENTRY32 mod = {0};
@@ -664,7 +664,7 @@ cleanup:
bool tool_term_has_bold;
-#ifndef CURL_WINDOWS_UWP
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
/* The terminal settings to restore on exit */
static struct TerminalSettings {
HANDLE hStdOut;
@@ -747,7 +747,7 @@ CURLcode win32_init(void)
QueryPerformanceFrequency(&tool_freq);
-#ifndef CURL_WINDOWS_UWP
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
init_terminal();
#endif
src/tool_doswin.h+1 -1
@@ -47,7 +47,7 @@ char **__crt0_glob_function(char *arg);
#ifdef _WIN32
-#if !defined(CURL_WINDOWS_UWP) && \
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
!defined(CURL_DISABLE_CA_SEARCH) && !defined(CURL_CA_SEARCH_SAFE)
CURLcode FindWin32CACert(struct OperationConfig *config,
const TCHAR *bundle_file);
src/tool_formparse.c+4 -0
@@ -125,7 +125,11 @@ static struct tool_mime *tool_mime_new_filedata(struct tool_mime *parent,
}
}
else { /* Standard input. */
+#ifdef UNDER_CE
+ int fd = STDIN_FILENO;
+#else
int fd = fileno(stdin);
+#endif
char *data = NULL;
curl_off_t size;
curl_off_t origin;
src/tool_getparam.c+9 -1
@@ -2714,7 +2714,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
case C_BUFFER: /* --buffer */
/* disable the output I/O buffering. note that the option is called
--buffer but is mostly used in the negative form: --no-buffer */
- config->nobuffer = longopt ? !toggle : TRUE;
+ config->nobuffer = (bool)(longopt ? !toggle : TRUE);
break;
case C_REMOTE_NAME_ALL: /* --remote-name-all */
config->default_node_flags = toggle ? GETOUT_USEREMOTE : 0;
@@ -2873,7 +2873,11 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
struct OperationConfig *config = global->first;
for(i = 1, stillflags = TRUE; i < argc && !result; i++) {
+#ifdef UNDER_CE
+ orig_opt = strdup(argv[i]);
+#else
orig_opt = curlx_convert_tchar_to_UTF8(argv[i]);
+#endif
if(!orig_opt)
return PARAM_NO_MEM;
@@ -2887,7 +2891,11 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
else {
char *nextarg = NULL;
if(i < (argc - 1)) {
+#ifdef UNDER_CE
+ nextarg = strdup(argv[i + 1]);
+#else
nextarg = curlx_convert_tchar_to_UTF8(argv[i + 1]);
+#endif
if(!nextarg) {
curlx_unicodefree(orig_opt);
return PARAM_NO_MEM;
src/tool_getpass.c+3 -3
@@ -46,7 +46,7 @@
# include iodef
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
# include <conio.h>
#endif
@@ -94,7 +94,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
#define DONE
#endif /* __VMS */
-#if defined(_WIN32)
+#ifdef _WIN32
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
@@ -122,7 +122,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
return buffer; /* we always return success */
}
#define DONE
-#endif /* _WIN32 */
+#endif /* _WIN32 && !UNDER_CE */
#ifndef DONE /* not previously provided */
src/tool_main.c+7 -3
@@ -29,7 +29,9 @@
#include <tchar.h>
#endif
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@@ -224,7 +226,7 @@ static void main_free(struct GlobalConfig *config)
/*
** curl tool main function.
*/
-#ifdef _UNICODE
+#if defined(_UNICODE) && !defined(UNDER_CE)
#if defined(__GNUC__) || defined(__clang__)
/* GCC does not know about wmain() */
#pragma GCC diagnostic push
@@ -242,7 +244,7 @@ int main(int argc, char *argv[])
tool_init_stderr();
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
/* Undocumented diagnostic option to list the full paths of all loaded
modules. This is purposely pre-init. */
if(argc == 2 && !_tcscmp(argv[1], _T("--dump-module-paths"))) {
@@ -252,6 +254,8 @@ int main(int argc, char *argv[])
curl_slist_free_all(head);
return head ? 0 : 1;
}
+#endif
+#ifdef _WIN32
/* win32_init must be called before other init routines. */
result = win32_init();
if(result) {
@@ -295,7 +299,7 @@ int main(int argc, char *argv[])
#endif
}
-#ifdef _UNICODE
+#if defined(_UNICODE) && !defined(UNDER_CE)
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif
src/tool_operate.c+10 -3
@@ -664,7 +664,8 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
outs->bytes);
fflush(outs->stream);
/* truncate file at the position where we started appending */
-#if defined(HAVE_FTRUNCATE) && !defined(__DJGPP__) && !defined(__AMIGA__)
+#if defined(HAVE_FTRUNCATE) && !defined(__DJGPP__) && !defined(__AMIGA__) && \
+ !defined(__MINGW32CE__)
if(ftruncate(fileno(outs->stream), outs->init)) {
/* when truncate fails, we cannot just append as then we will
create something strange, bail out */
@@ -3003,7 +3004,8 @@ static CURLcode cacertpaths(struct OperationConfig *config)
fclose(cafile);
config->cacert = strdup(cacert);
}
-#elif !defined(CURL_WINDOWS_UWP) && !defined(CURL_DISABLE_CA_SEARCH)
+#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
+ !defined(CURL_DISABLE_CA_SEARCH)
result = FindWin32CACert(config, TEXT("curl-ca-bundle.crt"));
if(result)
goto fail;
@@ -3130,7 +3132,12 @@ static CURLcode run_all_transfers(struct GlobalConfig *global,
CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
{
CURLcode result = CURLE_OK;
- char *first_arg = argc > 1 ? curlx_convert_tchar_to_UTF8(argv[1]) : NULL;
+ char *first_arg;
+#ifdef UNDER_CE
+ first_arg = argc > 1 ? strdup(argv[1]) : NULL;
+#else
+ first_arg = argc > 1 ? curlx_convert_tchar_to_UTF8(argv[1]) : NULL;
+#endif
#ifdef HAVE_SETLOCALE
/* Override locale for number parsing (only) */
src/tool_paramhlp.c+3 -3
@@ -230,7 +230,7 @@ static ParameterError getnum(long *val, const char *str, int base)
long num;
if(!str[0])
return PARAM_BLANK_STRING;
- errno = 0;
+ CURL_SETERRNO(0);
num = strtol(str, &endptr, base);
if(errno == ERANGE)
return PARAM_NUMBER_TOO_LARGE;
@@ -319,7 +319,7 @@ static ParameterError str2double(double *val, const char *str, double max)
if(str) {
char *endptr;
double num;
- errno = 0;
+ CURL_SETERRNO(0);
num = strtod(str, &endptr);
if(errno == ERANGE)
return PARAM_NUMBER_TOO_LARGE;
@@ -577,7 +577,7 @@ ParameterError str2offset(curl_off_t *val, const char *str)
return PARAM_BAD_NUMERIC;
}
#else
- errno = 0;
+ CURL_SETERRNO(0);
*val = strtol(str, &endptr, 0);
if((*val == LONG_MIN || *val == LONG_MAX) && errno == ERANGE)
return PARAM_NUMBER_TOO_LARGE;
src/tool_parsecfg.c+1 -1
@@ -64,7 +64,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
}
filename = pathalloc = curlrc;
}
-#ifdef _WIN32 /* Windows */
+#if defined(_WIN32) && !defined(UNDER_CE)
else {
char *fullp;
/* check for .curlrc then _curlrc in the dir of the executable */
src/tool_setup.h+14 -3
@@ -81,15 +81,25 @@ extern FILE *tool_stderr;
# define CURL_STRICMP(p1, p2) strcmp(p1, p2)
#endif
-#if defined(_WIN32)
+#ifdef _WIN32
/* set in win32_init() */
extern LARGE_INTEGER tool_freq;
extern bool tool_isVistaOrGreater;
/* set in init_terminal() */
extern bool tool_term_has_bold;
+
+#ifdef UNDER_CE
+# undef isatty
+# define isatty(fd) 0 /* fd is void*, expects int */
+# undef _get_osfhandle
+# define _get_osfhandle(fd) (fd)
+# undef _getch
+# define _getch() 0
+# undef STDIN_FILENO
+# define STDIN_FILENO 0
#endif
-#if defined(_WIN32) && !defined(HAVE_FTRUNCATE)
+#ifndef HAVE_FTRUNCATE
int tool_ftruncate64(int fd, curl_off_t where);
@@ -99,7 +109,8 @@ int tool_ftruncate64(int fd, curl_off_t where);
#define HAVE_FTRUNCATE 1
#define USE_TOOL_FTRUNCATE 1
-#endif /* _WIN32 && ! HAVE_FTRUNCATE */
+#endif /* ! HAVE_FTRUNCATE */
+#endif /* _WIN32 */
#endif /* HEADER_CURL_TOOL_SETUP_H */
src/tool_urlglob.c+4 -4
@@ -215,7 +215,7 @@ static CURLcode glob_range(struct URLGlob *glob, char **patternp,
if(end_c == ':') {
char *endp;
- errno = 0;
+ CURL_SETERRNO(0);
step = strtoul(&pattern[4], &endp, 10);
if(errno || &pattern[4] == endp || *endp != ']')
step = 0;
@@ -269,7 +269,7 @@ static CURLcode glob_range(struct URLGlob *glob, char **patternp,
}
}
- errno = 0;
+ CURL_SETERRNO(0);
min_n = strtoul(pattern, &endp, 10);
if(errno || (endp == pattern))
endp = NULL;
@@ -284,14 +284,14 @@ static CURLcode glob_range(struct URLGlob *glob, char **patternp,
endp = NULL;
goto fail;
}
- errno = 0;
+ CURL_SETERRNO(0);
max_n = strtoul(pattern, &endp, 10);
if(errno)
/* overflow */
endp = NULL;
else if(*endp == ':') {
pattern = endp + 1;
- errno = 0;
+ CURL_SETERRNO(0);
step_n = strtoul(pattern, &endp, 10);
if(errno)
/* over/underflow situation */
src/tool_util.c+2 -4
@@ -188,12 +188,10 @@ int struplocompare4sort(const void *p1, const void *p2)
#ifdef USE_TOOL_FTRUNCATE
-#ifdef _WIN32_WCE
+#ifdef UNDER_CE
/* 64-bit lseek-like function unavailable */
# undef _lseeki64
# define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
-# undef _get_osfhandle
-# define _get_osfhandle(fd) (fd)
#endif
/*
@@ -215,7 +213,7 @@ int tool_ftruncate64(int fd, curl_off_t where)
#endif /* USE_TOOL_FTRUNCATE */
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
FILE *Curl_execpath(const char *filename, char **pathp)
{
static char filebuffer[512];
src/tool_util.h+1 -1
@@ -48,7 +48,7 @@ long tvdiff(struct timeval t1, struct timeval t2);
int struplocompare(const char *p1, const char *p2);
int struplocompare4sort(const void *p1, const void *p2);
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
FILE *Curl_execpath(const char *filename, char **pathp);
#endif
tests/http/clients/h2-upgrade-extreme.c+0 -2
@@ -29,8 +29,6 @@
#include <stdio.h>
#include <stdlib.h>
-/* #include <error.h> */
-#include <errno.h>
static void log_line_start(FILE *log, const char *idsbuf, curl_infotype type)
{
tests/http/clients/tls-session-reuse.c+0 -2
@@ -30,8 +30,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/* #include <error.h> */
-#include <errno.h>
static void log_line_start(FILE *log, const char *idsbuf, curl_infotype type)
{
tests/libtest/lib3026.c+3 -3
@@ -29,7 +29,7 @@
#define NUM_THREADS 100
#ifdef _WIN32
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
static DWORD WINAPI run_thread(LPVOID ptr)
#else
#include <process.h>
@@ -47,7 +47,7 @@ static unsigned int WINAPI run_thread(void *ptr)
CURLcode test(char *URL)
{
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
typedef HANDLE curl_win_thread_handle_t;
#else
typedef uintptr_t curl_win_thread_handle_t;
@@ -78,7 +78,7 @@ CURLcode test(char *URL)
for(i = 0; i < tid_count; i++) {
curl_win_thread_handle_t th;
results[i] = CURL_LAST; /* initialize with invalid value */
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
th = CreateThread(NULL, 0, run_thread, &results[i], 0, NULL);
#else
th = _beginthreadex(NULL, 0, run_thread, &results[i], 0, NULL);
tests/libtest/lib3207.c+1 -1
@@ -74,7 +74,7 @@ static size_t write_memory_callback(char *contents, size_t size,
static
#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP)
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
DWORD
#else
unsigned int
tests/libtest/lib505.c+4 -0
@@ -63,7 +63,11 @@ CURLcode test(char *URL)
}
/* get the file size of the local file */
+#ifdef UNDER_CE
+ hd = stat(libtest_arg2, &file_info);
+#else
hd = fstat(fileno(hd_src), &file_info);
+#endif
if(hd == -1) {
/* can't open file, bail out */
fprintf(stderr, "fstat() failed with error: %d %s\n",
tests/libtest/lib525.c+4 -0
@@ -63,7 +63,11 @@ CURLcode test(char *URL)
}
/* get the file size of the local file */
+#ifdef UNDER_CE
+ hd = stat(libtest_arg2, &file_info);
+#else
hd = fstat(fileno(hd_src), &file_info);
+#endif
if(hd == -1) {
/* can't open file, bail out */
fprintf(stderr, "fstat() failed with error: %d (%s)\n",
tests/libtest/lib541.c+4 -0
@@ -55,7 +55,11 @@ CURLcode test(char *URL)
}
/* get the file size of the local file */
+#ifdef UNDER_CE
+ hd = stat(libtest_arg2, &file_info);
+#else
hd = fstat(fileno(hd_src), &file_info);
+#endif
if(hd == -1) {
/* can't open file, bail out */
fprintf(stderr, "fstat() failed with error: %d %s\n",
tests/libtest/lib556.c+4 -0
@@ -94,7 +94,11 @@ again:
if(nread) {
/* send received stuff to stdout */
+#ifdef UNDER_CE
+ if((size_t)fwrite(buf, sizeof(buf[0]), nread, stdout) != nread) {
+#else
if((size_t)write(STDOUT_FILENO, buf, nread) != nread) {
+#endif
fprintf(stderr, "write() failed: errno %d (%s)\n",
errno, strerror(errno));
res = TEST_ERR_FAILURE;
tests/libtest/lib582.c+4 -0
@@ -256,7 +256,11 @@ CURLcode test(char *URL)
}
/* get the file size of the local file */
+#ifdef UNDER_CE
+ hd = stat(libtest_arg2, &file_info);
+#else
hd = fstat(fileno(hd_src), &file_info);
+#endif
if(hd == -1) {
/* can't open file, bail out */
fprintf(stderr, "fstat() failed with error: %d (%s)\n",
tests/libtest/testutil.c+1 -1
@@ -133,7 +133,7 @@ double tutil_tvdiff_secs(struct timeval newer, struct timeval older)
#ifdef _WIN32
HMODULE win32_load_system_library(const TCHAR *filename)
{
-#ifdef CURL_WINDOWS_UWP
+#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE)
(void)filename;
return NULL;
#else
tests/server/Makefile.inc+3 -1
@@ -64,7 +64,9 @@ USEFUL = \
UTIL = \
util.c \
- util.h
+ util.h \
+ ../../lib/strerror.c \
+ ../../lib/strerror.h
getpart_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) \
testpart.c
tests/server/mqttd.c+2 -0
@@ -37,7 +37,9 @@
/* based on sockfilt.c */
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
tests/server/resolve.c+0 -1
@@ -33,7 +33,6 @@
*
*/
-#include <signal.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
tests/server/rtspd.c+3 -1
@@ -29,7 +29,9 @@
* This source file was started based on curl's HTTP test suite server.
*/
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -474,7 +476,7 @@ static int ProcessRequest(struct httprequest *req)
while(*ptr && ISSPACE(*ptr))
ptr++;
endptr = ptr;
- errno = 0;
+ CURL_SETERRNO(0);
clen = strtoul(ptr, &endptr, 10);
if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
/* this assumes that a zero Content-Length is valid */
tests/server/sockfilt.c+31 -21
@@ -85,7 +85,9 @@
* it!
*/
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -151,7 +153,7 @@ enum sockmode {
ACTIVE_DISCONNECT /* as a client, disconnected from server */
};
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
/*
* read-wrapper to support reading from stdin on Windows.
*/
@@ -178,7 +180,7 @@ static ssize_t read_wincon(int fd, void *buf, size_t count)
return rcount;
}
- errno = (int)GetLastError();
+ CURL_SETERRNO((int)GetLastError());
return -1;
}
#undef read
@@ -213,13 +215,15 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count)
return wcount;
}
- errno = (int)GetLastError();
+ CURL_SETERRNO((int)GetLastError());
return -1;
}
#undef write
#define write(a,b,c) write_wincon(a,b,c)
#endif
+#ifndef UNDER_CE
+
/* On Windows, we sometimes get this for a broken pipe, seemingly
* when the client just closed stdin? */
#define CURL_WIN32_EPIPE 109
@@ -337,6 +341,7 @@ static bool read_stdin(void *buffer, size_t nbytes)
}
return TRUE;
}
+#endif
/*
* write_stdout tries to write to stdio nbytes from the given buffer. This is a
@@ -347,7 +352,13 @@ static bool read_stdin(void *buffer, size_t nbytes)
static bool write_stdout(const void *buffer, size_t nbytes)
{
- ssize_t nwrite = fullwrite(fileno(stdout), buffer, nbytes);
+ ssize_t nwrite;
+#ifdef UNDER_CE
+ puts(buffer);
+ nwrite = nbytes;
+#else
+ nwrite = fullwrite(fileno(stdout), buffer, nbytes);
+#endif
if(nwrite != (ssize_t)nbytes) {
logmsg("exiting...");
return FALSE;
@@ -355,6 +366,7 @@ static bool write_stdout(const void *buffer, size_t nbytes)
return TRUE;
}
+#ifndef UNDER_CE
static void lograw(unsigned char *buffer, ssize_t len)
{
char data[120];
@@ -426,9 +438,10 @@ static bool read_data_block(unsigned char *buffer, ssize_t maxlen,
return TRUE;
}
+#endif
-#if defined(USE_WINSOCK) && !defined(CURL_WINDOWS_UWP)
+#if defined(USE_WINSOCK) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
/*
* Winsock select() does not support standard file descriptors,
* it can only check SOCKETs. The following function is an attempt
@@ -446,12 +459,8 @@ struct select_ws_wait_data {
HANDLE signal; /* internal event to signal handle trigger */
HANDLE abort; /* internal event to abort waiting threads */
};
-#ifdef _WIN32_WCE
-static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
-#else
#include <process.h>
static unsigned int WINAPI select_ws_wait_thread(void *lpParameter)
-#endif
{
struct select_ws_wait_data *data;
HANDLE signal, handle, handles[2];
@@ -594,11 +603,7 @@ static unsigned int WINAPI select_ws_wait_thread(void *lpParameter)
}
static HANDLE select_ws_wait(HANDLE handle, HANDLE signal, HANDLE abort)
{
-#ifdef _WIN32_WCE
- typedef HANDLE curl_win_thread_handle_t;
-#else
typedef uintptr_t curl_win_thread_handle_t;
-#endif
struct select_ws_wait_data *data;
curl_win_thread_handle_t thread;
@@ -610,11 +615,7 @@ static HANDLE select_ws_wait(HANDLE handle, HANDLE signal, HANDLE abort)
data->abort = abort;
/* launch waiting thread */
-#ifdef _WIN32_WCE
- thread = CreateThread(NULL, 0, &select_ws_wait_thread, data, 0, NULL);
-#else
thread = _beginthreadex(NULL, 0, &select_ws_wait_thread, data, 0, NULL);
-#endif
/* free data if thread failed to launch */
if(!thread) {
@@ -646,7 +647,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
/* check if the input value is valid */
if(nfds < 0) {
- errno = EINVAL;
+ CURL_SETERRNO(EINVAL);
return -1;
}
@@ -667,7 +668,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
/* create internal event to abort waiting threads */
abort = CreateEvent(NULL, TRUE, FALSE, NULL);
if(!abort) {
- errno = ENOMEM;
+ CURL_SETERRNO(ENOMEM);
return -1;
}
@@ -675,7 +676,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
data = calloc(nfds, sizeof(struct select_ws_data));
if(!data) {
CloseHandle(abort);
- errno = ENOMEM;
+ CURL_SETERRNO(ENOMEM);
return -1;
}
@@ -684,7 +685,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
if(!handles) {
CloseHandle(abort);
free(data);
- errno = ENOMEM;
+ CURL_SETERRNO(ENOMEM);
return -1;
}
@@ -900,6 +901,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
#endif /* USE_WINSOCK */
+#ifndef UNDER_CE
/* Perform the disconnect handshake with sockfilt
* This involves waiting for the disconnect acknowledgment after the DISC
* command, while throwing away anything else that might come in before
@@ -954,6 +956,7 @@ static bool disc_handshake(void)
} while(TRUE);
return TRUE;
}
+#endif
/*
sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
@@ -965,6 +968,12 @@ static bool juggle(curl_socket_t *sockfdp,
curl_socket_t listenfd,
enum sockmode *mode)
{
+#ifdef UNDER_CE
+ (void)sockfdp;
+ (void)listenfd;
+ (void)mode;
+ return FALSE;
+#else
struct timeval timeout;
fd_set fds_read;
fd_set fds_write;
@@ -1236,6 +1245,7 @@ static bool juggle(curl_socket_t *sockfdp,
}
return TRUE;
+#endif
}
static curl_socket_t sockdaemon(curl_socket_t sock,
tests/server/socksd.c+2 -0
@@ -57,7 +57,9 @@
/* based on sockfilt.c */
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
tests/server/sws.c+3 -1
@@ -30,7 +30,9 @@
*/
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -622,7 +624,7 @@ static int ProcessRequest(struct httprequest *req)
while(*ptr && ISSPACE(*ptr))
ptr++;
endptr = ptr;
- errno = 0;
+ CURL_SETERRNO(0);
clen = strtoul(ptr, &endptr, 10);
if((ptr == endptr) || !ISSPACE(*endptr) || (ERANGE == errno)) {
/* this assumes that a zero Content-Length is valid */
tests/server/tftpd.c+2 -0
@@ -55,7 +55,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
tests/server/util.c+24 -37
@@ -23,7 +23,9 @@
***************************************************************************/
#include "server_setup.h"
+#ifndef UNDER_CE
#include <signal.h>
+#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -44,6 +46,10 @@
#include <dos.h> /* delay() */
#endif
+#ifdef _WIN32
+#include "strerror.h"
+#endif
+
#include "curlx.h" /* from the private lib dir */
#include "getpart.h"
#include "util.h"
@@ -136,22 +142,12 @@ void logmsg(const char *msg, ...)
}
#ifdef _WIN32
-/* use instead of strerror() on generic Windows */
-static const char *win32_strerror(int err, char *buf, size_t buflen)
-{
- if(!FormatMessageA((FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS), NULL, (DWORD)err,
- LANG_NEUTRAL, buf, (DWORD)buflen, NULL))
- msnprintf(buf, buflen, "Unknown error %d (%#x)", err, err);
- return buf;
-}
-
/* use instead of perror() on generic Windows */
void win32_perror(const char *msg)
{
char buf[512];
int err = SOCKERRNO;
- win32_strerror(err, buf, sizeof(buf));
+ Curl_winapi_strerror(err, buf, sizeof(buf));
if(msg)
fprintf(stderr, "%s: ", msg);
fprintf(stderr, "%s\n", buf);
@@ -193,11 +189,11 @@ void win32_cleanup(void)
_flushall();
}
-/* socket-safe strerror (works on Winsock errors, too */
+/* socket-safe strerror (works on Winsock errors, too) */
const char *sstrerror(int err)
{
static char buf[512];
- return win32_strerror(err, buf, sizeof(buf));
+ return Curl_winapi_strerror(err, buf, sizeof(buf));
}
#endif /* _WIN32 */
@@ -244,7 +240,7 @@ int wait_ms(int timeout_ms)
if(!timeout_ms)
return 0;
if(timeout_ms < 0) {
- errno = EINVAL;
+ CURL_SETERRNO(EINVAL);
return -1;
}
#if defined(MSDOS)
@@ -503,12 +499,8 @@ static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
#endif
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
-#ifdef _WIN32_WCE
-static DWORD thread_main_id = 0;
-#else
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
static unsigned int thread_main_id = 0;
-#endif
static HANDLE thread_main_window = NULL;
static HWND hidden_main_window = NULL;
#endif
@@ -529,6 +521,7 @@ HANDLE exit_event = NULL;
* The first time this is called it will set got_exit_signal to one and
* store in exit_signal the signal that triggered its execution.
*/
+#ifndef UNDER_CE
static void exit_signal_handler(int signum)
{
int old_errno = errno;
@@ -542,10 +535,11 @@ static void exit_signal_handler(int signum)
#endif
}
(void)signal(signum, exit_signal_handler);
- errno = old_errno;
+ CURL_SETERRNO(old_errno);
}
+#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(UNDER_CE)
/* CTRL event handler for Windows Console applications to simulate
* SIGINT, SIGTERM and SIGBREAK on CTRL events and trigger signal handler.
*
@@ -593,7 +587,7 @@ static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType)
}
#endif
-#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP)
+#if defined(_WIN32) && !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
/* Window message handler for Windows applications to add support
* for graceful process termination via taskkill (without /f) which
* sends WM_CLOSE to all Windows of a process (even hidden ones).
@@ -625,12 +619,8 @@ static LRESULT CALLBACK main_window_proc(HWND hwnd, UINT uMsg,
}
/* Window message queue loop for hidden main window, details see above.
*/
-#ifdef _WIN32_WCE
-static DWORD WINAPI main_window_loop(LPVOID lpParameter)
-#else
#include <process.h>
static unsigned int WINAPI main_window_loop(void *lpParameter)
-#endif
{
WNDCLASS wc;
BOOL ret;
@@ -678,6 +668,7 @@ static unsigned int WINAPI main_window_loop(void *lpParameter)
}
#endif
+#ifndef UNDER_CE
static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler,
bool restartable)
{
@@ -707,6 +698,7 @@ static SIGHANDLER_T set_signal(int signum, SIGHANDLER_T handler,
return oldhdlr;
#endif
}
+#endif
void install_signal_handlers(bool keep_sigalrm)
{
@@ -757,24 +749,17 @@ void install_signal_handlers(bool keep_sigalrm)
logmsg("cannot install SIGBREAK handler: %s", strerror(errno));
#endif
#ifdef _WIN32
+#ifndef UNDER_CE
if(!SetConsoleCtrlHandler(ctrl_event_handler, TRUE))
logmsg("cannot install CTRL event handler");
+#endif
-#ifndef CURL_WINDOWS_UWP
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
{
-#ifdef _WIN32_WCE
- typedef HANDLE curl_win_thread_handle_t;
-#else
typedef uintptr_t curl_win_thread_handle_t;
-#endif
curl_win_thread_handle_t thread;
-#ifdef _WIN32_WCE
- thread = CreateThread(NULL, 0, &main_window_loop,
- (LPVOID)GetModuleHandle(NULL), 0, &thread_main_id);
-#else
thread = _beginthreadex(NULL, 0, &main_window_loop,
(void *)GetModuleHandle(NULL), 0, &thread_main_id);
-#endif
thread_main_window = (HANDLE)thread;
if(!thread_main_window || !thread_main_id)
logmsg("cannot start main window loop");
@@ -814,8 +799,10 @@ void restore_signal_handlers(bool keep_sigalrm)
(void) set_signal(SIGBREAK, old_sigbreak_handler, FALSE);
#endif
#ifdef _WIN32
+#ifndef UNDER_CE
(void)SetConsoleCtrlHandler(ctrl_event_handler, FALSE);
-#ifndef CURL_WINDOWS_UWP
+#endif
+#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
if(thread_main_window && thread_main_id) {
if(PostThreadMessage(thread_main_id, WM_APP, 0, 0)) {
if(WaitForSingleObjectEx(thread_main_window, INFINITE, TRUE)) {
tests/unit/unit2600.c+0 -3
@@ -40,9 +40,6 @@
#include <inet.h>
#endif
-#include <setjmp.h>
-#include <signal.h>
-
#include "urldata.h"
#include "connect.h"
#include "cfilters.h"