From c73238ec01d8f4bf9eaf2196e3e2338d0302da5a Mon Sep 17 00:00:00 2001 From: Bryan Moffatt Date: Fri, 18 Sep 2020 12:45:20 -0700 Subject: [PATCH] Initial Java RIC Implementation --- .github/workflows/maven-build-all.yml | 4 + .gitignore | 5 + README.md | 35 +- .../.gitignore | 1 + .../Makefile | 44 + .../README.md | 131 + .../RELEASE.CHANGELOG.md | 3 + .../pom.xml | 254 + .../src/.gitkeep | 1 + .../lambda/runtime/api/client/AWSLambda.java | 309 + .../runtime/api/client/ClasspathLoader.java | 91 + .../api/client/CustomerClassLoader.java | 54 + .../api/client/EventHandlerLoader.java | 904 + .../lambda/runtime/api/client/Failure.java | 84 + .../runtime/api/client/HandlerInfo.java | 40 + .../runtime/api/client/LambdaEnvironment.java | 16 + .../api/client/LambdaRequestHandler.java | 31 + .../lambda/runtime/api/client/UserFault.java | 113 + .../runtime/api/client/UserMethods.java | 13 + .../runtime/api/client/XRayErrorCause.java | 114 + .../api/client/api/LambdaClientContext.java | 27 + .../client/api/LambdaClientContextClient.java | 38 + .../api/client/api/LambdaCognitoIdentity.java | 24 + .../runtime/api/client/api/LambdaContext.java | 94 + .../runtime/api/client/logging/FrameType.java | 18 + .../logging/FramedTelemetryLogSink.java | 69 + .../client/logging/LambdaContextLogger.java | 34 + .../runtime/api/client/logging/LogSink.java | 11 + .../api/client/logging/StdOutLogSink.java | 19 + .../client/runtimeapi/InvocationRequest.java | 79 + .../runtimeapi/LambdaRuntimeClient.java | 116 + .../LambdaRuntimeClientException.java | 11 + .../api/client/runtimeapi/NativeClient.java | 53 + .../runtime/api/client/util/EnvReader.java | 22 + .../runtime/api/client/util/EnvWriter.java | 76 + .../api/client/util/LambdaOutputStream.java | 30 + .../runtime/api/client/util/UnsafeUtil.java | 40 + .../src/main/jni/Dockerfile.glibc | 79 + .../src/main/jni/Dockerfile.musl | 54 + .../src/main/jni/build-jni-lib.sh | 15 + ...ime_api_client_runtimeapi_NativeClient.cpp | 128 + ...ntime_api_client_runtimeapi_NativeClient.h | 21 + .../deps/aws-lambda-cpp-0.2.7/.clang-format | 61 + .../jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy | 41 + .../.github/PULL_REQUEST_TEMPLATE.md | 6 + .../jni/deps/aws-lambda-cpp-0.2.7/.gitignore | 5 + .../deps/aws-lambda-cpp-0.2.7/CMakeLists.txt | 132 + .../aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md | 4 + .../deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md | 61 + .../jni/deps/aws-lambda-cpp-0.2.7/LICENSE | 202 + .../main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE | 2 + .../jni/deps/aws-lambda-cpp-0.2.7/README.md | 220 + .../ci/codebuild/amazonlinux-2017.03.yml | 18 + .../ci/codebuild/build-cpp-sdk.sh | 17 + .../ci/codebuild/build.sh | 11 + .../ci/codebuild/format-check.sh | 24 + .../ci/codebuild/run-tests.sh | 11 + .../ci/codebuild/ubuntu-18.04.yml | 17 + .../ci/docker/alpine-linux-3.8 | 5 + .../ci/docker/amazon-linux-2017.03 | 12 + .../ci/docker/ubuntu-linux-18.04 | 15 + .../cmake/aws-lambda-runtime-config.cmake | 20 + .../aws-lambda-cpp-0.2.7/examples/Dockerfile | 3 + .../examples/api-gateway/CMakeLists.txt | 12 + .../examples/api-gateway/README.md | 81 + .../examples/api-gateway/main.cpp | 61 + .../examples/dynamodb/CMakeLists.txt | 24 + .../examples/dynamodb/README.md | 52 + .../examples/dynamodb/main.cpp | 229 + .../examples/s3/CMakeLists.txt | 22 + .../examples/s3/README.md | 51 + .../aws-lambda-cpp-0.2.7/examples/s3/main.cpp | 128 + .../include/aws/http/response.h | 174 + .../include/aws/lambda-runtime/outcome.h | 96 + .../include/aws/lambda-runtime/runtime.h | 183 + .../include/aws/lambda-runtime/version.h | 41 + .../include/aws/logging/logging.h | 67 + .../aws-lambda-cpp-0.2.7/packaging/packager | 180 + .../aws-lambda-cpp-0.2.7/src/backward.cpp | 32 + .../deps/aws-lambda-cpp-0.2.7/src/backward.h | 4291 ++ .../deps/aws-lambda-cpp-0.2.7/src/logging.cpp | 70 + .../deps/aws-lambda-cpp-0.2.7/src/runtime.cpp | 521 + .../aws-lambda-cpp-0.2.7/src/version.cpp.in | 48 + .../aws-lambda-cpp-0.2.7/tests/CMakeLists.txt | 16 + .../tests/gtest/.clang-tidy | 3 + .../tests/gtest/gtest-all.cc | 11763 ++++ .../aws-lambda-cpp-0.2.7/tests/gtest/gtest.h | 14916 +++++ .../deps/aws-lambda-cpp-0.2.7/tests/main.cpp | 38 + .../tests/resources/CMakeLists.txt | 14 + .../tests/resources/lambda_function.cpp | 129 + .../tests/runtime_tests.cpp | 194 + .../tests/version_tests.cpp | 22 + .../src/main/jni/deps/curl-7.73.0/CHANGES | 7452 +++ .../CMake/CMakeConfigurableFile.in | 22 + .../curl-7.73.0/CMake/CurlSymbolHiding.cmake | 76 + .../jni/deps/curl-7.73.0/CMake/CurlTests.c | 617 + .../deps/curl-7.73.0/CMake/FindBearSSL.cmake | 30 + .../deps/curl-7.73.0/CMake/FindBrotli.cmake | 41 + .../deps/curl-7.73.0/CMake/FindCARES.cmake | 45 + .../jni/deps/curl-7.73.0/CMake/FindGSS.cmake | 310 + .../deps/curl-7.73.0/CMake/FindLibSSH2.cmake | 43 + .../deps/curl-7.73.0/CMake/FindMbedTLS.cmake | 34 + .../deps/curl-7.73.0/CMake/FindNGHTTP2.cmake | 39 + .../deps/curl-7.73.0/CMake/FindNGHTTP3.cmake | 76 + .../deps/curl-7.73.0/CMake/FindNGTCP2.cmake | 113 + .../jni/deps/curl-7.73.0/CMake/FindNSS.cmake | 38 + .../deps/curl-7.73.0/CMake/FindQUICHE.cmake | 68 + .../deps/curl-7.73.0/CMake/FindWolfSSL.cmake | 34 + .../jni/deps/curl-7.73.0/CMake/FindZstd.cmake | 69 + .../jni/deps/curl-7.73.0/CMake/Macros.cmake | 109 + .../deps/curl-7.73.0/CMake/OtherTests.cmake | 291 + .../CMake/Platforms/WindowsCache.cmake | 144 + .../deps/curl-7.73.0/CMake/Utilities.cmake | 33 + .../CMake/cmake_uninstall.cmake.in | 47 + .../curl-7.73.0/CMake/curl-config.cmake.in | 33 + .../main/jni/deps/curl-7.73.0/CMakeLists.txt | 1560 + .../src/main/jni/deps/curl-7.73.0/COPYING | 22 + .../jni/deps/curl-7.73.0/MacOSX-Framework | 158 + .../src/main/jni/deps/curl-7.73.0/Makefile | 115 + .../src/main/jni/deps/curl-7.73.0/Makefile.am | 744 + .../src/main/jni/deps/curl-7.73.0/Makefile.in | 1963 + .../src/main/jni/deps/curl-7.73.0/README | 55 + .../main/jni/deps/curl-7.73.0/RELEASE-NOTES | 321 + .../main/jni/deps/curl-7.73.0/acinclude.m4 | 2576 + .../src/main/jni/deps/curl-7.73.0/aclocal.m4 | 1194 + .../src/main/jni/deps/curl-7.73.0/buildconf | 4 + .../main/jni/deps/curl-7.73.0/buildconf.bat | 317 + .../src/main/jni/deps/curl-7.73.0/compile | 348 + .../main/jni/deps/curl-7.73.0/config.guess | 1480 + .../src/main/jni/deps/curl-7.73.0/config.sub | 1801 + .../src/main/jni/deps/curl-7.73.0/configure | 47845 ++++++++++++++++ .../main/jni/deps/curl-7.73.0/configure.ac | 5248 ++ .../main/jni/deps/curl-7.73.0/curl-config.in | 194 + .../src/main/jni/deps/curl-7.73.0/depcomp | 791 + .../main/jni/deps/curl-7.73.0/docs/ALTSVC.md | 39 + .../jni/deps/curl-7.73.0/docs/BINDINGS.md | 127 + .../jni/deps/curl-7.73.0/docs/BUG-BOUNTY.md | 106 + .../main/jni/deps/curl-7.73.0/docs/BUGS.md | 266 + .../jni/deps/curl-7.73.0/docs/CHECKSRC.md | 166 + .../main/jni/deps/curl-7.73.0/docs/CIPHERS.md | 516 + .../jni/deps/curl-7.73.0/docs/CMakeLists.txt | 24 + .../deps/curl-7.73.0/docs/CODE_OF_CONDUCT.md | 32 + .../jni/deps/curl-7.73.0/docs/CODE_REVIEW.md | 168 + .../jni/deps/curl-7.73.0/docs/CODE_STYLE.md | 265 + .../jni/deps/curl-7.73.0/docs/CONTRIBUTE.md | 307 + .../jni/deps/curl-7.73.0/docs/CURL-DISABLE.md | 124 + .../jni/deps/curl-7.73.0/docs/DEPRECATE.md | 12 + .../main/jni/deps/curl-7.73.0/docs/DYNBUF.md | 86 + .../src/main/jni/deps/curl-7.73.0/docs/ECH.md | 135 + .../jni/deps/curl-7.73.0/docs/EXPERIMENTAL.md | 23 + .../src/main/jni/deps/curl-7.73.0/docs/FAQ | 1550 + .../main/jni/deps/curl-7.73.0/docs/FEATURES | 207 + .../jni/deps/curl-7.73.0/docs/GOVERNANCE.md | 167 + .../main/jni/deps/curl-7.73.0/docs/HELP-US.md | 87 + .../main/jni/deps/curl-7.73.0/docs/HISTORY.md | 384 + .../jni/deps/curl-7.73.0/docs/HTTP-COOKIES.md | 134 + .../main/jni/deps/curl-7.73.0/docs/HTTP2.md | 127 + .../main/jni/deps/curl-7.73.0/docs/HTTP3.md | 142 + .../main/jni/deps/curl-7.73.0/docs/INSTALL | 9 + .../jni/deps/curl-7.73.0/docs/INSTALL.cmake | 89 + .../main/jni/deps/curl-7.73.0/docs/INSTALL.md | 509 + .../jni/deps/curl-7.73.0/docs/INTERNALS.md | 1102 + .../main/jni/deps/curl-7.73.0/docs/KNOWN_BUGS | 827 + .../jni/deps/curl-7.73.0/docs/MAIL-ETIQUETTE | 285 + .../main/jni/deps/curl-7.73.0/docs/MQTT.md | 29 + .../jni/deps/curl-7.73.0/docs/Makefile.am | 123 + .../jni/deps/curl-7.73.0/docs/Makefile.in | 921 + .../curl-7.73.0/docs/PARALLEL-TRANSFERS.md | 58 + .../main/jni/deps/curl-7.73.0/docs/README.md | 12 + .../curl-7.73.0/docs/RELEASE-PROCEDURE.md | 110 + .../main/jni/deps/curl-7.73.0/docs/ROADMAP.md | 19 + .../deps/curl-7.73.0/docs/SECURITY-PROCESS.md | 132 + .../jni/deps/curl-7.73.0/docs/SSL-PROBLEMS.md | 87 + .../jni/deps/curl-7.73.0/docs/SSLCERTS.md | 173 + .../src/main/jni/deps/curl-7.73.0/docs/THANKS | 2276 + .../src/main/jni/deps/curl-7.73.0/docs/TODO | 1370 + .../curl-7.73.0/docs/TheArtOfHttpScripting.md | 692 + .../jni/deps/curl-7.73.0/docs/VERSIONS.md | 56 + .../docs/cmdline-opts/CMakeLists.txt | 33 + .../curl-7.73.0/docs/cmdline-opts/MANPAGE.md | 52 + .../curl-7.73.0/docs/cmdline-opts/Makefile.am | 35 + .../curl-7.73.0/docs/cmdline-opts/Makefile.in | 820 + .../docs/cmdline-opts/Makefile.inc | 241 + .../docs/cmdline-opts/abstract-unix-socket.d | 10 + .../curl-7.73.0/docs/cmdline-opts/alt-svc.d | 18 + .../curl-7.73.0/docs/cmdline-opts/anyauth.d | 18 + .../curl-7.73.0/docs/cmdline-opts/append.d | 9 + .../curl-7.73.0/docs/cmdline-opts/basic.d | 12 + .../curl-7.73.0/docs/cmdline-opts/cacert.d | 34 + .../curl-7.73.0/docs/cmdline-opts/capath.d | 16 + .../docs/cmdline-opts/cert-status.d | 14 + .../curl-7.73.0/docs/cmdline-opts/cert-type.d | 11 + .../deps/curl-7.73.0/docs/cmdline-opts/cert.d | 51 + .../curl-7.73.0/docs/cmdline-opts/ciphers.d | 12 + .../docs/cmdline-opts/compressed-ssh.d | 8 + .../docs/cmdline-opts/compressed.d | 10 + .../curl-7.73.0/docs/cmdline-opts/config.d | 68 + .../docs/cmdline-opts/connect-timeout.d | 12 + .../docs/cmdline-opts/connect-to.d | 22 + .../docs/cmdline-opts/continue-at.d | 16 + .../docs/cmdline-opts/cookie-jar.d | 25 + .../curl-7.73.0/docs/cmdline-opts/cookie.d | 38 + .../docs/cmdline-opts/create-dirs.d | 12 + .../deps/curl-7.73.0/docs/cmdline-opts/crlf.d | 8 + .../curl-7.73.0/docs/cmdline-opts/crlfile.d | 11 + .../curl-7.73.0/docs/cmdline-opts/curves.d | 18 + .../docs/cmdline-opts/data-ascii.d | 7 + .../docs/cmdline-opts/data-binary.d | 19 + .../curl-7.73.0/docs/cmdline-opts/data-raw.d | 10 + .../docs/cmdline-opts/data-urlencode.d | 34 + .../deps/curl-7.73.0/docs/cmdline-opts/data.d | 30 + .../docs/cmdline-opts/delegation.d | 17 + .../curl-7.73.0/docs/cmdline-opts/digest.d | 12 + .../docs/cmdline-opts/disable-eprt.d | 20 + .../docs/cmdline-opts/disable-epsv.d | 17 + .../curl-7.73.0/docs/cmdline-opts/disable.d | 8 + .../cmdline-opts/disallow-username-in-url.d | 8 + .../docs/cmdline-opts/dns-interface.d | 12 + .../docs/cmdline-opts/dns-ipv4-addr.d | 12 + .../docs/cmdline-opts/dns-ipv6-addr.d | 12 + .../docs/cmdline-opts/dns-servers.d | 11 + .../curl-7.73.0/docs/cmdline-opts/doh-url.d | 11 + .../docs/cmdline-opts/dump-header.d | 21 + .../curl-7.73.0/docs/cmdline-opts/egd-file.d | 9 + .../curl-7.73.0/docs/cmdline-opts/engine.d | 9 + .../docs/cmdline-opts/etag-compare.d | 19 + .../curl-7.73.0/docs/cmdline-opts/etag-save.d | 17 + .../docs/cmdline-opts/expect100-timeout.d | 12 + .../docs/cmdline-opts/fail-early.d | 22 + .../deps/curl-7.73.0/docs/cmdline-opts/fail.d | 15 + .../docs/cmdline-opts/false-start.d | 13 + .../docs/cmdline-opts/form-string.d | 12 + .../deps/curl-7.73.0/docs/cmdline-opts/form.d | 139 + .../docs/cmdline-opts/ftp-account.d | 11 + .../cmdline-opts/ftp-alternative-to-user.d | 11 + .../docs/cmdline-opts/ftp-create-dirs.d | 9 + .../docs/cmdline-opts/ftp-method.d | 22 + .../curl-7.73.0/docs/cmdline-opts/ftp-pasv.d | 17 + .../curl-7.73.0/docs/cmdline-opts/ftp-port.d | 33 + .../curl-7.73.0/docs/cmdline-opts/ftp-pret.d | 9 + .../docs/cmdline-opts/ftp-skip-pasv-ip.d | 13 + .../docs/cmdline-opts/ftp-ssl-ccc-mode.d | 12 + .../docs/cmdline-opts/ftp-ssl-ccc.d | 11 + .../docs/cmdline-opts/ftp-ssl-control.d | 9 + .../deps/curl-7.73.0/docs/cmdline-opts/gen.pl | 465 + .../deps/curl-7.73.0/docs/cmdline-opts/get.d | 16 + .../curl-7.73.0/docs/cmdline-opts/globoff.d | 9 + .../cmdline-opts/happy-eyeballs-timeout-ms.d | 18 + .../docs/cmdline-opts/haproxy-protocol.d | 12 + .../deps/curl-7.73.0/docs/cmdline-opts/head.d | 9 + .../curl-7.73.0/docs/cmdline-opts/header.d | 42 + .../deps/curl-7.73.0/docs/cmdline-opts/help.d | 12 + .../docs/cmdline-opts/hostpubmd5.d | 10 + .../curl-7.73.0/docs/cmdline-opts/http0.9.d | 14 + .../curl-7.73.0/docs/cmdline-opts/http1.0.d | 11 + .../curl-7.73.0/docs/cmdline-opts/http1.1.d | 9 + .../docs/cmdline-opts/http2-prior-knowledge.d | 13 + .../curl-7.73.0/docs/cmdline-opts/http2.d | 12 + .../curl-7.73.0/docs/cmdline-opts/http3.d | 20 + .../docs/cmdline-opts/ignore-content-length.d | 11 + .../curl-7.73.0/docs/cmdline-opts/include.d | 11 + .../curl-7.73.0/docs/cmdline-opts/insecure.d | 17 + .../curl-7.73.0/docs/cmdline-opts/interface.d | 17 + .../deps/curl-7.73.0/docs/cmdline-opts/ipv4.d | 13 + .../deps/curl-7.73.0/docs/cmdline-opts/ipv6.d | 13 + .../docs/cmdline-opts/junk-session-cookies.d | 11 + .../docs/cmdline-opts/keepalive-time.d | 14 + .../curl-7.73.0/docs/cmdline-opts/key-type.d | 10 + .../deps/curl-7.73.0/docs/cmdline-opts/key.d | 18 + .../deps/curl-7.73.0/docs/cmdline-opts/krb.d | 12 + .../curl-7.73.0/docs/cmdline-opts/libcurl.d | 12 + .../docs/cmdline-opts/limit-rate.d | 19 + .../curl-7.73.0/docs/cmdline-opts/list-only.d | 25 + .../docs/cmdline-opts/local-port.d | 10 + .../docs/cmdline-opts/location-trusted.d | 10 + .../curl-7.73.0/docs/cmdline-opts/location.d | 26 + .../docs/cmdline-opts/login-options.d | 15 + .../curl-7.73.0/docs/cmdline-opts/mail-auth.d | 11 + .../curl-7.73.0/docs/cmdline-opts/mail-from.d | 9 + .../docs/cmdline-opts/mail-rcpt-allowfails.d | 16 + .../curl-7.73.0/docs/cmdline-opts/mail-rcpt.d | 20 + .../curl-7.73.0/docs/cmdline-opts/manual.d | 6 + .../docs/cmdline-opts/max-filesize.d | 17 + .../docs/cmdline-opts/max-redirs.d | 11 + .../curl-7.73.0/docs/cmdline-opts/max-time.d | 14 + .../curl-7.73.0/docs/cmdline-opts/metalink.d | 27 + .../curl-7.73.0/docs/cmdline-opts/negotiate.d | 16 + .../docs/cmdline-opts/netrc-file.d | 13 + .../docs/cmdline-opts/netrc-optional.d | 8 + .../curl-7.73.0/docs/cmdline-opts/netrc.d | 18 + .../deps/curl-7.73.0/docs/cmdline-opts/next.d | 21 + .../curl-7.73.0/docs/cmdline-opts/no-alpn.d | 12 + .../curl-7.73.0/docs/cmdline-opts/no-buffer.d | 12 + .../docs/cmdline-opts/no-keepalive.d | 9 + .../curl-7.73.0/docs/cmdline-opts/no-npn.d | 13 + .../docs/cmdline-opts/no-progress-meter.d | 11 + .../docs/cmdline-opts/no-sessionid.d | 14 + .../curl-7.73.0/docs/cmdline-opts/noproxy.d | 16 + .../curl-7.73.0/docs/cmdline-opts/ntlm-wb.d | 8 + .../deps/curl-7.73.0/docs/cmdline-opts/ntlm.d | 19 + .../docs/cmdline-opts/oauth2-bearer.d | 13 + .../docs/cmdline-opts/output-dir.d | 19 + .../curl-7.73.0/docs/cmdline-opts/output.d | 33 + .../curl-7.73.0/docs/cmdline-opts/page-footer | 286 + .../curl-7.73.0/docs/cmdline-opts/page-header | 191 + .../docs/cmdline-opts/parallel-immediate.d | 10 + .../docs/cmdline-opts/parallel-max.d | 10 + .../curl-7.73.0/docs/cmdline-opts/parallel.d | 8 + .../deps/curl-7.73.0/docs/cmdline-opts/pass.d | 9 + .../docs/cmdline-opts/path-as-is.d | 8 + .../docs/cmdline-opts/pinnedpubkey.d | 26 + .../curl-7.73.0/docs/cmdline-opts/post301.d | 12 + .../curl-7.73.0/docs/cmdline-opts/post302.d | 12 + .../curl-7.73.0/docs/cmdline-opts/post303.d | 11 + .../curl-7.73.0/docs/cmdline-opts/preproxy.d | 23 + .../docs/cmdline-opts/progress-bar.d | 13 + .../docs/cmdline-opts/proto-default.d | 19 + .../docs/cmdline-opts/proto-redir.d | 19 + .../curl-7.73.0/docs/cmdline-opts/proto.d | 44 + .../docs/cmdline-opts/proxy-anyauth.d | 8 + .../docs/cmdline-opts/proxy-basic.d | 8 + .../docs/cmdline-opts/proxy-cacert.d | 8 + .../docs/cmdline-opts/proxy-capath.d | 8 + .../docs/cmdline-opts/proxy-cert-type.d | 7 + .../docs/cmdline-opts/proxy-cert.d | 7 + .../docs/cmdline-opts/proxy-ciphers.d | 7 + .../docs/cmdline-opts/proxy-crlfile.d | 7 + .../docs/cmdline-opts/proxy-digest.d | 7 + .../docs/cmdline-opts/proxy-header.d | 25 + .../docs/cmdline-opts/proxy-insecure.d | 6 + .../docs/cmdline-opts/proxy-key-type.d | 7 + .../curl-7.73.0/docs/cmdline-opts/proxy-key.d | 6 + .../docs/cmdline-opts/proxy-negotiate.d | 9 + .../docs/cmdline-opts/proxy-ntlm.d | 7 + .../docs/cmdline-opts/proxy-pass.d | 7 + .../docs/cmdline-opts/proxy-pinnedpubkey.d | 17 + .../docs/cmdline-opts/proxy-service-name.d | 7 + .../docs/cmdline-opts/proxy-ssl-allow-beast.d | 6 + .../docs/cmdline-opts/proxy-tls13-ciphers.d | 17 + .../docs/cmdline-opts/proxy-tlsauthtype.d | 7 + .../docs/cmdline-opts/proxy-tlspassword.d | 7 + .../docs/cmdline-opts/proxy-tlsuser.d | 7 + .../docs/cmdline-opts/proxy-tlsv1.d | 6 + .../docs/cmdline-opts/proxy-user.d | 19 + .../curl-7.73.0/docs/cmdline-opts/proxy.d | 40 + .../curl-7.73.0/docs/cmdline-opts/proxy1.0.d | 11 + .../docs/cmdline-opts/proxytunnel.d | 13 + .../curl-7.73.0/docs/cmdline-opts/pubkey.d | 15 + .../curl-7.73.0/docs/cmdline-opts/quote.d | 66 + .../docs/cmdline-opts/random-file.d | 8 + .../curl-7.73.0/docs/cmdline-opts/range.d | 47 + .../deps/curl-7.73.0/docs/cmdline-opts/raw.d | 8 + .../curl-7.73.0/docs/cmdline-opts/referer.d | 15 + .../docs/cmdline-opts/remote-header-name.d | 20 + .../docs/cmdline-opts/remote-name-all.d | 9 + .../docs/cmdline-opts/remote-name.d | 22 + .../docs/cmdline-opts/remote-time.d | 8 + .../docs/cmdline-opts/request-target.d | 10 + .../curl-7.73.0/docs/cmdline-opts/request.d | 40 + .../curl-7.73.0/docs/cmdline-opts/resolve.d | 28 + .../docs/cmdline-opts/retry-all-errors.d | 20 + .../docs/cmdline-opts/retry-connrefused.d | 7 + .../docs/cmdline-opts/retry-delay.d | 12 + .../docs/cmdline-opts/retry-max-time.d | 14 + .../curl-7.73.0/docs/cmdline-opts/retry.d | 21 + .../docs/cmdline-opts/sasl-authzid.d | 13 + .../curl-7.73.0/docs/cmdline-opts/sasl-ir.d | 6 + .../docs/cmdline-opts/service-name.d | 9 + .../docs/cmdline-opts/show-error.d | 7 + .../curl-7.73.0/docs/cmdline-opts/silent.d | 12 + .../curl-7.73.0/docs/cmdline-opts/socks4.d | 20 + .../curl-7.73.0/docs/cmdline-opts/socks4a.d | 20 + .../docs/cmdline-opts/socks5-basic.d | 8 + .../docs/cmdline-opts/socks5-gssapi-nec.d | 9 + .../docs/cmdline-opts/socks5-gssapi-service.d | 13 + .../docs/cmdline-opts/socks5-gssapi.d | 9 + .../docs/cmdline-opts/socks5-hostname.d | 20 + .../curl-7.73.0/docs/cmdline-opts/socks5.d | 22 + .../docs/cmdline-opts/speed-limit.d | 11 + .../docs/cmdline-opts/speed-time.d | 14 + .../docs/cmdline-opts/ssl-allow-beast.d | 10 + .../docs/cmdline-opts/ssl-no-revoke.d | 8 + .../curl-7.73.0/docs/cmdline-opts/ssl-reqd.d | 10 + .../cmdline-opts/ssl-revoke-best-effort.d | 8 + .../deps/curl-7.73.0/docs/cmdline-opts/ssl.d | 13 + .../curl-7.73.0/docs/cmdline-opts/sslv2.d | 14 + .../curl-7.73.0/docs/cmdline-opts/sslv3.d | 14 + .../curl-7.73.0/docs/cmdline-opts/stderr.d | 9 + .../docs/cmdline-opts/styled-output.d | 7 + .../cmdline-opts/suppress-connect-headers.d | 9 + .../docs/cmdline-opts/tcp-fastopen.d | 6 + .../docs/cmdline-opts/tcp-nodelay.d | 10 + .../docs/cmdline-opts/telnet-option.d | 13 + .../docs/cmdline-opts/tftp-blksize.d | 12 + .../docs/cmdline-opts/tftp-no-options.d | 11 + .../curl-7.73.0/docs/cmdline-opts/time-cond.d | 18 + .../curl-7.73.0/docs/cmdline-opts/tls-max.d | 28 + .../docs/cmdline-opts/tls13-ciphers.d | 17 + .../docs/cmdline-opts/tlsauthtype.d | 11 + .../docs/cmdline-opts/tlspassword.d | 9 + .../curl-7.73.0/docs/cmdline-opts/tlsuser.d | 10 + .../curl-7.73.0/docs/cmdline-opts/tlsv1.0.d | 11 + .../curl-7.73.0/docs/cmdline-opts/tlsv1.1.d | 11 + .../curl-7.73.0/docs/cmdline-opts/tlsv1.2.d | 11 + .../curl-7.73.0/docs/cmdline-opts/tlsv1.3.d | 13 + .../curl-7.73.0/docs/cmdline-opts/tlsv1.d | 13 + .../docs/cmdline-opts/tr-encoding.d | 8 + .../docs/cmdline-opts/trace-ascii.d | 15 + .../docs/cmdline-opts/trace-time.d | 6 + .../curl-7.73.0/docs/cmdline-opts/trace.d | 12 + .../docs/cmdline-opts/unix-socket.d | 8 + .../docs/cmdline-opts/upload-file.d | 34 + .../deps/curl-7.73.0/docs/cmdline-opts/url.d | 19 + .../curl-7.73.0/docs/cmdline-opts/use-ascii.d | 9 + .../docs/cmdline-opts/user-agent.d | 17 + .../deps/curl-7.73.0/docs/cmdline-opts/user.d | 40 + .../curl-7.73.0/docs/cmdline-opts/verbose.d | 20 + .../curl-7.73.0/docs/cmdline-opts/version.d | 69 + .../curl-7.73.0/docs/cmdline-opts/write-out.d | 169 + .../curl-7.73.0/docs/cmdline-opts/xattr.d | 9 + .../jni/deps/curl-7.73.0/docs/curl-config.1 | 103 + .../src/main/jni/deps/curl-7.73.0/docs/curl.1 | 3369 ++ .../curl-7.73.0/docs/examples/10-at-a-time.c | 150 + .../curl-7.73.0/docs/examples/Makefile.am | 70 + .../docs/examples/Makefile.example | 53 + .../curl-7.73.0/docs/examples/Makefile.in | 2185 + .../curl-7.73.0/docs/examples/Makefile.inc | 48 + .../curl-7.73.0/docs/examples/Makefile.m32 | 383 + .../docs/examples/Makefile.netware | 436 + .../deps/curl-7.73.0/docs/examples/README.md | 34 + .../deps/curl-7.73.0/docs/examples/altsvc.c | 56 + .../curl-7.73.0/docs/examples/anyauthput.c | 171 + .../curl-7.73.0/docs/examples/cacertinmem.c | 181 + .../deps/curl-7.73.0/docs/examples/certinfo.c | 85 + .../deps/curl-7.73.0/docs/examples/chkspeed.c | 213 + .../docs/examples/cookie_interface.c | 140 + .../deps/curl-7.73.0/docs/examples/crawler.c | 217 + .../deps/curl-7.73.0/docs/examples/curlgtk.c | 106 + .../deps/curl-7.73.0/docs/examples/curlx.c | 574 + .../deps/curl-7.73.0/docs/examples/debug.c | 154 + .../curl-7.73.0/docs/examples/ephiperfifo.c | 547 + .../curl-7.73.0/docs/examples/evhiperfifo.c | 448 + .../docs/examples/externalsocket.c | 174 + .../curl-7.73.0/docs/examples/fileupload.c | 89 + .../deps/curl-7.73.0/docs/examples/fopen.c | 546 + .../curl-7.73.0/docs/examples/ftp-wildcard.c | 150 + .../deps/curl-7.73.0/docs/examples/ftpget.c | 92 + .../curl-7.73.0/docs/examples/ftpgetinfo.c | 90 + .../curl-7.73.0/docs/examples/ftpgetresp.c | 77 + .../deps/curl-7.73.0/docs/examples/ftpsget.c | 99 + .../curl-7.73.0/docs/examples/ftpupload.c | 139 + .../docs/examples/ftpuploadfrommem.c | 124 + .../docs/examples/ftpuploadresume.c | 161 + .../deps/curl-7.73.0/docs/examples/getinfo.c | 52 + .../curl-7.73.0/docs/examples/getinmemory.c | 116 + .../curl-7.73.0/docs/examples/getredirect.c | 70 + .../deps/curl-7.73.0/docs/examples/ghiper.c | 436 + .../curl-7.73.0/docs/examples/hiperfifo.c | 458 + .../docs/examples/href_extractor.c | 86 + .../deps/curl-7.73.0/docs/examples/htmltidy.c | 128 + .../curl-7.73.0/docs/examples/htmltitle.cpp | 294 + .../curl-7.73.0/docs/examples/http-post.c | 59 + .../docs/examples/http2-download.c | 297 + .../docs/examples/http2-pushinmemory.c | 188 + .../docs/examples/http2-serverpush.c | 334 + .../curl-7.73.0/docs/examples/http2-upload.c | 364 + .../curl-7.73.0/docs/examples/http3-present.c | 47 + .../deps/curl-7.73.0/docs/examples/http3.c | 54 + .../docs/examples/httpcustomheader.c | 70 + .../deps/curl-7.73.0/docs/examples/httpput.c | 124 + .../deps/curl-7.73.0/docs/examples/https.c | 78 + .../curl-7.73.0/docs/examples/imap-append.c | 132 + .../curl-7.73.0/docs/examples/imap-authzid.c | 71 + .../curl-7.73.0/docs/examples/imap-copy.c | 71 + .../curl-7.73.0/docs/examples/imap-create.c | 67 + .../curl-7.73.0/docs/examples/imap-delete.c | 67 + .../curl-7.73.0/docs/examples/imap-examine.c | 67 + .../curl-7.73.0/docs/examples/imap-fetch.c | 65 + .../curl-7.73.0/docs/examples/imap-list.c | 66 + .../curl-7.73.0/docs/examples/imap-lsub.c | 68 + .../curl-7.73.0/docs/examples/imap-multi.c | 173 + .../curl-7.73.0/docs/examples/imap-noop.c | 67 + .../curl-7.73.0/docs/examples/imap-search.c | 71 + .../deps/curl-7.73.0/docs/examples/imap-ssl.c | 92 + .../curl-7.73.0/docs/examples/imap-store.c | 82 + .../deps/curl-7.73.0/docs/examples/imap-tls.c | 92 + .../curl-7.73.0/docs/examples/makefile.dj | 55 + .../curl-7.73.0/docs/examples/multi-app.c | 177 + .../docs/examples/multi-debugcallback.c | 231 + .../curl-7.73.0/docs/examples/multi-double.c | 143 + .../curl-7.73.0/docs/examples/multi-event.c | 240 + .../curl-7.73.0/docs/examples/multi-formadd.c | 171 + .../curl-7.73.0/docs/examples/multi-poll.c | 76 + .../curl-7.73.0/docs/examples/multi-post.c | 167 + .../curl-7.73.0/docs/examples/multi-single.c | 111 + .../deps/curl-7.73.0/docs/examples/multi-uv.c | 235 + .../curl-7.73.0/docs/examples/multithread.c | 94 + .../docs/examples/opensslthreadlock.c | 95 + .../deps/curl-7.73.0/docs/examples/parseurl.c | 78 + .../curl-7.73.0/docs/examples/persistent.c | 68 + .../curl-7.73.0/docs/examples/pop3-authzid.c | 70 + .../curl-7.73.0/docs/examples/pop3-dele.c | 70 + .../curl-7.73.0/docs/examples/pop3-list.c | 64 + .../curl-7.73.0/docs/examples/pop3-multi.c | 173 + .../curl-7.73.0/docs/examples/pop3-noop.c | 70 + .../curl-7.73.0/docs/examples/pop3-retr.c | 64 + .../deps/curl-7.73.0/docs/examples/pop3-ssl.c | 91 + .../curl-7.73.0/docs/examples/pop3-stat.c | 70 + .../deps/curl-7.73.0/docs/examples/pop3-tls.c | 91 + .../deps/curl-7.73.0/docs/examples/pop3-top.c | 67 + .../curl-7.73.0/docs/examples/pop3-uidl.c | 67 + .../curl-7.73.0/docs/examples/post-callback.c | 154 + .../curl-7.73.0/docs/examples/postinmemory.c | 112 + .../docs/examples/postit2-formadd.c | 106 + .../deps/curl-7.73.0/docs/examples/postit2.c | 102 + .../curl-7.73.0/docs/examples/progressfunc.c | 144 + .../deps/curl-7.73.0/docs/examples/resolve.c | 56 + .../jni/deps/curl-7.73.0/docs/examples/rtsp.c | 288 + .../curl-7.73.0/docs/examples/sampleconv.c | 112 + .../deps/curl-7.73.0/docs/examples/sendrecv.c | 161 + .../curl-7.73.0/docs/examples/sepheaders.c | 94 + .../curl-7.73.0/docs/examples/sessioninfo.c | 110 + .../deps/curl-7.73.0/docs/examples/sftpget.c | 110 + .../docs/examples/sftpuploadresume.c | 135 + .../docs/examples/shared-connection-cache.c | 85 + .../deps/curl-7.73.0/docs/examples/simple.c | 51 + .../curl-7.73.0/docs/examples/simplepost.c | 57 + .../curl-7.73.0/docs/examples/simplessl.c | 141 + .../docs/examples/smooth-gtk-thread.c | 224 + .../curl-7.73.0/docs/examples/smtp-authzid.c | 161 + .../curl-7.73.0/docs/examples/smtp-expn.c | 79 + .../curl-7.73.0/docs/examples/smtp-mail.c | 149 + .../curl-7.73.0/docs/examples/smtp-mime.c | 163 + .../curl-7.73.0/docs/examples/smtp-multi.c | 243 + .../deps/curl-7.73.0/docs/examples/smtp-ssl.c | 169 + .../deps/curl-7.73.0/docs/examples/smtp-tls.c | 171 + .../curl-7.73.0/docs/examples/smtp-vrfy.c | 79 + .../curl-7.73.0/docs/examples/sslbackend.c | 77 + .../deps/curl-7.73.0/docs/examples/synctime.c | 375 + .../docs/examples/threaded-shared-conn.c | 156 + .../curl-7.73.0/docs/examples/threaded-ssl.c | 166 + .../deps/curl-7.73.0/docs/examples/url2file.c | 86 + .../deps/curl-7.73.0/docs/examples/urlapi.c | 72 + .../curl-7.73.0/docs/examples/usercertinmem.c | 226 + .../docs/examples/version-check.pl | 103 + .../curl-7.73.0/docs/examples/xmlstream.c | 166 + .../jni/deps/curl-7.73.0/docs/libcurl/ABI.md | 63 + .../curl-7.73.0/docs/libcurl/CMakeLists.txt | 76 + .../deps/curl-7.73.0/docs/libcurl/Makefile.am | 78 + .../deps/curl-7.73.0/docs/libcurl/Makefile.in | 1363 + .../curl-7.73.0/docs/libcurl/Makefile.inc | 110 + .../docs/libcurl/curl_easy_cleanup.3 | 72 + .../docs/libcurl/curl_easy_duphandle.3 | 54 + .../docs/libcurl/curl_easy_escape.3 | 68 + .../docs/libcurl/curl_easy_getinfo.3 | 287 + .../curl-7.73.0/docs/libcurl/curl_easy_init.3 | 60 + .../docs/libcurl/curl_easy_option_by_id.3 | 47 + .../docs/libcurl/curl_easy_option_by_name.3 | 45 + .../docs/libcurl/curl_easy_option_next.3 | 75 + .../docs/libcurl/curl_easy_pause.3 | 104 + .../docs/libcurl/curl_easy_perform.3 | 75 + .../curl-7.73.0/docs/libcurl/curl_easy_recv.3 | 85 + .../docs/libcurl/curl_easy_reset.3 | 45 + .../curl-7.73.0/docs/libcurl/curl_easy_send.3 | 76 + .../docs/libcurl/curl_easy_setopt.3 | 669 + .../docs/libcurl/curl_easy_strerror.3 | 41 + .../docs/libcurl/curl_easy_unescape.3 | 55 + .../docs/libcurl/curl_easy_upkeep.3 | 77 + .../curl-7.73.0/docs/libcurl/curl_escape.3 | 49 + .../curl-7.73.0/docs/libcurl/curl_formadd.3 | 268 + .../curl-7.73.0/docs/libcurl/curl_formfree.3 | 52 + .../curl-7.73.0/docs/libcurl/curl_formget.3 | 72 + .../deps/curl-7.73.0/docs/libcurl/curl_free.3 | 39 + .../curl-7.73.0/docs/libcurl/curl_getdate.3 | 111 + .../curl-7.73.0/docs/libcurl/curl_getenv.3 | 50 + .../docs/libcurl/curl_global_cleanup.3 | 56 + .../docs/libcurl/curl_global_init.3 | 104 + .../docs/libcurl/curl_global_init_mem.3 | 67 + .../docs/libcurl/curl_global_sslset.3 | 103 + .../docs/libcurl/curl_mime_addpart.3 | 67 + .../curl-7.73.0/docs/libcurl/curl_mime_data.3 | 70 + .../docs/libcurl/curl_mime_data_cb.3 | 168 + .../docs/libcurl/curl_mime_encoder.3 | 98 + .../docs/libcurl/curl_mime_filedata.3 | 85 + .../docs/libcurl/curl_mime_filename.3 | 73 + .../curl-7.73.0/docs/libcurl/curl_mime_free.3 | 51 + .../docs/libcurl/curl_mime_headers.3 | 66 + .../curl-7.73.0/docs/libcurl/curl_mime_init.3 | 70 + .../curl-7.73.0/docs/libcurl/curl_mime_name.3 | 64 + .../docs/libcurl/curl_mime_subparts.3 | 54 + .../curl-7.73.0/docs/libcurl/curl_mime_type.3 | 84 + .../curl-7.73.0/docs/libcurl/curl_mprintf.3 | 104 + .../docs/libcurl/curl_multi_add_handle.3 | 72 + .../docs/libcurl/curl_multi_assign.3 | 64 + .../docs/libcurl/curl_multi_cleanup.3 | 51 + .../docs/libcurl/curl_multi_fdset.3 | 85 + .../docs/libcurl/curl_multi_info_read.3 | 95 + .../docs/libcurl/curl_multi_init.3 | 40 + .../docs/libcurl/curl_multi_perform.3 | 131 + .../docs/libcurl/curl_multi_poll.3 | 118 + .../docs/libcurl/curl_multi_remove_handle.3 | 48 + .../docs/libcurl/curl_multi_setopt.3 | 81 + .../docs/libcurl/curl_multi_socket.3 | 160 + .../docs/libcurl/curl_multi_socket_action.3 | 97 + .../docs/libcurl/curl_multi_socket_all.3 | 1 + .../docs/libcurl/curl_multi_strerror.3 | 38 + .../docs/libcurl/curl_multi_timeout.3 | 79 + .../docs/libcurl/curl_multi_wait.3 | 124 + .../docs/libcurl/curl_multi_wakeup.3 | 87 + .../docs/libcurl/curl_share_cleanup.3 | 43 + .../docs/libcurl/curl_share_init.3 | 44 + .../docs/libcurl/curl_share_setopt.3 | 115 + .../docs/libcurl/curl_share_strerror.3 | 38 + .../docs/libcurl/curl_slist_append.3 | 73 + .../docs/libcurl/curl_slist_free_all.3 | 56 + .../curl-7.73.0/docs/libcurl/curl_strequal.3 | 52 + .../curl-7.73.0/docs/libcurl/curl_strnequal.3 | 1 + .../curl-7.73.0/docs/libcurl/curl_unescape.3 | 49 + .../deps/curl-7.73.0/docs/libcurl/curl_url.3 | 54 + .../docs/libcurl/curl_url_cleanup.3 | 45 + .../curl-7.73.0/docs/libcurl/curl_url_dup.3 | 53 + .../curl-7.73.0/docs/libcurl/curl_url_get.3 | 116 + .../curl-7.73.0/docs/libcurl/curl_url_set.3 | 147 + .../curl-7.73.0/docs/libcurl/curl_version.3 | 40 + .../docs/libcurl/curl_version_info.3 | 218 + .../curl-7.73.0/docs/libcurl/libcurl-easy.3 | 59 + .../curl-7.73.0/docs/libcurl/libcurl-env.3 | 90 + .../curl-7.73.0/docs/libcurl/libcurl-errors.3 | 363 + .../curl-7.73.0/docs/libcurl/libcurl-multi.3 | 181 + .../docs/libcurl/libcurl-security.3 | 368 + .../curl-7.73.0/docs/libcurl/libcurl-share.3 | 66 + .../docs/libcurl/libcurl-symbols.3 | 2170 + .../curl-7.73.0/docs/libcurl/libcurl-thread.3 | 108 + .../docs/libcurl/libcurl-tutorial.3 | 1398 + .../curl-7.73.0/docs/libcurl/libcurl-url.3 | 138 + .../deps/curl-7.73.0/docs/libcurl/libcurl.3 | 228 + .../deps/curl-7.73.0/docs/libcurl/libcurl.m4 | 272 + .../docs/libcurl/mksymbolsmanpage.pl | 93 + .../docs/libcurl/opts/CMakeLists.txt | 33 + .../docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 | 72 + .../libcurl/opts/CURLINFO_APPCONNECT_TIME.3 | 65 + .../libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 | 67 + .../docs/libcurl/opts/CURLINFO_CERTINFO.3 | 82 + .../libcurl/opts/CURLINFO_CONDITION_UNMET.3 | 71 + .../docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 | 62 + .../libcurl/opts/CURLINFO_CONNECT_TIME_T.3 | 63 + .../opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 | 66 + .../opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 | 63 + .../opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 | 65 + .../opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 | 62 + .../docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 | 66 + .../docs/libcurl/opts/CURLINFO_COOKIELIST.3 | 78 + .../libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3 | 69 + .../libcurl/opts/CURLINFO_EFFECTIVE_URL.3 | 64 + .../docs/libcurl/opts/CURLINFO_FILETIME.3 | 70 + .../docs/libcurl/opts/CURLINFO_FILETIME_T.3 | 72 + .../libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 | 66 + .../docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 | 62 + .../libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 | 71 + .../libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 | 62 + .../docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 | 58 + .../docs/libcurl/opts/CURLINFO_LASTSOCKET.3 | 72 + .../docs/libcurl/opts/CURLINFO_LOCAL_IP.3 | 69 + .../docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 | 66 + .../libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 | 62 + .../libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 | 63 + .../docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 | 62 + .../docs/libcurl/opts/CURLINFO_OS_ERRNO.3 | 59 + .../libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 | 65 + .../opts/CURLINFO_PRETRANSFER_TIME_T.3 | 67 + .../docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 | 68 + .../docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 | 57 + .../docs/libcurl/opts/CURLINFO_PRIVATE.3 | 61 + .../docs/libcurl/opts/CURLINFO_PROTOCOL.3 | 65 + .../libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 | 72 + .../docs/libcurl/opts/CURLINFO_PROXY_ERROR.3 | 105 + .../opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 | 58 + .../libcurl/opts/CURLINFO_REDIRECT_COUNT.3 | 56 + .../libcurl/opts/CURLINFO_REDIRECT_TIME.3 | 62 + .../libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 | 64 + .../docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 | 63 + .../docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 | 60 + .../libcurl/opts/CURLINFO_RESPONSE_CODE.3 | 61 + .../docs/libcurl/opts/CURLINFO_RETRY_AFTER.3 | 64 + .../libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 | 55 + .../libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 | 57 + .../libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 | 60 + .../libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 | 62 + .../docs/libcurl/opts/CURLINFO_SCHEME.3 | 63 + .../libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 | 68 + .../libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 | 65 + .../docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 | 63 + .../libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 | 60 + .../libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 | 63 + .../libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 | 60 + .../docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 | 62 + .../libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 | 59 + .../docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 | 61 + .../libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 | 58 + .../opts/CURLINFO_STARTTRANSFER_TIME.3 | 64 + .../opts/CURLINFO_STARTTRANSFER_TIME_T.3 | 66 + .../docs/libcurl/opts/CURLINFO_TLS_SESSION.3 | 71 + .../docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 | 169 + .../docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 | 63 + .../docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 | 64 + .../opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 | 55 + .../CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 | 54 + .../docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 | 66 + .../opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3 | 56 + .../opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 | 63 + .../opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 | 58 + .../opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 | 55 + .../docs/libcurl/opts/CURLMOPT_PIPELINING.3 | 90 + .../opts/CURLMOPT_PIPELINING_SERVER_BL.3 | 63 + .../opts/CURLMOPT_PIPELINING_SITE_BL.3 | 59 + .../docs/libcurl/opts/CURLMOPT_PUSHDATA.3 | 80 + .../docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 | 137 + .../docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 | 77 + .../libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 | 111 + .../docs/libcurl/opts/CURLMOPT_TIMERDATA.3 | 83 + .../libcurl/opts/CURLMOPT_TIMERFUNCTION.3 | 108 + .../opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 | 59 + .../libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 | 55 + .../libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 | 107 + .../docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 | 56 + .../docs/libcurl/opts/CURLOPT_ALTSVC.3 | 64 + .../docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3 | 93 + .../docs/libcurl/opts/CURLOPT_APPEND.3 | 56 + .../docs/libcurl/opts/CURLOPT_AUTOREFERER.3 | 61 + .../docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 | 66 + .../docs/libcurl/opts/CURLOPT_CAINFO.3 | 84 + .../docs/libcurl/opts/CURLOPT_CAPATH.3 | 70 + .../docs/libcurl/opts/CURLOPT_CERTINFO.3 | 79 + .../libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 | 142 + .../docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 | 91 + .../libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 | 72 + .../libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 | 56 + .../opts/CURLOPT_CLOSESOCKETFUNCTION.3 | 67 + .../libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 | 66 + .../libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 | 65 + .../docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 | 67 + .../docs/libcurl/opts/CURLOPT_CONNECT_TO.3 | 112 + .../opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 | 102 + .../opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 | 100 + .../opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 | 101 + .../docs/libcurl/opts/CURLOPT_COOKIE.3 | 84 + .../docs/libcurl/opts/CURLOPT_COOKIEFILE.3 | 88 + .../docs/libcurl/opts/CURLOPT_COOKIEJAR.3 | 79 + .../docs/libcurl/opts/CURLOPT_COOKIELIST.3 | 125 + .../docs/libcurl/opts/CURLOPT_COOKIESESSION.3 | 67 + .../libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 | 71 + .../docs/libcurl/opts/CURLOPT_CRLF.3 | 57 + .../docs/libcurl/opts/CURLOPT_CRLFILE.3 | 76 + .../docs/libcurl/opts/CURLOPT_CURLU.3 | 70 + .../docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 | 112 + .../docs/libcurl/opts/CURLOPT_DEBUGDATA.3 | 46 + .../docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 | 188 + .../libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 | 83 + .../docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 | 74 + .../opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 | 57 + .../libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 | 74 + .../docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 | 60 + .../docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 | 63 + .../docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 | 63 + .../docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 | 68 + .../opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 | 70 + .../opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 | 63 + .../docs/libcurl/opts/CURLOPT_DOH_URL.3 | 72 + .../docs/libcurl/opts/CURLOPT_EGDSOCKET.3 | 57 + .../docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 | 93 + .../opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 | 60 + .../docs/libcurl/opts/CURLOPT_FAILONERROR.3 | 68 + .../docs/libcurl/opts/CURLOPT_FILETIME.3 | 65 + .../docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 | 65 + .../libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 | 75 + .../libcurl/opts/CURLOPT_FOLLOWLOCATION.3 | 82 + .../docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 | 60 + .../docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 | 60 + .../docs/libcurl/opts/CURLOPT_FTPPORT.3 | 84 + .../docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 | 64 + .../docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 | 61 + .../opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 | 65 + .../opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 | 82 + .../libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 | 74 + .../opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 | 63 + .../libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 | 64 + .../docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 | 65 + .../docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 | 48 + .../docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 | 61 + .../docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 | 59 + .../libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 | 61 + .../opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 | 60 + .../libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 | 58 + .../docs/libcurl/opts/CURLOPT_HEADER.3 | 70 + .../docs/libcurl/opts/CURLOPT_HEADERDATA.3 | 79 + .../libcurl/opts/CURLOPT_HEADERFUNCTION.3 | 118 + .../docs/libcurl/opts/CURLOPT_HEADEROPT.3 | 77 + .../libcurl/opts/CURLOPT_HTTP09_ALLOWED.3 | 59 + .../libcurl/opts/CURLOPT_HTTP200ALIASES.3 | 72 + .../docs/libcurl/opts/CURLOPT_HTTPAUTH.3 | 133 + .../docs/libcurl/opts/CURLOPT_HTTPGET.3 | 65 + .../docs/libcurl/opts/CURLOPT_HTTPHEADER.3 | 125 + .../docs/libcurl/opts/CURLOPT_HTTPPOST.3 | 83 + .../libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 | 69 + .../opts/CURLOPT_HTTP_CONTENT_DECODING.3 | 58 + .../opts/CURLOPT_HTTP_TRANSFER_DECODING.3 | 57 + .../docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 | 94 + .../opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 | 68 + .../docs/libcurl/opts/CURLOPT_INFILESIZE.3 | 72 + .../libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 | 73 + .../docs/libcurl/opts/CURLOPT_INTERFACE.3 | 73 + .../libcurl/opts/CURLOPT_INTERLEAVEDATA.3 | 59 + .../libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 | 85 + .../docs/libcurl/opts/CURLOPT_IOCTLDATA.3 | 61 + .../docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 | 93 + .../docs/libcurl/opts/CURLOPT_IPRESOLVE.3 | 65 + .../docs/libcurl/opts/CURLOPT_ISSUERCERT.3 | 70 + .../libcurl/opts/CURLOPT_ISSUERCERT_BLOB.3 | 79 + .../opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 | 62 + .../docs/libcurl/opts/CURLOPT_KEYPASSWD.3 | 62 + .../docs/libcurl/opts/CURLOPT_KRBLEVEL.3 | 60 + .../docs/libcurl/opts/CURLOPT_LOCALPORT.3 | 57 + .../libcurl/opts/CURLOPT_LOCALPORTRANGE.3 | 61 + .../docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 | 65 + .../libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 | 61 + .../libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 | 60 + .../docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 | 70 + .../docs/libcurl/opts/CURLOPT_MAIL_FROM.3 | 63 + .../docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 | 74 + .../opts/CURLOPT_MAIL_RCPT_ALLLOWFAILS.3 | 72 + .../docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3 | 66 + .../docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 | 69 + .../docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 | 62 + .../libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 | 63 + .../docs/libcurl/opts/CURLOPT_MAXREDIRS.3 | 65 + .../opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 | 65 + .../opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 | 68 + .../docs/libcurl/opts/CURLOPT_MIMEPOST.3 | 53 + .../docs/libcurl/opts/CURLOPT_NETRC.3 | 85 + .../docs/libcurl/opts/CURLOPT_NETRC_FILE.3 | 61 + .../opts/CURLOPT_NEW_DIRECTORY_PERMS.3 | 58 + .../libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 | 57 + .../docs/libcurl/opts/CURLOPT_NOBODY.3 | 71 + .../docs/libcurl/opts/CURLOPT_NOPROGRESS.3 | 60 + .../docs/libcurl/opts/CURLOPT_NOPROXY.3 | 86 + .../docs/libcurl/opts/CURLOPT_NOSIGNAL.3 | 56 + .../libcurl/opts/CURLOPT_OPENSOCKETDATA.3 | 82 + .../libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 | 126 + .../docs/libcurl/opts/CURLOPT_PASSWORD.3 | 64 + .../docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 | 65 + .../libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 | 129 + .../docs/libcurl/opts/CURLOPT_PIPEWAIT.3 | 64 + .../docs/libcurl/opts/CURLOPT_PORT.3 | 60 + .../docs/libcurl/opts/CURLOPT_POST.3 | 91 + .../docs/libcurl/opts/CURLOPT_POSTFIELDS.3 | 89 + .../docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 | 63 + .../opts/CURLOPT_POSTFIELDSIZE_LARGE.3 | 65 + .../docs/libcurl/opts/CURLOPT_POSTQUOTE.3 | 65 + .../docs/libcurl/opts/CURLOPT_POSTREDIR.3 | 74 + .../docs/libcurl/opts/CURLOPT_PREQUOTE.3 | 67 + .../docs/libcurl/opts/CURLOPT_PRE_PROXY.3 | 80 + .../docs/libcurl/opts/CURLOPT_PRIVATE.3 | 62 + .../docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 | 45 + .../libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 | 88 + .../docs/libcurl/opts/CURLOPT_PROTOCOLS.3 | 94 + .../docs/libcurl/opts/CURLOPT_PROXY.3 | 117 + .../docs/libcurl/opts/CURLOPT_PROXYAUTH.3 | 70 + .../docs/libcurl/opts/CURLOPT_PROXYHEADER.3 | 76 + .../docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 | 63 + .../docs/libcurl/opts/CURLOPT_PROXYPORT.3 | 58 + .../docs/libcurl/opts/CURLOPT_PROXYTYPE.3 | 77 + .../docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 | 67 + .../docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 | 63 + .../docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 | 84 + .../docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 | 72 + .../docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 | 76 + .../libcurl/opts/CURLOPT_PROXY_ISSUERCERT.3 | 74 + .../opts/CURLOPT_PROXY_ISSUERCERT_BLOB.3 | 85 + .../libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 | 63 + .../opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 | 112 + .../libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 | 58 + .../docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 | 73 + .../libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 | 68 + .../libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.3 | 72 + .../docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 | 69 + .../libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 | 62 + .../libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.3 | 73 + .../libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 | 101 + .../opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 | 82 + .../libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 | 83 + .../opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 | 90 + .../opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 | 90 + .../opts/CURLOPT_PROXY_TLS13_CIPHERS.3 | 70 + .../opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 | 63 + .../libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 | 71 + .../opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 | 63 + .../opts/CURLOPT_PROXY_TRANSFER_MODE.3 | 59 + .../docs/libcurl/opts/CURLOPT_PUT.3 | 47 + .../docs/libcurl/opts/CURLOPT_QUOTE.3 | 114 + .../docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 | 57 + .../docs/libcurl/opts/CURLOPT_RANGE.3 | 82 + .../docs/libcurl/opts/CURLOPT_READDATA.3 | 66 + .../docs/libcurl/opts/CURLOPT_READFUNCTION.3 | 117 + .../libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 | 105 + .../docs/libcurl/opts/CURLOPT_REFERER.3 | 61 + .../libcurl/opts/CURLOPT_REQUEST_TARGET.3 | 57 + .../docs/libcurl/opts/CURLOPT_RESOLVE.3 | 98 + .../opts/CURLOPT_RESOLVER_START_DATA.3 | 64 + .../opts/CURLOPT_RESOLVER_START_FUNCTION.3 | 84 + .../docs/libcurl/opts/CURLOPT_RESUME_FROM.3 | 73 + .../libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 | 75 + .../libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 | 54 + .../docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 | 112 + .../libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 | 54 + .../libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 | 62 + .../libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 | 67 + .../libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 | 63 + .../docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3 | 65 + .../docs/libcurl/opts/CURLOPT_SASL_IR.3 | 65 + .../docs/libcurl/opts/CURLOPT_SEEKDATA.3 | 58 + .../docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 | 90 + .../docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 | 59 + .../docs/libcurl/opts/CURLOPT_SHARE.3 | 82 + .../docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 | 68 + .../libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 | 125 + .../docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 | 64 + .../libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 | 57 + .../opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 | 61 + .../libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 | 60 + .../libcurl/opts/CURLOPT_SSH_COMPRESSION.3 | 59 + .../opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 | 61 + .../docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 | 64 + .../libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 | 132 + .../libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 | 62 + .../opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 | 65 + .../libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 | 66 + .../docs/libcurl/opts/CURLOPT_SSLCERT.3 | 81 + .../docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 | 63 + .../docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.3 | 69 + .../docs/libcurl/opts/CURLOPT_SSLENGINE.3 | 67 + .../libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 | 64 + .../docs/libcurl/opts/CURLOPT_SSLKEY.3 | 64 + .../docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 | 65 + .../docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.3 | 75 + .../docs/libcurl/opts/CURLOPT_SSLVERSION.3 | 114 + .../libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 | 78 + .../docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 | 125 + .../libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 | 84 + .../docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.3 | 55 + .../libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 | 54 + .../libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 | 54 + .../libcurl/opts/CURLOPT_SSL_FALSESTART.3 | 56 + .../docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 | 85 + .../opts/CURLOPT_SSL_SESSIONID_CACHE.3 | 59 + .../libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 | 99 + .../libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 | 94 + .../libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 | 63 + .../docs/libcurl/opts/CURLOPT_STDERR.3 | 55 + .../libcurl/opts/CURLOPT_STREAM_DEPENDS.3 | 69 + .../libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 | 72 + .../docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 | 77 + .../opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 | 96 + .../docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 | 55 + .../docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 | 64 + .../docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 | 62 + .../docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 | 62 + .../docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 | 65 + .../docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 | 60 + .../docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 | 58 + .../libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 | 72 + .../docs/libcurl/opts/CURLOPT_TIMECONDITION.3 | 66 + .../docs/libcurl/opts/CURLOPT_TIMEOUT.3 | 73 + .../docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 | 75 + .../docs/libcurl/opts/CURLOPT_TIMEVALUE.3 | 63 + .../libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 | 65 + .../docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 | 69 + .../libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 | 63 + .../docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 | 68 + .../libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 | 63 + .../docs/libcurl/opts/CURLOPT_TRAILERDATA.3 | 50 + .../libcurl/opts/CURLOPT_TRAILERFUNCTION.3 | 102 + .../docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 | 60 + .../libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 | 62 + .../libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 | 82 + .../libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 | 61 + .../libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3 | 73 + .../docs/libcurl/opts/CURLOPT_UPLOAD.3 | 79 + .../libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 | 70 + .../docs/libcurl/opts/CURLOPT_URL.3 | 361 + .../docs/libcurl/opts/CURLOPT_USERAGENT.3 | 60 + .../docs/libcurl/opts/CURLOPT_USERNAME.3 | 86 + .../docs/libcurl/opts/CURLOPT_USERPWD.3 | 92 + .../docs/libcurl/opts/CURLOPT_USE_SSL.3 | 71 + .../docs/libcurl/opts/CURLOPT_VERBOSE.3 | 65 + .../docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 | 88 + .../docs/libcurl/opts/CURLOPT_WRITEDATA.3 | 61 + .../docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 | 113 + .../docs/libcurl/opts/CURLOPT_XFERINFODATA.3 | 47 + .../libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 | 85 + .../libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 | 61 + .../curl-7.73.0/docs/libcurl/opts/Makefile.am | 61 + .../curl-7.73.0/docs/libcurl/opts/Makefile.in | 1064 + .../docs/libcurl/opts/Makefile.inc | 385 + .../docs/libcurl/symbols-in-versions | 1030 + .../deps/curl-7.73.0/docs/libcurl/symbols.pl | 100 + .../jni/deps/curl-7.73.0/docs/mk-ca-bundle.1 | 119 + .../deps/curl-7.73.0/docs/options-in-versions | 246 + .../jni/deps/curl-7.73.0/include/Makefile.am | 26 + .../jni/deps/curl-7.73.0/include/Makefile.in | 752 + .../jni/deps/curl-7.73.0/include/README.md | 14 + .../deps/curl-7.73.0/include/curl/Makefile.am | 39 + .../deps/curl-7.73.0/include/curl/Makefile.in | 703 + .../jni/deps/curl-7.73.0/include/curl/curl.h | 2986 + .../deps/curl-7.73.0/include/curl/curlver.h | 77 + .../jni/deps/curl-7.73.0/include/curl/easy.h | 123 + .../deps/curl-7.73.0/include/curl/mprintf.h | 50 + .../jni/deps/curl-7.73.0/include/curl/multi.h | 456 + .../deps/curl-7.73.0/include/curl/options.h | 68 + .../curl-7.73.0/include/curl/stdcheaders.h | 33 + .../deps/curl-7.73.0/include/curl/system.h | 504 + .../curl-7.73.0/include/curl/typecheck-gcc.h | 701 + .../deps/curl-7.73.0/include/curl/urlapi.h | 125 + .../src/main/jni/deps/curl-7.73.0/install-sh | 529 + .../jni/deps/curl-7.73.0/lib/CMakeLists.txt | 143 + .../main/jni/deps/curl-7.73.0/lib/Makefile.am | 158 + .../main/jni/deps/curl-7.73.0/lib/Makefile.in | 4580 ++ .../jni/deps/curl-7.73.0/lib/Makefile.inc | 90 + .../jni/deps/curl-7.73.0/lib/Makefile.m32 | 404 + .../jni/deps/curl-7.73.0/lib/Makefile.netware | 729 + .../jni/deps/curl-7.73.0/lib/Makefile.vxworks | 198 + .../main/jni/deps/curl-7.73.0/lib/altsvc.c | 645 + .../main/jni/deps/curl-7.73.0/lib/altsvc.h | 79 + .../main/jni/deps/curl-7.73.0/lib/amigaos.c | 95 + .../main/jni/deps/curl-7.73.0/lib/amigaos.h | 44 + .../jni/deps/curl-7.73.0/lib/arpa_telnet.h | 108 + .../main/jni/deps/curl-7.73.0/lib/asyn-ares.c | 816 + .../jni/deps/curl-7.73.0/lib/asyn-thread.c | 809 + .../src/main/jni/deps/curl-7.73.0/lib/asyn.h | 182 + .../main/jni/deps/curl-7.73.0/lib/base64.c | 329 + .../main/jni/deps/curl-7.73.0/lib/checksrc.pl | 818 + .../jni/deps/curl-7.73.0/lib/config-amigaos.h | 164 + .../jni/deps/curl-7.73.0/lib/config-dos.h | 180 + .../jni/deps/curl-7.73.0/lib/config-mac.h | 125 + .../jni/deps/curl-7.73.0/lib/config-os400.h | 572 + .../jni/deps/curl-7.73.0/lib/config-plan9.h | 214 + .../jni/deps/curl-7.73.0/lib/config-riscos.h | 504 + .../jni/deps/curl-7.73.0/lib/config-tpf.h | 756 + .../jni/deps/curl-7.73.0/lib/config-vxworks.h | 904 + .../jni/deps/curl-7.73.0/lib/config-win32.h | 768 + .../jni/deps/curl-7.73.0/lib/config-win32ce.h | 448 + .../main/jni/deps/curl-7.73.0/lib/conncache.c | 605 + .../main/jni/deps/curl-7.73.0/lib/conncache.h | 107 + .../main/jni/deps/curl-7.73.0/lib/connect.c | 1596 + .../main/jni/deps/curl-7.73.0/lib/connect.h | 147 + .../deps/curl-7.73.0/lib/content_encoding.c | 1114 + .../deps/curl-7.73.0/lib/content_encoding.h | 55 + .../main/jni/deps/curl-7.73.0/lib/cookie.c | 1677 + .../main/jni/deps/curl-7.73.0/lib/cookie.h | 120 + .../jni/deps/curl-7.73.0/lib/curl_addrinfo.c | 595 + .../jni/deps/curl-7.73.0/lib/curl_addrinfo.h | 106 + .../jni/deps/curl-7.73.0/lib/curl_base64.h | 35 + .../deps/curl-7.73.0/lib/curl_config.h.cmake | 1071 + .../jni/deps/curl-7.73.0/lib/curl_config.h.in | 1126 + .../jni/deps/curl-7.73.0/lib/curl_ctype.c | 133 + .../jni/deps/curl-7.73.0/lib/curl_ctype.h | 81 + .../main/jni/deps/curl-7.73.0/lib/curl_des.c | 63 + .../main/jni/deps/curl-7.73.0/lib/curl_des.h | 34 + .../jni/deps/curl-7.73.0/lib/curl_endian.c | 124 + .../jni/deps/curl-7.73.0/lib/curl_endian.h | 43 + .../jni/deps/curl-7.73.0/lib/curl_fnmatch.c | 389 + .../jni/deps/curl-7.73.0/lib/curl_fnmatch.h | 44 + .../jni/deps/curl-7.73.0/lib/curl_get_line.c | 59 + .../jni/deps/curl-7.73.0/lib/curl_get_line.h | 29 + .../deps/curl-7.73.0/lib/curl_gethostname.c | 100 + .../deps/curl-7.73.0/lib/curl_gethostname.h | 31 + .../jni/deps/curl-7.73.0/lib/curl_gssapi.c | 136 + .../jni/deps/curl-7.73.0/lib/curl_gssapi.h | 61 + .../main/jni/deps/curl-7.73.0/lib/curl_hmac.h | 72 + .../main/jni/deps/curl-7.73.0/lib/curl_krb5.h | 51 + .../main/jni/deps/curl-7.73.0/lib/curl_ldap.h | 34 + .../main/jni/deps/curl-7.73.0/lib/curl_md4.h | 36 + .../main/jni/deps/curl-7.73.0/lib/curl_md5.h | 63 + .../jni/deps/curl-7.73.0/lib/curl_memory.h | 156 + .../jni/deps/curl-7.73.0/lib/curl_memrchr.c | 62 + .../jni/deps/curl-7.73.0/lib/curl_memrchr.h | 44 + .../jni/deps/curl-7.73.0/lib/curl_multibyte.c | 153 + .../jni/deps/curl-7.73.0/lib/curl_multibyte.h | 90 + .../jni/deps/curl-7.73.0/lib/curl_ntlm_core.c | 745 + .../jni/deps/curl-7.73.0/lib/curl_ntlm_core.h | 105 + .../jni/deps/curl-7.73.0/lib/curl_ntlm_wb.c | 494 + .../jni/deps/curl-7.73.0/lib/curl_ntlm_wb.h | 41 + .../main/jni/deps/curl-7.73.0/lib/curl_path.c | 199 + .../main/jni/deps/curl-7.73.0/lib/curl_path.h | 47 + .../jni/deps/curl-7.73.0/lib/curl_printf.h | 48 + .../jni/deps/curl-7.73.0/lib/curl_range.c | 95 + .../jni/deps/curl-7.73.0/lib/curl_range.h | 30 + .../main/jni/deps/curl-7.73.0/lib/curl_rtmp.c | 322 + .../main/jni/deps/curl-7.73.0/lib/curl_rtmp.h | 33 + .../main/jni/deps/curl-7.73.0/lib/curl_sasl.c | 643 + .../main/jni/deps/curl-7.73.0/lib/curl_sasl.h | 143 + .../jni/deps/curl-7.73.0/lib/curl_setup.h | 795 + .../deps/curl-7.73.0/lib/curl_setup_once.h | 499 + .../jni/deps/curl-7.73.0/lib/curl_sha256.h | 35 + .../main/jni/deps/curl-7.73.0/lib/curl_sspi.c | 237 + .../main/jni/deps/curl-7.73.0/lib/curl_sspi.h | 350 + .../jni/deps/curl-7.73.0/lib/curl_threads.c | 155 + .../jni/deps/curl-7.73.0/lib/curl_threads.h | 64 + .../src/main/jni/deps/curl-7.73.0/lib/curlx.h | 116 + .../src/main/jni/deps/curl-7.73.0/lib/dict.c | 325 + .../src/main/jni/deps/curl-7.73.0/lib/dict.h | 29 + .../src/main/jni/deps/curl-7.73.0/lib/doh.c | 995 + .../src/main/jni/deps/curl-7.73.0/lib/doh.h | 109 + .../main/jni/deps/curl-7.73.0/lib/dotdot.c | 182 + .../main/jni/deps/curl-7.73.0/lib/dotdot.h | 25 + .../main/jni/deps/curl-7.73.0/lib/dynbuf.c | 255 + .../main/jni/deps/curl-7.73.0/lib/dynbuf.h | 88 + .../src/main/jni/deps/curl-7.73.0/lib/easy.c | 1221 + .../jni/deps/curl-7.73.0/lib/easygetopt.c | 96 + .../main/jni/deps/curl-7.73.0/lib/easyif.h | 32 + .../jni/deps/curl-7.73.0/lib/easyoptions.c | 347 + .../jni/deps/curl-7.73.0/lib/easyoptions.h | 35 + .../main/jni/deps/curl-7.73.0/lib/escape.c | 246 + .../main/jni/deps/curl-7.73.0/lib/escape.h | 40 + .../src/main/jni/deps/curl-7.73.0/lib/file.c | 544 + .../src/main/jni/deps/curl-7.73.0/lib/file.h | 40 + .../main/jni/deps/curl-7.73.0/lib/fileinfo.c | 44 + .../main/jni/deps/curl-7.73.0/lib/fileinfo.h | 36 + .../deps/curl-7.73.0/lib/firefox-db2pem.sh | 53 + .../main/jni/deps/curl-7.73.0/lib/formdata.c | 946 + .../main/jni/deps/curl-7.73.0/lib/formdata.h | 60 + .../src/main/jni/deps/curl-7.73.0/lib/ftp.c | 4327 ++ .../src/main/jni/deps/curl-7.73.0/lib/ftp.h | 156 + .../jni/deps/curl-7.73.0/lib/ftplistparser.c | 1019 + .../jni/deps/curl-7.73.0/lib/ftplistparser.h | 41 + .../main/jni/deps/curl-7.73.0/lib/getenv.c | 77 + .../main/jni/deps/curl-7.73.0/lib/getinfo.c | 600 + .../main/jni/deps/curl-7.73.0/lib/getinfo.h | 27 + .../main/jni/deps/curl-7.73.0/lib/gopher.c | 186 + .../main/jni/deps/curl-7.73.0/lib/gopher.h | 29 + .../src/main/jni/deps/curl-7.73.0/lib/hash.c | 351 + .../src/main/jni/deps/curl-7.73.0/lib/hash.h | 100 + .../src/main/jni/deps/curl-7.73.0/lib/hmac.c | 170 + .../main/jni/deps/curl-7.73.0/lib/hostasyn.c | 128 + .../main/jni/deps/curl-7.73.0/lib/hostcheck.c | 150 + .../main/jni/deps/curl-7.73.0/lib/hostcheck.h | 31 + .../main/jni/deps/curl-7.73.0/lib/hostip.c | 1112 + .../main/jni/deps/curl-7.73.0/lib/hostip.h | 249 + .../main/jni/deps/curl-7.73.0/lib/hostip4.c | 298 + .../main/jni/deps/curl-7.73.0/lib/hostip6.c | 206 + .../main/jni/deps/curl-7.73.0/lib/hostsyn.c | 107 + .../src/main/jni/deps/curl-7.73.0/lib/http.c | 4053 ++ .../src/main/jni/deps/curl-7.73.0/lib/http.h | 255 + .../src/main/jni/deps/curl-7.73.0/lib/http2.c | 2449 + .../src/main/jni/deps/curl-7.73.0/lib/http2.h | 82 + .../jni/deps/curl-7.73.0/lib/http_chunks.c | 344 + .../jni/deps/curl-7.73.0/lib/http_chunks.h | 99 + .../jni/deps/curl-7.73.0/lib/http_digest.c | 185 + .../jni/deps/curl-7.73.0/lib/http_digest.h | 42 + .../jni/deps/curl-7.73.0/lib/http_negotiate.c | 225 + .../jni/deps/curl-7.73.0/lib/http_negotiate.h | 40 + .../main/jni/deps/curl-7.73.0/lib/http_ntlm.c | 258 + .../main/jni/deps/curl-7.73.0/lib/http_ntlm.h | 42 + .../jni/deps/curl-7.73.0/lib/http_proxy.c | 674 + .../jni/deps/curl-7.73.0/lib/http_proxy.h | 52 + .../main/jni/deps/curl-7.73.0/lib/idn_win32.c | 111 + .../src/main/jni/deps/curl-7.73.0/lib/if2ip.c | 246 + .../src/main/jni/deps/curl-7.73.0/lib/if2ip.h | 82 + .../src/main/jni/deps/curl-7.73.0/lib/imap.c | 2107 + .../src/main/jni/deps/curl-7.73.0/lib/imap.h | 99 + .../main/jni/deps/curl-7.73.0/lib/inet_ntop.c | 197 + .../main/jni/deps/curl-7.73.0/lib/inet_ntop.h | 37 + .../main/jni/deps/curl-7.73.0/lib/inet_pton.c | 237 + .../main/jni/deps/curl-7.73.0/lib/inet_pton.h | 39 + .../src/main/jni/deps/curl-7.73.0/lib/krb5.c | 909 + .../src/main/jni/deps/curl-7.73.0/lib/ldap.c | 1075 + .../jni/deps/curl-7.73.0/lib/libcurl.plist | 35 + .../main/jni/deps/curl-7.73.0/lib/libcurl.rc | 63 + .../jni/deps/curl-7.73.0/lib/libcurl.vers.in | 13 + .../src/main/jni/deps/curl-7.73.0/lib/llist.c | 146 + .../src/main/jni/deps/curl-7.73.0/lib/llist.h | 50 + .../jni/deps/curl-7.73.0/lib/makefile.amiga | 42 + .../main/jni/deps/curl-7.73.0/lib/makefile.dj | 71 + .../src/main/jni/deps/curl-7.73.0/lib/md4.c | 529 + .../src/main/jni/deps/curl-7.73.0/lib/md5.c | 623 + .../main/jni/deps/curl-7.73.0/lib/memdebug.c | 462 + .../main/jni/deps/curl-7.73.0/lib/memdebug.h | 177 + .../src/main/jni/deps/curl-7.73.0/lib/mime.c | 2059 + .../src/main/jni/deps/curl-7.73.0/lib/mime.h | 170 + .../jni/deps/curl-7.73.0/lib/mk-ca-bundle.pl | 609 + .../jni/deps/curl-7.73.0/lib/mk-ca-bundle.vbs | 431 + .../main/jni/deps/curl-7.73.0/lib/mprintf.c | 1157 + .../src/main/jni/deps/curl-7.73.0/lib/mqtt.c | 629 + .../src/main/jni/deps/curl-7.73.0/lib/mqtt.h | 59 + .../src/main/jni/deps/curl-7.73.0/lib/multi.c | 3568 ++ .../jni/deps/curl-7.73.0/lib/multihandle.h | 156 + .../main/jni/deps/curl-7.73.0/lib/multiif.h | 98 + .../src/main/jni/deps/curl-7.73.0/lib/netrc.c | 278 + .../src/main/jni/deps/curl-7.73.0/lib/netrc.h | 45 + .../main/jni/deps/curl-7.73.0/lib/non-ascii.c | 332 + .../main/jni/deps/curl-7.73.0/lib/non-ascii.h | 61 + .../main/jni/deps/curl-7.73.0/lib/nonblock.c | 91 + .../main/jni/deps/curl-7.73.0/lib/nonblock.h | 30 + .../src/main/jni/deps/curl-7.73.0/lib/nwlib.c | 327 + .../src/main/jni/deps/curl-7.73.0/lib/nwos.c | 88 + .../main/jni/deps/curl-7.73.0/lib/openldap.c | 760 + .../main/jni/deps/curl-7.73.0/lib/parsedate.c | 601 + .../main/jni/deps/curl-7.73.0/lib/parsedate.h | 36 + .../main/jni/deps/curl-7.73.0/lib/pingpong.c | 512 + .../main/jni/deps/curl-7.73.0/lib/pingpong.h | 153 + .../src/main/jni/deps/curl-7.73.0/lib/pop3.c | 1547 + .../src/main/jni/deps/curl-7.73.0/lib/pop3.h | 95 + .../main/jni/deps/curl-7.73.0/lib/progress.c | 630 + .../main/jni/deps/curl-7.73.0/lib/progress.h | 64 + .../src/main/jni/deps/curl-7.73.0/lib/psl.c | 111 + .../src/main/jni/deps/curl-7.73.0/lib/psl.h | 47 + .../src/main/jni/deps/curl-7.73.0/lib/quic.h | 59 + .../src/main/jni/deps/curl-7.73.0/lib/rand.c | 186 + .../src/main/jni/deps/curl-7.73.0/lib/rand.h | 49 + .../main/jni/deps/curl-7.73.0/lib/rename.c | 71 + .../main/jni/deps/curl-7.73.0/lib/rename.h | 27 + .../src/main/jni/deps/curl-7.73.0/lib/rtsp.c | 820 + .../src/main/jni/deps/curl-7.73.0/lib/rtsp.h | 66 + .../main/jni/deps/curl-7.73.0/lib/select.c | 469 + .../main/jni/deps/curl-7.73.0/lib/select.h | 124 + .../src/main/jni/deps/curl-7.73.0/lib/sendf.c | 764 + .../src/main/jni/deps/curl-7.73.0/lib/sendf.h | 89 + .../main/jni/deps/curl-7.73.0/lib/setopt.c | 2900 + .../main/jni/deps/curl-7.73.0/lib/setopt.h | 30 + .../jni/deps/curl-7.73.0/lib/setup-os400.h | 227 + .../main/jni/deps/curl-7.73.0/lib/setup-vms.h | 443 + .../jni/deps/curl-7.73.0/lib/setup-win32.h | 122 + .../main/jni/deps/curl-7.73.0/lib/sha256.c | 494 + .../src/main/jni/deps/curl-7.73.0/lib/share.c | 259 + .../src/main/jni/deps/curl-7.73.0/lib/share.h | 66 + .../main/jni/deps/curl-7.73.0/lib/sigpipe.h | 79 + .../src/main/jni/deps/curl-7.73.0/lib/slist.c | 144 + .../src/main/jni/deps/curl-7.73.0/lib/slist.h | 39 + .../src/main/jni/deps/curl-7.73.0/lib/smb.c | 1000 + .../src/main/jni/deps/curl-7.73.0/lib/smb.h | 255 + .../src/main/jni/deps/curl-7.73.0/lib/smtp.c | 1892 + .../src/main/jni/deps/curl-7.73.0/lib/smtp.h | 96 + .../main/jni/deps/curl-7.73.0/lib/sockaddr.h | 42 + .../jni/deps/curl-7.73.0/lib/socketpair.c | 121 + .../jni/deps/curl-7.73.0/lib/socketpair.h | 36 + .../src/main/jni/deps/curl-7.73.0/lib/socks.c | 1031 + .../src/main/jni/deps/curl-7.73.0/lib/socks.h | 80 + .../jni/deps/curl-7.73.0/lib/socks_gssapi.c | 532 + .../jni/deps/curl-7.73.0/lib/socks_sspi.c | 609 + .../jni/deps/curl-7.73.0/lib/speedcheck.c | 73 + .../jni/deps/curl-7.73.0/lib/speedcheck.h | 33 + .../src/main/jni/deps/curl-7.73.0/lib/splay.c | 276 + .../src/main/jni/deps/curl-7.73.0/lib/splay.h | 62 + .../main/jni/deps/curl-7.73.0/lib/strcase.c | 263 + .../main/jni/deps/curl-7.73.0/lib/strcase.h | 51 + .../main/jni/deps/curl-7.73.0/lib/strdup.c | 95 + .../main/jni/deps/curl-7.73.0/lib/strdup.h | 32 + .../main/jni/deps/curl-7.73.0/lib/strerror.c | 1005 + .../main/jni/deps/curl-7.73.0/lib/strerror.h | 37 + .../main/jni/deps/curl-7.73.0/lib/strtok.c | 66 + .../main/jni/deps/curl-7.73.0/lib/strtok.h | 34 + .../main/jni/deps/curl-7.73.0/lib/strtoofft.c | 242 + .../main/jni/deps/curl-7.73.0/lib/strtoofft.h | 52 + .../jni/deps/curl-7.73.0/lib/system_win32.c | 237 + .../jni/deps/curl-7.73.0/lib/system_win32.h | 46 + .../main/jni/deps/curl-7.73.0/lib/telnet.c | 1587 + .../main/jni/deps/curl-7.73.0/lib/telnet.h | 28 + .../src/main/jni/deps/curl-7.73.0/lib/tftp.c | 1426 + .../src/main/jni/deps/curl-7.73.0/lib/tftp.h | 28 + .../main/jni/deps/curl-7.73.0/lib/timeval.c | 206 + .../main/jni/deps/curl-7.73.0/lib/timeval.h | 58 + .../main/jni/deps/curl-7.73.0/lib/transfer.c | 1930 + .../main/jni/deps/curl-7.73.0/lib/transfer.h | 72 + .../src/main/jni/deps/curl-7.73.0/lib/url.c | 4048 ++ .../src/main/jni/deps/curl-7.73.0/lib/url.h | 97 + .../jni/deps/curl-7.73.0/lib/urlapi-int.h | 34 + .../main/jni/deps/curl-7.73.0/lib/urlapi.c | 1490 + .../main/jni/deps/curl-7.73.0/lib/urldata.h | 1924 + .../deps/curl-7.73.0/lib/vauth/cleartext.c | 170 + .../jni/deps/curl-7.73.0/lib/vauth/cram.c | 138 + .../jni/deps/curl-7.73.0/lib/vauth/digest.c | 997 + .../jni/deps/curl-7.73.0/lib/vauth/digest.h | 47 + .../deps/curl-7.73.0/lib/vauth/digest_sspi.c | 683 + .../deps/curl-7.73.0/lib/vauth/krb5_gssapi.c | 401 + .../deps/curl-7.73.0/lib/vauth/krb5_sspi.c | 533 + .../jni/deps/curl-7.73.0/lib/vauth/ntlm.c | 876 + .../jni/deps/curl-7.73.0/lib/vauth/ntlm.h | 143 + .../deps/curl-7.73.0/lib/vauth/ntlm_sspi.c | 383 + .../jni/deps/curl-7.73.0/lib/vauth/oauth2.c | 126 + .../curl-7.73.0/lib/vauth/spnego_gssapi.c | 282 + .../deps/curl-7.73.0/lib/vauth/spnego_sspi.c | 371 + .../jni/deps/curl-7.73.0/lib/vauth/vauth.c | 147 + .../jni/deps/curl-7.73.0/lib/vauth/vauth.h | 215 + .../main/jni/deps/curl-7.73.0/lib/version.c | 546 + .../jni/deps/curl-7.73.0/lib/version_win32.c | 226 + .../jni/deps/curl-7.73.0/lib/version_win32.h | 53 + .../jni/deps/curl-7.73.0/lib/vquic/ngtcp2.c | 1947 + .../jni/deps/curl-7.73.0/lib/vquic/ngtcp2.h | 73 + .../jni/deps/curl-7.73.0/lib/vquic/quiche.c | 860 + .../jni/deps/curl-7.73.0/lib/vquic/quiche.h | 49 + .../jni/deps/curl-7.73.0/lib/vquic/vquic.c | 85 + .../jni/deps/curl-7.73.0/lib/vquic/vquic.h | 34 + .../jni/deps/curl-7.73.0/lib/vssh/libssh.c | 2923 + .../jni/deps/curl-7.73.0/lib/vssh/libssh2.c | 3612 ++ .../main/jni/deps/curl-7.73.0/lib/vssh/ssh.h | 264 + .../jni/deps/curl-7.73.0/lib/vssh/wolfssh.c | 1156 + .../jni/deps/curl-7.73.0/lib/vtls/bearssl.c | 877 + .../jni/deps/curl-7.73.0/lib/vtls/bearssl.h | 32 + .../jni/deps/curl-7.73.0/lib/vtls/gskit.c | 1288 + .../jni/deps/curl-7.73.0/lib/vtls/gskit.h | 38 + .../main/jni/deps/curl-7.73.0/lib/vtls/gtls.c | 1693 + .../main/jni/deps/curl-7.73.0/lib/vtls/gtls.h | 34 + .../jni/deps/curl-7.73.0/lib/vtls/keylog.c | 156 + .../jni/deps/curl-7.73.0/lib/vtls/keylog.h | 56 + .../jni/deps/curl-7.73.0/lib/vtls/mbedtls.c | 1112 + .../jni/deps/curl-7.73.0/lib/vtls/mbedtls.h | 32 + .../curl-7.73.0/lib/vtls/mbedtls_threadlock.c | 144 + .../curl-7.73.0/lib/vtls/mbedtls_threadlock.h | 48 + .../jni/deps/curl-7.73.0/lib/vtls/mesalink.c | 661 + .../jni/deps/curl-7.73.0/lib/vtls/mesalink.h | 32 + .../main/jni/deps/curl-7.73.0/lib/vtls/nss.c | 2464 + .../main/jni/deps/curl-7.73.0/lib/vtls/nssg.h | 39 + .../jni/deps/curl-7.73.0/lib/vtls/openssl.c | 4445 ++ .../jni/deps/curl-7.73.0/lib/vtls/openssl.h | 37 + .../jni/deps/curl-7.73.0/lib/vtls/schannel.c | 2444 + .../jni/deps/curl-7.73.0/lib/vtls/schannel.h | 108 + .../curl-7.73.0/lib/vtls/schannel_verify.c | 700 + .../jni/deps/curl-7.73.0/lib/vtls/sectransp.c | 3326 ++ .../jni/deps/curl-7.73.0/lib/vtls/sectransp.h | 32 + .../main/jni/deps/curl-7.73.0/lib/vtls/vtls.c | 1426 + .../main/jni/deps/curl-7.73.0/lib/vtls/vtls.h | 291 + .../jni/deps/curl-7.73.0/lib/vtls/wolfssl.c | 1149 + .../jni/deps/curl-7.73.0/lib/vtls/wolfssl.h | 31 + .../main/jni/deps/curl-7.73.0/lib/warnless.c | 508 + .../main/jni/deps/curl-7.73.0/lib/warnless.h | 99 + .../main/jni/deps/curl-7.73.0/lib/wildcard.c | 73 + .../main/jni/deps/curl-7.73.0/lib/wildcard.h | 67 + .../main/jni/deps/curl-7.73.0/lib/x509asn1.c | 1282 + .../main/jni/deps/curl-7.73.0/lib/x509asn1.h | 133 + .../main/jni/deps/curl-7.73.0/libcurl.pc.in | 39 + .../src/main/jni/deps/curl-7.73.0/ltmain.sh | 11251 ++++ .../curl-7.73.0/m4/ax_compile_check_sizeof.m4 | 115 + .../jni/deps/curl-7.73.0/m4/curl-compilers.m4 | 1681 + .../jni/deps/curl-7.73.0/m4/curl-confopts.m4 | 686 + .../jni/deps/curl-7.73.0/m4/curl-functions.m4 | 7336 +++ .../jni/deps/curl-7.73.0/m4/curl-openssl.m4 | 278 + .../jni/deps/curl-7.73.0/m4/curl-override.m4 | 96 + .../jni/deps/curl-7.73.0/m4/curl-reentrant.m4 | 616 + .../main/jni/deps/curl-7.73.0/m4/libtool.m4 | 8394 +++ .../main/jni/deps/curl-7.73.0/m4/ltoptions.m4 | 437 + .../main/jni/deps/curl-7.73.0/m4/ltsugar.m4 | 124 + .../main/jni/deps/curl-7.73.0/m4/ltversion.m4 | 23 + .../jni/deps/curl-7.73.0/m4/lt~obsolete.m4 | 99 + .../jni/deps/curl-7.73.0/m4/xc-am-iface.m4 | 252 + .../jni/deps/curl-7.73.0/m4/xc-cc-check.m4 | 95 + .../jni/deps/curl-7.73.0/m4/xc-lt-iface.m4 | 464 + .../jni/deps/curl-7.73.0/m4/xc-translit.m4 | 163 + .../jni/deps/curl-7.73.0/m4/xc-val-flgs.m4 | 242 + .../jni/deps/curl-7.73.0/m4/zz40-xc-ovr.m4 | 665 + .../jni/deps/curl-7.73.0/m4/zz50-xc-ovr.m4 | 59 + .../jni/deps/curl-7.73.0/m4/zz60-xc-ovr.m4 | 63 + .../src/main/jni/deps/curl-7.73.0/maketgz | 217 + .../src/main/jni/deps/curl-7.73.0/missing | 215 + .../curl-7.73.0/packages/Android/Android.mk | 131 + .../jni/deps/curl-7.73.0/packages/DOS/README | 11 + .../deps/curl-7.73.0/packages/DOS/common.dj | 157 + .../jni/deps/curl-7.73.0/packages/Makefile.am | 43 + .../jni/deps/curl-7.73.0/packages/Makefile.in | 769 + .../curl-7.73.0/packages/OS400/README.OS400 | 341 + .../curl-7.73.0/packages/OS400/ccsidcurl.c | 1475 + .../curl-7.73.0/packages/OS400/ccsidcurl.h | 93 + .../curl-7.73.0/packages/OS400/chkstrings.c | 62 + .../curl-7.73.0/packages/OS400/curl.inc.in | 2848 + .../curl-7.73.0/packages/OS400/initscript.sh | 282 + .../packages/OS400/make-include.sh | 104 + .../curl-7.73.0/packages/OS400/make-lib.sh | 245 + .../curl-7.73.0/packages/OS400/make-src.sh | 25 + .../curl-7.73.0/packages/OS400/make-tests.sh | 135 + .../curl-7.73.0/packages/OS400/makefile.sh | 75 + .../curl-7.73.0/packages/OS400/os400sys.c | 1492 + .../curl-7.73.0/packages/OS400/os400sys.h | 55 + .../main/jni/deps/curl-7.73.0/packages/README | 27 + .../deps/curl-7.73.0/packages/TPF/curl.mak | 80 + .../curl-7.73.0/packages/TPF/maketpf.env_curl | 45 + .../packages/TPF/maketpf.env_curllib | 77 + .../deps/curl-7.73.0/packages/vms/Makefile.am | 57 + .../deps/curl-7.73.0/packages/vms/Makefile.in | 604 + .../packages/vms/backup_gnv_curl_src.com | 132 + .../packages/vms/build_curl-config_script.com | 154 + .../packages/vms/build_gnv_curl.com | 38 + .../packages/vms/build_gnv_curl_pcsi_desc.com | 492 + .../packages/vms/build_gnv_curl_pcsi_text.com | 198 + .../vms/build_gnv_curl_release_notes.com | 102 + .../packages/vms/build_libcurl_pc.com | 205 + .../curl-7.73.0/packages/vms/build_vms.com | 1038 + .../packages/vms/clean_gnv_curl.com | 241 + .../packages/vms/compare_curl_source.com | 371 + .../curl-7.73.0/packages/vms/config_h.com | 2149 + .../curl-7.73.0/packages/vms/curl_crtl_init.c | 331 + .../packages/vms/curl_gnv_build_steps.txt | 288 + .../packages/vms/curl_release_note_start.txt | 77 + .../curl-7.73.0/packages/vms/curl_startup.com | 100 + .../deps/curl-7.73.0/packages/vms/curlmsg.h | 141 + .../deps/curl-7.73.0/packages/vms/curlmsg.msg | 132 + .../deps/curl-7.73.0/packages/vms/curlmsg.sdl | 116 + .../curl-7.73.0/packages/vms/curlmsg_vms.h | 141 + .../vms/generate_config_vms_h_curl.com | 466 + .../packages/vms/generate_vax_transfer.com | 274 + .../packages/vms/gnv_conftest.c_first | 60 + .../packages/vms/gnv_curl_configure.sh | 46 + .../packages/vms/gnv_libcurl_symbols.opt | 181 + .../packages/vms/gnv_link_curl.com | 852 + .../packages/vms/macro32_exactcase.patch | 11 + .../packages/vms/make_gnv_curl_install.sh | 45 + .../packages/vms/make_pcsi_curl_kit_name.com | 190 + .../packages/vms/pcsi_gnv_curl_file_list.txt | 126 + .../packages/vms/pcsi_product_gnv_curl.com | 199 + .../jni/deps/curl-7.73.0/packages/vms/readme | 228 + .../packages/vms/report_openssl_version.c | 100 + .../packages/vms/setup_gnv_curl_build.com | 288 + .../packages/vms/stage_curl_install.com | 173 + .../curl-7.73.0/packages/vms/vms_eco_level.h | 30 + .../main/jni/deps/curl-7.73.0/plan9/README | 55 + .../jni/deps/curl-7.73.0/plan9/include/mkfile | 34 + .../jni/deps/curl-7.73.0/plan9/lib/mkfile | 39 + .../jni/deps/curl-7.73.0/plan9/lib/mkfile.inc | 25 + .../main/jni/deps/curl-7.73.0/plan9/mkfile | 36 + .../jni/deps/curl-7.73.0/plan9/mkfile.proto | 30 + .../jni/deps/curl-7.73.0/plan9/src/mkfile | 45 + .../jni/deps/curl-7.73.0/plan9/src/mkfile.inc | 25 + .../main/jni/deps/curl-7.73.0/projects/README | 159 + .../projects/Windows/VC10/curl-all.sln | 298 + .../projects/Windows/VC10/lib/libcurl.sln | 181 + .../projects/Windows/VC10/lib/libcurl.vcxproj | 2619 + .../Windows/VC10/lib/libcurl.vcxproj.filters | 17 + .../projects/Windows/VC10/src/curl.sln | 181 + .../projects/Windows/VC10/src/curl.vcxproj | 2740 + .../Windows/VC10/src/curl.vcxproj.filters | 17 + .../projects/Windows/VC11/curl-all.sln | 298 + .../projects/Windows/VC11/lib/libcurl.sln | 181 + .../projects/Windows/VC11/lib/libcurl.vcxproj | 2675 + .../Windows/VC11/lib/libcurl.vcxproj.filters | 17 + .../projects/Windows/VC11/src/curl.sln | 181 + .../projects/Windows/VC11/src/curl.vcxproj | 2796 + .../Windows/VC11/src/curl.vcxproj.filters | 17 + .../projects/Windows/VC12/curl-all.sln | 298 + .../projects/Windows/VC12/lib/libcurl.sln | 181 + .../projects/Windows/VC12/lib/libcurl.vcxproj | 2675 + .../Windows/VC12/lib/libcurl.vcxproj.filters | 17 + .../projects/Windows/VC12/src/curl.sln | 181 + .../projects/Windows/VC12/src/curl.vcxproj | 2796 + .../Windows/VC12/src/curl.vcxproj.filters | 17 + .../projects/Windows/VC14/curl-all.sln | 298 + .../projects/Windows/VC14/lib/libcurl.sln | 181 + .../projects/Windows/VC14/lib/libcurl.vcxproj | 2675 + .../Windows/VC14/lib/libcurl.vcxproj.filters | 17 + .../projects/Windows/VC14/src/curl.sln | 181 + .../projects/Windows/VC14/src/curl.vcxproj | 2796 + .../Windows/VC14/src/curl.vcxproj.filters | 17 + .../projects/Windows/VC15/curl-all.sln | 298 + .../projects/Windows/VC15/lib/libcurl.sln | 181 + .../projects/Windows/VC15/lib/libcurl.vcxproj | 2647 + .../Windows/VC15/lib/libcurl.vcxproj.filters | 17 + .../projects/Windows/VC15/src/curl.sln | 181 + .../projects/Windows/VC15/src/curl.vcxproj | 2768 + .../Windows/VC15/src/curl.vcxproj.filters | 17 + .../projects/Windows/VC6/curl-all.dsw | 44 + .../projects/Windows/VC6/lib/libcurl.dsp | 1881 + .../projects/Windows/VC6/lib/libcurl.dsw | 29 + .../projects/Windows/VC6/src/curl.dsp | 1098 + .../projects/Windows/VC6/src/curl.dsw | 29 + .../projects/Windows/VC7.1/curl-all.sln | 140 + .../projects/Windows/VC7.1/lib/libcurl.sln | 87 + .../projects/Windows/VC7.1/lib/libcurl.vcproj | 2173 + .../projects/Windows/VC7.1/src/curl.sln | 87 + .../projects/Windows/VC7.1/src/curl.vcproj | 1682 + .../projects/Windows/VC7/curl-all.sln | 138 + .../projects/Windows/VC7/lib/libcurl.sln | 87 + .../projects/Windows/VC7/lib/libcurl.vcproj | 2027 + .../projects/Windows/VC7/src/curl.sln | 87 + .../projects/Windows/VC7/src/curl.vcproj | 1536 + .../projects/Windows/VC8/curl-all.sln | 258 + .../projects/Windows/VC8/lib/libcurl.sln | 157 + .../projects/Windows/VC8/lib/libcurl.vcproj | 4819 ++ .../projects/Windows/VC8/src/curl.sln | 157 + .../projects/Windows/VC8/src/curl.vcproj | 4503 ++ .../projects/Windows/VC9/curl-all.sln | 258 + .../projects/Windows/VC9/lib/libcurl.sln | 157 + .../projects/Windows/VC9/lib/libcurl.vcproj | 4760 ++ .../projects/Windows/VC9/src/curl.sln | 157 + .../projects/Windows/VC9/src/curl.vcproj | 4360 ++ .../curl-7.73.0/projects/build-openssl.bat | 695 + .../curl-7.73.0/projects/build-wolfssl.bat | 392 + .../deps/curl-7.73.0/projects/checksrc.bat | 223 + .../deps/curl-7.73.0/projects/generate.bat | 478 + .../curl-7.73.0/projects/wolfssl_options.h | 244 + .../projects/wolfssl_override.props | 40 + .../jni/deps/curl-7.73.0/scripts/Makefile.am | 57 + .../jni/deps/curl-7.73.0/scripts/Makefile.in | 591 + .../deps/curl-7.73.0/scripts/completion.pl | 155 + .../jni/deps/curl-7.73.0/scripts/coverage.sh | 37 + .../curl-7.73.0/scripts/updatemanpages.pl | 355 + .../jni/deps/curl-7.73.0/src/CMakeLists.txt | 114 + .../main/jni/deps/curl-7.73.0/src/Makefile.am | 155 + .../main/jni/deps/curl-7.73.0/src/Makefile.in | 2671 + .../jni/deps/curl-7.73.0/src/Makefile.inc | 144 + .../jni/deps/curl-7.73.0/src/Makefile.m32 | 417 + .../jni/deps/curl-7.73.0/src/Makefile.netware | 502 + .../src/main/jni/deps/curl-7.73.0/src/curl.rc | 111 + .../deps/curl-7.73.0/src/macos/MACINSTALL.TXT | 1 + .../src/macos/curl.mcp.xml.sit.hqx | 1 + .../src/macos/src/curl_GUSIConfig.cpp | 1 + .../curl-7.73.0/src/macos/src/macos_main.cpp | 1 + .../jni/deps/curl-7.73.0/src/makefile.amiga | 50 + .../main/jni/deps/curl-7.73.0/src/makefile.dj | 93 + .../main/jni/deps/curl-7.73.0/src/mkhelp.pl | 235 + .../main/jni/deps/curl-7.73.0/src/slist_wc.c | 72 + .../main/jni/deps/curl-7.73.0/src/slist_wc.h | 55 + .../jni/deps/curl-7.73.0/src/tool_binmode.c | 51 + .../jni/deps/curl-7.73.0/src/tool_binmode.h | 36 + .../jni/deps/curl-7.73.0/src/tool_bname.c | 49 + .../jni/deps/curl-7.73.0/src/tool_bname.h | 34 + .../jni/deps/curl-7.73.0/src/tool_cb_dbg.c | 282 + .../jni/deps/curl-7.73.0/src/tool_cb_dbg.h | 34 + .../jni/deps/curl-7.73.0/src/tool_cb_hdr.c | 313 + .../jni/deps/curl-7.73.0/src/tool_cb_hdr.h | 56 + .../jni/deps/curl-7.73.0/src/tool_cb_prg.c | 273 + .../jni/deps/curl-7.73.0/src/tool_cb_prg.h | 52 + .../jni/deps/curl-7.73.0/src/tool_cb_rea.c | 79 + .../jni/deps/curl-7.73.0/src/tool_cb_rea.h | 40 + .../jni/deps/curl-7.73.0/src/tool_cb_see.c | 132 + .../jni/deps/curl-7.73.0/src/tool_cb_see.h | 44 + .../jni/deps/curl-7.73.0/src/tool_cb_wrt.c | 249 + .../jni/deps/curl-7.73.0/src/tool_cb_wrt.h | 36 + .../jni/deps/curl-7.73.0/src/tool_cfgable.c | 184 + .../jni/deps/curl-7.73.0/src/tool_cfgable.h | 324 + .../jni/deps/curl-7.73.0/src/tool_convert.c | 147 + .../jni/deps/curl-7.73.0/src/tool_convert.h | 44 + .../jni/deps/curl-7.73.0/src/tool_dirhie.c | 170 + .../jni/deps/curl-7.73.0/src/tool_dirhie.h | 28 + .../jni/deps/curl-7.73.0/src/tool_doswin.c | 722 + .../jni/deps/curl-7.73.0/src/tool_doswin.h | 70 + .../jni/deps/curl-7.73.0/src/tool_easysrc.c | 236 + .../jni/deps/curl-7.73.0/src/tool_easysrc.h | 49 + .../jni/deps/curl-7.73.0/src/tool_filetime.c | 161 + .../jni/deps/curl-7.73.0/src/tool_filetime.h | 37 + .../jni/deps/curl-7.73.0/src/tool_formparse.c | 920 + .../jni/deps/curl-7.73.0/src/tool_formparse.h | 71 + .../jni/deps/curl-7.73.0/src/tool_getparam.c | 2345 + .../jni/deps/curl-7.73.0/src/tool_getparam.h | 65 + .../jni/deps/curl-7.73.0/src/tool_getpass.c | 252 + .../jni/deps/curl-7.73.0/src/tool_getpass.h | 36 + .../main/jni/deps/curl-7.73.0/src/tool_help.c | 1001 + .../main/jni/deps/curl-7.73.0/src/tool_help.h | 30 + .../jni/deps/curl-7.73.0/src/tool_helpers.c | 122 + .../jni/deps/curl-7.73.0/src/tool_helpers.h | 34 + .../jni/deps/curl-7.73.0/src/tool_homedir.c | 131 + .../jni/deps/curl-7.73.0/src/tool_homedir.h | 28 + .../jni/deps/curl-7.73.0/src/tool_hugehelp.c | 9087 +++ .../jni/deps/curl-7.73.0/src/tool_hugehelp.h | 28 + .../jni/deps/curl-7.73.0/src/tool_libinfo.c | 101 + .../jni/deps/curl-7.73.0/src/tool_libinfo.h | 33 + .../main/jni/deps/curl-7.73.0/src/tool_main.c | 344 + .../main/jni/deps/curl-7.73.0/src/tool_main.h | 46 + .../jni/deps/curl-7.73.0/src/tool_metalink.c | 937 + .../jni/deps/curl-7.73.0/src/tool_metalink.h | 165 + .../main/jni/deps/curl-7.73.0/src/tool_msgs.c | 139 + .../main/jni/deps/curl-7.73.0/src/tool_msgs.h | 31 + .../jni/deps/curl-7.73.0/src/tool_operate.c | 2635 + .../jni/deps/curl-7.73.0/src/tool_operate.h | 81 + .../jni/deps/curl-7.73.0/src/tool_operhlp.c | 197 + .../jni/deps/curl-7.73.0/src/tool_operhlp.h | 38 + .../jni/deps/curl-7.73.0/src/tool_panykey.c | 45 + .../jni/deps/curl-7.73.0/src/tool_panykey.h | 32 + .../jni/deps/curl-7.73.0/src/tool_paramhlp.c | 594 + .../jni/deps/curl-7.73.0/src/tool_paramhlp.h | 57 + .../jni/deps/curl-7.73.0/src/tool_parsecfg.c | 368 + .../jni/deps/curl-7.73.0/src/tool_parsecfg.h | 28 + .../jni/deps/curl-7.73.0/src/tool_progress.c | 321 + .../jni/deps/curl-7.73.0/src/tool_progress.h | 39 + .../jni/deps/curl-7.73.0/src/tool_sdecls.h | 149 + .../jni/deps/curl-7.73.0/src/tool_setopt.c | 874 + .../jni/deps/curl-7.73.0/src/tool_setopt.h | 161 + .../jni/deps/curl-7.73.0/src/tool_setup.h | 73 + .../jni/deps/curl-7.73.0/src/tool_sleep.c | 59 + .../jni/deps/curl-7.73.0/src/tool_sleep.h | 28 + .../jni/deps/curl-7.73.0/src/tool_strdup.c | 42 + .../jni/deps/curl-7.73.0/src/tool_strdup.h | 30 + .../jni/deps/curl-7.73.0/src/tool_urlglob.c | 705 + .../jni/deps/curl-7.73.0/src/tool_urlglob.h | 76 + .../main/jni/deps/curl-7.73.0/src/tool_util.c | 135 + .../main/jni/deps/curl-7.73.0/src/tool_util.h | 36 + .../jni/deps/curl-7.73.0/src/tool_version.h | 34 + .../main/jni/deps/curl-7.73.0/src/tool_vms.c | 218 + .../main/jni/deps/curl-7.73.0/src/tool_vms.h | 46 + .../jni/deps/curl-7.73.0/src/tool_writeout.c | 389 + .../jni/deps/curl-7.73.0/src/tool_writeout.h | 87 + .../deps/curl-7.73.0/src/tool_writeout_json.c | 203 + .../deps/curl-7.73.0/src/tool_writeout_json.h | 30 + .../jni/deps/curl-7.73.0/src/tool_xattr.c | 139 + .../jni/deps/curl-7.73.0/src/tool_xattr.h | 28 + .../src/main/jni/deps/curl-7.73.0/test-driver | 148 + .../jni/deps/curl-7.73.0/tests/CMakeLists.txt | 51 + .../jni/deps/curl-7.73.0/tests/FILEFORMAT.md | 554 + .../jni/deps/curl-7.73.0/tests/Makefile.am | 120 + .../jni/deps/curl-7.73.0/tests/Makefile.in | 834 + .../main/jni/deps/curl-7.73.0/tests/README.md | 229 + .../jni/deps/curl-7.73.0/tests/appveyor.pm | 115 + .../main/jni/deps/curl-7.73.0/tests/azure.pm | 149 + .../jni/deps/curl-7.73.0/tests/badsymbols.pl | 132 + .../tests/certs/EdelCurlRoot-ca.cacert | 84 + .../tests/certs/EdelCurlRoot-ca.cnf | 11 + .../tests/certs/EdelCurlRoot-ca.crt | 84 + .../tests/certs/EdelCurlRoot-ca.csr | 17 + .../tests/certs/EdelCurlRoot-ca.der | Bin 0 -> 918 bytes .../tests/certs/EdelCurlRoot-ca.key | 27 + .../tests/certs/EdelCurlRoot-ca.prm | 17 + .../deps/curl-7.73.0/tests/certs/Makefile.am | 116 + .../deps/curl-7.73.0/tests/certs/Makefile.in | 840 + .../certs/Server-localhost-firstSAN-sv.crl | 15 + .../certs/Server-localhost-firstSAN-sv.crt | 92 + .../certs/Server-localhost-firstSAN-sv.csr | 16 + .../certs/Server-localhost-firstSAN-sv.der | Bin 0 -> 994 bytes .../certs/Server-localhost-firstSAN-sv.dhp | 0 .../certs/Server-localhost-firstSAN-sv.key | 27 + .../certs/Server-localhost-firstSAN-sv.pem | 144 + .../Server-localhost-firstSAN-sv.pub.der | Bin 0 -> 294 bytes .../Server-localhost-firstSAN-sv.pub.pem | 9 + .../certs/Server-localhost-lastSAN-sv.crl | 12 + .../certs/Server-localhost-lastSAN-sv.crt | 93 + .../certs/Server-localhost-lastSAN-sv.csr | 16 + .../certs/Server-localhost-lastSAN-sv.der | Bin 0 -> 994 bytes .../certs/Server-localhost-lastSAN-sv.dhp | 0 .../certs/Server-localhost-lastSAN-sv.key | 27 + .../certs/Server-localhost-lastSAN-sv.pem | 145 + .../certs/Server-localhost-lastSAN-sv.pub.der | Bin 0 -> 294 bytes .../certs/Server-localhost-lastSAN-sv.pub.pem | 9 + .../tests/certs/Server-localhost-sv.crl | 12 + .../tests/certs/Server-localhost-sv.crt | 92 + .../tests/certs/Server-localhost-sv.csr | 16 + .../tests/certs/Server-localhost-sv.der | Bin 0 -> 967 bytes .../tests/certs/Server-localhost-sv.dhp | 0 .../tests/certs/Server-localhost-sv.key | 27 + .../tests/certs/Server-localhost-sv.pem | 144 + .../tests/certs/Server-localhost-sv.prm | 25 + .../tests/certs/Server-localhost-sv.pub.der | Bin 0 -> 294 bytes .../tests/certs/Server-localhost-sv.pub.pem | 9 + .../tests/certs/Server-localhost.nn-sv.crl | 13 + .../tests/certs/Server-localhost.nn-sv.crt | 92 + .../tests/certs/Server-localhost.nn-sv.csr | 16 + .../tests/certs/Server-localhost.nn-sv.der | Bin 0 -> 973 bytes .../tests/certs/Server-localhost.nn-sv.dhp | 0 .../tests/certs/Server-localhost.nn-sv.key | 27 + .../tests/certs/Server-localhost.nn-sv.pem | 144 + .../tests/certs/Server-localhost.nn-sv.prm | 25 + .../certs/Server-localhost.nn-sv.pub.der | Bin 0 -> 294 bytes .../certs/Server-localhost.nn-sv.pub.pem | 9 + .../tests/certs/Server-localhost0h-sv.crl | 14 + .../tests/certs/Server-localhost0h-sv.crt | 92 + .../tests/certs/Server-localhost0h-sv.csr | 16 + .../tests/certs/Server-localhost0h-sv.der | Bin 0 -> 969 bytes .../tests/certs/Server-localhost0h-sv.dhp | 0 .../tests/certs/Server-localhost0h-sv.key | 27 + .../tests/certs/Server-localhost0h-sv.pem | 145 + .../tests/certs/Server-localhost0h-sv.prm | 26 + .../tests/certs/Server-localhost0h-sv.pub.der | Bin 0 -> 294 bytes .../tests/certs/Server-localhost0h-sv.pub.pem | 9 + .../tests/certs/scripts/Makefile.am | 28 + .../tests/certs/scripts/Makefile.in | 573 + .../tests/certs/scripts/genroot.sh | 68 + .../tests/certs/scripts/genserv.sh | 118 + .../curl-7.73.0/tests/certs/srp-verifier-conf | 3 + .../curl-7.73.0/tests/certs/srp-verifier-db | 2 + .../deps/curl-7.73.0/tests/curl_test_data.py | 61 + .../curl-7.73.0/tests/data/CMakeLists.txt | 28 + .../jni/deps/curl-7.73.0/tests/data/DISABLED | 25 + .../deps/curl-7.73.0/tests/data/Makefile.am | 50 + .../deps/curl-7.73.0/tests/data/Makefile.in | 820 + .../deps/curl-7.73.0/tests/data/Makefile.inc | 224 + .../jni/deps/curl-7.73.0/tests/data/test1 | 53 + .../jni/deps/curl-7.73.0/tests/data/test10 | 65 + .../jni/deps/curl-7.73.0/tests/data/test100 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1000 | 42 + .../jni/deps/curl-7.73.0/tests/data/test1001 | 106 + .../jni/deps/curl-7.73.0/tests/data/test1002 | 124 + .../jni/deps/curl-7.73.0/tests/data/test1003 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1004 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1005 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1006 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1007 | 42 + .../jni/deps/curl-7.73.0/tests/data/test1008 | 134 + .../jni/deps/curl-7.73.0/tests/data/test1009 | 47 + .../jni/deps/curl-7.73.0/tests/data/test101 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1010 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1011 | 74 + .../jni/deps/curl-7.73.0/tests/data/test1012 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1013 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1014 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1015 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1016 | 39 + .../jni/deps/curl-7.73.0/tests/data/test1017 | 40 + .../jni/deps/curl-7.73.0/tests/data/test1018 | 39 + .../jni/deps/curl-7.73.0/tests/data/test1019 | 42 + .../jni/deps/curl-7.73.0/tests/data/test102 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1020 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1021 | 143 + .../jni/deps/curl-7.73.0/tests/data/test1022 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1023 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1024 | 103 + .../jni/deps/curl-7.73.0/tests/data/test1025 | 105 + .../jni/deps/curl-7.73.0/tests/data/test1026 | 42 + .../jni/deps/curl-7.73.0/tests/data/test1027 | 39 + .../jni/deps/curl-7.73.0/tests/data/test1028 | 88 + .../jni/deps/curl-7.73.0/tests/data/test1029 | 56 + .../jni/deps/curl-7.73.0/tests/data/test103 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1030 | 108 + .../jni/deps/curl-7.73.0/tests/data/test1031 | 75 + .../jni/deps/curl-7.73.0/tests/data/test1032 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1033 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1034 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1035 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1036 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1037 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1038 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1039 | 53 + .../jni/deps/curl-7.73.0/tests/data/test104 | 43 + .../jni/deps/curl-7.73.0/tests/data/test1040 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1041 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1042 | 92 + .../jni/deps/curl-7.73.0/tests/data/test1043 | 82 + .../jni/deps/curl-7.73.0/tests/data/test1044 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1045 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1046 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1047 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1048 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1049 | 47 + .../jni/deps/curl-7.73.0/tests/data/test105 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1050 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1051 | 117 + .../jni/deps/curl-7.73.0/tests/data/test1052 | 110 + .../jni/deps/curl-7.73.0/tests/data/test1053 | 127 + .../jni/deps/curl-7.73.0/tests/data/test1054 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1055 | 94 + .../jni/deps/curl-7.73.0/tests/data/test1056 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1057 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1058 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1059 | 57 + .../jni/deps/curl-7.73.0/tests/data/test106 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1060 | 903 + .../jni/deps/curl-7.73.0/tests/data/test1061 | 908 + .../jni/deps/curl-7.73.0/tests/data/test1062 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1063 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1064 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1065 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1066 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1067 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1068 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1069 | 36 + .../jni/deps/curl-7.73.0/tests/data/test107 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1070 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1071 | 113 + .../jni/deps/curl-7.73.0/tests/data/test1072 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1073 | 70 + .../jni/deps/curl-7.73.0/tests/data/test1074 | 75 + .../jni/deps/curl-7.73.0/tests/data/test1075 | 93 + .../jni/deps/curl-7.73.0/tests/data/test1076 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1077 | 75 + .../jni/deps/curl-7.73.0/tests/data/test1078 | 99 + .../jni/deps/curl-7.73.0/tests/data/test1079 | 75 + .../jni/deps/curl-7.73.0/tests/data/test108 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1080 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1081 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1082 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1083 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1084 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1085 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1086 | 110 + .../jni/deps/curl-7.73.0/tests/data/test1087 | 113 + .../jni/deps/curl-7.73.0/tests/data/test1088 | 115 + .../jni/deps/curl-7.73.0/tests/data/test1089 | 90 + .../jni/deps/curl-7.73.0/tests/data/test109 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1090 | 97 + .../jni/deps/curl-7.73.0/tests/data/test1091 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1092 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1093 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1094 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1095 | 82 + .../jni/deps/curl-7.73.0/tests/data/test1096 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1097 | 80 + .../jni/deps/curl-7.73.0/tests/data/test1098 | 73 + .../jni/deps/curl-7.73.0/tests/data/test1099 | 51 + .../jni/deps/curl-7.73.0/tests/data/test11 | 75 + .../jni/deps/curl-7.73.0/tests/data/test110 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1100 | 115 + .../jni/deps/curl-7.73.0/tests/data/test1101 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1102 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1103 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1104 | 87 + .../jni/deps/curl-7.73.0/tests/data/test1105 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1106 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1107 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1108 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1109 | 44 + .../jni/deps/curl-7.73.0/tests/data/test111 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1110 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1111 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1112 | 114 + .../jni/deps/curl-7.73.0/tests/data/test1113 | 99 + .../jni/deps/curl-7.73.0/tests/data/test1114 | 136 + .../jni/deps/curl-7.73.0/tests/data/test1115 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1116 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1117 | 86 + .../jni/deps/curl-7.73.0/tests/data/test1118 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1119 | 30 + .../jni/deps/curl-7.73.0/tests/data/test112 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1120 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1121 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1122 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1123 | 199 + .../jni/deps/curl-7.73.0/tests/data/test1124 | 67 + .../jni/deps/curl-7.73.0/tests/data/test1125 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1126 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1127 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1128 | 84 + .../jni/deps/curl-7.73.0/tests/data/test1129 | 96 + .../jni/deps/curl-7.73.0/tests/data/test113 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1130 | 96 + .../jni/deps/curl-7.73.0/tests/data/test1131 | 94 + .../jni/deps/curl-7.73.0/tests/data/test1132 | 25 + .../jni/deps/curl-7.73.0/tests/data/test1133 | 102 + .../jni/deps/curl-7.73.0/tests/data/test1134 | 64 + .../jni/deps/curl-7.73.0/tests/data/test1135 | 111 + .../jni/deps/curl-7.73.0/tests/data/test1136 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1137 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1138 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1139 | 33 + .../jni/deps/curl-7.73.0/tests/data/test114 | 38 + .../jni/deps/curl-7.73.0/tests/data/test1140 | 32 + .../jni/deps/curl-7.73.0/tests/data/test1141 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1142 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1143 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1144 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1145 | 40 + .../jni/deps/curl-7.73.0/tests/data/test1146 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1147 | 64 + .../jni/deps/curl-7.73.0/tests/data/test1148 | 67 + .../jni/deps/curl-7.73.0/tests/data/test1149 | 64 + .../jni/deps/curl-7.73.0/tests/data/test115 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1150 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1151 | 64 + .../jni/deps/curl-7.73.0/tests/data/test1152 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1153 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1154 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1155 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1156 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1157 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1158 | 98 + .../jni/deps/curl-7.73.0/tests/data/test1159 | 56 + .../jni/deps/curl-7.73.0/tests/data/test116 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1160 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1161 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1162 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1163 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1164 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1165 | 25 + .../jni/deps/curl-7.73.0/tests/data/test1166 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1167 | 24 + .../jni/deps/curl-7.73.0/tests/data/test1168 | 77 + .../jni/deps/curl-7.73.0/tests/data/test117 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1170 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1171 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1172 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1173 | 26 + .../jni/deps/curl-7.73.0/tests/data/test1174 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1175 | 25 + .../jni/deps/curl-7.73.0/tests/data/test1176 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1177 | 25 + .../jni/deps/curl-7.73.0/tests/data/test1178 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1179 | 43 + .../jni/deps/curl-7.73.0/tests/data/test118 | 49 + .../jni/deps/curl-7.73.0/tests/data/test119 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1190 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1191 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1192 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1193 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1194 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1195 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1196 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1197 | 87 + .../jni/deps/curl-7.73.0/tests/data/test12 | 54 + .../jni/deps/curl-7.73.0/tests/data/test120 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1200 | 39 + .../jni/deps/curl-7.73.0/tests/data/test1201 | 39 + .../jni/deps/curl-7.73.0/tests/data/test1202 | 40 + .../jni/deps/curl-7.73.0/tests/data/test1203 | 43 + .../jni/deps/curl-7.73.0/tests/data/test1204 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1205 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1206 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1207 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1208 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1209 | 58 + .../jni/deps/curl-7.73.0/tests/data/test121 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1210 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1211 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1212 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1213 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1214 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1215 | 105 + .../jni/deps/curl-7.73.0/tests/data/test1216 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1217 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1218 | 64 + .../jni/deps/curl-7.73.0/tests/data/test1219 | 49 + .../jni/deps/curl-7.73.0/tests/data/test122 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1220 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1221 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1222 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1223 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1224 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1225 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1226 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1227 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1228 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1229 | 82 + .../jni/deps/curl-7.73.0/tests/data/test123 | 40 + .../jni/deps/curl-7.73.0/tests/data/test1230 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1231 | 60 + .../jni/deps/curl-7.73.0/tests/data/test1232 | 67 + .../jni/deps/curl-7.73.0/tests/data/test1233 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1234 | 33 + .../jni/deps/curl-7.73.0/tests/data/test1235 | 92 + .../jni/deps/curl-7.73.0/tests/data/test1236 | 33 + .../jni/deps/curl-7.73.0/tests/data/test1237 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1238 | 60 + .../jni/deps/curl-7.73.0/tests/data/test1239 | 66 + .../jni/deps/curl-7.73.0/tests/data/test124 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1240 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1241 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1242 | 43 + .../jni/deps/curl-7.73.0/tests/data/test1243 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1244 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1245 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1246 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1247 | 38 + .../jni/deps/curl-7.73.0/tests/data/test1248 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1249 | 50 + .../jni/deps/curl-7.73.0/tests/data/test125 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1250 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1251 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1252 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1253 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1254 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1255 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1256 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1257 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1258 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1259 | 45 + .../jni/deps/curl-7.73.0/tests/data/test126 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1260 | 36 + .../jni/deps/curl-7.73.0/tests/data/test1261 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1262 | 40 + .../jni/deps/curl-7.73.0/tests/data/test1263 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1264 | 36 + .../jni/deps/curl-7.73.0/tests/data/test1265 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1266 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1267 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1268 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1269 | 34 + .../jni/deps/curl-7.73.0/tests/data/test127 | 46 + .../jni/deps/curl-7.73.0/tests/data/test1270 | 67 + .../jni/deps/curl-7.73.0/tests/data/test1271 | 46 + .../jni/deps/curl-7.73.0/tests/data/test128 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1280 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1281 | 38 + .../jni/deps/curl-7.73.0/tests/data/test1282 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1283 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1284 | 88 + .../jni/deps/curl-7.73.0/tests/data/test1285 | 96 + .../jni/deps/curl-7.73.0/tests/data/test1286 | 111 + .../jni/deps/curl-7.73.0/tests/data/test1287 | 93 + .../jni/deps/curl-7.73.0/tests/data/test1288 | 98 + .../jni/deps/curl-7.73.0/tests/data/test1289 | 35 + .../jni/deps/curl-7.73.0/tests/data/test129 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1290 | 46 + .../jni/deps/curl-7.73.0/tests/data/test1291 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1292 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1293 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1294 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1295 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1296 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1297 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1298 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1299 | 53 + .../jni/deps/curl-7.73.0/tests/data/test13 | 42 + .../jni/deps/curl-7.73.0/tests/data/test130 | 64 + .../jni/deps/curl-7.73.0/tests/data/test1300 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1301 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1302 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1303 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1304 | 26 + .../jni/deps/curl-7.73.0/tests/data/test1305 | 26 + .../jni/deps/curl-7.73.0/tests/data/test1306 | 30 + .../jni/deps/curl-7.73.0/tests/data/test1307 | 24 + .../jni/deps/curl-7.73.0/tests/data/test1308 | 27 + .../jni/deps/curl-7.73.0/tests/data/test1309 | 1564 + .../jni/deps/curl-7.73.0/tests/data/test131 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1310 | 122 + .../jni/deps/curl-7.73.0/tests/data/test1311 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1312 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1313 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1314 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1315 | 83 + .../jni/deps/curl-7.73.0/tests/data/test1316 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1317 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1318 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1319 | 81 + .../jni/deps/curl-7.73.0/tests/data/test132 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1320 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1321 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1322 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1323 | 32 + .../jni/deps/curl-7.73.0/tests/data/test1324 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1325 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1326 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1327 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1328 | 70 + .../jni/deps/curl-7.73.0/tests/data/test1329 | 33 + .../jni/deps/curl-7.73.0/tests/data/test133 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1330 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1331 | 91 + .../jni/deps/curl-7.73.0/tests/data/test1332 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1333 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1334 | 74 + .../jni/deps/curl-7.73.0/tests/data/test1335 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1336 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1337 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1338 | 75 + .../jni/deps/curl-7.73.0/tests/data/test1339 | 72 + .../jni/deps/curl-7.73.0/tests/data/test134 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1340 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1341 | 75 + .../jni/deps/curl-7.73.0/tests/data/test1342 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1343 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1344 | 87 + .../jni/deps/curl-7.73.0/tests/data/test1345 | 84 + .../jni/deps/curl-7.73.0/tests/data/test1346 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1347 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1348 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1349 | 83 + .../jni/deps/curl-7.73.0/tests/data/test135 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1350 | 80 + .../jni/deps/curl-7.73.0/tests/data/test1351 | 84 + .../jni/deps/curl-7.73.0/tests/data/test1352 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1353 | 83 + .../jni/deps/curl-7.73.0/tests/data/test1354 | 78 + .../jni/deps/curl-7.73.0/tests/data/test1355 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1356 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1357 | 99 + .../jni/deps/curl-7.73.0/tests/data/test1358 | 96 + .../jni/deps/curl-7.73.0/tests/data/test1359 | 100 + .../jni/deps/curl-7.73.0/tests/data/test136 | 42 + .../jni/deps/curl-7.73.0/tests/data/test1360 | 97 + .../jni/deps/curl-7.73.0/tests/data/test1361 | 99 + .../jni/deps/curl-7.73.0/tests/data/test1362 | 96 + .../jni/deps/curl-7.73.0/tests/data/test1363 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1364 | 69 + .../jni/deps/curl-7.73.0/tests/data/test1365 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1366 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1367 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1368 | 70 + .../jni/deps/curl-7.73.0/tests/data/test1369 | 67 + .../jni/deps/curl-7.73.0/tests/data/test137 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1370 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1371 | 69 + .../jni/deps/curl-7.73.0/tests/data/test1372 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1373 | 73 + .../jni/deps/curl-7.73.0/tests/data/test1374 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1375 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1376 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1377 | 68 + .../jni/deps/curl-7.73.0/tests/data/test1378 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1379 | 76 + .../jni/deps/curl-7.73.0/tests/data/test138 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1380 | 73 + .../jni/deps/curl-7.73.0/tests/data/test1381 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1382 | 74 + .../jni/deps/curl-7.73.0/tests/data/test1383 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1384 | 73 + .../jni/deps/curl-7.73.0/tests/data/test1385 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1386 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1387 | 91 + .../jni/deps/curl-7.73.0/tests/data/test1388 | 88 + .../jni/deps/curl-7.73.0/tests/data/test1389 | 92 + .../jni/deps/curl-7.73.0/tests/data/test139 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1390 | 89 + .../jni/deps/curl-7.73.0/tests/data/test1391 | 91 + .../jni/deps/curl-7.73.0/tests/data/test1392 | 88 + .../jni/deps/curl-7.73.0/tests/data/test1393 | 71 + .../jni/deps/curl-7.73.0/tests/data/test1394 | 26 + .../jni/deps/curl-7.73.0/tests/data/test1395 | 21 + .../jni/deps/curl-7.73.0/tests/data/test1396 | 24 + .../jni/deps/curl-7.73.0/tests/data/test1397 | 24 + .../jni/deps/curl-7.73.0/tests/data/test1398 | 23 + .../jni/deps/curl-7.73.0/tests/data/test1399 | 22 + .../jni/deps/curl-7.73.0/tests/data/test14 | 41 + .../jni/deps/curl-7.73.0/tests/data/test140 | 42 + .../jni/deps/curl-7.73.0/tests/data/test1400 | 107 + .../jni/deps/curl-7.73.0/tests/data/test1401 | 126 + .../jni/deps/curl-7.73.0/tests/data/test1402 | 112 + .../jni/deps/curl-7.73.0/tests/data/test1403 | 107 + .../jni/deps/curl-7.73.0/tests/data/test1404 | 187 + .../jni/deps/curl-7.73.0/tests/data/test1405 | 143 + .../jni/deps/curl-7.73.0/tests/data/test1406 | 129 + .../jni/deps/curl-7.73.0/tests/data/test1407 | 107 + .../jni/deps/curl-7.73.0/tests/data/test1408 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1409 | 31 + .../jni/deps/curl-7.73.0/tests/data/test141 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1410 | 31 + .../jni/deps/curl-7.73.0/tests/data/test1411 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1412 | 134 + .../jni/deps/curl-7.73.0/tests/data/test1413 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1414 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1415 | 76 + .../jni/deps/curl-7.73.0/tests/data/test1416 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1417 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1418 | 122 + .../jni/deps/curl-7.73.0/tests/data/test1419 | 68 + .../jni/deps/curl-7.73.0/tests/data/test142 | 190 + .../jni/deps/curl-7.73.0/tests/data/test1420 | 111 + .../jni/deps/curl-7.73.0/tests/data/test1421 | 74 + .../jni/deps/curl-7.73.0/tests/data/test1422 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1423 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1424 | 74 + .../jni/deps/curl-7.73.0/tests/data/test1425 | Bin 0 -> 1721 bytes .../jni/deps/curl-7.73.0/tests/data/test1426 | Bin 0 -> 1658 bytes .../jni/deps/curl-7.73.0/tests/data/test1427 | 29 + .../jni/deps/curl-7.73.0/tests/data/test1428 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1429 | 68 + .../jni/deps/curl-7.73.0/tests/data/test143 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1430 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1431 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1432 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1433 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1434 | 88 + .../jni/deps/curl-7.73.0/tests/data/test1435 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1436 | 85 + .../jni/deps/curl-7.73.0/tests/data/test1437 | 82 + .../jni/deps/curl-7.73.0/tests/data/test1438 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1439 | 56 + .../jni/deps/curl-7.73.0/tests/data/test144 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1440 | 35 + .../jni/deps/curl-7.73.0/tests/data/test1441 | 35 + .../jni/deps/curl-7.73.0/tests/data/test1442 | 35 + .../jni/deps/curl-7.73.0/tests/data/test1443 | 66 + .../jni/deps/curl-7.73.0/tests/data/test1444 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1445 | 35 + .../jni/deps/curl-7.73.0/tests/data/test1446 | 42 + .../jni/deps/curl-7.73.0/tests/data/test1447 | 39 + .../jni/deps/curl-7.73.0/tests/data/test1448 | 91 + .../jni/deps/curl-7.73.0/tests/data/test1449 | 38 + .../jni/deps/curl-7.73.0/tests/data/test145 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1450 | 34 + .../jni/deps/curl-7.73.0/tests/data/test1451 | 43 + .../jni/deps/curl-7.73.0/tests/data/test1452 | 43 + .../jni/deps/curl-7.73.0/tests/data/test1453 | 38 + .../jni/deps/curl-7.73.0/tests/data/test1454 | 38 + .../jni/deps/curl-7.73.0/tests/data/test1455 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1456 | 67 + .../jni/deps/curl-7.73.0/tests/data/test1457 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1458 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1459 | 46 + .../jni/deps/curl-7.73.0/tests/data/test146 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1460 | 59 + .../jni/deps/curl-7.73.0/tests/data/test1461 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1462 | 61 + .../jni/deps/curl-7.73.0/tests/data/test1463 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1464 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1465 | Bin 0 -> 2914 bytes .../jni/deps/curl-7.73.0/tests/data/test147 | 55 + .../jni/deps/curl-7.73.0/tests/data/test148 | 49 + .../jni/deps/curl-7.73.0/tests/data/test149 | 53 + .../jni/deps/curl-7.73.0/tests/data/test15 | 55 + .../jni/deps/curl-7.73.0/tests/data/test150 | 101 + .../jni/deps/curl-7.73.0/tests/data/test1500 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1501 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1502 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1503 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1504 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1505 | 55 + .../jni/deps/curl-7.73.0/tests/data/test1506 | 96 + .../jni/deps/curl-7.73.0/tests/data/test1507 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1508 | 31 + .../jni/deps/curl-7.73.0/tests/data/test1509 | 90 + .../jni/deps/curl-7.73.0/tests/data/test151 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1510 | 96 + .../jni/deps/curl-7.73.0/tests/data/test1511 | 70 + .../jni/deps/curl-7.73.0/tests/data/test1512 | 80 + .../jni/deps/curl-7.73.0/tests/data/test1513 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1514 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1515 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1516 | 58 + .../jni/deps/curl-7.73.0/tests/data/test1517 | 69 + .../jni/deps/curl-7.73.0/tests/data/test1518 | 62 + .../jni/deps/curl-7.73.0/tests/data/test1519 | 62 + .../jni/deps/curl-7.73.0/tests/data/test152 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1520 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1521 | 30 + .../jni/deps/curl-7.73.0/tests/data/test1522 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1523 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1524 | 75 + .../jni/deps/curl-7.73.0/tests/data/test1525 | 77 + .../jni/deps/curl-7.73.0/tests/data/test1526 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1527 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1528 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1529 | 46 + .../jni/deps/curl-7.73.0/tests/data/test153 | 156 + .../jni/deps/curl-7.73.0/tests/data/test1530 | 30 + .../jni/deps/curl-7.73.0/tests/data/test1531 | Bin 0 -> 552 bytes .../jni/deps/curl-7.73.0/tests/data/test1532 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1533 | 74 + .../jni/deps/curl-7.73.0/tests/data/test1534 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1535 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1536 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1537 | 45 + .../jni/deps/curl-7.73.0/tests/data/test1538 | 157 + .../jni/deps/curl-7.73.0/tests/data/test1539 | 43 + .../jni/deps/curl-7.73.0/tests/data/test154 | 107 + .../jni/deps/curl-7.73.0/tests/data/test1540 | 64 + .../jni/deps/curl-7.73.0/tests/data/test155 | 140 + .../jni/deps/curl-7.73.0/tests/data/test1550 | 29 + .../jni/deps/curl-7.73.0/tests/data/test1551 | 69 + .../jni/deps/curl-7.73.0/tests/data/test1552 | 52 + .../jni/deps/curl-7.73.0/tests/data/test1553 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1554 | 105 + .../jni/deps/curl-7.73.0/tests/data/test1555 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1556 | 60 + .../jni/deps/curl-7.73.0/tests/data/test1557 | 36 + .../jni/deps/curl-7.73.0/tests/data/test1558 | 46 + .../jni/deps/curl-7.73.0/tests/data/test1559 | 44 + .../jni/deps/curl-7.73.0/tests/data/test156 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1560 | 47 + .../jni/deps/curl-7.73.0/tests/data/test1561 | 103 + .../jni/deps/curl-7.73.0/tests/data/test1562 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1563 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1564 | 31 + .../jni/deps/curl-7.73.0/tests/data/test1565 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1566 | 63 + .../jni/deps/curl-7.73.0/tests/data/test1567 | 70 + .../jni/deps/curl-7.73.0/tests/data/test157 | 45 + .../jni/deps/curl-7.73.0/tests/data/test158 | 55 + .../jni/deps/curl-7.73.0/tests/data/test159 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1590 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1591 | 60 + .../jni/deps/curl-7.73.0/tests/data/test1592 | 37 + .../jni/deps/curl-7.73.0/tests/data/test1593 | 46 + .../jni/deps/curl-7.73.0/tests/data/test1594 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1595 | 48 + .../jni/deps/curl-7.73.0/tests/data/test1596 | 49 + .../jni/deps/curl-7.73.0/tests/data/test16 | 53 + .../jni/deps/curl-7.73.0/tests/data/test160 | 72 + .../jni/deps/curl-7.73.0/tests/data/test1600 | 23 + .../jni/deps/curl-7.73.0/tests/data/test1601 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1602 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1603 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1604 | 21 + .../jni/deps/curl-7.73.0/tests/data/test1605 | 21 + .../jni/deps/curl-7.73.0/tests/data/test1606 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1607 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1608 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1609 | 22 + .../jni/deps/curl-7.73.0/tests/data/test161 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1610 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1611 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1612 | 22 + .../jni/deps/curl-7.73.0/tests/data/test162 | 60 + .../jni/deps/curl-7.73.0/tests/data/test1620 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1621 | 23 + .../jni/deps/curl-7.73.0/tests/data/test163 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1630 | 54 + .../jni/deps/curl-7.73.0/tests/data/test1631 | 86 + .../jni/deps/curl-7.73.0/tests/data/test1632 | 104 + .../jni/deps/curl-7.73.0/tests/data/test1633 | 98 + .../jni/deps/curl-7.73.0/tests/data/test164 | 66 + .../jni/deps/curl-7.73.0/tests/data/test165 | 67 + .../jni/deps/curl-7.73.0/tests/data/test1650 | 23 + .../jni/deps/curl-7.73.0/tests/data/test1651 | 22 + .../jni/deps/curl-7.73.0/tests/data/test1652 | 20 + .../jni/deps/curl-7.73.0/tests/data/test1653 | 20 + .../jni/deps/curl-7.73.0/tests/data/test1654 | 56 + .../jni/deps/curl-7.73.0/tests/data/test1655 | 23 + .../jni/deps/curl-7.73.0/tests/data/test166 | 60 + .../jni/deps/curl-7.73.0/tests/data/test167 | 78 + .../jni/deps/curl-7.73.0/tests/data/test168 | 98 + .../jni/deps/curl-7.73.0/tests/data/test169 | 128 + .../jni/deps/curl-7.73.0/tests/data/test17 | 54 + .../jni/deps/curl-7.73.0/tests/data/test170 | 51 + .../jni/deps/curl-7.73.0/tests/data/test1700 | 102 + .../jni/deps/curl-7.73.0/tests/data/test1701 | 83 + .../jni/deps/curl-7.73.0/tests/data/test1702 | 78 + .../jni/deps/curl-7.73.0/tests/data/test171 | 59 + .../jni/deps/curl-7.73.0/tests/data/test172 | 54 + .../jni/deps/curl-7.73.0/tests/data/test173 | 79 + .../jni/deps/curl-7.73.0/tests/data/test174 | 49 + .../jni/deps/curl-7.73.0/tests/data/test175 | 83 + .../jni/deps/curl-7.73.0/tests/data/test176 | 86 + .../jni/deps/curl-7.73.0/tests/data/test177 | 51 + .../jni/deps/curl-7.73.0/tests/data/test178 | 55 + .../jni/deps/curl-7.73.0/tests/data/test179 | 58 + .../jni/deps/curl-7.73.0/tests/data/test18 | 88 + .../jni/deps/curl-7.73.0/tests/data/test180 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1800 | 53 + .../jni/deps/curl-7.73.0/tests/data/test1801 | 67 + .../jni/deps/curl-7.73.0/tests/data/test181 | 66 + .../jni/deps/curl-7.73.0/tests/data/test182 | 43 + .../jni/deps/curl-7.73.0/tests/data/test183 | 56 + .../jni/deps/curl-7.73.0/tests/data/test184 | 76 + .../jni/deps/curl-7.73.0/tests/data/test185 | 76 + .../jni/deps/curl-7.73.0/tests/data/test186 | 62 + .../jni/deps/curl-7.73.0/tests/data/test187 | 76 + .../jni/deps/curl-7.73.0/tests/data/test188 | 75 + .../jni/deps/curl-7.73.0/tests/data/test189 | 73 + .../jni/deps/curl-7.73.0/tests/data/test19 | 37 + .../jni/deps/curl-7.73.0/tests/data/test190 | 44 + .../jni/deps/curl-7.73.0/tests/data/test1904 | 79 + .../jni/deps/curl-7.73.0/tests/data/test1905 | 57 + .../jni/deps/curl-7.73.0/tests/data/test1906 | 49 + .../jni/deps/curl-7.73.0/tests/data/test1907 | 50 + .../jni/deps/curl-7.73.0/tests/data/test1908 | 81 + .../jni/deps/curl-7.73.0/tests/data/test1909 | 64 + .../jni/deps/curl-7.73.0/tests/data/test191 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1910 | 65 + .../jni/deps/curl-7.73.0/tests/data/test1911 | 29 + .../jni/deps/curl-7.73.0/tests/data/test1912 | 30 + .../jni/deps/curl-7.73.0/tests/data/test1913 | 41 + .../jni/deps/curl-7.73.0/tests/data/test1914 | 42 + .../jni/deps/curl-7.73.0/tests/data/test192 | 57 + .../jni/deps/curl-7.73.0/tests/data/test193 | 81 + .../jni/deps/curl-7.73.0/tests/data/test194 | 71 + .../jni/deps/curl-7.73.0/tests/data/test195 | 38 + .../jni/deps/curl-7.73.0/tests/data/test196 | 42 + .../jni/deps/curl-7.73.0/tests/data/test197 | 75 + .../jni/deps/curl-7.73.0/tests/data/test198 | 70 + .../jni/deps/curl-7.73.0/tests/data/test199 | 58 + .../jni/deps/curl-7.73.0/tests/data/test2 | 51 + .../jni/deps/curl-7.73.0/tests/data/test20 | 38 + .../jni/deps/curl-7.73.0/tests/data/test200 | 41 + .../jni/deps/curl-7.73.0/tests/data/test2000 | 73 + .../jni/deps/curl-7.73.0/tests/data/test2001 | 96 + .../jni/deps/curl-7.73.0/tests/data/test2002 | 115 + .../jni/deps/curl-7.73.0/tests/data/test2003 | 145 + .../jni/deps/curl-7.73.0/tests/data/test2004 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2005 | 91 + .../jni/deps/curl-7.73.0/tests/data/test2006 | 122 + .../jni/deps/curl-7.73.0/tests/data/test2007 | 122 + .../jni/deps/curl-7.73.0/tests/data/test2008 | 114 + .../jni/deps/curl-7.73.0/tests/data/test2009 | 115 + .../jni/deps/curl-7.73.0/tests/data/test201 | 34 + .../jni/deps/curl-7.73.0/tests/data/test2010 | 114 + .../jni/deps/curl-7.73.0/tests/data/test2011 | 91 + .../jni/deps/curl-7.73.0/tests/data/test2012 | 90 + .../jni/deps/curl-7.73.0/tests/data/test2013 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2014 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2015 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2016 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2017 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2018 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2019 | 78 + .../jni/deps/curl-7.73.0/tests/data/test202 | 37 + .../jni/deps/curl-7.73.0/tests/data/test2020 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2021 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2022 | 78 + .../jni/deps/curl-7.73.0/tests/data/test2023 | 159 + .../jni/deps/curl-7.73.0/tests/data/test2024 | 173 + .../jni/deps/curl-7.73.0/tests/data/test2025 | 270 + .../jni/deps/curl-7.73.0/tests/data/test2026 | 217 + .../jni/deps/curl-7.73.0/tests/data/test2027 | 245 + .../jni/deps/curl-7.73.0/tests/data/test2028 | 314 + .../jni/deps/curl-7.73.0/tests/data/test2029 | 238 + .../jni/deps/curl-7.73.0/tests/data/test203 | 46 + .../jni/deps/curl-7.73.0/tests/data/test2030 | 295 + .../jni/deps/curl-7.73.0/tests/data/test2031 | 319 + .../jni/deps/curl-7.73.0/tests/data/test2032 | 121 + .../jni/deps/curl-7.73.0/tests/data/test2034 | 56 + .../jni/deps/curl-7.73.0/tests/data/test2035 | 44 + .../jni/deps/curl-7.73.0/tests/data/test2036 | 36 + .../jni/deps/curl-7.73.0/tests/data/test2037 | 57 + .../jni/deps/curl-7.73.0/tests/data/test2038 | 44 + .../jni/deps/curl-7.73.0/tests/data/test2039 | 63 + .../jni/deps/curl-7.73.0/tests/data/test204 | 40 + .../jni/deps/curl-7.73.0/tests/data/test2040 | 68 + .../jni/deps/curl-7.73.0/tests/data/test2041 | 56 + .../jni/deps/curl-7.73.0/tests/data/test2042 | 44 + .../jni/deps/curl-7.73.0/tests/data/test2043 | 33 + .../jni/deps/curl-7.73.0/tests/data/test2044 | 33 + .../jni/deps/curl-7.73.0/tests/data/test2045 | 54 + .../jni/deps/curl-7.73.0/tests/data/test2046 | 97 + .../jni/deps/curl-7.73.0/tests/data/test2047 | 101 + .../jni/deps/curl-7.73.0/tests/data/test2048 | 40 + .../jni/deps/curl-7.73.0/tests/data/test2049 | 65 + .../jni/deps/curl-7.73.0/tests/data/test205 | 38 + .../jni/deps/curl-7.73.0/tests/data/test2050 | 80 + .../jni/deps/curl-7.73.0/tests/data/test2051 | 74 + .../jni/deps/curl-7.73.0/tests/data/test2052 | 67 + .../jni/deps/curl-7.73.0/tests/data/test2053 | 55 + .../jni/deps/curl-7.73.0/tests/data/test2054 | 65 + .../jni/deps/curl-7.73.0/tests/data/test2055 | 81 + .../jni/deps/curl-7.73.0/tests/data/test2056 | 65 + .../jni/deps/curl-7.73.0/tests/data/test2057 | 87 + .../jni/deps/curl-7.73.0/tests/data/test2058 | 106 + .../jni/deps/curl-7.73.0/tests/data/test2059 | 106 + .../jni/deps/curl-7.73.0/tests/data/test206 | 108 + .../jni/deps/curl-7.73.0/tests/data/test2060 | 106 + .../jni/deps/curl-7.73.0/tests/data/test2061 | 82 + .../jni/deps/curl-7.73.0/tests/data/test2062 | 82 + .../jni/deps/curl-7.73.0/tests/data/test2063 | 82 + .../jni/deps/curl-7.73.0/tests/data/test2064 | 82 + .../jni/deps/curl-7.73.0/tests/data/test2065 | 82 + .../jni/deps/curl-7.73.0/tests/data/test2066 | 82 + .../jni/deps/curl-7.73.0/tests/data/test2067 | 88 + .../jni/deps/curl-7.73.0/tests/data/test2068 | 88 + .../jni/deps/curl-7.73.0/tests/data/test2069 | 88 + .../jni/deps/curl-7.73.0/tests/data/test207 | 65 + .../jni/deps/curl-7.73.0/tests/data/test2070 | 60 + .../jni/deps/curl-7.73.0/tests/data/test2071 | 41 + .../jni/deps/curl-7.73.0/tests/data/test2072 | 44 + .../jni/deps/curl-7.73.0/tests/data/test2073 | 70 + .../jni/deps/curl-7.73.0/tests/data/test2074 | 55 + .../jni/deps/curl-7.73.0/tests/data/test2075 | 34 + .../jni/deps/curl-7.73.0/tests/data/test2076 | 74 + .../jni/deps/curl-7.73.0/tests/data/test2077 | 42 + .../jni/deps/curl-7.73.0/tests/data/test2078 | 52 + .../jni/deps/curl-7.73.0/tests/data/test208 | 74 + .../jni/deps/curl-7.73.0/tests/data/test2080 | Bin 0 -> 20659 bytes .../jni/deps/curl-7.73.0/tests/data/test209 | 124 + .../jni/deps/curl-7.73.0/tests/data/test21 | 33 + .../jni/deps/curl-7.73.0/tests/data/test210 | 52 + .../jni/deps/curl-7.73.0/tests/data/test2100 | Bin 0 -> 1642 bytes .../jni/deps/curl-7.73.0/tests/data/test211 | 54 + .../jni/deps/curl-7.73.0/tests/data/test212 | 64 + .../jni/deps/curl-7.73.0/tests/data/test213 | 127 + .../jni/deps/curl-7.73.0/tests/data/test214 | 52 + .../jni/deps/curl-7.73.0/tests/data/test215 | 58 + .../jni/deps/curl-7.73.0/tests/data/test216 | 45 + .../jni/deps/curl-7.73.0/tests/data/test217 | 61 + .../jni/deps/curl-7.73.0/tests/data/test218 | 57 + .../jni/deps/curl-7.73.0/tests/data/test219 | 38 + .../jni/deps/curl-7.73.0/tests/data/test22 | 43 + .../jni/deps/curl-7.73.0/tests/data/test220 | 69 + .../jni/deps/curl-7.73.0/tests/data/test221 | 72 + .../jni/deps/curl-7.73.0/tests/data/test222 | 200 + .../jni/deps/curl-7.73.0/tests/data/test223 | 93 + .../jni/deps/curl-7.73.0/tests/data/test224 | 105 + .../jni/deps/curl-7.73.0/tests/data/test225 | 28 + .../jni/deps/curl-7.73.0/tests/data/test226 | 29 + .../jni/deps/curl-7.73.0/tests/data/test227 | 57 + .../jni/deps/curl-7.73.0/tests/data/test228 | 52 + .../jni/deps/curl-7.73.0/tests/data/test229 | 41 + .../jni/deps/curl-7.73.0/tests/data/test23 | 33 + .../jni/deps/curl-7.73.0/tests/data/test230 | 201 + .../jni/deps/curl-7.73.0/tests/data/test231 | 38 + .../jni/deps/curl-7.73.0/tests/data/test232 | 200 + .../jni/deps/curl-7.73.0/tests/data/test233 | 96 + .../jni/deps/curl-7.73.0/tests/data/test234 | 99 + .../jni/deps/curl-7.73.0/tests/data/test235 | 51 + .../jni/deps/curl-7.73.0/tests/data/test236 | 53 + .../jni/deps/curl-7.73.0/tests/data/test237 | 44 + .../jni/deps/curl-7.73.0/tests/data/test238 | 42 + .../jni/deps/curl-7.73.0/tests/data/test239 | 101 + .../jni/deps/curl-7.73.0/tests/data/test24 | 47 + .../jni/deps/curl-7.73.0/tests/data/test240 | 56 + .../jni/deps/curl-7.73.0/tests/data/test241 | 54 + .../jni/deps/curl-7.73.0/tests/data/test242 | 52 + .../jni/deps/curl-7.73.0/tests/data/test243 | 130 + .../jni/deps/curl-7.73.0/tests/data/test244 | 54 + .../jni/deps/curl-7.73.0/tests/data/test245 | 85 + .../jni/deps/curl-7.73.0/tests/data/test246 | 95 + .../jni/deps/curl-7.73.0/tests/data/test247 | 47 + .../jni/deps/curl-7.73.0/tests/data/test248 | 56 + .../jni/deps/curl-7.73.0/tests/data/test249 | 51 + .../jni/deps/curl-7.73.0/tests/data/test25 | 113 + .../jni/deps/curl-7.73.0/tests/data/test250 | 58 + .../jni/deps/curl-7.73.0/tests/data/test251 | 60 + .../jni/deps/curl-7.73.0/tests/data/test252 | 60 + .../jni/deps/curl-7.73.0/tests/data/test253 | 63 + .../jni/deps/curl-7.73.0/tests/data/test254 | 61 + .../jni/deps/curl-7.73.0/tests/data/test255 | 64 + .../jni/deps/curl-7.73.0/tests/data/test256 | 65 + .../jni/deps/curl-7.73.0/tests/data/test257 | 111 + .../jni/deps/curl-7.73.0/tests/data/test258 | 136 + .../jni/deps/curl-7.73.0/tests/data/test259 | 134 + .../jni/deps/curl-7.73.0/tests/data/test26 | 42 + .../jni/deps/curl-7.73.0/tests/data/test260 | 53 + .../jni/deps/curl-7.73.0/tests/data/test261 | 48 + .../jni/deps/curl-7.73.0/tests/data/test262 | Bin 0 -> 1132 bytes .../jni/deps/curl-7.73.0/tests/data/test263 | 53 + .../jni/deps/curl-7.73.0/tests/data/test264 | 50 + .../jni/deps/curl-7.73.0/tests/data/test265 | 128 + .../jni/deps/curl-7.73.0/tests/data/test266 | 77 + .../jni/deps/curl-7.73.0/tests/data/test267 | 109 + .../jni/deps/curl-7.73.0/tests/data/test268 | 55 + .../jni/deps/curl-7.73.0/tests/data/test269 | 51 + .../jni/deps/curl-7.73.0/tests/data/test27 | 56 + .../jni/deps/curl-7.73.0/tests/data/test270 | 50 + .../jni/deps/curl-7.73.0/tests/data/test271 | 46 + .../jni/deps/curl-7.73.0/tests/data/test272 | 40 + .../jni/deps/curl-7.73.0/tests/data/test273 | 82 + .../jni/deps/curl-7.73.0/tests/data/test274 | 49 + .../jni/deps/curl-7.73.0/tests/data/test275 | 90 + .../jni/deps/curl-7.73.0/tests/data/test276 | 75 + .../jni/deps/curl-7.73.0/tests/data/test277 | 55 + .../jni/deps/curl-7.73.0/tests/data/test278 | 50 + .../jni/deps/curl-7.73.0/tests/data/test279 | 51 + .../jni/deps/curl-7.73.0/tests/data/test28 | 74 + .../jni/deps/curl-7.73.0/tests/data/test280 | 63 + .../jni/deps/curl-7.73.0/tests/data/test281 | 63 + .../jni/deps/curl-7.73.0/tests/data/test282 | 43 + .../jni/deps/curl-7.73.0/tests/data/test283 | 39 + .../jni/deps/curl-7.73.0/tests/data/test284 | 70 + .../jni/deps/curl-7.73.0/tests/data/test285 | 47 + .../jni/deps/curl-7.73.0/tests/data/test286 | 95 + .../jni/deps/curl-7.73.0/tests/data/test287 | 56 + .../jni/deps/curl-7.73.0/tests/data/test288 | 48 + .../jni/deps/curl-7.73.0/tests/data/test289 | 30 + .../jni/deps/curl-7.73.0/tests/data/test29 | 50 + .../jni/deps/curl-7.73.0/tests/data/test290 | 43 + .../jni/deps/curl-7.73.0/tests/data/test291 | 47 + .../jni/deps/curl-7.73.0/tests/data/test292 | 54 + .../jni/deps/curl-7.73.0/tests/data/test293 | 58 + .../jni/deps/curl-7.73.0/tests/data/test294 | 64 + .../jni/deps/curl-7.73.0/tests/data/test295 | 45 + .../jni/deps/curl-7.73.0/tests/data/test296 | 48 + .../jni/deps/curl-7.73.0/tests/data/test297 | 46 + .../jni/deps/curl-7.73.0/tests/data/test298 | 45 + .../jni/deps/curl-7.73.0/tests/data/test299 | 52 + .../jni/deps/curl-7.73.0/tests/data/test3 | 58 + .../jni/deps/curl-7.73.0/tests/data/test30 | 41 + .../jni/deps/curl-7.73.0/tests/data/test300 | 50 + .../jni/deps/curl-7.73.0/tests/data/test3000 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3001 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3002 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3003 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3004 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3005 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3006 | 51 + .../jni/deps/curl-7.73.0/tests/data/test3007 | 47 + .../jni/deps/curl-7.73.0/tests/data/test3008 | 57 + .../jni/deps/curl-7.73.0/tests/data/test3009 | 57 + .../jni/deps/curl-7.73.0/tests/data/test301 | 55 + .../jni/deps/curl-7.73.0/tests/data/test3010 | 57 + .../jni/deps/curl-7.73.0/tests/data/test3011 | 57 + .../jni/deps/curl-7.73.0/tests/data/test3012 | 60 + .../jni/deps/curl-7.73.0/tests/data/test3013 | 68 + .../jni/deps/curl-7.73.0/tests/data/test3014 | 56 + .../jni/deps/curl-7.73.0/tests/data/test3015 | 78 + .../jni/deps/curl-7.73.0/tests/data/test302 | 49 + .../jni/deps/curl-7.73.0/tests/data/test303 | 53 + .../jni/deps/curl-7.73.0/tests/data/test304 | 71 + .../jni/deps/curl-7.73.0/tests/data/test305 | 32 + .../jni/deps/curl-7.73.0/tests/data/test306 | 63 + .../jni/deps/curl-7.73.0/tests/data/test307 | 54 + .../jni/deps/curl-7.73.0/tests/data/test308 | 35 + .../jni/deps/curl-7.73.0/tests/data/test309 | 81 + .../jni/deps/curl-7.73.0/tests/data/test31 | 117 + .../jni/deps/curl-7.73.0/tests/data/test310 | 55 + .../jni/deps/curl-7.73.0/tests/data/test311 | 43 + .../jni/deps/curl-7.73.0/tests/data/test312 | 43 + .../jni/deps/curl-7.73.0/tests/data/test313 | 39 + .../jni/deps/curl-7.73.0/tests/data/test314 | 196 + .../jni/deps/curl-7.73.0/tests/data/test315 | 89 + .../jni/deps/curl-7.73.0/tests/data/test316 | 196 + .../jni/deps/curl-7.73.0/tests/data/test317 | 96 + .../jni/deps/curl-7.73.0/tests/data/test318 | 97 + .../jni/deps/curl-7.73.0/tests/data/test319 | 55 + .../jni/deps/curl-7.73.0/tests/data/test32 | 53 + .../jni/deps/curl-7.73.0/tests/data/test320 | 80 + .../jni/deps/curl-7.73.0/tests/data/test321 | 33 + .../jni/deps/curl-7.73.0/tests/data/test322 | 33 + .../jni/deps/curl-7.73.0/tests/data/test323 | 33 + .../jni/deps/curl-7.73.0/tests/data/test324 | 33 + .../jni/deps/curl-7.73.0/tests/data/test325 | 64 + .../jni/deps/curl-7.73.0/tests/data/test326 | 64 + .../jni/deps/curl-7.73.0/tests/data/test327 | 72 + .../jni/deps/curl-7.73.0/tests/data/test328 | 55 + .../jni/deps/curl-7.73.0/tests/data/test329 | 69 + .../jni/deps/curl-7.73.0/tests/data/test33 | 61 + .../jni/deps/curl-7.73.0/tests/data/test330 | 92 + .../jni/deps/curl-7.73.0/tests/data/test331 | 67 + .../jni/deps/curl-7.73.0/tests/data/test332 | 45 + .../jni/deps/curl-7.73.0/tests/data/test333 | 35 + .../jni/deps/curl-7.73.0/tests/data/test334 | 42 + .../jni/deps/curl-7.73.0/tests/data/test335 | 100 + .../jni/deps/curl-7.73.0/tests/data/test336 | 58 + .../jni/deps/curl-7.73.0/tests/data/test337 | 58 + .../jni/deps/curl-7.73.0/tests/data/test338 | 62 + .../jni/deps/curl-7.73.0/tests/data/test339 | 61 + .../jni/deps/curl-7.73.0/tests/data/test34 | 64 + .../jni/deps/curl-7.73.0/tests/data/test340 | 40 + .../jni/deps/curl-7.73.0/tests/data/test341 | 54 + .../jni/deps/curl-7.73.0/tests/data/test342 | 56 + .../jni/deps/curl-7.73.0/tests/data/test343 | 59 + .../jni/deps/curl-7.73.0/tests/data/test344 | 56 + .../jni/deps/curl-7.73.0/tests/data/test345 | 59 + .../jni/deps/curl-7.73.0/tests/data/test346 | 58 + .../jni/deps/curl-7.73.0/tests/data/test347 | 60 + .../jni/deps/curl-7.73.0/tests/data/test348 | 61 + .../jni/deps/curl-7.73.0/tests/data/test35 | Bin 0 -> 805 bytes .../jni/deps/curl-7.73.0/tests/data/test350 | 57 + .../jni/deps/curl-7.73.0/tests/data/test351 | 56 + .../jni/deps/curl-7.73.0/tests/data/test352 | 57 + .../jni/deps/curl-7.73.0/tests/data/test353 | 56 + .../jni/deps/curl-7.73.0/tests/data/test354 | 50 + .../jni/deps/curl-7.73.0/tests/data/test355 | 55 + .../jni/deps/curl-7.73.0/tests/data/test356 | 68 + .../jni/deps/curl-7.73.0/tests/data/test357 | 96 + .../jni/deps/curl-7.73.0/tests/data/test358 | 94 + .../jni/deps/curl-7.73.0/tests/data/test359 | 94 + .../jni/deps/curl-7.73.0/tests/data/test36 | 64 + .../jni/deps/curl-7.73.0/tests/data/test37 | 45 + .../jni/deps/curl-7.73.0/tests/data/test38 | 59 + .../jni/deps/curl-7.73.0/tests/data/test39 | 108 + .../jni/deps/curl-7.73.0/tests/data/test393 | 58 + .../jni/deps/curl-7.73.0/tests/data/test394 | 57 + .../jni/deps/curl-7.73.0/tests/data/test395 | 53 + .../jni/deps/curl-7.73.0/tests/data/test396 | 200 + .../jni/deps/curl-7.73.0/tests/data/test397 | 196 + .../jni/deps/curl-7.73.0/tests/data/test4 | 61 + .../jni/deps/curl-7.73.0/tests/data/test40 | 72 + .../jni/deps/curl-7.73.0/tests/data/test400 | 62 + .../jni/deps/curl-7.73.0/tests/data/test401 | 57 + .../jni/deps/curl-7.73.0/tests/data/test402 | 36 + .../jni/deps/curl-7.73.0/tests/data/test403 | 65 + .../jni/deps/curl-7.73.0/tests/data/test404 | 32 + .../jni/deps/curl-7.73.0/tests/data/test405 | 35 + .../jni/deps/curl-7.73.0/tests/data/test406 | 67 + .../jni/deps/curl-7.73.0/tests/data/test407 | 60 + .../jni/deps/curl-7.73.0/tests/data/test408 | 62 + .../jni/deps/curl-7.73.0/tests/data/test409 | 57 + .../jni/deps/curl-7.73.0/tests/data/test41 | 32 + .../jni/deps/curl-7.73.0/tests/data/test42 | 72 + .../jni/deps/curl-7.73.0/tests/data/test43 | 81 + .../jni/deps/curl-7.73.0/tests/data/test430 | 101 + .../jni/deps/curl-7.73.0/tests/data/test431 | 95 + .../jni/deps/curl-7.73.0/tests/data/test432 | 100 + .../jni/deps/curl-7.73.0/tests/data/test433 | 57 + .../jni/deps/curl-7.73.0/tests/data/test434 | 46 + .../jni/deps/curl-7.73.0/tests/data/test44 | 72 + .../jni/deps/curl-7.73.0/tests/data/test45 | 75 + .../jni/deps/curl-7.73.0/tests/data/test46 | 87 + .../jni/deps/curl-7.73.0/tests/data/test47 | 47 + .../jni/deps/curl-7.73.0/tests/data/test48 | 53 + .../jni/deps/curl-7.73.0/tests/data/test49 | 72 + .../jni/deps/curl-7.73.0/tests/data/test490 | 67 + .../jni/deps/curl-7.73.0/tests/data/test491 | 62 + .../jni/deps/curl-7.73.0/tests/data/test492 | 90 + .../jni/deps/curl-7.73.0/tests/data/test5 | 51 + .../jni/deps/curl-7.73.0/tests/data/test50 | 72 + .../jni/deps/curl-7.73.0/tests/data/test500 | 58 + .../jni/deps/curl-7.73.0/tests/data/test501 | 40 + .../jni/deps/curl-7.73.0/tests/data/test502 | 47 + .../jni/deps/curl-7.73.0/tests/data/test503 | 89 + .../jni/deps/curl-7.73.0/tests/data/test504 | 46 + .../jni/deps/curl-7.73.0/tests/data/test505 | 66 + .../jni/deps/curl-7.73.0/tests/data/test506 | 250 + .../jni/deps/curl-7.73.0/tests/data/test507 | 37 + .../jni/deps/curl-7.73.0/tests/data/test508 | 58 + .../jni/deps/curl-7.73.0/tests/data/test509 | 41 + .../jni/deps/curl-7.73.0/tests/data/test51 | 72 + .../jni/deps/curl-7.73.0/tests/data/test510 | 65 + .../jni/deps/curl-7.73.0/tests/data/test511 | 50 + .../jni/deps/curl-7.73.0/tests/data/test512 | 50 + .../jni/deps/curl-7.73.0/tests/data/test513 | 49 + .../jni/deps/curl-7.73.0/tests/data/test514 | 54 + .../jni/deps/curl-7.73.0/tests/data/test515 | 51 + .../jni/deps/curl-7.73.0/tests/data/test516 | 51 + .../jni/deps/curl-7.73.0/tests/data/test517 | 45 + .../jni/deps/curl-7.73.0/tests/data/test518 | 67 + .../jni/deps/curl-7.73.0/tests/data/test519 | 78 + .../jni/deps/curl-7.73.0/tests/data/test52 | 72 + .../jni/deps/curl-7.73.0/tests/data/test520 | 53 + .../jni/deps/curl-7.73.0/tests/data/test521 | 60 + .../jni/deps/curl-7.73.0/tests/data/test522 | 57 + .../jni/deps/curl-7.73.0/tests/data/test523 | 64 + .../jni/deps/curl-7.73.0/tests/data/test524 | 46 + .../jni/deps/curl-7.73.0/tests/data/test525 | 59 + .../jni/deps/curl-7.73.0/tests/data/test526 | 63 + .../jni/deps/curl-7.73.0/tests/data/test527 | 63 + .../jni/deps/curl-7.73.0/tests/data/test528 | 65 + .../jni/deps/curl-7.73.0/tests/data/test529 | 59 + .../jni/deps/curl-7.73.0/tests/data/test53 | 52 + .../jni/deps/curl-7.73.0/tests/data/test531 | 59 + .../jni/deps/curl-7.73.0/tests/data/test532 | 63 + .../jni/deps/curl-7.73.0/tests/data/test533 | 55 + .../jni/deps/curl-7.73.0/tests/data/test534 | 53 + .../jni/deps/curl-7.73.0/tests/data/test535 | 69 + .../jni/deps/curl-7.73.0/tests/data/test537 | 64 + .../jni/deps/curl-7.73.0/tests/data/test538 | 45 + .../jni/deps/curl-7.73.0/tests/data/test539 | 71 + .../jni/deps/curl-7.73.0/tests/data/test54 | 43 + .../jni/deps/curl-7.73.0/tests/data/test540 | 108 + .../jni/deps/curl-7.73.0/tests/data/test541 | 57 + .../jni/deps/curl-7.73.0/tests/data/test542 | 57 + .../jni/deps/curl-7.73.0/tests/data/test543 | 37 + .../jni/deps/curl-7.73.0/tests/data/test544 | 53 + .../jni/deps/curl-7.73.0/tests/data/test545 | Bin 0 -> 798 bytes .../jni/deps/curl-7.73.0/tests/data/test546 | 70 + .../jni/deps/curl-7.73.0/tests/data/test547 | 131 + .../jni/deps/curl-7.73.0/tests/data/test548 | 131 + .../jni/deps/curl-7.73.0/tests/data/test549 | 63 + .../jni/deps/curl-7.73.0/tests/data/test55 | 64 + .../jni/deps/curl-7.73.0/tests/data/test550 | 63 + .../jni/deps/curl-7.73.0/tests/data/test551 | 98 + .../jni/deps/curl-7.73.0/tests/data/test552 | 90 + .../jni/deps/curl-7.73.0/tests/data/test553 | 62 + .../jni/deps/curl-7.73.0/tests/data/test554 | 132 + .../jni/deps/curl-7.73.0/tests/data/test555 | 136 + .../jni/deps/curl-7.73.0/tests/data/test556 | 47 + .../jni/deps/curl-7.73.0/tests/data/test557 | 47 + .../jni/deps/curl-7.73.0/tests/data/test558 | 57 + .../jni/deps/curl-7.73.0/tests/data/test559 | 50 + .../jni/deps/curl-7.73.0/tests/data/test56 | 61 + .../jni/deps/curl-7.73.0/tests/data/test560 | 53 + .../jni/deps/curl-7.73.0/tests/data/test561 | 64 + .../jni/deps/curl-7.73.0/tests/data/test562 | 53 + .../jni/deps/curl-7.73.0/tests/data/test563 | 59 + .../jni/deps/curl-7.73.0/tests/data/test564 | 68 + .../jni/deps/curl-7.73.0/tests/data/test565 | 109 + .../jni/deps/curl-7.73.0/tests/data/test566 | 57 + .../jni/deps/curl-7.73.0/tests/data/test567 | 49 + .../jni/deps/curl-7.73.0/tests/data/test568 | 116 + .../jni/deps/curl-7.73.0/tests/data/test569 | 110 + .../jni/deps/curl-7.73.0/tests/data/test57 | 46 + .../jni/deps/curl-7.73.0/tests/data/test570 | 76 + .../jni/deps/curl-7.73.0/tests/data/test571 | 107 + .../jni/deps/curl-7.73.0/tests/data/test572 | 121 + .../jni/deps/curl-7.73.0/tests/data/test573 | 55 + .../jni/deps/curl-7.73.0/tests/data/test574 | 98 + .../jni/deps/curl-7.73.0/tests/data/test575 | 121 + .../jni/deps/curl-7.73.0/tests/data/test576 | 192 + .../jni/deps/curl-7.73.0/tests/data/test577 | 55 + .../jni/deps/curl-7.73.0/tests/data/test578 | 52 + .../jni/deps/curl-7.73.0/tests/data/test579 | 87 + .../jni/deps/curl-7.73.0/tests/data/test58 | 49 + .../jni/deps/curl-7.73.0/tests/data/test580 | 55 + .../jni/deps/curl-7.73.0/tests/data/test581 | 55 + .../jni/deps/curl-7.73.0/tests/data/test582 | 49 + .../jni/deps/curl-7.73.0/tests/data/test583 | 45 + .../jni/deps/curl-7.73.0/tests/data/test585 | 66 + .../jni/deps/curl-7.73.0/tests/data/test586 | 59 + .../jni/deps/curl-7.73.0/tests/data/test587 | 58 + .../jni/deps/curl-7.73.0/tests/data/test588 | 69 + .../jni/deps/curl-7.73.0/tests/data/test589 | 52 + .../jni/deps/curl-7.73.0/tests/data/test59 | 45 + .../jni/deps/curl-7.73.0/tests/data/test590 | 122 + .../jni/deps/curl-7.73.0/tests/data/test591 | 73 + .../jni/deps/curl-7.73.0/tests/data/test592 | 74 + .../jni/deps/curl-7.73.0/tests/data/test593 | 72 + .../jni/deps/curl-7.73.0/tests/data/test594 | 72 + .../jni/deps/curl-7.73.0/tests/data/test595 | 57 + .../jni/deps/curl-7.73.0/tests/data/test596 | 60 + .../jni/deps/curl-7.73.0/tests/data/test597 | 36 + .../jni/deps/curl-7.73.0/tests/data/test598 | 80 + .../jni/deps/curl-7.73.0/tests/data/test599 | 86 + .../jni/deps/curl-7.73.0/tests/data/test6 | 47 + .../jni/deps/curl-7.73.0/tests/data/test60 | 56 + .../jni/deps/curl-7.73.0/tests/data/test600 | 42 + .../jni/deps/curl-7.73.0/tests/data/test601 | 42 + .../jni/deps/curl-7.73.0/tests/data/test602 | 43 + .../jni/deps/curl-7.73.0/tests/data/test603 | 43 + .../jni/deps/curl-7.73.0/tests/data/test604 | 33 + .../jni/deps/curl-7.73.0/tests/data/test605 | 33 + .../jni/deps/curl-7.73.0/tests/data/test606 | 33 + .../jni/deps/curl-7.73.0/tests/data/test607 | 33 + .../jni/deps/curl-7.73.0/tests/data/test608 | 49 + .../jni/deps/curl-7.73.0/tests/data/test609 | 45 + .../jni/deps/curl-7.73.0/tests/data/test61 | 70 + .../jni/deps/curl-7.73.0/tests/data/test610 | 47 + .../jni/deps/curl-7.73.0/tests/data/test611 | 47 + .../jni/deps/curl-7.73.0/tests/data/test612 | 47 + .../jni/deps/curl-7.73.0/tests/data/test613 | 46 + .../jni/deps/curl-7.73.0/tests/data/test614 | 47 + .../jni/deps/curl-7.73.0/tests/data/test615 | 44 + .../jni/deps/curl-7.73.0/tests/data/test616 | 39 + .../jni/deps/curl-7.73.0/tests/data/test617 | 39 + .../jni/deps/curl-7.73.0/tests/data/test618 | 39 + .../jni/deps/curl-7.73.0/tests/data/test619 | 39 + .../jni/deps/curl-7.73.0/tests/data/test62 | 64 + .../jni/deps/curl-7.73.0/tests/data/test620 | 38 + .../jni/deps/curl-7.73.0/tests/data/test621 | 38 + .../jni/deps/curl-7.73.0/tests/data/test622 | 43 + .../jni/deps/curl-7.73.0/tests/data/test623 | 44 + .../jni/deps/curl-7.73.0/tests/data/test624 | 47 + .../jni/deps/curl-7.73.0/tests/data/test625 | 47 + .../jni/deps/curl-7.73.0/tests/data/test626 | 42 + .../jni/deps/curl-7.73.0/tests/data/test627 | 46 + .../jni/deps/curl-7.73.0/tests/data/test628 | 33 + .../jni/deps/curl-7.73.0/tests/data/test629 | 33 + .../jni/deps/curl-7.73.0/tests/data/test63 | 53 + .../jni/deps/curl-7.73.0/tests/data/test630 | 34 + .../jni/deps/curl-7.73.0/tests/data/test631 | 34 + .../jni/deps/curl-7.73.0/tests/data/test632 | 34 + .../jni/deps/curl-7.73.0/tests/data/test633 | 42 + .../jni/deps/curl-7.73.0/tests/data/test634 | 43 + .../jni/deps/curl-7.73.0/tests/data/test635 | 42 + .../jni/deps/curl-7.73.0/tests/data/test636 | 43 + .../jni/deps/curl-7.73.0/tests/data/test637 | 44 + .../jni/deps/curl-7.73.0/tests/data/test638 | 49 + .../jni/deps/curl-7.73.0/tests/data/test639 | 49 + .../jni/deps/curl-7.73.0/tests/data/test64 | 82 + .../jni/deps/curl-7.73.0/tests/data/test640 | 41 + .../jni/deps/curl-7.73.0/tests/data/test641 | 41 + .../jni/deps/curl-7.73.0/tests/data/test642 | 42 + .../jni/deps/curl-7.73.0/tests/data/test643 | 131 + .../jni/deps/curl-7.73.0/tests/data/test644 | 60 + .../jni/deps/curl-7.73.0/tests/data/test645 | 193 + .../jni/deps/curl-7.73.0/tests/data/test646 | 98 + .../jni/deps/curl-7.73.0/tests/data/test647 | 79 + .../jni/deps/curl-7.73.0/tests/data/test648 | 75 + .../jni/deps/curl-7.73.0/tests/data/test649 | 72 + .../jni/deps/curl-7.73.0/tests/data/test65 | 82 + .../jni/deps/curl-7.73.0/tests/data/test650 | 133 + .../jni/deps/curl-7.73.0/tests/data/test651 | 72 + .../jni/deps/curl-7.73.0/tests/data/test652 | 358 + .../jni/deps/curl-7.73.0/tests/data/test653 | 93 + .../jni/deps/curl-7.73.0/tests/data/test654 | 123 + .../jni/deps/curl-7.73.0/tests/data/test655 | 50 + .../jni/deps/curl-7.73.0/tests/data/test656 | 33 + .../jni/deps/curl-7.73.0/tests/data/test658 | 49 + .../jni/deps/curl-7.73.0/tests/data/test659 | 54 + .../jni/deps/curl-7.73.0/tests/data/test66 | 40 + .../jni/deps/curl-7.73.0/tests/data/test660 | 34 + .../jni/deps/curl-7.73.0/tests/data/test661 | 73 + .../jni/deps/curl-7.73.0/tests/data/test662 | 77 + .../jni/deps/curl-7.73.0/tests/data/test663 | 81 + .../jni/deps/curl-7.73.0/tests/data/test664 | 44 + .../jni/deps/curl-7.73.0/tests/data/test665 | 44 + .../jni/deps/curl-7.73.0/tests/data/test666 | 293 + .../jni/deps/curl-7.73.0/tests/data/test667 | 85 + .../jni/deps/curl-7.73.0/tests/data/test668 | 99 + .../jni/deps/curl-7.73.0/tests/data/test669 | 60 + .../jni/deps/curl-7.73.0/tests/data/test67 | 100 + .../jni/deps/curl-7.73.0/tests/data/test670 | 72 + .../jni/deps/curl-7.73.0/tests/data/test671 | 72 + .../jni/deps/curl-7.73.0/tests/data/test672 | 72 + .../jni/deps/curl-7.73.0/tests/data/test673 | 72 + .../jni/deps/curl-7.73.0/tests/data/test674 | 54 + .../jni/deps/curl-7.73.0/tests/data/test68 | 99 + .../jni/deps/curl-7.73.0/tests/data/test69 | 121 + .../jni/deps/curl-7.73.0/tests/data/test7 | 60 + .../jni/deps/curl-7.73.0/tests/data/test70 | 85 + .../jni/deps/curl-7.73.0/tests/data/test700 | 55 + .../jni/deps/curl-7.73.0/tests/data/test701 | 55 + .../jni/deps/curl-7.73.0/tests/data/test702 | 44 + .../jni/deps/curl-7.73.0/tests/data/test703 | 44 + .../jni/deps/curl-7.73.0/tests/data/test704 | 39 + .../jni/deps/curl-7.73.0/tests/data/test705 | 39 + .../jni/deps/curl-7.73.0/tests/data/test706 | 59 + .../jni/deps/curl-7.73.0/tests/data/test707 | 59 + .../jni/deps/curl-7.73.0/tests/data/test708 | 58 + .../jni/deps/curl-7.73.0/tests/data/test709 | 58 + .../jni/deps/curl-7.73.0/tests/data/test71 | 78 + .../jni/deps/curl-7.73.0/tests/data/test710 | 55 + .../jni/deps/curl-7.73.0/tests/data/test711 | 54 + .../jni/deps/curl-7.73.0/tests/data/test712 | 48 + .../jni/deps/curl-7.73.0/tests/data/test713 | 49 + .../jni/deps/curl-7.73.0/tests/data/test714 | 68 + .../jni/deps/curl-7.73.0/tests/data/test715 | 70 + .../jni/deps/curl-7.73.0/tests/data/test716 | 45 + .../jni/deps/curl-7.73.0/tests/data/test717 | 66 + .../jni/deps/curl-7.73.0/tests/data/test72 | 84 + .../jni/deps/curl-7.73.0/tests/data/test73 | 53 + .../jni/deps/curl-7.73.0/tests/data/test74 | 74 + .../jni/deps/curl-7.73.0/tests/data/test75 | 44 + .../jni/deps/curl-7.73.0/tests/data/test76 | 36 + .../jni/deps/curl-7.73.0/tests/data/test77 | 54 + .../jni/deps/curl-7.73.0/tests/data/test78 | 66 + .../jni/deps/curl-7.73.0/tests/data/test79 | 54 + .../jni/deps/curl-7.73.0/tests/data/test8 | 67 + .../jni/deps/curl-7.73.0/tests/data/test80 | 83 + .../jni/deps/curl-7.73.0/tests/data/test800 | 49 + .../jni/deps/curl-7.73.0/tests/data/test801 | 46 + .../jni/deps/curl-7.73.0/tests/data/test802 | 47 + .../jni/deps/curl-7.73.0/tests/data/test803 | 45 + .../jni/deps/curl-7.73.0/tests/data/test804 | 47 + .../jni/deps/curl-7.73.0/tests/data/test805 | 62 + .../jni/deps/curl-7.73.0/tests/data/test806 | 44 + .../jni/deps/curl-7.73.0/tests/data/test807 | 45 + .../jni/deps/curl-7.73.0/tests/data/test808 | 49 + .../jni/deps/curl-7.73.0/tests/data/test809 | 43 + .../jni/deps/curl-7.73.0/tests/data/test81 | 102 + .../jni/deps/curl-7.73.0/tests/data/test810 | 43 + .../jni/deps/curl-7.73.0/tests/data/test811 | 40 + .../jni/deps/curl-7.73.0/tests/data/test812 | 40 + .../jni/deps/curl-7.73.0/tests/data/test813 | 40 + .../jni/deps/curl-7.73.0/tests/data/test814 | 41 + .../jni/deps/curl-7.73.0/tests/data/test815 | 46 + .../jni/deps/curl-7.73.0/tests/data/test816 | 49 + .../jni/deps/curl-7.73.0/tests/data/test817 | 40 + .../jni/deps/curl-7.73.0/tests/data/test818 | 46 + .../jni/deps/curl-7.73.0/tests/data/test819 | 56 + .../jni/deps/curl-7.73.0/tests/data/test82 | 54 + .../jni/deps/curl-7.73.0/tests/data/test820 | 57 + .../jni/deps/curl-7.73.0/tests/data/test821 | 59 + .../jni/deps/curl-7.73.0/tests/data/test822 | 72 + .../jni/deps/curl-7.73.0/tests/data/test823 | 63 + .../jni/deps/curl-7.73.0/tests/data/test824 | 56 + .../jni/deps/curl-7.73.0/tests/data/test825 | 56 + .../jni/deps/curl-7.73.0/tests/data/test826 | 57 + .../jni/deps/curl-7.73.0/tests/data/test827 | 72 + .../jni/deps/curl-7.73.0/tests/data/test828 | 56 + .../jni/deps/curl-7.73.0/tests/data/test829 | 29 + .../jni/deps/curl-7.73.0/tests/data/test83 | 79 + .../jni/deps/curl-7.73.0/tests/data/test830 | 56 + .../jni/deps/curl-7.73.0/tests/data/test831 | 68 + .../jni/deps/curl-7.73.0/tests/data/test832 | 58 + .../jni/deps/curl-7.73.0/tests/data/test833 | 65 + .../jni/deps/curl-7.73.0/tests/data/test834 | 77 + .../jni/deps/curl-7.73.0/tests/data/test835 | 67 + .../jni/deps/curl-7.73.0/tests/data/test836 | 59 + .../jni/deps/curl-7.73.0/tests/data/test837 | 56 + .../jni/deps/curl-7.73.0/tests/data/test838 | 56 + .../jni/deps/curl-7.73.0/tests/data/test839 | 56 + .../jni/deps/curl-7.73.0/tests/data/test84 | 54 + .../jni/deps/curl-7.73.0/tests/data/test840 | 56 + .../jni/deps/curl-7.73.0/tests/data/test841 | 51 + .../jni/deps/curl-7.73.0/tests/data/test842 | 59 + .../jni/deps/curl-7.73.0/tests/data/test843 | 57 + .../jni/deps/curl-7.73.0/tests/data/test844 | 52 + .../jni/deps/curl-7.73.0/tests/data/test845 | 54 + .../jni/deps/curl-7.73.0/tests/data/test846 | 50 + .../jni/deps/curl-7.73.0/tests/data/test847 | 49 + .../jni/deps/curl-7.73.0/tests/data/test848 | 56 + .../jni/deps/curl-7.73.0/tests/data/test849 | 51 + .../jni/deps/curl-7.73.0/tests/data/test85 | 58 + .../jni/deps/curl-7.73.0/tests/data/test850 | 49 + .../jni/deps/curl-7.73.0/tests/data/test851 | 44 + .../jni/deps/curl-7.73.0/tests/data/test852 | 47 + .../jni/deps/curl-7.73.0/tests/data/test853 | 52 + .../jni/deps/curl-7.73.0/tests/data/test854 | 45 + .../jni/deps/curl-7.73.0/tests/data/test855 | 47 + .../jni/deps/curl-7.73.0/tests/data/test856 | 48 + .../jni/deps/curl-7.73.0/tests/data/test857 | 60 + .../jni/deps/curl-7.73.0/tests/data/test858 | 41 + .../jni/deps/curl-7.73.0/tests/data/test859 | 41 + .../jni/deps/curl-7.73.0/tests/data/test86 | 94 + .../jni/deps/curl-7.73.0/tests/data/test860 | 41 + .../jni/deps/curl-7.73.0/tests/data/test861 | 52 + .../jni/deps/curl-7.73.0/tests/data/test862 | 50 + .../jni/deps/curl-7.73.0/tests/data/test863 | 41 + .../jni/deps/curl-7.73.0/tests/data/test864 | 54 + .../jni/deps/curl-7.73.0/tests/data/test865 | 57 + .../jni/deps/curl-7.73.0/tests/data/test866 | 58 + .../jni/deps/curl-7.73.0/tests/data/test867 | 60 + .../jni/deps/curl-7.73.0/tests/data/test868 | 73 + .../jni/deps/curl-7.73.0/tests/data/test869 | 64 + .../jni/deps/curl-7.73.0/tests/data/test87 | 61 + .../jni/deps/curl-7.73.0/tests/data/test870 | 57 + .../jni/deps/curl-7.73.0/tests/data/test871 | 56 + .../jni/deps/curl-7.73.0/tests/data/test872 | 57 + .../jni/deps/curl-7.73.0/tests/data/test873 | 72 + .../jni/deps/curl-7.73.0/tests/data/test874 | 56 + .../jni/deps/curl-7.73.0/tests/data/test875 | 29 + .../jni/deps/curl-7.73.0/tests/data/test876 | 57 + .../jni/deps/curl-7.73.0/tests/data/test877 | 69 + .../jni/deps/curl-7.73.0/tests/data/test878 | 59 + .../jni/deps/curl-7.73.0/tests/data/test879 | 66 + .../jni/deps/curl-7.73.0/tests/data/test88 | 99 + .../jni/deps/curl-7.73.0/tests/data/test880 | 78 + .../jni/deps/curl-7.73.0/tests/data/test881 | 68 + .../jni/deps/curl-7.73.0/tests/data/test882 | 58 + .../jni/deps/curl-7.73.0/tests/data/test883 | 57 + .../jni/deps/curl-7.73.0/tests/data/test884 | 57 + .../jni/deps/curl-7.73.0/tests/data/test885 | 56 + .../jni/deps/curl-7.73.0/tests/data/test886 | 56 + .../jni/deps/curl-7.73.0/tests/data/test887 | 58 + .../jni/deps/curl-7.73.0/tests/data/test888 | 57 + .../jni/deps/curl-7.73.0/tests/data/test889 | 56 + .../jni/deps/curl-7.73.0/tests/data/test89 | 145 + .../jni/deps/curl-7.73.0/tests/data/test890 | 55 + .../jni/deps/curl-7.73.0/tests/data/test891 | 47 + .../jni/deps/curl-7.73.0/tests/data/test892 | 57 + .../jni/deps/curl-7.73.0/tests/data/test893 | 53 + .../jni/deps/curl-7.73.0/tests/data/test894 | 37 + .../jni/deps/curl-7.73.0/tests/data/test895 | 50 + .../jni/deps/curl-7.73.0/tests/data/test896 | 38 + .../jni/deps/curl-7.73.0/tests/data/test9 | 72 + .../jni/deps/curl-7.73.0/tests/data/test90 | 193 + .../jni/deps/curl-7.73.0/tests/data/test900 | 51 + .../jni/deps/curl-7.73.0/tests/data/test901 | 63 + .../jni/deps/curl-7.73.0/tests/data/test902 | 57 + .../jni/deps/curl-7.73.0/tests/data/test903 | 56 + .../jni/deps/curl-7.73.0/tests/data/test904 | 57 + .../jni/deps/curl-7.73.0/tests/data/test905 | 59 + .../jni/deps/curl-7.73.0/tests/data/test906 | 72 + .../jni/deps/curl-7.73.0/tests/data/test907 | 63 + .../jni/deps/curl-7.73.0/tests/data/test908 | 56 + .../jni/deps/curl-7.73.0/tests/data/test909 | 51 + .../jni/deps/curl-7.73.0/tests/data/test91 | 122 + .../jni/deps/curl-7.73.0/tests/data/test910 | 51 + .../jni/deps/curl-7.73.0/tests/data/test911 | 46 + .../jni/deps/curl-7.73.0/tests/data/test912 | 55 + .../jni/deps/curl-7.73.0/tests/data/test913 | 50 + .../jni/deps/curl-7.73.0/tests/data/test914 | 49 + .../jni/deps/curl-7.73.0/tests/data/test915 | 51 + .../jni/deps/curl-7.73.0/tests/data/test916 | 47 + .../jni/deps/curl-7.73.0/tests/data/test917 | 55 + .../jni/deps/curl-7.73.0/tests/data/test918 | 48 + .../jni/deps/curl-7.73.0/tests/data/test919 | 55 + .../jni/deps/curl-7.73.0/tests/data/test92 | 67 + .../jni/deps/curl-7.73.0/tests/data/test920 | 56 + .../jni/deps/curl-7.73.0/tests/data/test921 | 71 + .../jni/deps/curl-7.73.0/tests/data/test922 | 55 + .../jni/deps/curl-7.73.0/tests/data/test923 | 37 + .../jni/deps/curl-7.73.0/tests/data/test924 | 43 + .../jni/deps/curl-7.73.0/tests/data/test925 | 40 + .../jni/deps/curl-7.73.0/tests/data/test926 | 44 + .../jni/deps/curl-7.73.0/tests/data/test927 | 43 + .../jni/deps/curl-7.73.0/tests/data/test928 | 41 + .../jni/deps/curl-7.73.0/tests/data/test929 | 38 + .../jni/deps/curl-7.73.0/tests/data/test93 | 51 + .../jni/deps/curl-7.73.0/tests/data/test930 | 38 + .../jni/deps/curl-7.73.0/tests/data/test931 | 29 + .../jni/deps/curl-7.73.0/tests/data/test932 | 56 + .../jni/deps/curl-7.73.0/tests/data/test933 | 68 + .../jni/deps/curl-7.73.0/tests/data/test934 | 58 + .../jni/deps/curl-7.73.0/tests/data/test935 | 65 + .../jni/deps/curl-7.73.0/tests/data/test936 | 77 + .../jni/deps/curl-7.73.0/tests/data/test937 | 67 + .../jni/deps/curl-7.73.0/tests/data/test938 | 65 + .../jni/deps/curl-7.73.0/tests/data/test939 | 50 + .../jni/deps/curl-7.73.0/tests/data/test94 | 56 + .../jni/deps/curl-7.73.0/tests/data/test940 | 45 + .../jni/deps/curl-7.73.0/tests/data/test941 | 66 + .../jni/deps/curl-7.73.0/tests/data/test942 | 56 + .../jni/deps/curl-7.73.0/tests/data/test943 | 56 + .../jni/deps/curl-7.73.0/tests/data/test944 | 55 + .../jni/deps/curl-7.73.0/tests/data/test945 | 55 + .../jni/deps/curl-7.73.0/tests/data/test946 | 57 + .../jni/deps/curl-7.73.0/tests/data/test947 | 56 + .../jni/deps/curl-7.73.0/tests/data/test948 | 58 + .../jni/deps/curl-7.73.0/tests/data/test949 | 57 + .../jni/deps/curl-7.73.0/tests/data/test95 | 81 + .../jni/deps/curl-7.73.0/tests/data/test950 | 43 + .../jni/deps/curl-7.73.0/tests/data/test951 | 45 + .../jni/deps/curl-7.73.0/tests/data/test952 | 45 + .../jni/deps/curl-7.73.0/tests/data/test953 | 56 + .../jni/deps/curl-7.73.0/tests/data/test954 | 55 + .../jni/deps/curl-7.73.0/tests/data/test955 | 59 + .../jni/deps/curl-7.73.0/tests/data/test956 | 57 + .../jni/deps/curl-7.73.0/tests/data/test957 | 51 + .../jni/deps/curl-7.73.0/tests/data/test958 | 51 + .../jni/deps/curl-7.73.0/tests/data/test959 | 60 + .../jni/deps/curl-7.73.0/tests/data/test96 | 46 + .../jni/deps/curl-7.73.0/tests/data/test960 | 58 + .../jni/deps/curl-7.73.0/tests/data/test961 | 52 + .../jni/deps/curl-7.73.0/tests/data/test962 | 63 + .../jni/deps/curl-7.73.0/tests/data/test963 | 63 + .../jni/deps/curl-7.73.0/tests/data/test964 | 49 + .../jni/deps/curl-7.73.0/tests/data/test965 | 66 + .../jni/deps/curl-7.73.0/tests/data/test966 | 66 + .../jni/deps/curl-7.73.0/tests/data/test967 | 55 + .../jni/deps/curl-7.73.0/tests/data/test968 | 52 + .../jni/deps/curl-7.73.0/tests/data/test969 | 51 + .../jni/deps/curl-7.73.0/tests/data/test97 | 50 + .../jni/deps/curl-7.73.0/tests/data/test970 | 65 + .../jni/deps/curl-7.73.0/tests/data/test971 | 30 + .../jni/deps/curl-7.73.0/tests/data/test98 | 53 + .../jni/deps/curl-7.73.0/tests/data/test99 | 67 + .../jni/deps/curl-7.73.0/tests/dictserver.py | 189 + .../jni/deps/curl-7.73.0/tests/directories.pm | 287 + .../deps/curl-7.73.0/tests/disable-scan.pl | 134 + .../jni/deps/curl-7.73.0/tests/error-codes.pl | 80 + .../jni/deps/curl-7.73.0/tests/extern-scan.pl | 62 + .../main/jni/deps/curl-7.73.0/tests/ftp.pm | 398 + .../jni/deps/curl-7.73.0/tests/ftpserver.pl | 3321 ++ .../jni/deps/curl-7.73.0/tests/getpart.pm | 340 + .../deps/curl-7.73.0/tests/http2-server.pl | 83 + .../jni/deps/curl-7.73.0/tests/httpserver.pl | 155 + .../curl-7.73.0/tests/libtest/CMakeLists.txt | 83 + .../curl-7.73.0/tests/libtest/Makefile.am | 148 + .../curl-7.73.0/tests/libtest/Makefile.in | 12548 ++++ .../curl-7.73.0/tests/libtest/Makefile.inc | 654 + .../tests/libtest/chkdecimalpoint.c | 41 + .../curl-7.73.0/tests/libtest/chkhostname.c | 47 + .../deps/curl-7.73.0/tests/libtest/first.c | 183 + .../deps/curl-7.73.0/tests/libtest/lib1156.c | 162 + .../deps/curl-7.73.0/tests/libtest/lib1500.c | 90 + .../deps/curl-7.73.0/tests/libtest/lib1501.c | 111 + .../deps/curl-7.73.0/tests/libtest/lib1502.c | 156 + .../deps/curl-7.73.0/tests/libtest/lib1506.c | 137 + .../deps/curl-7.73.0/tests/libtest/lib1507.c | 149 + .../deps/curl-7.73.0/tests/libtest/lib1508.c | 49 + .../deps/curl-7.73.0/tests/libtest/lib1509.c | 97 + .../deps/curl-7.73.0/tests/libtest/lib1510.c | 99 + .../deps/curl-7.73.0/tests/libtest/lib1511.c | 75 + .../deps/curl-7.73.0/tests/libtest/lib1512.c | 90 + .../deps/curl-7.73.0/tests/libtest/lib1513.c | 74 + .../deps/curl-7.73.0/tests/libtest/lib1514.c | 84 + .../deps/curl-7.73.0/tests/libtest/lib1515.c | 154 + .../deps/curl-7.73.0/tests/libtest/lib1517.c | 116 + .../deps/curl-7.73.0/tests/libtest/lib1518.c | 74 + .../deps/curl-7.73.0/tests/libtest/lib1520.c | 113 + .../deps/curl-7.73.0/tests/libtest/lib1522.c | 90 + .../deps/curl-7.73.0/tests/libtest/lib1523.c | 82 + .../deps/curl-7.73.0/tests/libtest/lib1525.c | 98 + .../deps/curl-7.73.0/tests/libtest/lib1526.c | 103 + .../deps/curl-7.73.0/tests/libtest/lib1527.c | 100 + .../deps/curl-7.73.0/tests/libtest/lib1528.c | 73 + .../deps/curl-7.73.0/tests/libtest/lib1529.c | 61 + .../deps/curl-7.73.0/tests/libtest/lib1530.c | 68 + .../deps/curl-7.73.0/tests/libtest/lib1531.c | 157 + .../deps/curl-7.73.0/tests/libtest/lib1532.c | 80 + .../deps/curl-7.73.0/tests/libtest/lib1533.c | 199 + .../deps/curl-7.73.0/tests/libtest/lib1534.c | 129 + .../deps/curl-7.73.0/tests/libtest/lib1535.c | 128 + .../deps/curl-7.73.0/tests/libtest/lib1536.c | 129 + .../deps/curl-7.73.0/tests/libtest/lib1537.c | 89 + .../deps/curl-7.73.0/tests/libtest/lib1538.c | 52 + .../deps/curl-7.73.0/tests/libtest/lib1540.c | 119 + .../deps/curl-7.73.0/tests/libtest/lib1550.c | 46 + .../deps/curl-7.73.0/tests/libtest/lib1551.c | 47 + .../deps/curl-7.73.0/tests/libtest/lib1552.c | 93 + .../deps/curl-7.73.0/tests/libtest/lib1553.c | 109 + .../deps/curl-7.73.0/tests/libtest/lib1554.c | 90 + .../deps/curl-7.73.0/tests/libtest/lib1555.c | 79 + .../deps/curl-7.73.0/tests/libtest/lib1556.c | 78 + .../deps/curl-7.73.0/tests/libtest/lib1557.c | 62 + .../deps/curl-7.73.0/tests/libtest/lib1558.c | 65 + .../deps/curl-7.73.0/tests/libtest/lib1559.c | 74 + .../deps/curl-7.73.0/tests/libtest/lib1560.c | 1104 + .../deps/curl-7.73.0/tests/libtest/lib1564.c | 142 + .../deps/curl-7.73.0/tests/libtest/lib1565.c | 204 + .../deps/curl-7.73.0/tests/libtest/lib1567.c | 52 + .../deps/curl-7.73.0/tests/libtest/lib1591.c | 118 + .../deps/curl-7.73.0/tests/libtest/lib1592.c | 121 + .../deps/curl-7.73.0/tests/libtest/lib1593.c | 79 + .../deps/curl-7.73.0/tests/libtest/lib1594.c | 66 + .../deps/curl-7.73.0/tests/libtest/lib1905.c | 93 + .../deps/curl-7.73.0/tests/libtest/lib1906.c | 72 + .../deps/curl-7.73.0/tests/libtest/lib1907.c | 54 + .../deps/curl-7.73.0/tests/libtest/lib1908.c | 62 + .../deps/curl-7.73.0/tests/libtest/lib1910.c | 47 + .../deps/curl-7.73.0/tests/libtest/lib1911.c | 87 + .../deps/curl-7.73.0/tests/libtest/lib1912.c | 80 + .../deps/curl-7.73.0/tests/libtest/lib1913.c | 48 + .../deps/curl-7.73.0/tests/libtest/lib3010.c | 66 + .../deps/curl-7.73.0/tests/libtest/lib500.c | 156 + .../deps/curl-7.73.0/tests/libtest/lib501.c | 58 + .../deps/curl-7.73.0/tests/libtest/lib502.c | 91 + .../deps/curl-7.73.0/tests/libtest/lib503.c | 101 + .../deps/curl-7.73.0/tests/libtest/lib504.c | 113 + .../deps/curl-7.73.0/tests/libtest/lib505.c | 150 + .../deps/curl-7.73.0/tests/libtest/lib506.c | 380 + .../deps/curl-7.73.0/tests/libtest/lib507.c | 100 + .../deps/curl-7.73.0/tests/libtest/lib508.c | 108 + .../deps/curl-7.73.0/tests/libtest/lib509.c | 115 + .../deps/curl-7.73.0/tests/libtest/lib510.c | 135 + .../deps/curl-7.73.0/tests/libtest/lib511.c | 56 + .../deps/curl-7.73.0/tests/libtest/lib512.c | 74 + .../deps/curl-7.73.0/tests/libtest/lib513.c | 83 + .../deps/curl-7.73.0/tests/libtest/lib514.c | 79 + .../deps/curl-7.73.0/tests/libtest/lib515.c | 60 + .../deps/curl-7.73.0/tests/libtest/lib516.c | 59 + .../deps/curl-7.73.0/tests/libtest/lib517.c | 164 + .../deps/curl-7.73.0/tests/libtest/lib518.c | 521 + .../deps/curl-7.73.0/tests/libtest/lib519.c | 62 + .../deps/curl-7.73.0/tests/libtest/lib520.c | 55 + .../deps/curl-7.73.0/tests/libtest/lib521.c | 56 + .../deps/curl-7.73.0/tests/libtest/lib523.c | 57 + .../deps/curl-7.73.0/tests/libtest/lib524.c | 55 + .../deps/curl-7.73.0/tests/libtest/lib525.c | 162 + .../deps/curl-7.73.0/tests/libtest/lib526.c | 184 + .../deps/curl-7.73.0/tests/libtest/lib533.c | 112 + .../deps/curl-7.73.0/tests/libtest/lib537.c | 523 + .../deps/curl-7.73.0/tests/libtest/lib539.c | 91 + .../deps/curl-7.73.0/tests/libtest/lib540.c | 246 + .../deps/curl-7.73.0/tests/libtest/lib541.c | 115 + .../deps/curl-7.73.0/tests/libtest/lib542.c | 73 + .../deps/curl-7.73.0/tests/libtest/lib543.c | 72 + .../deps/curl-7.73.0/tests/libtest/lib544.c | 95 + .../deps/curl-7.73.0/tests/libtest/lib547.c | 130 + .../deps/curl-7.73.0/tests/libtest/lib549.c | 65 + .../deps/curl-7.73.0/tests/libtest/lib552.c | 224 + .../deps/curl-7.73.0/tests/libtest/lib553.c | 115 + .../deps/curl-7.73.0/tests/libtest/lib554.c | 225 + .../deps/curl-7.73.0/tests/libtest/lib555.c | 163 + .../deps/curl-7.73.0/tests/libtest/lib556.c | 108 + .../deps/curl-7.73.0/tests/libtest/lib557.c | 1709 + .../deps/curl-7.73.0/tests/libtest/lib558.c | 52 + .../deps/curl-7.73.0/tests/libtest/lib559.c | 55 + .../deps/curl-7.73.0/tests/libtest/lib560.c | 113 + .../deps/curl-7.73.0/tests/libtest/lib562.c | 74 + .../deps/curl-7.73.0/tests/libtest/lib564.c | 93 + .../deps/curl-7.73.0/tests/libtest/lib566.c | 67 + .../deps/curl-7.73.0/tests/libtest/lib567.c | 69 + .../deps/curl-7.73.0/tests/libtest/lib568.c | 177 + .../deps/curl-7.73.0/tests/libtest/lib569.c | 126 + .../deps/curl-7.73.0/tests/libtest/lib570.c | 115 + .../deps/curl-7.73.0/tests/libtest/lib571.c | 213 + .../deps/curl-7.73.0/tests/libtest/lib572.c | 183 + .../deps/curl-7.73.0/tests/libtest/lib573.c | 113 + .../deps/curl-7.73.0/tests/libtest/lib574.c | 71 + .../deps/curl-7.73.0/tests/libtest/lib575.c | 114 + .../deps/curl-7.73.0/tests/libtest/lib576.c | 125 + .../deps/curl-7.73.0/tests/libtest/lib578.c | 105 + .../deps/curl-7.73.0/tests/libtest/lib579.c | 161 + .../deps/curl-7.73.0/tests/libtest/lib582.c | 357 + .../deps/curl-7.73.0/tests/libtest/lib583.c | 87 + .../deps/curl-7.73.0/tests/libtest/lib586.c | 246 + .../deps/curl-7.73.0/tests/libtest/lib589.c | 59 + .../deps/curl-7.73.0/tests/libtest/lib590.c | 71 + .../deps/curl-7.73.0/tests/libtest/lib591.c | 145 + .../deps/curl-7.73.0/tests/libtest/lib597.c | 126 + .../deps/curl-7.73.0/tests/libtest/lib598.c | 72 + .../deps/curl-7.73.0/tests/libtest/lib599.c | 97 + .../deps/curl-7.73.0/tests/libtest/lib643.c | 304 + .../deps/curl-7.73.0/tests/libtest/lib650.c | 214 + .../deps/curl-7.73.0/tests/libtest/lib651.c | 94 + .../deps/curl-7.73.0/tests/libtest/lib652.c | 131 + .../deps/curl-7.73.0/tests/libtest/lib653.c | 63 + .../deps/curl-7.73.0/tests/libtest/lib654.c | 172 + .../deps/curl-7.73.0/tests/libtest/lib655.c | 112 + .../deps/curl-7.73.0/tests/libtest/lib658.c | 76 + .../deps/curl-7.73.0/tests/libtest/lib659.c | 75 + .../deps/curl-7.73.0/tests/libtest/lib661.c | 150 + .../deps/curl-7.73.0/tests/libtest/lib666.c | 120 + .../deps/curl-7.73.0/tests/libtest/lib667.c | 117 + .../deps/curl-7.73.0/tests/libtest/lib668.c | 122 + .../deps/curl-7.73.0/tests/libtest/lib670.c | 259 + .../deps/curl-7.73.0/tests/libtest/lib674.c | 81 + .../curl-7.73.0/tests/libtest/libauthretry.c | 147 + .../tests/libtest/libntlmconnect.c | 234 + .../curl-7.73.0/tests/libtest/mk-lib1521.pl | 311 + .../curl-7.73.0/tests/libtest/notexists.pl | 36 + .../curl-7.73.0/tests/libtest/sethostname.c | 41 + .../curl-7.73.0/tests/libtest/sethostname.h | 40 + .../curl-7.73.0/tests/libtest/stub_gssapi.c | 449 + .../curl-7.73.0/tests/libtest/stub_gssapi.h | 182 + .../jni/deps/curl-7.73.0/tests/libtest/test.h | 492 + .../curl-7.73.0/tests/libtest/test1013.pl | 72 + .../curl-7.73.0/tests/libtest/test1022.pl | 75 + .../deps/curl-7.73.0/tests/libtest/test307.pl | 40 + .../deps/curl-7.73.0/tests/libtest/test610.pl | 54 + .../deps/curl-7.73.0/tests/libtest/test613.pl | 144 + .../curl-7.73.0/tests/libtest/testtrace.c | 144 + .../curl-7.73.0/tests/libtest/testtrace.h | 36 + .../deps/curl-7.73.0/tests/libtest/testutil.c | 130 + .../deps/curl-7.73.0/tests/libtest/testutil.h | 44 + .../deps/curl-7.73.0/tests/manpage-scan.pl | 291 + .../deps/curl-7.73.0/tests/manpage-syntax.pl | 63 + .../curl-7.73.0/tests/mem-include-scan.pl | 96 + .../jni/deps/curl-7.73.0/tests/memanalyze.pl | 425 + .../deps/curl-7.73.0/tests/negtelnetserver.py | 364 + .../jni/deps/curl-7.73.0/tests/nroff-scan.pl | 106 + .../deps/curl-7.73.0/tests/objnames-test08.sh | 217 + .../deps/curl-7.73.0/tests/objnames-test10.sh | 217 + .../jni/deps/curl-7.73.0/tests/objnames.inc | 107 + .../deps/curl-7.73.0/tests/options-scan.pl | 122 + .../jni/deps/curl-7.73.0/tests/pathhelp.pm | 761 + .../jni/deps/curl-7.73.0/tests/rtspserver.pl | 122 + .../jni/deps/curl-7.73.0/tests/runtests.1 | 147 + .../jni/deps/curl-7.73.0/tests/runtests.pl | 5821 ++ .../deps/curl-7.73.0/tests/secureserver.pl | 364 + .../curl-7.73.0/tests/server/CMakeLists.txt | 81 + .../deps/curl-7.73.0/tests/server/Makefile.am | 70 + .../deps/curl-7.73.0/tests/server/Makefile.in | 3437 ++ .../curl-7.73.0/tests/server/Makefile.inc | 113 + .../deps/curl-7.73.0/tests/server/base64.pl | 30 + .../deps/curl-7.73.0/tests/server/disabled.c | 79 + .../deps/curl-7.73.0/tests/server/fake_ntlm.c | 278 + .../deps/curl-7.73.0/tests/server/getpart.c | 482 + .../deps/curl-7.73.0/tests/server/getpart.h | 34 + .../jni/deps/curl-7.73.0/tests/server/mqttd.c | 1018 + .../deps/curl-7.73.0/tests/server/resolve.c | 156 + .../jni/deps/curl-7.73.0/tests/server/rtspd.c | 1392 + .../curl-7.73.0/tests/server/server_setup.h | 29 + .../tests/server/server_sockaddr.h | 41 + .../deps/curl-7.73.0/tests/server/sockfilt.c | 1551 + .../deps/curl-7.73.0/tests/server/socksd.c | 1053 + .../jni/deps/curl-7.73.0/tests/server/sws.c | 2368 + .../deps/curl-7.73.0/tests/server/testpart.c | 49 + .../jni/deps/curl-7.73.0/tests/server/tftp.h | 61 + .../jni/deps/curl-7.73.0/tests/server/tftpd.c | 1360 + .../jni/deps/curl-7.73.0/tests/server/util.c | 838 + .../jni/deps/curl-7.73.0/tests/server/util.h | 83 + .../jni/deps/curl-7.73.0/tests/serverhelp.pm | 256 + .../jni/deps/curl-7.73.0/tests/smbserver.py | 393 + .../jni/deps/curl-7.73.0/tests/sshhelp.pm | 473 + .../jni/deps/curl-7.73.0/tests/sshserver.pl | 1159 + .../jni/deps/curl-7.73.0/tests/stunnel.pem | 172 + .../jni/deps/curl-7.73.0/tests/symbol-scan.pl | 183 + .../jni/deps/curl-7.73.0/tests/testcurl.1 | 125 + .../jni/deps/curl-7.73.0/tests/testcurl.pl | 806 + .../jni/deps/curl-7.73.0/tests/tftpserver.pl | 123 + .../curl-7.73.0/tests/unit/CMakeLists.txt | 69 + .../deps/curl-7.73.0/tests/unit/Makefile.am | 79 + .../deps/curl-7.73.0/tests/unit/Makefile.in | 2746 + .../deps/curl-7.73.0/tests/unit/Makefile.inc | 156 + .../jni/deps/curl-7.73.0/tests/unit/README.md | 66 + .../deps/curl-7.73.0/tests/unit/curlcheck.h | 101 + .../deps/curl-7.73.0/tests/unit/unit1300.c | 221 + .../deps/curl-7.73.0/tests/unit/unit1301.c | 54 + .../deps/curl-7.73.0/tests/unit/unit1302.c | 165 + .../deps/curl-7.73.0/tests/unit/unit1303.c | 149 + .../deps/curl-7.73.0/tests/unit/unit1304.c | 210 + .../deps/curl-7.73.0/tests/unit/unit1305.c | 134 + .../deps/curl-7.73.0/tests/unit/unit1307.c | 323 + .../deps/curl-7.73.0/tests/unit/unit1308.c | 95 + .../deps/curl-7.73.0/tests/unit/unit1309.c | 142 + .../deps/curl-7.73.0/tests/unit/unit1323.c | 66 + .../deps/curl-7.73.0/tests/unit/unit1330.c | 41 + .../deps/curl-7.73.0/tests/unit/unit1394.c | 131 + .../deps/curl-7.73.0/tests/unit/unit1395.c | 94 + .../deps/curl-7.73.0/tests/unit/unit1396.c | 115 + .../deps/curl-7.73.0/tests/unit/unit1397.c | 79 + .../deps/curl-7.73.0/tests/unit/unit1398.c | 90 + .../deps/curl-7.73.0/tests/unit/unit1399.c | 117 + .../deps/curl-7.73.0/tests/unit/unit1600.c | 71 + .../deps/curl-7.73.0/tests/unit/unit1601.c | 56 + .../deps/curl-7.73.0/tests/unit/unit1602.c | 78 + .../deps/curl-7.73.0/tests/unit/unit1603.c | 150 + .../deps/curl-7.73.0/tests/unit/unit1604.c | 358 + .../deps/curl-7.73.0/tests/unit/unit1605.c | 55 + .../deps/curl-7.73.0/tests/unit/unit1606.c | 89 + .../deps/curl-7.73.0/tests/unit/unit1607.c | 219 + .../deps/curl-7.73.0/tests/unit/unit1608.c | 74 + .../deps/curl-7.73.0/tests/unit/unit1609.c | 218 + .../deps/curl-7.73.0/tests/unit/unit1610.c | 60 + .../deps/curl-7.73.0/tests/unit/unit1611.c | 58 + .../deps/curl-7.73.0/tests/unit/unit1612.c | 66 + .../deps/curl-7.73.0/tests/unit/unit1620.c | 88 + .../deps/curl-7.73.0/tests/unit/unit1621.c | 91 + .../deps/curl-7.73.0/tests/unit/unit1650.c | 295 + .../deps/curl-7.73.0/tests/unit/unit1651.c | 388 + .../deps/curl-7.73.0/tests/unit/unit1652.c | 133 + .../deps/curl-7.73.0/tests/unit/unit1653.c | 192 + .../deps/curl-7.73.0/tests/unit/unit1654.c | 138 + .../deps/curl-7.73.0/tests/unit/unit1655.c | 190 + .../jni/deps/curl-7.73.0/tests/valgrind.pm | 34 + .../jni/deps/curl-7.73.0/tests/valgrind.supp | 110 + .../deps/curl-7.73.0/tests/version-scan.pl | 66 + .../jni/deps/curl-7.73.0/winbuild/Makefile.vc | 300 + .../curl-7.73.0/winbuild/MakefileBuild.vc | 665 + .../jni/deps/curl-7.73.0/winbuild/README.md | 127 + .../curl-7.73.0/winbuild/gen_resp_file.bat | 32 + .../api/client/CustomerClassLoaderTest.java | 144 + .../runtime/api/client/FailureTest.java | 64 + .../runtime/api/client/UserFaultTest.java | 74 + .../api/client/XRayErrorCauseTest.java | 84 + .../api/client/api/LambdaContextTest.java | 59 + .../logging/FramedTelemetryLogSinkTest.java | 133 + .../api/client/logging/StdOutLogSinkTest.java | 53 + .../api/client/util/EnvWriterTest.java | 118 + .../factories/JacksonFactoryTest.java | 18 + .../test/java/testpkg/StackTraceHelper.java | 24 + .../test/integration/.gitignore | 2 + .../codebuild-local/Dockerfile.agent | 5 + .../codebuild-local/codebuild_build.sh | 194 + .../integration/codebuild-local/test_all.sh | 68 + .../integration/codebuild-local/test_one.sh | 59 + .../codebuild/buildspec.os.alpine.yml | 98 + .../codebuild/buildspec.os.amazoncorretto.yml | 93 + .../codebuild/buildspec.os.amazonlinux.yml | 93 + .../codebuild/buildspec.os.centos.yml | 94 + .../codebuild/buildspec.os.debian.yml | 95 + .../codebuild/buildspec.os.ubuntu.yml | 97 + .../docker/Dockerfile.function.alpine | 14 + .../docker/Dockerfile.function.amazoncorretto | 9 + .../docker/Dockerfile.function.amazonlinux | 11 + .../docker/Dockerfile.function.centos | 13 + .../docker/Dockerfile.function.debian | 22 + .../docker/Dockerfile.function.ubuntu | 23 + .../resources/aws-lambda-rie.tar.gz | Bin 0 -> 8159744 bytes .../test/integration/test-handler/pom.xml | 53 + .../src/main/java/helloworld/App.java | 18 + .../RELEASE.CHANGELOG.md | 3 + aws-lambda-java-serialization/pom.xml | 255 + .../runtime/serialization/PojoSerializer.java | 12 + .../events/LambdaEventSerializers.java | 287 + ...loudFormationCustomResourceEventMixin.java | 51 + .../events/mixins/CloudFrontEventMixin.java | 18 + .../mixins/CloudWatchLogsEventMixin.java | 16 + .../events/mixins/CodeCommitEventMixin.java | 32 + .../events/mixins/ConnectEventMixin.java | 98 + .../events/mixins/DynamodbEventMixin.java | 88 + .../events/mixins/KinesisEventMixin.java | 23 + .../events/mixins/SNSEventMixin.java | 23 + .../events/mixins/SQSEventMixin.java | 22 + .../events/mixins/ScheduledEventMixin.java | 16 + .../SecretsManagerRotationEventMixin.java | 24 + .../events/modules/DateModule.java | 63 + .../events/modules/DateTimeModule.java | 79 + .../events/serializers/OrgJsonSerializer.java | 47 + .../events/serializers/S3EventSerializer.java | 554 + .../serialization/factories/GsonFactory.java | 125 + .../factories/JacksonFactory.java | 238 + .../factories/PojoSerializerFactory.java | 12 + .../runtime/serialization/util/Functions.java | 54 + .../util/LambdaByteArrayOutputStream.java | 54 + .../serialization/util/ReflectUtil.java | 663 + .../serialization/util/SerializeUtil.java | 103 + .../events/LambdaEventSerializersTest.java | 217 + .../serializers/S3EventSerializerTest.java | 73 + .../api_gateway_proxy_request_event.json | 59 + .../api_gateway_proxy_response_event.json | 23 + .../event_models/cloud_front_event.json | 30 + .../event_models/cloud_watch_logs_event.json | 5 + .../event_models/code_commit_event.json | 27 + .../resources/event_models/cognito_event.json | 20 + .../resources/event_models/config_event.json | 12 + .../event_models/dynamodb_event.json | 166 + .../event_models/iot_button_event.json | 5 + ...cs_firehose_input_preprocessing_event.json | 14 + ...cs_input_preprocessing_response_event.json | 10 + ...nesis_analytics_output_delivery_event.json | 10 + ...lytics_output_delivery_response_event.json | 8 + ...ics_streams_input_preprocessing_event.json | 17 + .../resources/event_models/kinesis_event.json | 35 + .../event_models/kinesis_firehose_event.json | 33 + .../resources/event_models/lex_event.json | 24 + .../test/resources/event_models/s3_event.json | 40 + .../event_models/scheduled_event.json | 12 + .../resources/event_models/sns_event.json | 31 + .../resources/event_models/sqs_event.json | 40 + .../verify-relocation.sh | 35 + git-config/hooks/pre-commit | 41 + 3423 files changed, 688734 insertions(+), 8 deletions(-) create mode 100644 aws-lambda-java-runtime-interface-client/.gitignore create mode 100644 aws-lambda-java-runtime-interface-client/Makefile create mode 100644 aws-lambda-java-runtime-interface-client/README.md create mode 100644 aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md create mode 100644 aws-lambda-java-runtime-interface-client/pom.xml create mode 100644 aws-lambda-java-runtime-interface-client/src/.gitkeep create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/ClasspathLoader.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/CustomerClassLoader.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/EventHandlerLoader.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/Failure.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/HandlerInfo.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaEnvironment.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaRequestHandler.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserFault.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserMethods.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/XRayErrorCause.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContext.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContextClient.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaCognitoIdentity.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaContext.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FrameType.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FramedTelemetryLogSink.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LambdaContextLogger.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LogSink.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/StdOutLogSink.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/InvocationRequest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClient.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClientException.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvReader.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvWriter.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/LambdaOutputStream.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/UnsafeUtil.java create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/run-tests.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/ubuntu-18.04.yml create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/docker/alpine-linux-3.8 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/docker/amazon-linux-2017.03 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/docker/ubuntu-linux-18.04 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/cmake/aws-lambda-runtime-config.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/logging.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/runtime.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/version.cpp.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/.clang-tidy create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest-all.cc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/main.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/lambda_function.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/runtime_tests.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/version_tests.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CHANGES create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CMakeConfigurableFile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlSymbolHiding.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlTests.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBearSSL.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBrotli.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindCARES.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindGSS.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindLibSSH2.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindMbedTLS.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP2.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP3.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGTCP2.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNSS.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindQUICHE.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindWolfSSL.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindZstd.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Macros.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/OtherTests.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Platforms/WindowsCache.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Utilities.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/cmake_uninstall.cmake.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/curl-config.cmake.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/COPYING create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/MacOSX-Framework create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/README create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/RELEASE-NOTES create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/acinclude.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/aclocal.m4 create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf.bat create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/compile create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.guess create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.sub create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure.ac create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/curl-config.in create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/depcomp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ALTSVC.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BINDINGS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUG-BOUNTY.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUGS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CHECKSRC.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CIPHERS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_OF_CONDUCT.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_REVIEW.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_STYLE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CONTRIBUTE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CURL-DISABLE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DEPRECATE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DYNBUF.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ECH.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/EXPERIMENTAL.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FAQ create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FEATURES create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/GOVERNANCE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HELP-US.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HISTORY.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP-COOKIES.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP2.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP3.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INTERNALS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/KNOWN_BUGS create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MAIL-ETIQUETTE create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MQTT.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/PARALLEL-TRANSFERS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/RELEASE-PROCEDURE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ROADMAP.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SECURITY-PROCESS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSL-PROBLEMS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSLCERTS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/THANKS create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TODO create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TheArtOfHttpScripting.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/VERSIONS.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/MANPAGE.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/abstract-unix-socket.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/alt-svc.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/anyauth.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/append.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/basic.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cacert.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/capath.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-status.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-type.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ciphers.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed-ssh.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/config.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-timeout.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-to.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/continue-at.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie-jar.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/create-dirs.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlf.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlfile.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/curves.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-ascii.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-binary.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-raw.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-urlencode.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/delegation.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/digest.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-eprt.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-epsv.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disallow-username-in-url.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-interface.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv4-addr.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv6-addr.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-servers.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/doh-url.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dump-header.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/egd-file.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/engine.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-compare.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-save.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/expect100-timeout.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail-early.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/false-start.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form-string.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-account.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-alternative-to-user.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-create-dirs.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-method.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pasv.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-port.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pret.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-skip-pasv-ip.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc-mode.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-control.d create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/gen.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/get.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/globoff.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/happy-eyeballs-timeout-ms.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/haproxy-protocol.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/head.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/header.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/help.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/hostpubmd5.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http0.9.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.0.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.1.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2-prior-knowledge.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http3.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ignore-content-length.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/include.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/insecure.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/interface.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv4.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv6.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/junk-session-cookies.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/keepalive-time.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key-type.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/krb.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/libcurl.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/limit-rate.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/list-only.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/local-port.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location-trusted.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/login-options.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-auth.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-from.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt-allowfails.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/manual.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-filesize.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-redirs.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-time.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/metalink.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/negotiate.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-file.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-optional.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/next.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-alpn.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-buffer.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-keepalive.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-npn.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-progress-meter.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-sessionid.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/noproxy.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm-wb.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/oauth2-bearer.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output-dir.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-footer create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-header create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-immediate.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-max.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pass.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/path-as-is.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pinnedpubkey.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post301.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post302.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post303.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/preproxy.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/progress-bar.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-default.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-redir.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-anyauth.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-basic.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cacert.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-capath.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert-type.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ciphers.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-crlfile.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-digest.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-header.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-insecure.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key-type.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-negotiate.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ntlm.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pass.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pinnedpubkey.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-service-name.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ssl-allow-beast.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tls13-ciphers.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsauthtype.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlspassword.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsuser.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsv1.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-user.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy1.0.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxytunnel.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pubkey.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/quote.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/random-file.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/range.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/raw.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/referer.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-header-name.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name-all.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-time.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request-target.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/resolve.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-all-errors.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-connrefused.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-delay.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-max-time.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-authzid.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-ir.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/service-name.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/show-error.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/silent.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4a.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-basic.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-nec.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-service.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-hostname.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-limit.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-time.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-allow-beast.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-no-revoke.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-reqd.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-revoke-best-effort.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv2.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv3.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/stderr.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/styled-output.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/suppress-connect-headers.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-fastopen.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-nodelay.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/telnet-option.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-blksize.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-no-options.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/time-cond.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tls-max.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tls13-ciphers.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsauthtype.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlspassword.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsuser.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsv1.0.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsv1.1.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsv1.2.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsv1.3.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tlsv1.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tr-encoding.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/trace-ascii.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/trace-time.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/trace.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/unix-socket.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/upload-file.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/url.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/use-ascii.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/user-agent.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/user.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/verbose.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/version.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/write-out.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/xattr.d create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/curl-config.1 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/curl.1 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/10-at-a-time.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/Makefile.example create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/Makefile.m32 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/Makefile.netware create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/altsvc.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/anyauthput.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/cacertinmem.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/certinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/chkspeed.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/cookie_interface.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/crawler.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/curlgtk.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/curlx.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/debug.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ephiperfifo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/evhiperfifo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/externalsocket.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/fileupload.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/fopen.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftp-wildcard.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpget.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpgetinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpgetresp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpsget.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpupload.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpuploadfrommem.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ftpuploadresume.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/getinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/getinmemory.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/getredirect.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/ghiper.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/hiperfifo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/href_extractor.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/htmltidy.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/htmltitle.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http-post.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http2-download.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http2-pushinmemory.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http2-serverpush.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http2-upload.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http3-present.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/http3.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/httpcustomheader.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/httpput.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/https.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-append.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-authzid.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-copy.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-create.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-delete.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-examine.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-fetch.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-list.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-lsub.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-multi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-noop.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-search.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-ssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-store.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/imap-tls.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/makefile.dj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-app.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-debugcallback.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-double.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-event.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-formadd.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-poll.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-post.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-single.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multi-uv.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/multithread.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/opensslthreadlock.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/parseurl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/persistent.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-authzid.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-dele.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-list.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-multi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-noop.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-retr.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-ssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-stat.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-tls.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-top.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/pop3-uidl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/post-callback.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/postinmemory.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/postit2-formadd.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/postit2.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/progressfunc.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/resolve.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/rtsp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sampleconv.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sendrecv.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sepheaders.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sessioninfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sftpget.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sftpuploadresume.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/shared-connection-cache.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/simple.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/simplepost.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/simplessl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smooth-gtk-thread.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-authzid.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-expn.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-mail.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-mime.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-multi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-ssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-tls.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/smtp-vrfy.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/sslbackend.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/synctime.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/threaded-shared-conn.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/threaded-ssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/url2file.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/urlapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/usercertinmem.c create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/version-check.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/examples/xmlstream.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/ABI.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_cleanup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_duphandle.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_escape.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_getinfo.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_init.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_option_by_id.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_option_by_name.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_option_next.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_pause.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_perform.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_recv.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_reset.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_send.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_setopt.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_strerror.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_unescape.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_easy_upkeep.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_escape.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_formadd.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_formfree.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_formget.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_free.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_getdate.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_getenv.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_global_cleanup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_global_init.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_global_init_mem.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_global_sslset.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_addpart.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_data.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_data_cb.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_encoder.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_filedata.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_filename.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_free.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_headers.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_init.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_name.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_subparts.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mime_type.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_mprintf.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_add_handle.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_assign.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_cleanup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_fdset.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_info_read.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_init.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_perform.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_poll.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_remove_handle.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_setopt.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_socket.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_socket_action.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_socket_all.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_strerror.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_timeout.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_wait.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_multi_wakeup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_share_cleanup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_share_init.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_share_setopt.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_share_strerror.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_slist_append.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_slist_free_all.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_strequal.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_strnequal.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_unescape.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_url.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_url_cleanup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_url_dup.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_url_get.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_url_set.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_version.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/curl_version_info.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-easy.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-env.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-errors.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-multi.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-security.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-share.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-symbols.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-thread.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-tutorial.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl-url.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/libcurl.m4 create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/mksymbolsmanpage.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CERTINFO.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_COOKIELIST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_FILETIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_FILETIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_LASTSOCKET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_LOCAL_IP.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_OS_ERRNO.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PRIVATE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PROTOCOL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SCHEME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_TLS_SESSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_PIPELINING.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_PUSHDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ALTSVC.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_APPEND.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CAINFO.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CAPATH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CERTINFO.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_COOKIE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_COOKIELIST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CRLF.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CRLFILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CURLU.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DISALLOW_USERNAME_IN_URL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_DOH_URL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FAILONERROR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FILETIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTPPORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HEADER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HEADERDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HEADEROPT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTPGET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTPPOST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_INFILESIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_INTERFACE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_LOCALPORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLLOWFAILS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAXAGE_CONN.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_MIMEPOST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NETRC.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NOBODY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NOPROXY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PASSWORD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_POST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_POSTREDIR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PREQUOTE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PRE_PROXY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PRIVATE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYPORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_PUT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_QUOTE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RANGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_READDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_READFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_REFERER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RESOLVE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SASL_AUTHZID.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SASL_IR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SEEKDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SHARE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLCERT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLENGINE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLKEY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSLVERSION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_STDERR.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TIMEOUT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TRAILERDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_UPLOAD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_URL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_USERAGENT.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_USERNAME.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_USERPWD.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_USE_SSL.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_VERBOSE.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_WRITEDATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/opts/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/symbols-in-versions create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/libcurl/symbols.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/mk-ca-bundle.1 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/options-in-versions create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/curl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/curlver.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/easy.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/mprintf.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/multi.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/options.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/stdcheaders.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/system.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/typecheck-gcc.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/include/curl/urlapi.h create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/install-sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/Makefile.m32 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/Makefile.netware create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/Makefile.vxworks create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/altsvc.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/altsvc.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/amigaos.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/amigaos.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/arpa_telnet.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/asyn-ares.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/asyn-thread.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/asyn.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/base64.c create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/checksrc.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-amigaos.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-dos.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-mac.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-os400.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-plan9.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-riscos.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-tpf.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-vxworks.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-win32.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/config-win32ce.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/conncache.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/conncache.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/connect.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/connect.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/content_encoding.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/content_encoding.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/cookie.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/cookie.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_addrinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_addrinfo.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_base64.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_config.h.cmake create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_config.h.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ctype.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ctype.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_des.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_des.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_endian.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_endian.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_fnmatch.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_fnmatch.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_get_line.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_get_line.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_gethostname.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_gethostname.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_gssapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_gssapi.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_hmac.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_krb5.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ldap.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_md4.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_md5.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_memory.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_memrchr.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_memrchr.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_multibyte.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_multibyte.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ntlm_core.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ntlm_core.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ntlm_wb.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_ntlm_wb.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_path.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_path.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_printf.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_range.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_range.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_rtmp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_rtmp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_sasl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_sasl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_setup.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_setup_once.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_sha256.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_sspi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_sspi.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_threads.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curl_threads.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/curlx.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/dict.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/dict.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/doh.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/doh.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/dotdot.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/dotdot.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/dynbuf.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/dynbuf.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/easy.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/easygetopt.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/easyif.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/easyoptions.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/easyoptions.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/escape.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/escape.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/file.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/file.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/fileinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/fileinfo.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/firefox-db2pem.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/formdata.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/formdata.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/ftp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/ftp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/ftplistparser.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/ftplistparser.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/getenv.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/getinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/getinfo.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/gopher.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/gopher.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hash.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hash.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hmac.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostasyn.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostcheck.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostcheck.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostip.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostip.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostip4.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostip6.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/hostsyn.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http2.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http2.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_chunks.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_chunks.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_digest.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_digest.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_negotiate.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_negotiate.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_ntlm.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_ntlm.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_proxy.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/http_proxy.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/idn_win32.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/if2ip.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/if2ip.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/imap.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/imap.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/inet_ntop.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/inet_ntop.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/inet_pton.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/inet_pton.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/krb5.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/ldap.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/libcurl.plist create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/libcurl.rc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/libcurl.vers.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/llist.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/llist.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/makefile.amiga create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/makefile.dj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/md4.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/md5.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/memdebug.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/memdebug.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mime.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mime.h create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mk-ca-bundle.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mk-ca-bundle.vbs create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mprintf.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mqtt.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/mqtt.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/multi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/multihandle.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/multiif.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/netrc.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/netrc.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/non-ascii.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/non-ascii.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/nonblock.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/nonblock.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/nwlib.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/nwos.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/openldap.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/parsedate.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/parsedate.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/pingpong.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/pingpong.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/pop3.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/pop3.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/progress.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/progress.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/psl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/psl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/quic.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/rand.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/rand.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/rename.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/rename.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/rtsp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/rtsp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/select.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/select.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/sendf.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/sendf.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/setopt.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/setopt.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/setup-os400.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/setup-vms.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/setup-win32.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/sha256.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/share.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/share.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/sigpipe.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/slist.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/slist.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/smb.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/smb.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/smtp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/smtp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/sockaddr.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/socketpair.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/socketpair.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/socks.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/socks.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/socks_gssapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/socks_sspi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/speedcheck.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/speedcheck.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/splay.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/splay.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strcase.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strcase.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strdup.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strdup.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strerror.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strerror.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strtok.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strtok.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strtoofft.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/strtoofft.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/system_win32.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/system_win32.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/telnet.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/telnet.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/tftp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/tftp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/timeval.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/timeval.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/transfer.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/transfer.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/url.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/url.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/urlapi-int.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/urlapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/urldata.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/cleartext.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/cram.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/digest.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/digest.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/digest_sspi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/krb5_gssapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/krb5_sspi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/ntlm.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/ntlm.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/ntlm_sspi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/oauth2.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/spnego_gssapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/spnego_sspi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/vauth.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vauth/vauth.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/version.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/version_win32.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/version_win32.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vquic/ngtcp2.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vquic/ngtcp2.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vquic/quiche.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vquic/quiche.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vquic/vquic.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vquic/vquic.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vssh/libssh.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vssh/libssh2.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vssh/ssh.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vssh/wolfssh.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/bearssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/bearssl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/gskit.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/gskit.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/gtls.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/gtls.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/keylog.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/keylog.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/mbedtls.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/mbedtls.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/mbedtls_threadlock.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/mbedtls_threadlock.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/mesalink.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/mesalink.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/nss.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/nssg.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/openssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/openssl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/schannel.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/schannel.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/schannel_verify.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/sectransp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/sectransp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/vtls.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/vtls.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/wolfssl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/vtls/wolfssl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/warnless.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/warnless.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/wildcard.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/wildcard.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/x509asn1.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/lib/x509asn1.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/libcurl.pc.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/ltmain.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/ax_compile_check_sizeof.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/curl-compilers.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/curl-confopts.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/curl-functions.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/curl-openssl.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/curl-override.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/curl-reentrant.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/libtool.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/ltoptions.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/ltsugar.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/ltversion.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/lt~obsolete.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/xc-am-iface.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/xc-cc-check.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/xc-lt-iface.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/xc-translit.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/xc-val-flgs.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/zz40-xc-ovr.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/zz50-xc-ovr.m4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/m4/zz60-xc-ovr.m4 create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/maketgz create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/missing create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/Android/Android.mk create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/DOS/README create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/DOS/common.dj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/README.OS400 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/ccsidcurl.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/ccsidcurl.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/chkstrings.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/curl.inc.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/initscript.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/make-include.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/make-lib.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/make-src.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/make-tests.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/makefile.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/os400sys.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/OS400/os400sys.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/README create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/TPF/curl.mak create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/TPF/maketpf.env_curl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/TPF/maketpf.env_curllib create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/backup_gnv_curl_src.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_curl-config_script.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_gnv_curl.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_gnv_curl_pcsi_desc.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_gnv_curl_pcsi_text.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_gnv_curl_release_notes.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_libcurl_pc.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/build_vms.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/clean_gnv_curl.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/compare_curl_source.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/config_h.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curl_crtl_init.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curl_gnv_build_steps.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curl_release_note_start.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curl_startup.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curlmsg.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curlmsg.msg create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curlmsg.sdl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/curlmsg_vms.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/generate_config_vms_h_curl.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/generate_vax_transfer.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/gnv_conftest.c_first create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/gnv_curl_configure.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/gnv_libcurl_symbols.opt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/gnv_link_curl.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/macro32_exactcase.patch create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/make_gnv_curl_install.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/make_pcsi_curl_kit_name.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/pcsi_gnv_curl_file_list.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/pcsi_product_gnv_curl.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/readme create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/report_openssl_version.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/setup_gnv_curl_build.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/stage_curl_install.com create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/packages/vms/vms_eco_level.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/README create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/include/mkfile create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/lib/mkfile create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/lib/mkfile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/mkfile create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/mkfile.proto create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/src/mkfile create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/plan9/src/mkfile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/README create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/lib/libcurl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/lib/libcurl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/src/curl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC10/src/curl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/lib/libcurl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/lib/libcurl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/src/curl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC11/src/curl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/lib/libcurl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/lib/libcurl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/src/curl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC12/src/curl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/lib/libcurl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/lib/libcurl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/src/curl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC14/src/curl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/lib/libcurl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/lib/libcurl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/src/curl.vcxproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC15/src/curl.vcxproj.filters create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC6/curl-all.dsw create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC6/lib/libcurl.dsp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC6/lib/libcurl.dsw create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC6/src/curl.dsp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC6/src/curl.dsw create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7.1/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7.1/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7.1/lib/libcurl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7.1/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7.1/src/curl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7/lib/libcurl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC7/src/curl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC8/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC8/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC8/lib/libcurl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC8/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC8/src/curl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC9/curl-all.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC9/lib/libcurl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC9/lib/libcurl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC9/src/curl.sln create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/Windows/VC9/src/curl.vcproj create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/build-openssl.bat create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/build-wolfssl.bat create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/checksrc.bat create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/generate.bat create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/wolfssl_options.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/projects/wolfssl_override.props create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/scripts/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/scripts/Makefile.in create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/scripts/completion.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/scripts/coverage.sh create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/scripts/updatemanpages.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/Makefile.m32 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/Makefile.netware create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/curl.rc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/macos/MACINSTALL.TXT create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/macos/curl.mcp.xml.sit.hqx create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/macos/src/curl_GUSIConfig.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/macos/src/macos_main.cpp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/makefile.amiga create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/makefile.dj create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/mkhelp.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/slist_wc.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/slist_wc.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_binmode.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_binmode.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_bname.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_bname.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_dbg.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_dbg.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_hdr.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_hdr.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_prg.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_prg.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_rea.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_rea.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_see.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_see.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_wrt.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cb_wrt.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cfgable.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_cfgable.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_convert.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_convert.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_dirhie.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_dirhie.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_doswin.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_doswin.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_easysrc.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_easysrc.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_filetime.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_filetime.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_formparse.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_formparse.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_getparam.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_getparam.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_getpass.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_getpass.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_help.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_help.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_helpers.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_helpers.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_homedir.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_homedir.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_hugehelp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_hugehelp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_libinfo.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_libinfo.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_main.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_main.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_metalink.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_metalink.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_msgs.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_msgs.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_operate.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_operate.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_operhlp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_operhlp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_panykey.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_panykey.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_paramhlp.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_paramhlp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_parsecfg.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_parsecfg.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_progress.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_progress.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_sdecls.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_setopt.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_setopt.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_setup.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_sleep.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_sleep.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_strdup.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_strdup.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_urlglob.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_urlglob.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_util.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_util.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_version.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_vms.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_vms.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_writeout.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_writeout.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_writeout_json.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_writeout_json.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_xattr.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/src/tool_xattr.h create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/test-driver create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/FILEFORMAT.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/appveyor.pm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/azure.pm create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/badsymbols.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.cacert create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.cnf create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.crt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.csr create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.key create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/EdelCurlRoot-ca.prm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.crl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.crt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.csr create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.dhp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.key create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.pub.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-firstSAN-sv.pub.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.crl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.crt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.csr create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.dhp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.key create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.pub.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-lastSAN-sv.pub.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.crl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.crt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.csr create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.dhp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.key create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.prm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.pub.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost-sv.pub.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.crl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.crt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.csr create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.dhp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.key create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.prm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.pub.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost.nn-sv.pub.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.crl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.crt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.csr create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.dhp create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.key create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.prm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.pub.der create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/Server-localhost0h-sv.pub.pem create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/scripts/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/scripts/Makefile.in create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/scripts/genroot.sh create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/scripts/genserv.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/srp-verifier-conf create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/certs/srp-verifier-db create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/curl_test_data.py create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/DISABLED create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test10 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test100 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1000 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1001 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1002 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1003 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1004 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1005 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1006 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1007 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1008 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1009 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test101 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1010 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1011 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1012 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1013 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1014 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1015 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1016 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1017 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1018 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1019 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test102 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1020 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1021 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1022 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1023 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1024 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1025 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1026 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1027 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1028 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1029 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test103 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1030 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1031 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1032 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1033 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1034 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1035 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1036 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1037 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1038 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1039 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test104 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1040 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1041 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1042 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1043 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1044 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1045 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1046 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1047 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1048 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1049 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test105 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1050 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1051 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1052 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1053 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1054 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1055 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1056 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1057 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1058 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1059 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test106 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1060 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1061 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1062 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1063 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1064 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1065 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1066 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1067 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1068 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1069 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test107 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1070 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1071 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1072 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1073 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1074 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1075 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1076 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1077 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1078 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1079 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test108 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1080 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1081 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1082 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1083 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1084 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1085 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1086 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1087 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1088 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1089 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test109 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1090 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1091 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1092 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1093 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1094 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1095 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1096 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1097 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1098 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1099 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test11 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test110 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1100 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1101 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1102 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1103 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1104 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1105 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1106 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1107 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1108 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1109 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test111 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1110 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1111 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1112 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1113 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1114 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1115 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1116 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1117 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1118 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1119 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test112 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1120 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1121 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1122 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1123 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1124 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1125 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1126 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1127 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1128 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1129 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test113 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1130 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1131 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1132 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1133 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1134 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1135 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1136 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1137 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1138 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1139 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test114 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1140 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1141 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1142 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1143 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1144 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1145 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1146 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1147 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1148 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1149 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test115 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1150 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1151 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1152 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1153 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1154 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1155 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1156 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1157 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1158 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1159 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test116 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1160 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1161 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1162 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1163 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1164 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1165 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1166 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1167 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1168 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test117 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1170 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1171 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1172 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1173 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1174 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1175 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1176 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1177 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1178 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1179 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test118 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test119 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1190 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1191 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1192 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1193 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1194 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1195 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1196 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1197 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test12 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test120 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1200 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1201 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1202 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1203 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1204 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1205 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1206 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1207 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1208 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1209 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test121 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1210 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1211 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1212 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1213 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1214 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1215 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1216 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1217 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1218 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1219 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test122 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1220 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1221 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1222 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1223 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1224 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1225 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1226 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1227 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1228 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1229 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test123 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1230 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1231 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1232 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1233 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1234 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1235 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1236 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1237 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1238 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1239 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test124 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1240 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1241 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1242 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1243 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1244 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1245 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1246 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1247 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1248 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1249 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test125 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1250 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1251 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1252 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1253 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1254 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1255 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1256 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1257 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1258 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1259 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test126 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1260 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1261 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1262 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1263 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1264 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1265 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1266 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1267 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1268 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1269 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test127 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1270 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1271 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test128 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1280 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1281 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1282 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1283 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1284 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1285 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1286 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1287 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1288 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1289 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test129 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1290 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1291 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1292 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1293 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1294 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1295 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1296 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1297 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1298 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1299 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test13 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test130 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1300 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1301 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1302 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1303 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1304 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1305 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1306 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1307 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1308 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1309 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test131 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1310 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1311 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1312 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1313 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1314 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1315 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1316 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1317 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1318 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1319 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test132 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1320 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1321 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1322 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1323 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1324 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1325 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1326 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1327 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1328 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1329 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test133 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1330 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1331 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1332 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1333 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1334 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1335 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1336 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1337 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1338 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1339 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test134 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1340 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1341 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1342 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1343 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1344 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1345 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1346 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1347 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1348 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1349 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test135 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1350 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1351 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1352 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1353 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1354 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1355 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1356 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1357 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1358 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1359 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test136 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1360 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1361 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1362 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1363 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1364 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1365 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1366 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1367 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1368 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1369 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test137 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1370 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1371 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1372 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1373 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1374 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1375 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1376 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1377 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1378 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1379 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test138 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1380 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1381 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1382 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1383 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1384 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1385 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1386 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1387 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1388 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1389 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test139 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1390 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1391 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1392 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1393 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1394 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1395 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1396 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1397 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1398 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1399 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test14 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test140 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1400 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1401 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1402 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1403 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1404 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1405 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1406 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1407 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1408 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1409 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test141 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1410 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1411 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1412 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1413 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1414 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1415 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1416 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1417 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1418 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1419 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test142 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1420 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1421 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1422 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1423 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1424 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1425 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1426 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1427 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1428 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1429 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test143 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1430 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1431 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1432 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1433 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1434 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1435 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1436 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1437 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1438 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1439 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test144 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1440 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1441 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1442 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1443 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1444 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1445 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1446 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1447 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1448 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1449 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test145 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1450 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1451 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1452 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1453 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1454 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1455 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1456 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1457 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1458 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1459 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test146 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1460 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1461 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1462 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1463 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1464 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1465 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test147 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test148 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test149 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test15 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test150 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1500 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1501 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1502 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1503 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1504 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1505 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1506 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1507 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1508 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1509 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test151 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1510 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1511 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1512 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1513 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1514 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1515 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1516 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1517 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1518 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1519 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test152 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1520 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1521 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1522 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1523 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1524 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1525 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1526 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1527 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1528 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1529 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test153 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1530 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1531 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1532 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1533 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1534 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1535 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1536 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1537 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1538 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1539 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test154 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1540 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test155 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1550 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1551 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1552 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1553 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1554 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1555 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1556 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1557 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1558 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1559 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test156 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1560 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1561 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1562 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1563 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1564 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1565 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1566 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1567 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test157 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test158 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test159 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1590 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1591 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1592 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1593 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1594 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1595 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1596 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test16 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test160 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1600 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1601 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1602 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1603 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1604 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1605 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1606 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1607 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1608 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1609 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test161 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1610 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1611 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1612 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test162 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1620 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1621 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test163 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1630 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1631 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1632 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1633 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test164 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test165 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1650 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1651 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1652 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1653 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1654 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1655 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test166 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test167 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test168 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test169 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test17 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test170 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1700 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1701 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1702 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test171 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test172 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test173 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test174 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test175 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test176 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test177 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test178 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test179 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test18 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test180 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1800 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1801 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test181 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test182 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test183 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test184 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test185 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test186 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test187 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test188 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test189 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test19 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test190 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1904 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1905 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1906 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1907 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1908 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1909 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test191 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1910 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1911 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1912 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1913 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test1914 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test192 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test193 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test194 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test195 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test196 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test197 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test198 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test199 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test20 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test200 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2000 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2001 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2002 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2003 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2004 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2005 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2006 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2007 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2008 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2009 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test201 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2010 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2011 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2012 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2013 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2014 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2015 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2016 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2017 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2018 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2019 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test202 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2020 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2021 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2022 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2023 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2024 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2025 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2026 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2027 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2028 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2029 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test203 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2030 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2031 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2032 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2034 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2035 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2036 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2037 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2038 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2039 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test204 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2040 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2041 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2042 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2043 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2044 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2045 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2046 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2047 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2048 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2049 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test205 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2050 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2051 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2052 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2053 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2054 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2055 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2056 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2057 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2058 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2059 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test206 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2060 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2061 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2062 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2063 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2064 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2065 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2066 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2067 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2068 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2069 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test207 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2070 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2071 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2072 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2073 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2074 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2075 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2076 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2077 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2078 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test208 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2080 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test209 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test21 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test210 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test2100 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test211 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test212 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test213 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test214 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test215 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test216 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test217 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test218 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test219 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test22 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test220 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test221 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test222 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test223 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test224 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test225 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test226 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test227 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test228 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test229 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test23 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test230 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test231 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test232 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test233 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test234 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test235 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test236 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test237 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test238 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test239 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test24 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test240 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test241 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test242 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test243 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test244 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test245 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test246 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test247 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test248 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test249 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test25 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test250 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test251 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test252 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test253 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test254 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test255 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test256 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test257 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test258 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test259 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test26 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test260 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test261 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test262 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test263 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test264 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test265 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test266 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test267 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test268 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test269 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test27 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test270 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test271 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test272 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test273 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test274 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test275 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test276 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test277 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test278 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test279 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test28 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test280 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test281 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test282 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test283 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test284 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test285 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test286 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test287 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test288 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test289 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test29 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test290 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test291 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test292 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test293 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test294 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test295 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test296 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test297 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test298 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test299 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test30 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test300 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3000 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3001 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3002 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3003 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3004 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3005 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3006 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3007 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3008 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3009 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test301 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3010 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3011 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3012 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3013 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3014 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test3015 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test302 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test303 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test304 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test305 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test306 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test307 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test308 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test309 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test31 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test310 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test311 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test312 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test313 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test314 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test315 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test316 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test317 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test318 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test319 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test32 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test320 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test321 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test322 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test323 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test324 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test325 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test326 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test327 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test328 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test329 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test33 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test330 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test331 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test332 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test333 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test334 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test335 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test336 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test337 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test338 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test339 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test34 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test340 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test341 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test342 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test343 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test344 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test345 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test346 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test347 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test348 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test35 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test350 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test351 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test352 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test353 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test354 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test355 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test356 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test357 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test358 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test359 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test36 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test37 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test38 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test39 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test393 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test394 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test395 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test396 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test397 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test4 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test40 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test400 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test401 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test402 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test403 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test404 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test405 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test406 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test407 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test408 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test409 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test41 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test42 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test43 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test430 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test431 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test432 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test433 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test434 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test44 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test45 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test46 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test47 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test48 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test49 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test490 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test491 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test492 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test5 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test50 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test500 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test501 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test502 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test503 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test504 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test505 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test506 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test507 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test508 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test509 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test51 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test510 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test511 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test512 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test513 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test514 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test515 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test516 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test517 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test518 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test519 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test52 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test520 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test521 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test522 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test523 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test524 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test525 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test526 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test527 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test528 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test529 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test53 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test531 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test532 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test533 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test534 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test535 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test537 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test538 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test539 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test54 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test540 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test541 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test542 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test543 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test544 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test545 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test546 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test547 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test548 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test549 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test55 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test550 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test551 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test552 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test553 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test554 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test555 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test556 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test557 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test558 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test559 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test56 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test560 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test561 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test562 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test563 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test564 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test565 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test566 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test567 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test568 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test569 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test57 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test570 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test571 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test572 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test573 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test574 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test575 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test576 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test577 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test578 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test579 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test58 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test580 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test581 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test582 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test583 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test585 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test586 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test587 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test588 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test589 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test59 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test590 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test591 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test592 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test593 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test594 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test595 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test596 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test597 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test598 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test599 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test6 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test60 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test600 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test601 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test602 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test603 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test604 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test605 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test606 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test607 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test608 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test609 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test61 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test610 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test611 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test612 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test613 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test614 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test615 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test616 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test617 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test618 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test619 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test62 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test620 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test621 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test622 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test623 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test624 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test625 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test626 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test627 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test628 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test629 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test63 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test630 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test631 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test632 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test633 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test634 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test635 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test636 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test637 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test638 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test639 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test64 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test640 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test641 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test642 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test643 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test644 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test645 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test646 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test647 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test648 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test649 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test65 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test650 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test651 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test652 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test653 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test654 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test655 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test656 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test658 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test659 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test66 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test660 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test661 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test662 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test663 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test664 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test665 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test666 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test667 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test668 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test669 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test67 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test670 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test671 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test672 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test673 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test674 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test68 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test69 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test7 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test70 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test700 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test701 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test702 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test703 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test704 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test705 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test706 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test707 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test708 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test709 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test71 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test710 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test711 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test712 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test713 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test714 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test715 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test716 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test717 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test72 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test73 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test74 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test75 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test76 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test77 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test78 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test79 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test8 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test80 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test800 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test801 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test802 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test803 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test804 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test805 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test806 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test807 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test808 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test809 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test81 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test810 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test811 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test812 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test813 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test814 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test815 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test816 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test817 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test818 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test819 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test82 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test820 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test821 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test822 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test823 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test824 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test825 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test826 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test827 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test828 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test829 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test83 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test830 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test831 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test832 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test833 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test834 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test835 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test836 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test837 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test838 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test839 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test84 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test840 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test841 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test842 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test843 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test844 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test845 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test846 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test847 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test848 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test849 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test85 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test850 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test851 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test852 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test853 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test854 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test855 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test856 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test857 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test858 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test859 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test86 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test860 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test861 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test862 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test863 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test864 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test865 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test866 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test867 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test868 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test869 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test87 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test870 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test871 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test872 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test873 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test874 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test875 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test876 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test877 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test878 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test879 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test88 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test880 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test881 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test882 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test883 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test884 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test885 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test886 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test887 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test888 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test889 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test89 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test890 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test891 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test892 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test893 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test894 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test895 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test896 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test9 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test90 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test900 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test901 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test902 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test903 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test904 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test905 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test906 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test907 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test908 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test909 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test91 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test910 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test911 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test912 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test913 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test914 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test915 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test916 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test917 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test918 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test919 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test92 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test920 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test921 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test922 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test923 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test924 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test925 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test926 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test927 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test928 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test929 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test93 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test930 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test931 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test932 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test933 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test934 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test935 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test936 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test937 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test938 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test939 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test94 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test940 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test941 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test942 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test943 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test944 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test945 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test946 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test947 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test948 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test949 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test95 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test950 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test951 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test952 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test953 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test954 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test955 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test956 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test957 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test958 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test959 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test96 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test960 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test961 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test962 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test963 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test964 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test965 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test966 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test967 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test968 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test969 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test97 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test970 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test971 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test98 create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/data/test99 create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/dictserver.py create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/directories.pm create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/disable-scan.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/error-codes.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/extern-scan.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/ftp.pm create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/ftpserver.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/getpart.pm create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/http2-server.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/httpserver.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/chkdecimalpoint.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/chkhostname.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/first.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1156.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1500.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1501.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1502.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1506.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1507.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1508.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1509.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1510.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1511.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1512.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1513.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1514.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1515.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1517.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1518.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1520.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1522.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1523.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1525.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1526.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1527.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1528.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1529.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1530.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1531.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1532.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1533.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1534.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1535.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1536.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1537.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1538.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1540.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1550.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1551.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1552.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1553.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1554.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1555.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1556.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1557.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1558.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1559.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1560.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1564.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1565.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1567.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1591.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1592.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1593.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1594.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1905.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1906.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1907.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1908.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1910.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1911.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1912.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib1913.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib3010.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib500.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib501.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib502.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib503.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib504.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib505.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib506.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib507.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib508.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib509.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib510.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib511.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib512.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib513.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib514.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib515.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib516.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib517.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib518.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib519.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib520.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib521.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib523.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib524.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib525.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib526.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib533.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib537.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib539.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib540.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib541.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib542.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib543.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib544.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib547.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib549.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib552.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib553.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib554.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib555.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib556.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib557.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib558.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib559.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib560.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib562.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib564.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib566.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib567.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib568.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib569.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib570.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib571.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib572.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib573.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib574.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib575.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib576.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib578.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib579.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib582.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib583.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib586.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib589.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib590.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib591.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib597.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib598.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib599.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib643.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib650.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib651.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib652.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib653.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib654.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib655.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib658.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib659.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib661.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib666.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib667.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib668.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib670.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/lib674.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/libauthretry.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/libntlmconnect.c create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/mk-lib1521.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/notexists.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/sethostname.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/sethostname.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/stub_gssapi.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/stub_gssapi.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/test.h create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/test1013.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/test1022.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/test307.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/test610.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/test613.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/testtrace.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/testtrace.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/testutil.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/libtest/testutil.h create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/manpage-scan.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/manpage-syntax.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/mem-include-scan.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/memanalyze.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/negtelnetserver.py create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/nroff-scan.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/objnames-test08.sh create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/objnames-test10.sh create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/objnames.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/options-scan.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/pathhelp.pm create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/rtspserver.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/runtests.1 create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/runtests.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/secureserver.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/Makefile.inc create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/base64.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/disabled.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/fake_ntlm.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/getpart.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/getpart.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/mqttd.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/resolve.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/rtspd.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/server_setup.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/server_sockaddr.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/sockfilt.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/socksd.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/sws.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/testpart.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/tftp.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/tftpd.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/util.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/server/util.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/serverhelp.pm create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/smbserver.py create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/sshhelp.pm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/sshserver.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/stunnel.pem create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/symbol-scan.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/testcurl.1 create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/testcurl.pl create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/tftpserver.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/CMakeLists.txt create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/Makefile.am create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/Makefile.in create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/Makefile.inc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/README.md create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/curlcheck.h create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1300.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1301.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1302.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1303.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1304.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1305.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1307.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1308.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1309.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1323.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1330.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1394.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1395.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1396.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1397.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1398.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1399.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1600.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1601.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1602.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1603.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1604.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1605.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1606.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1607.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1608.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1609.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1610.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1611.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1612.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1620.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1621.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1650.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1651.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1652.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1653.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1654.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/unit/unit1655.c create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/valgrind.pm create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/valgrind.supp create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/tests/version-scan.pl create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/winbuild/Makefile.vc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/winbuild/MakefileBuild.vc create mode 100644 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/winbuild/README.md create mode 100755 aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/winbuild/gen_resp_file.bat create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/CustomerClassLoaderTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/FailureTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/UserFaultTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/XRayErrorCauseTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaContextTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/logging/FramedTelemetryLogSinkTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/logging/StdOutLogSinkTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvWriterTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/serialization/factories/JacksonFactoryTest.java create mode 100644 aws-lambda-java-runtime-interface-client/src/test/java/testpkg/StackTraceHelper.java create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/.gitignore create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild-local/Dockerfile.agent create mode 100755 aws-lambda-java-runtime-interface-client/test/integration/codebuild-local/codebuild_build.sh create mode 100755 aws-lambda-java-runtime-interface-client/test/integration/codebuild-local/test_all.sh create mode 100755 aws-lambda-java-runtime-interface-client/test/integration/codebuild-local/test_one.sh create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild/buildspec.os.alpine.yml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild/buildspec.os.amazoncorretto.yml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild/buildspec.os.amazonlinux.yml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild/buildspec.os.centos.yml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild/buildspec.os.debian.yml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/codebuild/buildspec.os.ubuntu.yml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/docker/Dockerfile.function.alpine create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/docker/Dockerfile.function.amazoncorretto create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/docker/Dockerfile.function.amazonlinux create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/docker/Dockerfile.function.centos create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/docker/Dockerfile.function.debian create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/docker/Dockerfile.function.ubuntu create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/resources/aws-lambda-rie.tar.gz create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/test-handler/pom.xml create mode 100644 aws-lambda-java-runtime-interface-client/test/integration/test-handler/src/main/java/helloworld/App.java create mode 100644 aws-lambda-java-serialization/RELEASE.CHANGELOG.md create mode 100644 aws-lambda-java-serialization/pom.xml create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/PojoSerializer.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/LambdaEventSerializers.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/CloudFormationCustomResourceEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/CloudFrontEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/CloudWatchLogsEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/CodeCommitEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/ConnectEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/DynamodbEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/KinesisEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/SNSEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/SQSEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/ScheduledEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/mixins/SecretsManagerRotationEventMixin.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/modules/DateModule.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/modules/DateTimeModule.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/serializers/OrgJsonSerializer.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/serializers/S3EventSerializer.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/factories/GsonFactory.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/factories/JacksonFactory.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/factories/PojoSerializerFactory.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/util/Functions.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/util/LambdaByteArrayOutputStream.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/util/ReflectUtil.java create mode 100644 aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/util/SerializeUtil.java create mode 100644 aws-lambda-java-serialization/src/test/java/com/amazonaws/services/lambda/runtime/serialization/events/LambdaEventSerializersTest.java create mode 100644 aws-lambda-java-serialization/src/test/java/com/amazonaws/services/lambda/runtime/serialization/events/serializers/S3EventSerializerTest.java create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/api_gateway_proxy_request_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/api_gateway_proxy_response_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/cloud_front_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/cloud_watch_logs_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/code_commit_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/cognito_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/config_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/dynamodb_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/iot_button_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_analytics_firehose_input_preprocessing_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_analytics_input_preprocessing_response_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_analytics_output_delivery_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_analytics_output_delivery_response_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_analytics_streams_input_preprocessing_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/kinesis_firehose_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/lex_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/s3_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/scheduled_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/sns_event.json create mode 100644 aws-lambda-java-serialization/src/test/resources/event_models/sqs_event.json create mode 100755 aws-lambda-java-serialization/verify-relocation.sh create mode 100755 git-config/hooks/pre-commit diff --git a/.github/workflows/maven-build-all.yml b/.github/workflows/maven-build-all.yml index 67c4a611..afe75d98 100644 --- a/.github/workflows/maven-build-all.yml +++ b/.github/workflows/maven-build-all.yml @@ -31,3 +31,7 @@ jobs: run: mvn -B package --file aws-lambda-java-events-sdk-transformer/pom.xml - name: Build log4j2 with Maven run: mvn -B package --file aws-lambda-java-log4j2/pom.xml + - name: Build serialization with Maven + run: mvn -B package --file aws-lambda-java-serialization/pom.xml + - name: Build runtime-interface-client with Maven + run: mvn -B package --file aws-lambda-java-runtime-interface-client/pom.xml diff --git a/.gitignore b/.gitignore index e7133935..fbdc4bbe 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,12 @@ hs_err_pid* # Maven build target/ +dependency-reduced-pom.xml # IDEA internal *.iml .idea +.gradle +.settings +.classpath +.project \ No newline at end of file diff --git a/README.md b/README.md index 57e03ea1..ba4cf48e 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ Check out the per-module release notes: - [aws-lambda-java-events](aws-lambda-java-events/RELEASE.CHANGELOG.md) - [aws-lambda-java-events-sdk-transformer](aws-lambda-java-events-sdk-transformer/RELEASE.CHANGELOG.md) - [aws-lambda-java-log4j2](aws-lambda-java-log4j2/RELEASE.CHANGELOG.md) +- [aws-lambda-java-runtime-interface-client](aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md) +- [aws-lambda-java-serialization](aws-lambda-java-serialization/RELEASE.CHANGELOG.md) # Where to get packages ___ @@ -34,45 +36,53 @@ ___ com.amazonaws aws-lambda-java-events - 3.4.0 + 3.6.0 com.amazonaws aws-lambda-java-events-sdk-transformer - 2.0.6 + 2.0.8 com.amazonaws aws-lambda-java-log4j2 1.2.0 + + com.amazonaws + aws-lambda-java-runtime-interface-client + 1.0.0 + ``` [Gradle](https://gradle.org) ```groovy 'com.amazonaws:aws-lambda-java-core:1.2.1' -'com.amazonaws:aws-lambda-java-events:3.4.0' -'com.amazonaws:aws-lambda-java-events-sdk-transformer:2.0.6' +'com.amazonaws:aws-lambda-java-events:3.6.0' +'com.amazonaws:aws-lambda-java-events-sdk-transformer:2.0.8' 'com.amazonaws:aws-lambda-java-log4j2:1.2.0' +'com.amazonaws:aws-lambda-java-runtime-interface-client:1.0.0' ``` [Leiningen](http://leiningen.org) and [Boot](http://boot-clj.com) ```clojure [com.amazonaws/aws-lambda-java-core "1.2.1"] -[com.amazonaws/aws-lambda-java-events "3.4.0"] -[com.amazonaws/aws-lambda-java-events-sdk-transformer "2.0.6"] +[com.amazonaws/aws-lambda-java-events "3.6.0"] +[com.amazonaws/aws-lambda-java-events-sdk-transformer "2.0.8"] [com.amazonaws/aws-lambda-java-log4j2 "1.2.0"] +[com.amazonaws/aws-lambda-java-runtime-interface-client "1.0.0"] ``` [sbt](http://www.scala-sbt.org) ```scala "com.amazonaws" % "aws-lambda-java-core" % "1.2.1" -"com.amazonaws" % "aws-lambda-java-events" % "3.4.0" -"com.amazonaws" % "aws-lambda-java-events-sdk-transformer" % "2.0.6" +"com.amazonaws" % "aws-lambda-java-events" % "3.6.0" +"com.amazonaws" % "aws-lambda-java-events-sdk-transformer" % "2.0.8" "com.amazonaws" % "aws-lambda-java-log4j2" % "1.2.0" +"com.amazonaws" % "aws-lambda-java-runtime-interface-client" % "1.0.0" ``` # Using aws-lambda-java-core @@ -95,3 +105,12 @@ See the [documentation](aws-lambda-java-events-sdk-transformer/README.md) for mo This package defines the Lambda adapter to use with log4j version 2. See the [README](aws-lambda-java-log4j2/README.md) or the [official documentation](http://docs.aws.amazon.com/lambda/latest/dg/java-logging.html#java-wt-logging-using-log4j) for information on how to use the adapter. + +# Using aws-lambda-java-runtime-interface-client + +This package defines the Lambda Java Runtime Interface Client package, a Lambda Runtime component that starts the runtime and interacts with the Runtime API - i.e., it calls the API for invocation events, starts the function code, calls the API to return the response. +The purpose of this package is to allow developers to deploy their applications in Lambda under the form of Container Images. See the [README](aws-lambda-java-runtime-interface-client/README.md) for information on how to use the library. + +# Using aws-lambda-java-serialization + +This package defines the Lambda serialization logic using in the aws-lambda-java-runtime-client library. It has no current standalone usage. diff --git a/aws-lambda-java-runtime-interface-client/.gitignore b/aws-lambda-java-runtime-interface-client/.gitignore new file mode 100644 index 00000000..73a7f328 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/.gitignore @@ -0,0 +1 @@ +compile-flags.txt diff --git a/aws-lambda-java-runtime-interface-client/Makefile b/aws-lambda-java-runtime-interface-client/Makefile new file mode 100644 index 00000000..a88954e9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/Makefile @@ -0,0 +1,44 @@ +.PHONY: target +target: + $(info ${HELP_MESSAGE}) + @exit 0 + +.PHONY: test +test: + mvn test + +.PHONY: setup-codebuild-agent +setup-codebuild-agent: + docker build -t codebuild-agent - < test/integration/codebuild-local/Dockerfile.agent + +.PHONY: test-smoke +test-smoke: setup-codebuild-agent + CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_one.sh test/integration/codebuild/buildspec.os.alpine.yml alpine 3.12 corretto11 + +.PHONY: test-integ +test-integ: setup-codebuild-agent + CODEBUILD_IMAGE_TAG=codebuild-agent test/integration/codebuild-local/test_all.sh test/integration/codebuild + +# Command to run everytime you make changes to verify everything works +.PHONY: dev +dev: test + +# Verifications to run before sending a pull request +.PHONY: pr +pr: test test-smoke + +.PHONY: build +build: + mvn clean install + +define HELP_MESSAGE + +Usage: $ make [TARGETS] + +TARGETS + build Builds the package. + dev Run all development tests after a change. + pr Perform all checks before submitting a Pull Request. + test Run the Unit tests. + +endef diff --git a/aws-lambda-java-runtime-interface-client/README.md b/aws-lambda-java-runtime-interface-client/README.md new file mode 100644 index 00000000..04bdb9e9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/README.md @@ -0,0 +1,131 @@ +## AWS Lambda Java Runtime Interface Client + +We have open-sourced a set of software packages, Runtime Interface Clients (RIC), that implement the Lambda + [Runtime API](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html), allowing you to seamlessly extend your preferred + base images to be Lambda compatible. +The Lambda Runtime Interface Client is a lightweight interface that allows your runtime to receive requests from and send requests to the Lambda service. + +You can include this package in your preferred base image to make that base image Lambda compatible. + +## Usage + +### Creating a Docker Image for Lambda with the Runtime Interface Client + +Choose a preferred base image. The Runtime Interface Client is tested on Amazon Linux, Alpine, Ubuntu, Debian, and CentOS. The requirements are that the image is: + +* built for x86_64 +* contains Java >= 8 +* contains glibc >= 2.12 or musl + +### Example + +The Runtime Interface Client library can be installed into the image separate from the function code, but the simplest approach to keeping the Dockerfile simple is to include the library as a part of the function's dependencies! + +Dockerfile +```dockerfile +# we'll use Amazon Linux 2 + Corretto 11 as our base +FROM amazoncorretto:11 as base + +# configure the build environment +FROM base as build +RUN yum install -y maven +WORKDIR /src + +# cache and copy dependencies +ADD pom.xml . +RUN mvn dependency:go-offline dependency:copy-dependencies + +# compile the function +ADD . . +RUN mvn package + +# copy the function artifact and dependencies onto a clean base +FROM base +WORKDIR /function + +COPY --from=build /src/target/dependency/*.jar ./ +COPY --from=build /src/target/*.jar ./ + +# configure the runtime startup as main +ENTRYPOINT [ "java", "-cp", "./*", "com.amazonaws.services.lambda.runtime.api.client.AWSLambda" ] +# pass the name of the function handler as an argument to the runtime +CMD [ "example.App::sayHello" ] +``` +pom.xml +```xml + + 4.0.0 + example + hello-lambda + jar + 1.0-SNAPSHOT + hello-lambda + http://maven.apache.org + + 1.8 + 1.8 + + + + com.amazonaws + aws-lambda-java-runtime-interface-client + 1.0.0 + + + +``` +src/main/java/example/App.java +```java +package example; + +public class App { + public static String sayHello() { + return "Hello λ!"; + } +} +``` + +### Local Testing + +To make it easy to locally test Lambda functions packaged as container images we open-sourced a lightweight web-server, Lambda Runtime Interface Emulator (RIE), which allows your function packaged as a container image to accept HTTP requests. You can install the [AWS Lambda Runtime Interface Emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator) on your local machine to test your function. Then when you run the image function, you set the entrypoint to be the emulator. + +*To install the emulator and test your Lambda function* + +1) From your project directory, run the following command to download the RIE from GitHub and install it on your local machine. + +```shell script +mkdir -p ~/.aws-lambda-rie && \ + curl -Lo ~/.aws-lambda-rie/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie && \ + chmod +x ~/.aws-lambda-rie/aws-lambda-rie +``` +2) Run your Lambda image function using the docker run command. + +```shell script +docker run -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \ + --entrypoint /aws-lambda/aws-lambda-rie \ + myfunction:latest \ + java -cp ./* com.amazonaws.services.lambda.runtime.api.client.AWSLambda example.App::sayHello +``` + +This runs the image as a container and starts up an endpoint locally at `http://localhost:9000/2015-03-31/functions/function/invocations`. + +3) Post an event to the following endpoint using a curl command: + +```shell script +curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'. +``` + +This command invokes the function running in the container image and returns a response. + +*Alternately, you can also include RIE as a part of your base image. See the AWS documentation on how to [Build RIE into your base image](https://docs.aws.amazon.com/lambda/latest/dg/images-test.html#images-test-alternative).* + + +## Security + +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. + +## License + +This project is licensed under the Apache-2.0 License. + diff --git a/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md b/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md new file mode 100644 index 00000000..e9e0c6c0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/RELEASE.CHANGELOG.md @@ -0,0 +1,3 @@ +### December 01, 2020 +`1.0.0`: +- Initial release of AWS Lambda Java Runtime Interface Client \ No newline at end of file diff --git a/aws-lambda-java-runtime-interface-client/pom.xml b/aws-lambda-java-runtime-interface-client/pom.xml new file mode 100644 index 00000000..54d2c06d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/pom.xml @@ -0,0 +1,254 @@ + + 4.0.0 + + com.amazonaws + aws-lambda-java-runtime-interface-client + 1.0.0 + jar + + AWS Lambda Java Runtime Interface Client + + The AWS Lambda Java Runtime Interface Client implements the Lambda programming model for Java + + https://aws.amazon.com/lambda/ + + + Apache License, Version 2.0 + https://aws.amazon.com/apache2.0 + repo + + + + https://github.com/aws/aws-lambda-java-libs.git + + + + AWS Lambda team + Amazon Web Services + https://aws.amazon.com/ + + + + + 1.8 + 1.8 + + + + + com.amazonaws + aws-lambda-java-core + 1.2.0 + + + com.amazonaws + aws-lambda-java-serialization + 1.0.0 + + + + org.junit.jupiter + junit-jupiter-engine + 5.7.0 + test + + + org.junit.jupiter + junit-jupiter-api + 5.7.0 + test + + + + + + + com.allogy.maven.wagon + maven-s3-wagon + 1.2.0 + + + + + maven-surefire-plugin + 2.22.2 + + + maven-failsafe-plugin + 2.22.2 + + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + build-jni-lib + prepare-package + + run + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + UTF-8 + + + + org.apache.maven.plugins + maven-jar-plugin + + + + com.amazonaws.services.lambda.runtime.api.client.AWSLambda + true + true + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.6 + + + default-prepare-agent + + prepare-agent + + + + default-report + test + + report + + + + default-check + test + + check + + + + + PACKAGE + + + LINE + COVEREDRATIO + 0 + + + + + + + + + + + + + + + dev + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + -Xdoclint:none + + + + attach-javadocs + + jar + + + + + + + + + release + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + -Xdoclint:none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.3 + true + + sonatype-nexus-staging + https://aws.oss.sonatype.org/ + false + + + + + + + diff --git a/aws-lambda-java-runtime-interface-client/src/.gitkeep b/aws-lambda-java-runtime-interface-client/src/.gitkeep new file mode 100644 index 00000000..74a6ce44 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/.gitkeep @@ -0,0 +1 @@ +Feel free to delete this file as soon as actual Java code is added to this directory. diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java new file mode 100644 index 00000000..cc8abe28 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/AWSLambda.java @@ -0,0 +1,309 @@ +// +// AWSLambda.java +// +// Copyright (c) 2013 Amazon. All rights reserved. +// +package com.amazonaws.services.lambda.runtime.api.client; + +import com.amazonaws.services.lambda.runtime.LambdaLogger; +import com.amazonaws.services.lambda.runtime.api.client.logging.LambdaContextLogger; +import com.amazonaws.services.lambda.runtime.api.client.logging.StdOutLogSink; +import com.amazonaws.services.lambda.runtime.api.client.util.EnvReader; +import com.amazonaws.services.lambda.runtime.api.client.util.EnvWriter; +import com.amazonaws.services.lambda.runtime.api.client.util.LambdaOutputStream; +import com.amazonaws.services.lambda.runtime.api.client.util.UnsafeUtil; +import com.amazonaws.services.lambda.runtime.serialization.PojoSerializer; +import com.amazonaws.services.lambda.runtime.serialization.factories.GsonFactory; +import com.amazonaws.services.lambda.runtime.serialization.factories.JacksonFactory; +import com.amazonaws.services.lambda.runtime.serialization.util.ReflectUtil; +import com.amazonaws.services.lambda.runtime.api.client.LambdaRequestHandler.UserFaultHandler; +import com.amazonaws.services.lambda.runtime.api.client.logging.FramedTelemetryLogSink; +import com.amazonaws.services.lambda.runtime.api.client.logging.LogSink; +import com.amazonaws.services.lambda.runtime.api.client.runtimeapi.InvocationRequest; +import com.amazonaws.services.lambda.runtime.api.client.runtimeapi.LambdaRuntimeClient; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.lang.reflect.Method; +import java.net.URLClassLoader; +import java.nio.file.Paths; +import java.security.Security; +import java.util.Properties; + +import static com.amazonaws.services.lambda.runtime.api.client.UserFault.makeUserFault; + +/** + * The entrypoint of this class is {@link AWSLambda#startRuntime}. It performs two main tasks: + * + *

+ * 1. loads the user's handler. + *
+ * 2. enters the Lambda runtime loop which handles function invocations as defined in the Lambda Custom Runtime API. + * + *

+ * Once initialized, {@link AWSLambda#startRuntime} will halt only if an irrecoverable error occurs. + */ +public class AWSLambda { + + private static final Runnable doNothing = () -> { + }; + + private static final String TRUST_STORE_PROPERTY = "javax.net.ssl.trustStore"; + + private static final String JAVA_SECURITY_PROPERTIES = "java.security.properties"; + + private static final String NETWORKADDRESS_CACHE_NEGATIVE_TTL_ENV_VAR = "AWS_LAMBDA_JAVA_NETWORKADDRESS_CACHE_NEGATIVE_TTL"; + + private static final String NETWORKADDRESS_CACHE_NEGATIVE_TTL_PROPERTY = "networkaddress.cache.negative.ttl"; + + private static final String DEFAULT_NEGATIVE_CACHE_TTL = "1"; + + static { + // Override the disabledAlgorithms setting to match configuration for openjdk8-u181. + // This is to keep DES ciphers around while we deploying security updates. + Security.setProperty( + "jdk.tls.disabledAlgorithms", + "SSLv3, RC4, MD5withRSA, DH keySize < 1024, EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC" + ); + // Override the location of the trusted certificate authorities to be provided by the system. + // The ca-certificates package provides /etc/pki/java/cacerts which becomes the symlink destination + // of $java_home/lib/security/cacerts when java is installed in the chroot. Given that java is provided + // in /var/lang as opposed to installed in the chroot, this brings it closer. + if(System.getProperty(TRUST_STORE_PROPERTY) == null) { + final File systemCacerts = new File("/etc/pki/java/cacerts"); + if(systemCacerts.exists() && systemCacerts.isFile()) { + System.setProperty(TRUST_STORE_PROPERTY, systemCacerts.getPath()); + } + } + + if (isNegativeCacheOverridable()) { + String ttlFromEnv = System.getenv(NETWORKADDRESS_CACHE_NEGATIVE_TTL_ENV_VAR); + String negativeCacheTtl = ttlFromEnv == null ? DEFAULT_NEGATIVE_CACHE_TTL : ttlFromEnv; + Security.setProperty(NETWORKADDRESS_CACHE_NEGATIVE_TTL_PROPERTY, negativeCacheTtl); + } + } + + private static boolean isNegativeCacheOverridable() { + String securityPropertiesPath = System.getProperty(JAVA_SECURITY_PROPERTIES); + if (securityPropertiesPath == null) { + return true; + } + try (FileInputStream inputStream = new FileInputStream(securityPropertiesPath)) { + Properties secProps = new Properties(); + secProps.load(inputStream); + return !secProps.containsKey(NETWORKADDRESS_CACHE_NEGATIVE_TTL_PROPERTY); + } catch (IOException e) { + return true; + } + } + + private static UserMethods findUserMethods(final String handlerString, ClassLoader customerClassLoader) { + final HandlerInfo handlerInfo; + try { + handlerInfo = HandlerInfo.fromString(handlerString, customerClassLoader); + } catch (HandlerInfo.InvalidHandlerException e) { + UserFault userFault = UserFault.makeUserFault("Invalid handler: `" + handlerString + "'"); + return new UserMethods( + doNothing, + new UserFaultHandler(userFault) + ); + } catch (ClassNotFoundException e) { + return new UserMethods(doNothing, LambdaRequestHandler.classNotFound(e, HandlerInfo.className(handlerString))); + } catch (NoClassDefFoundError e) { + return new UserMethods(doNothing, LambdaRequestHandler.initErrorHandler(e, HandlerInfo.className(handlerString))); + } catch (Throwable t) { + throw UserFault.makeInitErrorUserFault(t, HandlerInfo.className(handlerString)); + } + + final LambdaRequestHandler requestHandler = EventHandlerLoader.loadEventHandler(handlerInfo); + // if loading the handler failed and the failure is fatal (for e.g. the constructor threw an exception) + // we want to report this as an init error rather than deferring to the first invoke. + if(requestHandler instanceof UserFaultHandler) { + UserFault userFault =((UserFaultHandler) requestHandler).fault; + if(userFault.fatal) { + throw userFault; + } + } + + Runnable initHandler = doNothing; + try { + initHandler = wrapInitCall(handlerInfo.clazz.getMethod("init")); + } catch (NoSuchMethodException | NoClassDefFoundError e) { + } + + return new UserMethods(initHandler, requestHandler); + } + + private static Runnable wrapInitCall(final Method method) { + return () -> { + try { + method.invoke(null); + } catch (Throwable t) { + throw UserFault.makeUserFault(t); + } + }; + } + + public static void setupRuntimeLogger(LambdaLogger lambdaLogger) + throws ClassNotFoundException, IllegalAccessException, NoSuchFieldException { + ReflectUtil.setStaticField( + Class.forName("com.amazonaws.services.lambda.runtime.LambdaRuntime"), + "logger", + true, + lambdaLogger + ); + } + + public static String getEnvOrExit(String envVariableName) { + String value = System.getenv(envVariableName); + if(value == null) { + System.err.println("Could not get environment variable " + envVariableName); + System.exit(-1); + } + return value; + } + + protected static URLClassLoader customerClassLoader; + + private static LogSink createLogSink() { + final String fd = System.getenv("_LAMBDA_TELEMETRY_LOG_FD"); + if(fd == null) { + return new StdOutLogSink(); + } + + try { + File pipeFdFile = Paths.get("/proc", "self", "fd", fd).toFile(); + return new FramedTelemetryLogSink(pipeFdFile); + } catch (IOException e) { + return new StdOutLogSink(); + } + } + + public static void main(String[] args) { + // TODO validate arguments, show usage + startRuntime(args[0]); + } + + private static void startRuntime(String handler) { + try (LogSink logSink = createLogSink()) { + startRuntime(handler, new LambdaContextLogger(logSink)); + } catch (Throwable t) { + throw new Error(t); + } + } + + private static void startRuntime(String handler, LambdaLogger lambdaLogger) throws Throwable { + UnsafeUtil.disableIllegalAccessWarning(); + + System.setOut(new PrintStream(new LambdaOutputStream(System.out), false, "UTF-8")); + System.setErr(new PrintStream(new LambdaOutputStream(System.err), false, "UTF-8")); + setupRuntimeLogger(lambdaLogger); + + String runtimeApi = getEnvOrExit("AWS_LAMBDA_RUNTIME_API"); + LambdaRuntimeClient runtimeClient = new LambdaRuntimeClient(runtimeApi); + + EnvReader envReader = new EnvReader(); + try (EnvWriter envWriter = new EnvWriter(envReader)) { + envWriter.unsetLambdaInternalEnv(); + envWriter.setupEnvironmentCredentials(); + envWriter.setupAwsExecutionEnv(); + } + + String taskRoot = System.getProperty("user.dir"); + String libRoot = "/opt/java"; + // Make system classloader the customer classloader's parent to ensure any aws-lambda-java-core classes + // are loaded from the system classloader. + customerClassLoader = new CustomerClassLoader(taskRoot, libRoot, ClassLoader.getSystemClassLoader()); + Thread.currentThread().setContextClassLoader(customerClassLoader); + + // Load the user's handler + UserMethods methods; + try { + methods = findUserMethods(handler, customerClassLoader); + } catch (UserFault userFault) { + lambdaLogger.log(userFault.reportableError()); + ByteArrayOutputStream payload = new ByteArrayOutputStream(1024); + Failure failure = new Failure(userFault); + GsonFactory.getInstance().getSerializer(Failure.class).toJson(failure, payload); + runtimeClient.postInitError(payload.toByteArray(), failure.getErrorType()); + System.exit(1); + return; + } + + // Call the user's init handler(a function called 'init'), if provided in the same module as the request handler. + // This is an undocumented feature, and still exists to keep backward compatibility. Continue if this call fails. + try { + methods.initHandler.run(); + } catch (UserFault f) { + lambdaLogger.log(f.reportableError()); + } + + try (EnvWriter envWriter = new EnvWriter(envReader)) { + boolean shouldExit = false; + while (!shouldExit) { + UserFault userFault = null; + InvocationRequest request = runtimeClient.waitForNextInvocation(); + if (request.getXrayTraceId() != null) { + envWriter.modifyEnv(m -> m.put("_X_AMZN_TRACE_ID", request.getXrayTraceId())); + } else { + envWriter.modifyEnv(m -> m.remove("_X_AMZN_TRACE_ID")); + } + + ByteArrayOutputStream payload; + try { + payload = methods.requestHandler.call(request); + // TODO calling payload.toByteArray() creates a new copy of the underlying buffer + runtimeClient.postInvocationResponse(request.getId(), payload.toByteArray()); + } catch (UserFault f) { + userFault = f; + UserFault.filterStackTrace(f); + payload = new ByteArrayOutputStream(1024); + Failure failure = new Failure(f); + GsonFactory.getInstance().getSerializer(Failure.class).toJson(failure, payload); + shouldExit = f.fatal; + runtimeClient.postInvocationError(request.getId(), payload.toByteArray(), failure.getErrorType()); + } catch (Throwable t) { + UserFault.filterStackTrace(t); + userFault = UserFault.makeUserFault(t); + payload = new ByteArrayOutputStream(1024); + Failure failure = new Failure(t); + GsonFactory.getInstance().getSerializer(Failure.class).toJson(failure, payload); + // These two categories of errors are considered fatal. + shouldExit = Failure.isInvokeFailureFatal(t); + runtimeClient.postInvocationError(request.getId(), payload.toByteArray(), failure.getErrorType(), + serializeAsXRayJson(t)); + } finally { + if (userFault != null) { + lambdaLogger.log(userFault.reportableError()); + } + } + } + } + } + + private static PojoSerializer xRayErrorCauseSerializer; + + /** + * + * @param throwable throwable to convert + * @return json as string expected by XRay's web console. On conversion failure, returns null. + */ + private static String serializeAsXRayJson(Throwable throwable) { + try { + final OutputStream outputStream = new ByteArrayOutputStream(); + final XRayErrorCause cause = new XRayErrorCause(throwable); + if(xRayErrorCauseSerializer == null) { + xRayErrorCauseSerializer = JacksonFactory.getInstance().getSerializer(XRayErrorCause.class); + } + xRayErrorCauseSerializer.toJson(cause, outputStream); + return outputStream.toString(); + } catch (Exception e) { + return null; + } + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/ClasspathLoader.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/ClasspathLoader.java new file mode 100644 index 00000000..69845cbe --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/ClasspathLoader.java @@ -0,0 +1,91 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Set; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; + +/** + * This class loads all of the classes that are in jars on the classpath. + * + * It is used to generate a class list and Application CDS archive that includes all the possible classes that could be + * loaded by the runtime. This simplifies the process of generating the Application CDS archive. + */ +public class ClasspathLoader { + + private static final Set BLACKLIST = new HashSet<>(); + private static final ClassLoader SYSTEM_CLASS_LOADER = ClassLoader.getSystemClassLoader(); + private static final int CLASS_SUFFIX_LEN = ".class".length(); + + static { + // NativeClient loads a native library and crashes if loaded here so just exclude it + BLACKLIST.add("lambdainternal.runtimeapi.NativeClient"); + } + + private static String pathToClassName(final String path) { + return path.substring(0, path.length() - CLASS_SUFFIX_LEN).replaceAll("/|\\\\", "\\."); + } + + private static void loadClass(String name) { + try { + Class.forName(name, true, SYSTEM_CLASS_LOADER); + } catch (ClassNotFoundException e) { + System.err.println("[WARN] Failed to load " + name + ": " + e.getMessage()); + } + } + + private static void loadClassesInJar(File file) throws IOException { + JarFile jar = new JarFile(file); + Enumeration en = jar.entries(); + while (en.hasMoreElements()) { + JarEntry entry = en.nextElement(); + + if(!entry.getName().endsWith(".class")) { + continue; + } + + String name = pathToClassName(entry.getName()); + + if(BLACKLIST.contains(name)) { + continue; + } + + loadClass(name); + } + } + + private static void loadClassesInClasspathEntry(String entry) throws IOException { + File file = new File(entry); + + if(!file.exists()) { + throw new FileNotFoundException("Classpath entry does not exist: " + file.getPath()); + } + + if(file.isDirectory() || !file.getPath().endsWith(".jar")) { + System.err.println("[WARN] Only jar classpath entries are supported. Skipping " + file.getPath()); + return; + } + + loadClassesInJar(file); + } + + private static void loadAllClasses() throws IOException { + final String classPath = System.getProperty("java.class.path"); + if(classPath == null) { + return; + } + for(String classPathEntry : classPath.split(File.pathSeparator)) { + loadClassesInClasspathEntry(classPathEntry); + } + } + + public static void main(String[] args) throws IOException { + loadAllClasses(); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/CustomerClassLoader.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/CustomerClassLoader.java new file mode 100644 index 00000000..3932547d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/CustomerClassLoader.java @@ -0,0 +1,54 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; + +class CustomerClassLoader extends URLClassLoader { + /** + * This Comparator is used to ensure that jars added to this classloader are added in a deterministic order which + * does not depend on the underlying filesystem. + */ + private final static Comparator LEXICAL_SORT_ORDER = Comparator.comparing(String::toString); + + CustomerClassLoader(String taskRoot, String optRoot, ClassLoader parent) throws IOException { + super(getUrls(taskRoot, optRoot), parent); + } + + private static URL[] getUrls(String taskRoot, String optRoot) throws MalformedURLException { + File taskDir = new File(taskRoot + "/"); + List res = new ArrayList<>(); + res.add(newURL(taskDir, "")); + appendJars(new File(taskRoot + "/lib"), res); + appendJars(new File(optRoot + "/lib"), res); + return res.toArray(new URL[res.size()]); + } + + private static void appendJars(File dir, List result) throws MalformedURLException { + if (!dir.isDirectory()) { + return; + } + String[] names = dir.list(); + if (names == null) { + return; + } + Arrays.sort(names, CustomerClassLoader.LEXICAL_SORT_ORDER); + for(String path : names) { + if(path.endsWith(".jar")) { + result.add(newURL(dir, path)); + } + } + } + + private static URL newURL(File parent, String path) throws MalformedURLException { + return new URL("file", null, -1, parent.getPath() + "/" + path); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/EventHandlerLoader.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/EventHandlerLoader.java new file mode 100644 index 00000000..fc16d43f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/EventHandlerLoader.java @@ -0,0 +1,904 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import com.amazonaws.services.lambda.runtime.ClientContext; +import com.amazonaws.services.lambda.runtime.Context; +import com.amazonaws.services.lambda.runtime.RequestHandler; +import com.amazonaws.services.lambda.runtime.RequestStreamHandler; +import com.amazonaws.services.lambda.runtime.LambdaRuntimeInternal; + +import com.amazonaws.services.lambda.runtime.api.client.api.LambdaClientContext; +import com.amazonaws.services.lambda.runtime.api.client.api.LambdaCognitoIdentity; +import com.amazonaws.services.lambda.runtime.api.client.api.LambdaContext; +import com.amazonaws.services.lambda.runtime.api.client.util.UnsafeUtil; +import com.amazonaws.services.lambda.runtime.serialization.PojoSerializer; +import com.amazonaws.services.lambda.runtime.serialization.events.LambdaEventSerializers; +import com.amazonaws.services.lambda.runtime.serialization.factories.GsonFactory; +import com.amazonaws.services.lambda.runtime.serialization.factories.JacksonFactory; +import com.amazonaws.services.lambda.runtime.serialization.util.Functions; +import com.amazonaws.services.lambda.runtime.serialization.util.ReflectUtil; +import com.amazonaws.services.lambda.runtime.api.client.LambdaRequestHandler.UserFaultHandler; +import com.amazonaws.services.lambda.runtime.api.client.runtimeapi.InvocationRequest; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.Arrays; +import java.util.Comparator; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Map; +import java.util.Optional; + +import static com.amazonaws.services.lambda.runtime.api.client.UserFault.filterStackTrace; +import static com.amazonaws.services.lambda.runtime.api.client.UserFault.makeUserFault; +import static com.amazonaws.services.lambda.runtime.api.client.UserFault.trace; + +public final class EventHandlerLoader { + private static final byte[] _JsonNull = new byte[]{'n', 'u', 'l', 'l'}; + + private enum Platform { + ANDROID, + IOS, + UNKNOWN + } + + private static final EnumMap>> typeCache = new EnumMap<>(Platform.class); + + private EventHandlerLoader() { } + + /** + * returns the appropriate serializer for the class based on platform and whether the class is a supported event + * @param platform enum platform + * @param type Type of object used + * @return PojoSerializer + * @see Platform for which platforms are used + * @see LambdaEventSerializers for how mixins and modules are added to the serializer + */ + @SuppressWarnings({"unchecked", "rawtypes"}) + private static PojoSerializer getSerializer(Platform platform, Type type) { + // if serializing a Class that is a Lambda supported event, use Jackson with customizations + if (type instanceof Class) { + Class clazz = ((Class)type); + if (LambdaEventSerializers.isLambdaSupportedEvent(clazz.getName())) { + return LambdaEventSerializers.serializerFor(clazz, AWSLambda.customerClassLoader); + } + } + // else platform dependent (Android uses GSON but all other platforms use Jackson) + switch (platform) { + case ANDROID: + return GsonFactory.getInstance().getSerializer(type); + default: + return JacksonFactory.getInstance().getSerializer(type); + } + } + + private static PojoSerializer getSerializerCached(Platform platform, Type type) { + Map> cache = typeCache.get(platform); + if (cache == null) { + cache = new HashMap<>(); + typeCache.put(platform, cache); + } + + PojoSerializer serializer = cache.get(type); + if (serializer == null) { + serializer = getSerializer(platform, type); + cache.put(type, serializer); + } + + return serializer; + } + + private static volatile PojoSerializer contextSerializer; + private static volatile PojoSerializer cognitoSerializer; + + private static PojoSerializer getContextSerializer() { + if (contextSerializer == null) { + contextSerializer = GsonFactory.getInstance().getSerializer(LambdaClientContext.class); + } + return contextSerializer; + } + + private static PojoSerializer getCognitoSerializer() { + if (cognitoSerializer == null) { + cognitoSerializer = GsonFactory.getInstance().getSerializer(LambdaCognitoIdentity.class); + } + return cognitoSerializer; + } + + + private static Platform getPlatform(Context context) { + ClientContext cc = context.getClientContext(); + if (cc == null) { + return Platform.UNKNOWN; + } + + Map env = cc.getEnvironment(); + if (env == null) { + return Platform.UNKNOWN; + } + + String platform = env.get("platform"); + if (platform == null) { + return Platform.UNKNOWN; + } + + if ("Android".equalsIgnoreCase(platform)) { + return Platform.ANDROID; + } else if ("iPhoneOS".equalsIgnoreCase(platform)) { + return Platform.IOS; + } else { + return Platform.UNKNOWN; + } + } + + private static boolean isVoid(Type type) { + return Void.TYPE.equals(type) || (type instanceof Class) && Void.class.isAssignableFrom((Class)type); + } + + /** + * Wraps a RequestHandler as a lower level stream handler using supplied types. + * Optional types mean that the input and/or output should be ignored respectiveley + */ + @SuppressWarnings("rawtypes") + private static final class PojoHandlerAsStreamHandler implements RequestStreamHandler { + + public RequestHandler innerHandler; + public final Optional inputType; + public final Optional outputType; + + public PojoHandlerAsStreamHandler( + RequestHandler innerHandler, + Optional inputType, + Optional outputType + ) { + this.innerHandler = innerHandler; + this.inputType = inputType; + this.outputType = outputType; + + + if (inputType.isPresent()) { + getSerializerCached(Platform.UNKNOWN, inputType.get()); + } + + if (outputType.isPresent()) { + getSerializerCached(Platform.UNKNOWN, outputType.get()); + } + } + + @SuppressWarnings("unchecked") + @Override + public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) + throws IOException { + final Object input; + final Platform platform = getPlatform(context); + try { + if (inputType.isPresent()) { + input = getSerializerCached(platform, inputType.get()).fromJson(inputStream); + } else { + input = null; + } + } catch (Throwable t) { + throw new RuntimeException("An error occurred during JSON parsing", filterStackTrace(t)); + } + + final Object output; + try { + output = innerHandler.handleRequest(input, context); + } catch (Throwable t) { + throw UnsafeUtil.throwException(filterStackTrace(t)); + } + + try { + if (outputType.isPresent()) { + PojoSerializer serializer = getSerializerCached(platform, outputType.get()); + serializer.toJson(output, outputStream); + } else { + outputStream.write(_JsonNull); + } + } catch (Throwable t) { + throw new RuntimeException("An error occurred during JSON serialization of response", t); + } + } + } + + /** + * Wraps a java.lang.reflect.Method as a POJO RequestHandler + */ + private static final class PojoMethodRequestHandler implements RequestHandler { + public final Method m; + public final Type pType; + public final Object instance; + public final boolean needsContext; + public final int argSize; + + public PojoMethodRequestHandler(Method m, Type pType, Type rType, Object instance, boolean needsContext) { + this.m = m; + this.pType = pType; + this.instance = instance; + this.needsContext = needsContext; + this.argSize = (needsContext ? 1 : 0) + (pType != null ? 1 : 0); + } + + public static PojoMethodRequestHandler fromMethod( + Class clazz, + Method m, + Type pType, + Type rType, + boolean needsContext + ) throws Exception { + final Object instance; + if (Modifier.isStatic(m.getModifiers())) { + instance = null; + } else { + instance = newInstance(getConstructor(clazz)); + } + + return new PojoMethodRequestHandler(m, pType, rType, instance, needsContext); + } + + public static LambdaRequestHandler makeRequestHandler( + Class clazz, + Method m, + Type pType, + Type rType, + boolean needsContext + ) { + try { + return wrapPojoHandler(fromMethod(clazz, m, pType, rType, needsContext), pType, rType); + } catch (UserFault f) { + return new UserFaultHandler(f); + } catch (Throwable t) { + return new UserFaultHandler(makeUserFault(t)); + } + } + + @Override + public Object handleRequest(Object input, Context context) { + final Object[] args = new Object[argSize]; + int idx = 0; + + if (pType != null) { + args[idx++] = input; + } + + if (this.needsContext) { + args[idx++] = context; + } + + try { + return m.invoke(this.instance, args); + } catch (InvocationTargetException e) { + if (e.getCause() != null) { + throw UnsafeUtil.throwException(filterStackTrace(e.getCause())); + } else { + throw UnsafeUtil.throwException(filterStackTrace(e)); + } + } catch (Throwable t) { + throw UnsafeUtil.throwException(filterStackTrace(t)); + } + } + } + + /** + * Wraps a java.lang.reflect.Method object as a RequestStreamHandler + */ + private static final class StreamMethodRequestHandler implements RequestStreamHandler { + public final Method m; + public final Object instance; + public final boolean needsInput; + public final boolean needsOutput; + public final boolean needsContext; + public final int argSize; + + public StreamMethodRequestHandler( + Method m, + Object instance, + boolean needsInput, + boolean needsOutput, + boolean needsContext + ) { + this.m = m; + this.instance = instance; + this.needsInput = needsInput; + this.needsOutput = needsOutput; + this.needsContext = needsContext; + this.argSize = (needsInput ? 1 : 0) + (needsOutput ? 1 : 0) + (needsContext ? 1 : 0); + } + + public static StreamMethodRequestHandler fromMethod( + Class clazz, + Method m, + boolean needsInput, + boolean needsOutput, + boolean needsContext + ) throws Exception { + if (!isVoid(m.getReturnType())) { + System.err.println("Will ignore return type " + m.getReturnType() + " on byte stream handler"); + } + final Object instance = Modifier.isStatic(m.getModifiers()) + ? null + : newInstance(getConstructor(clazz)); + + return new StreamMethodRequestHandler(m, instance, needsInput, needsOutput, needsContext); + } + + public static LambdaRequestHandler makeRequestHandler( + Class clazz, + Method m, + boolean needsInput, + boolean needsOutput, + boolean needsContext + ) { + try { + return wrapRequestStreamHandler(fromMethod(clazz, m, needsInput, needsOutput, needsContext)); + } catch (UserFault f) { + return new UserFaultHandler(f); + } catch (Throwable t) { + return new UserFaultHandler(makeUserFault(t)); + } + } + + @Override + public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) + throws IOException { + final Object[] args = new Object[argSize]; + int idx = 0; + + if (needsInput) { + args[idx++] = inputStream; + } else { + inputStream.close(); + } + + if (needsOutput) { + args[idx++] = outputStream; + } + + if (needsContext) { + args[idx++] = context; + } + + try { + m.invoke(this.instance, args); + if (!needsOutput) { + outputStream.write(_JsonNull); + } + } catch (InvocationTargetException e) { + if (e.getCause() != null) { + throw UnsafeUtil.throwException(filterStackTrace(e.getCause())); + } else { + throw UnsafeUtil.throwException(filterStackTrace(e)); + } + } catch (Throwable t) { + throw UnsafeUtil.throwException(filterStackTrace(t)); + } + } + } + + public static Constructor getConstructor(Class clazz) throws Exception { + final Constructor constructor; + try { + constructor = clazz.getConstructor(); + } catch (NoSuchMethodException e) { + if (clazz.getEnclosingClass() != null && !Modifier.isStatic(clazz.getModifiers())) { + throw new Exception("Class " + + clazz.getName() + + " cannot be instantiated because it is a non-static inner class"); + } else { + throw new Exception("Class " + clazz.getName() + " has no public zero-argument constructor", e); + } + } + return constructor; + } + + public static T newInstance(Constructor constructor) { + try { + return constructor.newInstance(); + } catch (UserFault e) { + throw e; + } catch (InvocationTargetException e) { + throw makeUserFault(e.getCause() == null ? e : e.getCause(), true); + } catch (InstantiationException e) { + throw UnsafeUtil.throwException(e.getCause() == null ? e : e.getCause()); + } catch (IllegalAccessException e) { + throw UnsafeUtil.throwException(e); + } + } + + private static final class ClassContext { + public final Class clazz; + public final Type[] actualTypeArguments; + + @SuppressWarnings({"rawtypes"}) + private TypeVariable[] typeParameters; + + public ClassContext(Class clazz, Type[] actualTypeArguments) { + this.clazz = clazz; + this.actualTypeArguments = actualTypeArguments; + } + + @SuppressWarnings({"rawtypes"}) + public ClassContext(Class clazz, ClassContext curContext) { + this.typeParameters = clazz.getTypeParameters(); + if (typeParameters.length == 0 || curContext.actualTypeArguments == null) { + this.clazz = clazz; + this.actualTypeArguments = null; + } else { + Type[] types = new Type[typeParameters.length]; + for (int i = 0; i < types.length; i++) { + types[i] = curContext.resolveTypeVariable(typeParameters[i]); + } + + this.clazz = clazz; + this.actualTypeArguments = types; + } + } + + @SuppressWarnings({"rawtypes"}) + public ClassContext(ParameterizedType type, ClassContext curContext) { + Type[] types = type.getActualTypeArguments(); + for (int i = 0; i < types.length; i++) { + Type t = types[i]; + if (t instanceof TypeVariable) { + types[i] = curContext.resolveTypeVariable((TypeVariable)t); + } + } + + Type t = type.getRawType(); + if (t instanceof Class) { + this.clazz = (Class)t; + } else if (t instanceof TypeVariable) { + this.clazz = (Class)((TypeVariable)t).getGenericDeclaration(); + } else { + throw new RuntimeException("Type " + t + " is of unexpected type " + t.getClass()); + } + this.actualTypeArguments = types; + } + + @SuppressWarnings({"rawtypes"}) + public Type resolveTypeVariable(TypeVariable t) { + TypeVariable[] variables = getTypeParameters(); + for (int i = 0; i < variables.length; i++) { + if (t.getName().equals(variables[i].getName())) { + return actualTypeArguments == null ? variables[i] : actualTypeArguments[i]; + } + } + + return t; + } + + @SuppressWarnings({"rawtypes"}) + private TypeVariable[] getTypeParameters() { + if (typeParameters == null) { + typeParameters = clazz.getTypeParameters(); + } + return typeParameters; + } + } + + /** + * perform a breadth-first search for the first parameterized type for iface + * + * @return null of no type found. Otherwise the type found. + */ + public static Type[] findInterfaceParameters(Class clazz, Class iface) { + LinkedList clazzes = new LinkedList<>(); + clazzes.addFirst(new ClassContext(clazz, (Type[])null)); + while (!clazzes.isEmpty()) { + final ClassContext curContext = clazzes.removeLast(); + Type[] interfaces = curContext.clazz.getGenericInterfaces(); + + for (Type type : interfaces) { + if (type instanceof ParameterizedType) { + ParameterizedType candidate = (ParameterizedType)type; + Type rawType = candidate.getRawType(); + if (!(rawType instanceof Class)) { + //should be impossible + System.err.println("raw type is not a class: " + rawType); + continue; + } + Class rawClass = (Class)rawType; + if (iface.isAssignableFrom(rawClass)) { + return new ClassContext(candidate, curContext).actualTypeArguments; + } else { + clazzes.addFirst(new ClassContext(candidate, curContext)); + } + } else if (type instanceof Class) { + clazzes.addFirst(new ClassContext((Class)type, curContext)); + } else { + //should never happen? + System.err.println("Unexpected type class " + type.getClass().getName()); + } + } + + final Type superClass = curContext.clazz.getGenericSuperclass(); + if (superClass instanceof ParameterizedType) { + clazzes.addFirst(new ClassContext((ParameterizedType)superClass, curContext)); + } else if (superClass != null) { + clazzes.addFirst(new ClassContext((Class)superClass, curContext)); + } + } + return null; + } + + + @SuppressWarnings({"rawtypes"}) + public static LambdaRequestHandler wrapRequestHandlerClass(final Class clazz) { + Type[] ptypes = findInterfaceParameters(clazz, RequestHandler.class); + if (ptypes == null) { + return new UserFaultHandler(makeUserFault("Class " + + clazz.getName() + + " does not implement RequestHandler with concrete type parameters")); + } + if (ptypes.length != 2) { + return new UserFaultHandler(makeUserFault( + "Invalid class signature for RequestHandler. Expected two generic types, got " + ptypes.length)); + } + + for (Type t : ptypes) { + if (t instanceof TypeVariable) { + Type[] bounds = ((TypeVariable)t).getBounds(); + boolean foundBound = false; + if (bounds != null) { + for (Type bound : bounds) { + if (!Object.class.equals(bound)) { + foundBound = true; + break; + } + } + } + + if (!foundBound) { + return new UserFaultHandler(makeUserFault("Class " + clazz.getName() + + " does not implement RequestHandler with concrete type parameters: parameter " + + t + " has no upper bound.")); + } + } + } + + final Type pType = ptypes[0]; + final Type rType = ptypes[1]; + + final Constructor constructor; + try { + constructor = getConstructor(clazz); + return wrapPojoHandler(newInstance(constructor), pType, rType); + } catch (UserFault f) { + return new UserFaultHandler(f); + } catch (Throwable e) { + return new UserFaultHandler(makeUserFault(e)); + } + } + + public static LambdaRequestHandler wrapRequestStreamHandlerClass(final Class clazz) { + final Constructor constructor; + try { + constructor = getConstructor(clazz); + return wrapRequestStreamHandler(newInstance(constructor)); + } catch (UserFault f) { + return new UserFaultHandler(f); + } catch (Throwable e) { + return new UserFaultHandler(makeUserFault(e)); + } + } + + public static LambdaRequestHandler loadStreamingRequestHandler(Class clazz) { + if (RequestStreamHandler.class.isAssignableFrom(clazz)) { + return wrapRequestStreamHandlerClass(clazz.asSubclass(RequestStreamHandler.class)); + } else if (RequestHandler.class.isAssignableFrom(clazz)) { + return wrapRequestHandlerClass(clazz.asSubclass(RequestHandler.class)); + } else { + return new UserFaultHandler(makeUserFault("Class does not implement an appropriate handler interface: " + + clazz.getName())); + } + } + + public static LambdaRequestHandler loadEventHandler(HandlerInfo handlerInfo) { + if (handlerInfo.methodName == null) { + return loadStreamingRequestHandler(handlerInfo.clazz); + } else { + return loadEventPojoHandler(handlerInfo); + } + } + + private static Optional getOneLengthHandler( + Class clazz, + Method m, + Type pType, + Type rType + ) { + if (InputStream.class.equals(pType)) { + return Optional.of(StreamMethodRequestHandler.makeRequestHandler(clazz, m, true, false, false)); + } else if (OutputStream.class.equals(pType)) { + return Optional.of(StreamMethodRequestHandler.makeRequestHandler(clazz, m, false, true, false)); + } else if (isContext(pType)) { + return Optional.of(PojoMethodRequestHandler.makeRequestHandler(clazz, m, null, rType, true)); + } else { + return Optional.of(PojoMethodRequestHandler.makeRequestHandler(clazz, m, pType, rType, false)); + } + } + + private static Optional getTwoLengthHandler( + Class clazz, + Method m, + Type pType1, + Type pType2, + Type rType + ) { + if (OutputStream.class.equals(pType1)) { + if (isContext(pType2)) { + return Optional.of(StreamMethodRequestHandler.makeRequestHandler(clazz, m, false, true, true)); + } else { + System.err.println( + "Ignoring two-argument overload because first argument type is OutputStream and second argument type is not Context"); + return Optional.empty(); + } + } else if (isContext(pType1)) { + System.err.println("Ignoring two-argument overload because first argument type is Context"); + return Optional.empty(); + } else if (InputStream.class.equals(pType1)) { + if (OutputStream.class.equals(pType2)) { + return Optional.of(StreamMethodRequestHandler.makeRequestHandler(clazz, m, true, true, false)); + } else if (isContext(pType2)) { + return Optional.of(StreamMethodRequestHandler.makeRequestHandler(clazz, m, true, false, true)); + } else { + System.err.println("Ignoring two-argument overload because second parameter type, " + + ReflectUtil.getRawClass(pType2).getName() + + ", is not OutputStream."); + return Optional.empty(); + } + } else if (isContext(pType2)) { + return Optional.of(PojoMethodRequestHandler.makeRequestHandler(clazz, m, pType1, rType, true)); + } else { + System.err.println("Ignoring two-argument overload because second parameter type is not Context"); + return Optional.empty(); + } + } + + private static Optional getThreeLengthHandler( + Class clazz, + Method m, + Type pType1, + Type pType2, + Type pType3, + Type rType + ) { + if (InputStream.class.equals(pType1) && OutputStream.class.equals(pType2) && isContext(pType3)) { + return Optional.of(StreamMethodRequestHandler.makeRequestHandler(clazz, m, true, true, true)); + } else { + System.err.println( + "Ignoring three-argument overload because argument signature is not (InputStream, OutputStream, Context"); + return Optional.empty(); + } + } + + private static Optional getHandlerFromOverload(Class clazz, Method m) { + final Type rType = m.getGenericReturnType(); + final Type[] pTypes = m.getGenericParameterTypes(); + + if (pTypes.length == 0) { + return Optional.of(PojoMethodRequestHandler.makeRequestHandler(clazz, m, null, rType, false)); + } else if (pTypes.length == 1) { + return getOneLengthHandler(clazz, m, pTypes[0], rType); + } else if (pTypes.length == 2) { + return getTwoLengthHandler(clazz, m, pTypes[0], pTypes[1], rType); + } else if (pTypes.length == 3) { + return getThreeLengthHandler(clazz, m, pTypes[0], pTypes[1], pTypes[2], rType); + } else { + System.err.println("Ignoring an overload of method " + + m.getName() + + " because it has too many parameters: Expected at most 3, got " + + pTypes.length); + return Optional.empty(); + } + } + + private static final boolean isContext(Type t) { + return Context.class.equals(t); + } + + /** + * Returns true if the last type in params is a lambda context object interface (Context). + */ + private static final boolean lastParameterIsContext(Class[] params) { + return params.length != 0 && isContext(params[params.length - 1]); + } + + /** + * Implement a comparator for Methods. We sort overloaded handler methods using this comparator, and then pick the + * lowest sorted method. + */ + private static final Comparator methodPriority = new Comparator() { + public int compare(Method lhs, Method rhs) { + + //1. Non bridge methods are preferred over bridge methods. + if (! lhs.isBridge() && rhs.isBridge()) { + return -1; + } + else if (!rhs.isBridge() && lhs.isBridge()) { + return 1; + } + + //2. We prefer longer signatures to shorter signatures. Except we count a method whose last argument is + //Context as having 1 more argument than it really does. This is a stupid thing to do, but we + //need to keep it for back compat reasons. + Class[] lParams = lhs.getParameterTypes(); + Class[] rParams = rhs.getParameterTypes(); + + int lParamCompareLength = lParams.length; + int rParamCompareLength = rParams.length; + + if (lastParameterIsContext(lParams)) { + ++lParamCompareLength; + } + + if (lastParameterIsContext(rParams)) { + ++rParamCompareLength; + } + + return -Integer.compare(lParamCompareLength, rParamCompareLength); + } + }; + + private static LambdaRequestHandler loadEventPojoHandler(HandlerInfo handlerInfo) { + Method[] methods; + try { + methods = handlerInfo.clazz.getMethods(); + } catch (NoClassDefFoundError e) { + return new LambdaRequestHandler.UserFaultHandler(new UserFault( + "Error loading method " + handlerInfo.methodName + " on class " + handlerInfo.clazz.getName(), + e.getClass().getName(), + trace(e) + )); + } + if (methods.length == 0) { + final String msg = "Class " + + handlerInfo.getClass().getName() + + " has no public method named " + + handlerInfo.methodName; + return new UserFaultHandler(makeUserFault(msg)); + } + + /* + * We support the following signatures + * Anything (InputStream, OutputStream, Context) + * Anything (InputStream, OutputStream) + * Anything (OutputStream, Context) + * Anything (InputStream, Context) + * Anything (InputStream) + * Anything (OutputStream) + * Anything (Context) + * Anything (AlmostAnything, Context) + * Anything (AlmostAnything) + * Anything () + * + * where AlmostAnything is any type except InputStream, OutputStream, Context + * Anything represents any type (primitive, void, or Object) + * + * prefer methods with longer signatures, add extra weight to those ending with a Context object + * + */ + + int slide = 0; + + for (int i = 0; i < methods.length; i++) { + Method m = methods[i]; + methods[i - slide] = m; + if (!m.getName().equals(handlerInfo.methodName)) { + slide++; + continue; + } + } + + final int end = methods.length - slide; + Arrays.sort(methods, 0, end, methodPriority); + + for (int i = 0; i < end; i++) { + Method m = methods[i]; + Optional result = getHandlerFromOverload(handlerInfo.clazz, m); + if (result.isPresent()) { + return result.get(); + } else { + continue; + } + } + + return new UserFaultHandler(makeUserFault("No public method named " + + handlerInfo.methodName + + " with appropriate method signature found on class " + + handlerInfo.clazz.getName())); + } + + @SuppressWarnings({"rawtypes"}) + public static LambdaRequestHandler wrapPojoHandler(RequestHandler instance, Type pType, Type rType) { + return wrapRequestStreamHandler(new PojoHandlerAsStreamHandler(instance, Optional.ofNullable(pType), + isVoid(rType) ? Optional.empty() : Optional.of(rType) + )); + } + + public static String exceptionToString(Throwable t) { + StringWriter writer = new StringWriter(65536); + try (PrintWriter wrapped = new PrintWriter(writer)) { + t.printStackTrace(wrapped); + } + StringBuffer buffer = writer.getBuffer(); + if (buffer.length() > 262144) { + final String extra = " Truncated by Lambda"; + buffer.delete(262144, buffer.length()); + buffer.append(extra); + } + + return buffer.toString(); + } + + public static LambdaRequestHandler wrapRequestStreamHandler(final RequestStreamHandler handler) { + return new LambdaRequestHandler() { + private final ByteArrayOutputStream output = new ByteArrayOutputStream(1024); + private Functions.V2 log4jContextPutMethod = null; + + private void safeAddRequestIdToLog4j(String log4jContextClassName, + InvocationRequest request, Class contextMapValueClass) { + try { + Class log4jContextClass = ReflectUtil.loadClass(AWSLambda.customerClassLoader, log4jContextClassName); + log4jContextPutMethod = ReflectUtil.loadStaticV2(log4jContextClass, "put", false, String.class, contextMapValueClass); + log4jContextPutMethod.call("AWSRequestId", request.getId()); + } catch (Exception e) {} + } + + public ByteArrayOutputStream call(InvocationRequest request) throws Error, Exception { + output.reset(); + + LambdaCognitoIdentity cognitoIdentity = null; + if(request.getCognitoIdentity() != null && !request.getCognitoIdentity().isEmpty()) { + cognitoIdentity = getCognitoSerializer().fromJson(request.getCognitoIdentity()); + } + + LambdaClientContext clientContext = null; + if (request.getClientContext() != null && !request.getClientContext().isEmpty()) { + //Use GSON here because it handles immutable types without requiring annotations + clientContext = getContextSerializer().fromJson(request.getClientContext()); + } + + LambdaContext context = new LambdaContext( + LambdaEnvironment.MEMORY_LIMIT, + request.getDeadlineTimeInMs(), + request.getId(), + LambdaEnvironment.LOG_GROUP_NAME, + LambdaEnvironment.LOG_STREAM_NAME, + LambdaEnvironment.FUNCTION_NAME, + cognitoIdentity, + LambdaEnvironment.FUNCTION_VERSION, + request.getInvokedFunctionArn(), + clientContext + ); + + if (LambdaRuntimeInternal.getUseLog4jAppender()) { + safeAddRequestIdToLog4j("org.apache.log4j.MDC", request, Object.class); + safeAddRequestIdToLog4j("org.apache.logging.log4j.ThreadContext", request, String.class); + // if put method not assigned in either call to safeAddRequestIdtoLog4j then log4jContextPutMethod = null + if (log4jContextPutMethod == null) { + System.err.println("Customer using log4j appender but unable to load either " + + "org.apache.log4j.MDC or org.apache.logging.log4j.ThreadContext. " + + "Customer cannot see RequestId in log4j log lines."); + } + } + + handler.handleRequest(request.getContentAsStream(), output, context); + return output; + } + }; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/Failure.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/Failure.java new file mode 100644 index 00000000..d568d973 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/Failure.java @@ -0,0 +1,84 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import java.io.IOError; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; + +public class Failure { + + private static final Class[] reportableExceptionsArray = { + Error.class, + ClassNotFoundException.class, + IOError.class, + Throwable.class, + VirtualMachineError.class, + LinkageError.class, + ExceptionInInitializerError.class, + NoClassDefFoundError.class, + HandlerInfo.InvalidHandlerException.class + }; + + private static final List sortedExceptions = Collections.unmodifiableList( + Arrays.stream(reportableExceptionsArray).sorted(new ClassHierarchyComparator()).collect(Collectors.toList())); + + private final String errorMessage; + private final String errorType; + private final String[] stackTrace; + private final Failure cause; + + public Failure(Throwable t) { + this.errorMessage = t.getLocalizedMessage() == null ? t.getClass().getName() : t.getLocalizedMessage(); + this.errorType = t.getClass().getName(); + StackTraceElement[] trace = t.getStackTrace(); + this.stackTrace = new String[trace.length]; + for( int i = 0; i < trace.length; i++) { + this.stackTrace[i] = trace[i].toString(); + } + Throwable cause = t.getCause(); + this.cause = (cause == null) ? null : new Failure(cause); + } + + public Failure(UserFault userFault) { + this.errorMessage = userFault.msg; + this.errorType = userFault.exception; + // Not setting stacktrace for compatibility with legacy/native runtime + this.stackTrace = null; + this.cause = null; + } + + public static Class getReportableExceptionClass(Throwable customerException) { + return sortedExceptions + .stream() + .filter(e -> e.isAssignableFrom(customerException.getClass())) + .findFirst() + .orElse(Throwable.class); + } + + public static String getReportableExceptionClassName(Throwable f) { + return getReportableExceptionClass(f).getName(); + } + + public static boolean isInvokeFailureFatal(Throwable t) { + return t instanceof VirtualMachineError || t instanceof IOError; + } + + private static class ClassHierarchyComparator implements Comparator { + @Override + public int compare(Class o1, Class o2) { + if (o1.isAssignableFrom(o2)) { + return 1; + } else { + return -1; + } + } + } + + public String getErrorType() { + return errorType; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/HandlerInfo.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/HandlerInfo.java new file mode 100644 index 00000000..eaca0fd0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/HandlerInfo.java @@ -0,0 +1,40 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +public final class HandlerInfo { + public static class InvalidHandlerException extends RuntimeException { + public static final long serialVersionUID = -1; + } + + public final Class clazz; + public final String methodName; + + public HandlerInfo (Class clazz, String methodName) { + this.clazz = clazz; + this.methodName = methodName; + } + + public static HandlerInfo fromString(String handler, ClassLoader cl) throws ClassNotFoundException, NoClassDefFoundError, InvalidHandlerException { + final int colonLoc = handler.lastIndexOf("::"); + final String className; + final String methodName; + if(colonLoc < 0) { + className = handler; + methodName = null; + } else { + className = handler.substring(0, colonLoc); + methodName = handler.substring(colonLoc + 2); + } + + if(className.isEmpty() || (methodName != null && methodName.isEmpty())) { + throw new InvalidHandlerException(); + } + return new HandlerInfo(Class.forName(className, true, cl), methodName); + } + + public static String className(String handler) { + final int colonLoc = handler.lastIndexOf("::"); + return (colonLoc < 0) ? handler : handler.substring(0, colonLoc); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaEnvironment.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaEnvironment.java new file mode 100644 index 00000000..8821a113 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaEnvironment.java @@ -0,0 +1,16 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import com.amazonaws.services.lambda.runtime.api.client.util.EnvReader; + +import static java.lang.Integer.parseInt; + +public class LambdaEnvironment { + public static final EnvReader ENV_READER = new EnvReader(); + public static final int MEMORY_LIMIT = parseInt(ENV_READER.getEnvOrDefault("AWS_LAMBDA_FUNCTION_MEMORY_SIZE", "128")); + public static final String LOG_GROUP_NAME = ENV_READER.getEnv("AWS_LAMBDA_LOG_GROUP_NAME"); + public static final String LOG_STREAM_NAME = ENV_READER.getEnv("AWS_LAMBDA_LOG_STREAM_NAME"); + public static final String FUNCTION_NAME = ENV_READER.getEnv("AWS_LAMBDA_FUNCTION_NAME"); + public static final String FUNCTION_VERSION = ENV_READER.getEnv("AWS_LAMBDA_FUNCTION_VERSION"); +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaRequestHandler.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaRequestHandler.java new file mode 100644 index 00000000..d22d6394 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/LambdaRequestHandler.java @@ -0,0 +1,31 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import com.amazonaws.services.lambda.runtime.api.client.runtimeapi.InvocationRequest; + +import java.io.ByteArrayOutputStream; + +public interface LambdaRequestHandler { + ByteArrayOutputStream call(InvocationRequest request) throws Error, Exception; + + class UserFaultHandler implements LambdaRequestHandler { + public final UserFault fault; + + public UserFaultHandler(UserFault fault) { + this.fault = fault; + } + + public ByteArrayOutputStream call(InvocationRequest request) { + throw fault; + } + } + + static LambdaRequestHandler initErrorHandler(final Throwable e, String className) { + return new UserFaultHandler(UserFault.makeInitErrorUserFault(e, className)); + } + + static LambdaRequestHandler classNotFound(final Throwable e, String className) { + return new UserFaultHandler(UserFault.makeClassNotFoundUserFault(e, className)); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserFault.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserFault.java new file mode 100644 index 00000000..73066ad5 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserFault.java @@ -0,0 +1,113 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import java.io.PrintWriter; +import java.io.StringWriter; + +public final class UserFault extends RuntimeException { + private static final long serialVersionUID = 0; + + public final String msg; + public final String exception; + public final String trace; + public final Boolean fatal; + + private static final String packagePrefix = AWSLambda.class.getPackage().getName(); + + public UserFault(String msg, String exception, String trace) { + this.msg = msg; + this.exception = exception; + this.trace = trace; + this.fatal = false; + } + + public UserFault(String msg, String exception, String trace, Boolean fatal) { + this.msg = msg; + this.exception = exception; + this.trace = trace; + this.fatal = fatal; + } + + /** + * Convenience function to report a fault given an exception. The constructed fault is marked non-fatal. + * No more user code should run after a fault. + */ + public static UserFault makeUserFault(Throwable t) { + return makeUserFault(t, false); + } + + public static UserFault makeUserFault(Throwable t, boolean fatal) { + final String msg = t.getLocalizedMessage() == null ? t.getClass().getName() : t.getLocalizedMessage(); + return new UserFault(msg, t.getClass().getName(), trace(t), fatal); + } + + /** + * Convenience function to report a fault given a message. + * No more user code should run after a fault. + */ + public static UserFault makeUserFault(String msg) { + return new UserFault(msg, null, null); + } + + /** + * Convert a throwable's stack trace to a String + */ + public static String trace(Throwable t) { + filterStackTrace(t); + StringWriter sw = new StringWriter(); + t.printStackTrace(new PrintWriter(sw)); + return sw.toString(); + } + + /** + * remove our runtime code from the stack trace recursively. Returns + * the same object for convenience. + */ + public static T filterStackTrace(T t) { + StackTraceElement[] trace = t.getStackTrace(); + for(int i = 0; i < trace.length; i++) { + if(trace[i].getClassName().startsWith(packagePrefix)) { + StackTraceElement[] newTrace = new StackTraceElement[i]; + System.arraycopy(trace, 0, newTrace, 0, i); + t.setStackTrace(newTrace); + break; + } + } + + + Throwable cause = t.getCause(); + if(cause != null) { + filterStackTrace(cause); + } + return t; + } + + static UserFault makeInitErrorUserFault(Throwable e, String className) { + return new UserFault( + "Error loading class " + className + (e.getMessage() == null ? "" : ": " + e.getMessage()), + e.getClass().getName(), + trace(e), + true + ); + } + + static UserFault makeClassNotFoundUserFault(Throwable e, String className) { + return new UserFault( + "Class not found: " + className, + e.getClass().getName(), + trace(e), + false + ); + } + + public String reportableError() { + if(this.exception != null || this.trace != null) { + return String.format("%s: %s\n%s\n", + this.msg, + this.exception == null ? "" : this.exception, + this.trace == null ? "" : this.trace); + } + return String.format("%s\n", this.msg); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserMethods.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserMethods.java new file mode 100644 index 00000000..4012b381 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/UserMethods.java @@ -0,0 +1,13 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +public final class UserMethods { + public final Runnable initHandler; + public final LambdaRequestHandler requestHandler; + + public UserMethods(Runnable initHandler, LambdaRequestHandler requestHandler) { + this.initHandler = initHandler; + this.requestHandler = requestHandler; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/XRayErrorCause.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/XRayErrorCause.java new file mode 100644 index 00000000..5a05810e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/XRayErrorCause.java @@ -0,0 +1,114 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +/** + * helper class for serializing an exception in the format expected by XRay's web console. + */ +public class XRayErrorCause { + private final String working_directory; + private final Collection exceptions; + private final Collection paths; + + public XRayErrorCause(Throwable throwable) { + working_directory = System.getProperty("user.dir"); + exceptions = Collections.unmodifiableCollection(Collections.singletonList(new XRayException(throwable))); + paths = Collections.unmodifiableCollection( + Arrays.stream(throwable.getStackTrace()) + .map(XRayErrorCause::determineFileName) + .collect(Collectors.toSet())); + } + + public String getWorking_directory() { + return working_directory; + } + + public Collection getExceptions() { + return exceptions; + } + + public Collection getPaths() { + return paths; + } + + /** + * This method provides compatibility between Java 8 and Java 11 in determining the fileName of the class in the + * StackTraceElement. + * + * If the fileName property of the StackTraceElement is null (as it can be for native methods in Java 11), it + * constructs it using the className by stripping out the package and appending ".java". + */ + private static String determineFileName(StackTraceElement e) { + String fileName = null; + if(e.getFileName() != null) { + fileName = e.getFileName(); + } + if(fileName == null) { + String className = e.getClassName(); + fileName = className == null ? null : className.substring(className.lastIndexOf('.') + 1) + ".java"; + } + return fileName; + } + + public static class XRayException { + private final String message; + private final String type; + private final List stack; + + public XRayException(Throwable throwable) { + this.message = throwable.getMessage(); + this.type = throwable.getClass().getName(); + this.stack = Arrays.stream(throwable.getStackTrace()).map(this::toStackElement).collect(Collectors.toList()); + } + + private StackElement toStackElement(StackTraceElement e) { + return new StackElement( + e.getMethodName(), + determineFileName(e), + e.getLineNumber()); + } + + public String getMessage() { + return message; + } + + public String getType() { + return type; + } + + public List getStack() { + return stack; + } + + public static class StackElement { + private final String label; + private final String path; + private final int line; + + private StackElement(String label, String path, int line) { + this.label = label; + this.path = path; + this.line = line; + } + + public String getLabel() { + return label; + } + + public String getPath() { + return path; + } + + public int getLine() { + return line; + } + } + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContext.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContext.java new file mode 100644 index 00000000..8887dfb2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContext.java @@ -0,0 +1,27 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.api; + +import java.util.Map; + +import com.amazonaws.services.lambda.runtime.ClientContext; +import com.amazonaws.services.lambda.runtime.Client; + +public class LambdaClientContext implements ClientContext { + + private LambdaClientContextClient client; + private Map custom; + private Map env; + + public Client getClient() { + return client; + } + + public Map getCustom() { + return custom; + } + + public Map getEnvironment() { + return env; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContextClient.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContextClient.java new file mode 100644 index 00000000..66e86d3f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaClientContextClient.java @@ -0,0 +1,38 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.api; + +import com.amazonaws.services.lambda.runtime.Client; + +public class LambdaClientContextClient implements Client { + + private String installation_id; + + private String app_title; + + private String app_version_name; + + private String app_version_code; + + private String app_package_name; + + public String getInstallationId() { + return installation_id; + } + + public String getAppTitle() { + return app_title; + } + + public String getAppVersionName() { + return app_version_name; + } + + public String getAppVersionCode() { + return app_version_code; + } + + public String getAppPackageName() { + return app_package_name; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaCognitoIdentity.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaCognitoIdentity.java new file mode 100644 index 00000000..5b9df4f2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaCognitoIdentity.java @@ -0,0 +1,24 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.api; + +import com.amazonaws.services.lambda.runtime.CognitoIdentity; + +public class LambdaCognitoIdentity implements CognitoIdentity { + + private final String cognitoIdentityId; + private final String cognitoIdentityPoolId; + + public LambdaCognitoIdentity(String identityid, String poolid) { + this.cognitoIdentityId = identityid; + this.cognitoIdentityPoolId = poolid; + } + + public String getIdentityId() { + return this.cognitoIdentityId; + } + + public String getIdentityPoolId() { + return this.cognitoIdentityPoolId; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaContext.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaContext.java new file mode 100644 index 00000000..689c9110 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/api/LambdaContext.java @@ -0,0 +1,94 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.api; + +import com.amazonaws.services.lambda.runtime.ClientContext; +import com.amazonaws.services.lambda.runtime.CognitoIdentity; +import com.amazonaws.services.lambda.runtime.Context; +import com.amazonaws.services.lambda.runtime.LambdaLogger; + +public class LambdaContext implements Context { + + private int memoryLimit; + private final String awsRequestId; + private final String logGroupName; + private final String logStreamName; + private final String functionName; + private final String functionVersion; + private final String invokedFunctionArn; + private final long deadlineTimeInMs; + private final CognitoIdentity cognitoIdentity; + private final ClientContext clientContext; + private final LambdaLogger logger; + + public LambdaContext( + int memoryLimit, + long deadlineTimeInMs, + String requestId, + String logGroupName, + String logStreamName, + String functionName, + CognitoIdentity identity, + String functionVersion, + String invokedFunctionArn, + ClientContext clientContext + ) { + this.memoryLimit = memoryLimit; + this.deadlineTimeInMs = deadlineTimeInMs; + this.awsRequestId = requestId; + this.logGroupName = logGroupName; + this.logStreamName = logStreamName; + this.functionName = functionName; + this.cognitoIdentity = identity; + this.clientContext = clientContext; + this.functionVersion = functionVersion; + this.invokedFunctionArn = invokedFunctionArn; + this.logger = com.amazonaws.services.lambda.runtime.LambdaRuntime.getLogger(); + } + + public int getMemoryLimitInMB() { + return memoryLimit; + } + + public String getAwsRequestId() { + return awsRequestId; + } + + public String getLogGroupName() { + return logGroupName; + } + + public String getLogStreamName() { + return logStreamName; + } + + public String getFunctionName() { + return functionName; + } + + public String getFunctionVersion() { + return functionVersion; + } + + public String getInvokedFunctionArn() { + return invokedFunctionArn; + } + + public CognitoIdentity getIdentity() { + return cognitoIdentity; + } + + public ClientContext getClientContext() { + return clientContext; + } + + public int getRemainingTimeInMillis() { + long now = System.currentTimeMillis(); + int delta = (int) (this.deadlineTimeInMs - now); + return delta > 0 ? delta : 0; + } + + public LambdaLogger getLogger() { + return logger; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FrameType.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FrameType.java new file mode 100644 index 00000000..1284bc64 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FrameType.java @@ -0,0 +1,18 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.logging; + +public enum FrameType { + + LOG(0xa55a0001); + + private final int val; + + FrameType(int val) { + this.val = val; + } + + public int getValue() { + return this.val; + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FramedTelemetryLogSink.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FramedTelemetryLogSink.java new file mode 100644 index 00000000..60f1d18f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/FramedTelemetryLogSink.java @@ -0,0 +1,69 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.logging; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * FramedTelemetryLogSink implements the logging contract between runtimes and the platform. It implements a simple + * framing protocol so message boundaries can be determined. Each frame can be visualized as follows: + * + *
+ * {@code
+ * +----------------------+------------------------+-----------------------+
+ * | Frame Type - 4 bytes | Length (len) - 4 bytes | Message - 'len' bytes |
+ * +----------------------+------------------------+-----------------------+
+ * }
+ * 
+ * + * The first 4 bytes indicate the type of the frame - log frames have a type defined as the hex value 0xa55a0001. The + * second 4 bytes should indicate the message's length. The next 'len' bytes contain the message. The byte order is + * big-endian. + */ +public class FramedTelemetryLogSink implements LogSink { + + private static final int HEADER_LENGTH = 8; + + private final FileOutputStream logOutputStream; + private final ByteBuffer headerBuf; + + public FramedTelemetryLogSink(File file) throws IOException { + this.logOutputStream = new FileOutputStream(file); + this.headerBuf = ByteBuffer.allocate(HEADER_LENGTH).order(ByteOrder.BIG_ENDIAN); + } + + @Override + public synchronized void log(byte[] message) { + try { + writeFrame(message); + } catch (IOException e) { + e.printStackTrace(); + } + } + + private void writeFrame(byte[] message) throws IOException { + updateHeader(message.length); + this.logOutputStream.write(this.headerBuf.array()); + this.logOutputStream.write(message); + } + + /** + * Updates the header ByteBuffer with the provided length. The header comprises the frame type and message length. + */ + private void updateHeader(int length) { + this.headerBuf.clear(); + this.headerBuf.putInt(FrameType.LOG.getValue()); + this.headerBuf.putInt(length); + this.headerBuf.flip(); + } + + @Override + public void close() throws IOException { + this.logOutputStream.close(); + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LambdaContextLogger.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LambdaContextLogger.java new file mode 100644 index 00000000..eaa2e3ea --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LambdaContextLogger.java @@ -0,0 +1,34 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.logging; + +import com.amazonaws.services.lambda.runtime.LambdaLogger; + +import static java.nio.charset.StandardCharsets.UTF_8; + +public class LambdaContextLogger implements LambdaLogger { + // If a null string is passed in, replace it with "null", + // replicating the behavior of System.out.println(null); + private static final byte[] NULL_BYTES_VALUE = "null".getBytes(UTF_8); + + private final transient LogSink sink; + + public LambdaContextLogger(LogSink sink) { + this.sink = sink; + } + + public void log(byte[] message) { + if (message == null) { + message = NULL_BYTES_VALUE; + } + sink.log(message); + } + + public void log(String message) { + if (message == null) { + this.log(NULL_BYTES_VALUE); + } else { + this.log(message.getBytes(UTF_8)); + } + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LogSink.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LogSink.java new file mode 100644 index 00000000..11c3f92c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/LogSink.java @@ -0,0 +1,11 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.logging; + +import java.io.Closeable; + +public interface LogSink extends Closeable { + + void log(byte[] message); + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/StdOutLogSink.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/StdOutLogSink.java new file mode 100644 index 00000000..5487c5dd --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/logging/StdOutLogSink.java @@ -0,0 +1,19 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.logging; + +import java.io.IOException; + +public class StdOutLogSink implements LogSink { + @Override + public void log(byte[] message) { + try { + System.out.write(message); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void close() {} +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/InvocationRequest.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/InvocationRequest.java new file mode 100644 index 00000000..c8df04af --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/InvocationRequest.java @@ -0,0 +1,79 @@ +package com.amazonaws.services.lambda.runtime.api.client.runtimeapi; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; + +/** + * An invocation request represents the response of the runtime API's next invocation API. + * + * Copyright (c) 2019 Amazon. All rights reserved. + */ +public class InvocationRequest { + + /** + * The Lambda request ID associated with the request. + */ + private String id; + + /** + * The X-Ray tracing ID. + */ + private String xrayTraceId; + + /** + * The ARN of the Lambda function being invoked. + */ + private String invokedFunctionArn; + + /** + * Function execution deadline counted in milliseconds since the Unix epoch. + */ + private long deadlineTimeInMs; + + /** + * The client context header. This field is populated when the function is invoked from a mobile client. + */ + private String clientContext; + + /** + * The Cognito Identity context for the invocation. This field is populated when the function is invoked with AWS + * credentials obtained from Cognito Identity. + */ + private String cognitoIdentity; + + /** + * An input stream of the invocation's request body. + */ + private InputStream stream; + + private byte[] content; + + public String getId() { + return id; + } + + public String getXrayTraceId() { + return xrayTraceId; + } + + public String getInvokedFunctionArn() { + return invokedFunctionArn; + } + + public long getDeadlineTimeInMs() { + return deadlineTimeInMs; + } + + public String getClientContext() { + return clientContext; + } + + public String getCognitoIdentity() { + return cognitoIdentity; + } + + public InputStream getContentAsStream() { + return new ByteArrayInputStream(content); + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClient.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClient.java new file mode 100644 index 00000000..05aa50a1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClient.java @@ -0,0 +1,116 @@ +package com.amazonaws.services.lambda.runtime.api.client.runtimeapi; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Objects; + +import static java.net.HttpURLConnection.HTTP_ACCEPTED; +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * LambdaRuntimeClient is a client of the AWS Lambda Runtime HTTP API for custom runtimes. + * + * API definition can be found at https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html + * + * Copyright (c) 2019 Amazon. All rights reserved. + */ +public class LambdaRuntimeClient { + + private final String hostname; + private final int port; + private final String invocationEndpoint; + + private static final String DEFAULT_CONTENT_TYPE = "application/json"; + private static final String XRAY_ERROR_CAUSE_HEADER = "Lambda-Runtime-Function-XRay-Error-Cause"; + private static final String ERROR_TYPE_HEADER = "Lambda-Runtime-Function-Error-Type"; + private static final int XRAY_ERROR_CAUSE_MAX_HEADER_SIZE = 1024 * 1024; // 1MiB + + public LambdaRuntimeClient(String hostnamePort) { + Objects.requireNonNull(hostnamePort, "hostnamePort cannot be null"); + String[] parts = hostnamePort.split(":"); + this.hostname = parts[0]; + this.port = Integer.parseInt(parts[1]); + this.invocationEndpoint = invocationEndpoint(); + } + + public InvocationRequest waitForNextInvocation() { + return NativeClient.next(); + } + + public void postInvocationResponse(String requestId, byte[] response) { + NativeClient.postInvocationResponse(requestId.getBytes(UTF_8), response); + } + + public void postInvocationError(String requestId, byte[] errorResponse, String errorType) throws IOException { + postInvocationError(requestId, errorResponse, errorType, null); + } + + public void postInvocationError(String requestId, byte[] errorResponse, String errorType, String errorCause) + throws IOException { + String endpoint = invocationErrorEndpoint(requestId); + post(endpoint, errorResponse, errorType, errorCause); + } + + public void postInitError(byte[] errorResponse, String errorType) throws IOException { + String endpoint = initErrorEndpoint(); + post(endpoint, errorResponse, errorType, null); + } + + private void post(String endpoint, byte[] errorResponse, String errorType, String errorCause) throws IOException { + URL url = createUrl(endpoint); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("POST"); + conn.setRequestProperty("Content-Type", DEFAULT_CONTENT_TYPE); + if(errorType != null && !errorType.isEmpty()) { + conn.setRequestProperty(ERROR_TYPE_HEADER, errorType); + } + if(errorCause != null && errorCause.getBytes().length < XRAY_ERROR_CAUSE_MAX_HEADER_SIZE) { + conn.setRequestProperty(XRAY_ERROR_CAUSE_HEADER, errorCause); + } + conn.setFixedLengthStreamingMode(errorResponse.length); + conn.setDoOutput(true); + try (OutputStream outputStream = conn.getOutputStream()) { + outputStream.write(errorResponse); + } + + int responseCode = conn.getResponseCode(); + if (responseCode != HTTP_ACCEPTED) { + throw new LambdaRuntimeClientException(endpoint, responseCode); + } + + // don't need to read the response, close stream to ensure connection re-use + closeQuietly(conn.getInputStream()); + } + + private String invocationEndpoint() { + return "http://" + hostname + ":" + port + "/2018-06-01/runtime/invocation/"; + } + + private String invocationErrorEndpoint(String requestId) { + return invocationEndpoint + requestId + "/error"; + } + + private String initErrorEndpoint() { + return "http://" + hostname + ":" + port + "/2018-06-01/runtime/init/error"; + } + + private URL createUrl(String endpoint) { + try { + return new URL(endpoint); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + private void closeQuietly(InputStream inputStream) { + if (inputStream == null) return; + try { + inputStream.close(); + } catch (IOException e) { + } + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClientException.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClientException.java new file mode 100644 index 00000000..1fc52d2f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClientException.java @@ -0,0 +1,11 @@ +package com.amazonaws.services.lambda.runtime.api.client.runtimeapi; + +/** + * Copyright (c) 2019 Amazon. All rights reserved. + */ +public class LambdaRuntimeClientException extends RuntimeException { + public LambdaRuntimeClientException(String message, int responseCode) { + super(message + "Response code: '" + responseCode + "'."); + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java new file mode 100644 index 00000000..f3cda8bc --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/runtimeapi/NativeClient.java @@ -0,0 +1,53 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.runtimeapi; + +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +/** + * This module defines the native Runtime Interface Client which is responsible for all HTTP + * interactions with the Runtime API. + */ +class NativeClient { + private static final String nativeLibPath = "/tmp/.aws-lambda-runtime-interface-client"; + private static final String[] libsToTry = { + "/aws-lambda-runtime-interface-client.glibc.so", + "/aws-lambda-runtime-interface-client.musl.so", + }; + private static final Throwable[] exceptions = new Throwable[libsToTry.length]; + static { + boolean loaded = false; + for (int i = 0; !loaded && i < libsToTry.length; ++i) { + try (InputStream lib = NativeClient.class.getResourceAsStream(libsToTry[i])) { + Files.copy(lib, Paths.get(nativeLibPath), StandardCopyOption.REPLACE_EXISTING); + System.load(nativeLibPath); + loaded = true; + } catch (UnsatisfiedLinkError e) { + exceptions[i] = e; + } catch (Exception e) { + exceptions[i] = e; + } + } + if (!loaded) { + for (int i = 0; i < libsToTry.length; ++i) { + System.err.printf("Failed to load the native runtime interface client library %s. Exception: %s\n", libsToTry[i], exceptions[i].getMessage()); + } + System.exit(-1); + } + String userAgent = String.format( + "aws-lambda-java/%s-%s" , + System.getProperty("java.vendor.version"), + NativeClient.class.getPackage().getImplementationVersion()); + initializeClient(userAgent.getBytes()); + } + + static native void initializeClient(byte[] userAgent); + + static native InvocationRequest next(); + + static native void postInvocationResponse(byte[] requestId, byte[] response); + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvReader.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvReader.java new file mode 100644 index 00000000..968119ac --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvReader.java @@ -0,0 +1,22 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.util; + +import java.util.Map; + +public class EnvReader { + + public Map getEnv() { + return System.getenv(); + } + + public String getEnv(String envVariableName) { + return System.getenv(envVariableName); + } + + public String getEnvOrDefault(String envVariableName, String defaultVal) { + String val = getEnv(envVariableName); + return val == null ? defaultVal : val; + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvWriter.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvWriter.java new file mode 100644 index 00000000..839dddc9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/EnvWriter.java @@ -0,0 +1,76 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.util; + +import java.lang.reflect.Field; +import java.util.Map; +import java.util.function.Consumer; + +public class EnvWriter implements AutoCloseable { + + private Map envMap; + private final Field field; + + public EnvWriter(EnvReader envReader) { + Map env = envReader.getEnv(); + try { + field = env.getClass().getDeclaredField("m"); + field.setAccessible(true); + @SuppressWarnings("unchecked") + Map map = (Map) field.get(env); + envMap = map; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + public void close() { + if (field != null) { + field.setAccessible(false); + } + } + + public void modifyEnv(Consumer> modifier) { + modifier.accept(envMap); + } + + public void unsetLambdaInternalEnv() { + modifyEnv(env -> env.remove("_LAMBDA_TELEMETRY_LOG_FD")); + } + + public void setupEnvironmentCredentials() { + modifyEnv((env) -> { + // AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN are set by the runtime API daemon when + // executing the runtime's bootstrap. Ensure these are not empty values. + removeIfEmpty(env, "AWS_ACCESS_KEY_ID"); + removeIfEmpty(env, "AWS_SECRET_ACCESS_KEY"); + removeIfEmpty(env, "AWS_SESSION_TOKEN"); + + // The AWS Java SDK supports two alternate keys for the aws access and secret keys for compatibility. + // These are not set by the runtime API daemon when executing a runtime's bootstrap so set them here. + addIfNotNull(env, "AWS_ACCESS_KEY", env.get("AWS_ACCESS_KEY_ID")); + addIfNotNull(env, "AWS_SECRET_KEY", env.get("AWS_SECRET_ACCESS_KEY")); + }); + } + + public void setupAwsExecutionEnv() { + String version = System.getProperty("java.version"); + if (version.startsWith("1.8")) { + modifyEnv(env -> env.put("AWS_EXECUTION_ENV", "AWS_Lambda_java8")); + } else if (version.startsWith("11")) { + modifyEnv(env -> env.put("AWS_EXECUTION_ENV", "AWS_Lambda_java11")); + } + } + + private void addIfNotNull(Map env, String key, String value) { + if (value != null && !value.isEmpty()) { + env.put(key, value); + } + } + + private void removeIfEmpty(Map env, String key) { + env.computeIfPresent(key, (k, v) -> v.isEmpty() ? null : v); + } + +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/LambdaOutputStream.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/LambdaOutputStream.java new file mode 100644 index 00000000..83ffcb9a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/LambdaOutputStream.java @@ -0,0 +1,30 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.util; + +import java.io.OutputStream; +import java.io.IOException; + +public class LambdaOutputStream extends OutputStream { + private final OutputStream inner; + + public LambdaOutputStream(OutputStream inner) { + this.inner = inner; + } + + @Override + public void write(int b) throws IOException { + write(new byte[] {(byte)b}); + } + + @Override + public void write(byte[] bytes) throws IOException { + write(bytes, 0, bytes.length); + + } + + @Override + public void write(byte[] bytes, int offset, int length) throws IOException { + inner.write(bytes, offset, length); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/UnsafeUtil.java b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/UnsafeUtil.java new file mode 100644 index 00000000..f9351c94 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/UnsafeUtil.java @@ -0,0 +1,40 @@ +/* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ + +package com.amazonaws.services.lambda.runtime.api.client.util; + +import sun.misc.Unsafe; + +import java.lang.reflect.Field; + +/** + * Utilities for easy access to sun.misc.Unsafe + */ +public final class UnsafeUtil { + public static final Unsafe TheUnsafe; + + static { + try { + final Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe"); + theUnsafe.setAccessible(true); + TheUnsafe = (Unsafe) theUnsafe.get(null); + } catch (Exception e) { + throw new Error("failed to load Unsafe", e); + } + } + + private UnsafeUtil() { + } + + public static void disableIllegalAccessWarning() { + try { + Class illegalAccessLoggerClass = Class.forName("jdk.internal.module.IllegalAccessLogger"); + Field loggerField = illegalAccessLoggerClass.getDeclaredField("logger"); + TheUnsafe.putObjectVolatile(illegalAccessLoggerClass, TheUnsafe.staticFieldOffset(loggerField), null); + } catch (Throwable t) { /* ignore */ } + } + + public static RuntimeException throwException(Throwable t) { + TheUnsafe.throwException(t); + throw new Error("should never get here"); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc new file mode 100644 index 00000000..658d8548 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc @@ -0,0 +1,79 @@ +# we use centos 6 to build against glibc 2.12 +FROM centos:6 + +# aws-lambda-cpp requires cmake3, it's available in EPEL +RUN yum install -y epel-release +RUN yum install -y \ + cmake3 \ + gcc \ + gcc-c++ \ + glibc-devel \ + gmp-devel \ + libmpc-devel \ + libtool \ + mpfr-devel \ + wget + +# aws-lambda-cpp also needs a newer compiler than the default gcc 4.4 +ARG GCC_VERSION=4.8.5 +RUN wget -qO- https://mirrors.kernel.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.gz | tar xzf - +WORKDIR gcc-$GCC_VERSION +RUN ./configure \ + --disable-multilib \ + --enable-languages=c,c++ && \ + make -j$(nproc) && \ + make install +RUN yum remove -y gcc gcc-c++ +RUN rm -rf /usr/bin/gcc && \ + rm -rf /usr/bin/c++ && \ + rm -rf /usr/bin/cc && \ + ln -s /usr/local/bin/x86_64-unknown-linux-gnu-gcc-$GCC_VERSION /usr/bin/gcc && \ + ln -s /usr/local/bin/x86_64-unknown-linux-gnu-c++ /usr/bin/c++ && \ + ln -s /usr/local/bin/x86_64-unknown-linux-gnu-gcc /usr/bin/cc + +RUN rpm --import https://yum.corretto.aws/corretto.key +RUN curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo +RUN yum install -y java-1.8.0-amazon-corretto-devel + +ADD ./deps/curl-* /src/deps/curl +WORKDIR /src/deps/curl +RUN ./configure \ + --prefix $(pwd)/../artifacts \ + --disable-shared \ + --without-ssl \ + --without-zlib && \ + make && \ + make install + +ADD ./deps/aws-lambda-cpp-* /src/deps/aws-lambda-cpp +RUN sed -i.bak 's/VERSION 3.9/VERSION 3.6/' /src/deps/aws-lambda-cpp/CMakeLists.txt +RUN mkdir -p /src/deps/aws-lambda-cpp/build +WORKDIR /src/deps/aws-lambda-cpp/build +RUN cmake3 .. \ + -DENABLE_LTO=OFF \ + -DCMAKE_CXX_FLAGS="-fPIC -DBACKWARD_SYSTEM_UNKNOWN" \ + -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_INSTALL_PREFIX=$(pwd)/../../artifacts\ + -DCMAKE_MODULE_PATH=$(pwd)/../../artifacts/lib/pkgconfig && \ + make && \ + make install + +ADD *.cpp *.h /src/ +WORKDIR /src +ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto +RUN /usr/bin/c++ -c \ + -std=gnu++11 \ + -fPIC \ + -I${JAVA_HOME}/include \ + -I${JAVA_HOME}/include/linux \ + -I ./deps/artifacts/include \ + com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp -o com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.o && \ + /usr/bin/c++ -shared \ + -std=gnu++11 \ + -o aws-lambda-runtime-interface-client.so com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.o \ + -L ./deps/artifacts/lib64/ \ + -L ./deps/artifacts/lib/ \ + -laws-lambda-runtime \ + -lcurl \ + -static-libstdc++ \ + -lrt diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl new file mode 100644 index 00000000..9de8e617 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl @@ -0,0 +1,54 @@ +FROM alpine:3 +RUN wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub +RUN echo "https://apk.corretto.aws/" >> /etc/apk/repositories +RUN apk update +RUN apk add \ + amazon-corretto-8 \ + cmake \ + file \ + g++ \ + gcc \ + make \ + libexecinfo-dev \ + perl + +ADD ./deps/curl-* /src/deps/curl +WORKDIR /src/deps/curl +RUN ./configure \ + --prefix $(pwd)/../artifacts \ + --disable-shared \ + --without-ssl \ + --without-zlib && \ + make && \ + make install + +ADD ./deps/aws-lambda-cpp-* /src/deps/aws-lambda-cpp +RUN mkdir -p /src/deps/aws-lambda-cpp/build +WORKDIR /src/deps/aws-lambda-cpp/build +RUN cmake .. \ + -DCMAKE_CXX_FLAGS="-fPIC -DBACKWARD_SYSTEM_UNKNOWN" \ + -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_INSTALL_PREFIX=$(pwd)/../../artifacts\ + -DCMAKE_MODULE_PATH=$(pwd)/../../artifacts/lib/pkgconfig && \ + make && \ + make install + +ADD *.cpp *.h /src/ +WORKDIR /src +ENV JAVA_HOME=/usr/lib/jvm/java-8-amazon-corretto +RUN /usr/bin/c++ -c \ + -std=gnu++11 \ + -fPIC \ + -I${JAVA_HOME}/include \ + -I${JAVA_HOME}/include/linux \ + -I ./deps/artifacts/include \ + com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp -o com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.o && \ + /usr/bin/c++ -shared \ + -std=gnu++11 \ + -o aws-lambda-runtime-interface-client.so com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.o \ + -L ./deps/artifacts/lib64/ \ + -L ./deps/artifacts/lib/ \ + -laws-lambda-runtime \ + -lcurl \ + -static-libstdc++ \ + -static-libgcc diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh new file mode 100755 index 00000000..78d8baff --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +set -euo pipefail + +SRC_DIR=$(dirname "$0") +DST_DIR=${1} + +# compile the native library +docker build -f "${SRC_DIR}/Dockerfile.glibc" -t lambda-java-jni-lib-glibc "${SRC_DIR}" +docker run --rm --entrypoint /bin/cat lambda-java-jni-lib-glibc /src/aws-lambda-runtime-interface-client.so > "${DST_DIR}"/classes/aws-lambda-runtime-interface-client.glibc.so + +docker build -f "${SRC_DIR}/Dockerfile.musl" -t lambda-java-jni-lib-musl "${SRC_DIR}" +docker run --rm --entrypoint /bin/cat lambda-java-jni-lib-musl /src/aws-lambda-runtime-interface-client.so > "${DST_DIR}"/classes/aws-lambda-runtime-interface-client.musl.so + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp new file mode 100644 index 00000000..c6a1dabc --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.cpp @@ -0,0 +1,128 @@ +/* + * Copyright 2019-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +#include +#include "com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h" +#include "aws/lambda-runtime/runtime.h" +#include "aws/lambda-runtime/version.h" + +#define CHECK_EXCEPTION(env, expr) \ + expr; \ + if ((env)->ExceptionOccurred()) \ + goto ERROR; + +static aws::lambda_runtime::runtime * CLIENT = nullptr; + +static void throwLambdaRuntimeClientException(JNIEnv *env, std::string message, aws::http::response_code responseCode){ + jclass lambdaRuntimeExceptionClass = env->FindClass("com/amazonaws/services/lambda/runtime/api/client/runtimeapi/LambdaRuntimeClientException"); + jstring jMessage = env->NewStringUTF(message.c_str()); + jmethodID exInit = env->GetMethodID(lambdaRuntimeExceptionClass, "", "(Ljava/lang/String;I)V"); + jthrowable lambdaRuntimeException = (jthrowable) env->NewObject(lambdaRuntimeExceptionClass, exInit, jMessage, static_cast(responseCode)); + env->Throw(lambdaRuntimeException); +} + +static std::string toNativeString(JNIEnv *env, jbyteArray jArray) { + int length = env->GetArrayLength(jArray); + jbyte* bytes = env->GetByteArrayElements(jArray, NULL); + std::string nativeString = std::string((char *)bytes, length); + env->ReleaseByteArrayElements(jArray, bytes, JNI_ABORT); + env->DeleteLocalRef(jArray); + return nativeString; +} + +JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_initializeClient(JNIEnv *env, jobject thisObject, jbyteArray userAgent) { + std::string user_agent = toNativeString(env, userAgent); + std::string endpoint(getenv("AWS_LAMBDA_RUNTIME_API")); + CLIENT = new aws::lambda_runtime::runtime(endpoint, user_agent); +} + +JNIEXPORT jobject JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_next + (JNIEnv *env, jobject thisObject){ + auto outcome = CLIENT->get_next(); + if (!outcome.is_success()) { + std::string errorMessage("Failed to get next."); + throwLambdaRuntimeClientException(env, errorMessage, outcome.get_failure()); + return NULL; + } + + jclass invocationRequestClass; + jfieldID invokedFunctionArnField; + jfieldID deadlineTimeInMsField; + jfieldID xrayTraceIdField; + jfieldID idField; + jobject invocationRequest; + jfieldID clientContextField; + jfieldID cognitoIdentityField; + jbyteArray jArray; + const jbyte* bytes; + jfieldID contentField; + auto response = outcome.get_result(); + + CHECK_EXCEPTION(env, invocationRequestClass = env->FindClass("com/amazonaws/services/lambda/runtime/api/client/runtimeapi/InvocationRequest")); + CHECK_EXCEPTION(env, invocationRequest = env->AllocObject(invocationRequestClass)); + + CHECK_EXCEPTION(env, idField = env->GetFieldID(invocationRequestClass , "id", "Ljava/lang/String;")); + CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, idField, env->NewStringUTF(response.request_id.c_str()))); + + CHECK_EXCEPTION(env, invokedFunctionArnField = env->GetFieldID(invocationRequestClass , "invokedFunctionArn", "Ljava/lang/String;")); + CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, invokedFunctionArnField, env->NewStringUTF(response.function_arn.c_str()))); + + CHECK_EXCEPTION(env, deadlineTimeInMsField = env->GetFieldID(invocationRequestClass , "deadlineTimeInMs", "J")); + CHECK_EXCEPTION(env, env->SetLongField(invocationRequest, deadlineTimeInMsField, std::chrono::duration_cast(response.deadline.time_since_epoch()).count())); + + if(response.xray_trace_id != ""){ + CHECK_EXCEPTION(env, xrayTraceIdField = env->GetFieldID(invocationRequestClass , "xrayTraceId", "Ljava/lang/String;")); + CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, xrayTraceIdField, env->NewStringUTF(response.xray_trace_id.c_str()))); + } + + if(response.client_context != ""){ + CHECK_EXCEPTION(env, clientContextField = env->GetFieldID(invocationRequestClass , "clientContext", "Ljava/lang/String;")); + CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, clientContextField, env->NewStringUTF(response.client_context.c_str()))); + } + + if(response.cognito_identity != ""){ + CHECK_EXCEPTION(env, cognitoIdentityField = env->GetFieldID(invocationRequestClass , "cognitoIdentity", "Ljava/lang/String;")); + CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, cognitoIdentityField, env->NewStringUTF(response.cognito_identity.c_str()))); + } + + bytes = reinterpret_cast(response.payload.c_str()); + CHECK_EXCEPTION(env, jArray = env->NewByteArray(response.payload.length())); + CHECK_EXCEPTION(env, env->SetByteArrayRegion(jArray, 0, response.payload.length(), bytes)); + CHECK_EXCEPTION(env, contentField = env->GetFieldID(invocationRequestClass , "content", "[B")); + CHECK_EXCEPTION(env, env->SetObjectField(invocationRequest, contentField, jArray)); + + return invocationRequest; + + ERROR: + return NULL; +} + +JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_postInvocationResponse + (JNIEnv *env, jobject thisObject, jbyteArray jrequestId, jbyteArray jresponseArray) { + std::string payload = toNativeString(env, jresponseArray); + if ((env)->ExceptionOccurred()){ + return; + } + std::string requestId = toNativeString(env, jrequestId); + if ((env)->ExceptionOccurred()){ + return; + } + + auto response = aws::lambda_runtime::invocation_response::success(payload, "application/json"); + auto outcome = CLIENT->post_success(requestId, response); + if (!outcome.is_success()) { + std::string errorMessage("Failed to post invocation response."); + throwLambdaRuntimeClientException(env, errorMessage, outcome.get_failure()); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h new file mode 100644 index 00000000..28a6f444 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.h @@ -0,0 +1,21 @@ +#include + +#ifndef _Included_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient +#define _Included_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient +#ifdef __cplusplus +extern "C" { +#endif + +JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_initializeClient + (JNIEnv *, jobject, jbyteArray); + +JNIEXPORT jobject JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_next + (JNIEnv *, jobject); + +JNIEXPORT void JNICALL Java_com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient_postInvocationResponse + (JNIEnv *, jobject, jbyteArray, jbyteArray); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format new file mode 100644 index 00000000..ec8bb67d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-format @@ -0,0 +1,61 @@ +--- +Language: Cpp +# BasedOnStyle: Mozilla +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Right +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: true +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +BreakStringLiterals: true +ColumnLimit: 120 +ContinuationIndentWidth: 4 +DerivePointerAlignment: false +IncludeBlocks: Preserve +IndentCaseLabels: true +IndentPPDirectives: AfterHash +IndentWidth: 4 +IndentWrappedFunctionNames: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +PenaltyBreakComment: 10 +PenaltyBreakAssignment: 20 +PenaltyBreakString: 30 +PenaltyBreakBeforeFirstCallParameter: 35 +PenaltyBreakFirstLessLess: 40 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 100000 +PointerAlignment: Left +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 4 +UseTab: Never +NamespaceIndentation: None +BreakBeforeBraces: Stroustrup +AccessModifierOffset: -4 +... + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy new file mode 100644 index 00000000..7d343ead --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.clang-tidy @@ -0,0 +1,41 @@ +--- +Checks: +'clang-diagnostic-*,clang-analyzer-*,performance-*,readability-*,modernize-*,bugprone-*,misc-*,-modernize-use-trailing-return-type' +WarningsAsErrors: '*' +HeaderFilterRegex: 'include/aws/.*\.h$' +FormatStyle: 'none' +CheckOptions: + - key: modernize-pass-by-value.ValuesOnly + value: '1' + - key: readability-implicit-bool-conversion.AllowPointerConditions + value: '1' + - key: readability-implicit-bool-conversion.AllowIntegerConditions + value: '1' + - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: '1' + - key: readability-identifier-naming.ClassCase + value: 'lower_case' + - key: readability-identifier-naming.StructCase + value: 'lower_case' + - key: readability-identifier-naming.StructCase + value: 'lower_case' + - key: readability-identifier-naming.ParameterCase + value: 'lower_case' + - key: readability-identifier-naming.PrivateMemberCase + value: 'lower_case' + - key: readability-identifier-naming.LocalVariableCase + value: 'lower_case' + - key: readability-identifier-naming.TypeAliasCase + value: 'lower_case' + - key: readability-identifier-naming.UnionCase + value: 'lower_case' + - key: readability-identifier-naming.FunctionCase + value: 'lower_case' + - key: readability-identifier-naming.NamespaceCase + value: 'lower_case' + - key: readability-identifier-naming.GlobalConstantCase + value: 'UPPER_CASE' + - key: readability-identifier-naming.PrivateMemberPrefix + value: 'm_' + +... diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..ab40d21d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,6 @@ +*Issue #, if available:* + +*Description of changes:* + + +By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore new file mode 100644 index 00000000..647f4493 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/.gitignore @@ -0,0 +1,5 @@ +build +tags +TODO +compile_commands.json +.clangd diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt new file mode 100644 index 00000000..1765caf0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CMakeLists.txt @@ -0,0 +1,132 @@ +cmake_minimum_required(VERSION 3.9) +set(CMAKE_CXX_STANDARD 11) +project(aws-lambda-runtime + VERSION 0.2.7 + LANGUAGES CXX) + +option(ENABLE_LTO "Enables link-time optimization, requires compiler support." ON) +option(ENABLE_TESTS "Enables building the test project, requires AWS C++ SDK." OFF) + +add_library(${PROJECT_NAME} + "src/logging.cpp" + "src/runtime.cpp" + "src/backward.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/version.cpp" + ) + +set_target_properties(${PROJECT_NAME} PROPERTIES + SOVERSION 0 + VERSION ${PROJECT_VERSION}) + +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $) + +if (ENABLE_LTO) + include(CheckIPOSupported) + check_ipo_supported(RESULT has_lto OUTPUT lto_check_output) + if(has_lto) + set_property(TARGET ${PROJECT_NAME} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) + else() + message(WARNING "Link-time optimization (LTO) is not supported: ${lto_check_output}") + endif() +endif() + +find_package(CURL REQUIRED) +if (CMAKE_VERSION VERSION_LESS 3.12) + target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES}) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl) +endif() + +target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS}) + +target_compile_options(${PROJECT_NAME} PRIVATE + "-fno-exceptions" + "-fno-rtti" + "-fvisibility=hidden" + "-fvisibility-inlines-hidden" + "-Wall" + "-Wextra" + "-Werror" + "-Wconversion" + "-Wno-sign-conversion") + +find_library(DW_LIB NAMES dw) +if (NOT DW_LIB STREQUAL DW_LIB-NOTFOUND) + message("-- Enhanced stack-traces are enabled via libdw: ${DW_LIB}") + target_compile_definitions(${PROJECT_NAME} PRIVATE "BACKWARD_HAS_DW=1") + target_link_libraries(${PROJECT_NAME} PUBLIC "${DW_LIB}") +else() + find_library(BFD_LIB NAMES bfd) + if (NOT BFD_LIB STREQUAL BFD_LIB-NOTFOUND) + message("-- Enhanced stack-traces are enabled via libbfd: ${BFD_LIB}") + target_compile_definitions(${PROJECT_NAME} PRIVATE "BACKWARD_HAS_BFD=1") + target_link_libraries(${PROJECT_NAME} PRIVATE "${BFD_LIB}") + endif() +endif() + +if (LOG_VERBOSITY) + target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=${LOG_VERBOSITY}") +elseif(CMAKE_BUILD_TYPE STREQUAL Debug) + target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=3") +else () + target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_LAMBDA_LOG=0") +endif() + +#tests +if (ENABLE_TESTS) + enable_testing() + add_subdirectory(tests) +endif() + +#versioning +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/src/version.cpp.in" + "${CMAKE_CURRENT_BINARY_DIR}/version.cpp" + NEWLINE_STYLE LF) + +include (CMakePackageConfigHelpers) + +write_basic_package_version_file("${PROJECT_NAME}-config-version.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion) + +# installation +install(FILES "include/aws/http/response.h" + DESTINATION "include/aws/http") + +install(FILES + "include/aws/lambda-runtime/runtime.h" + "include/aws/lambda-runtime/version.h" + "include/aws/lambda-runtime/outcome.h" + DESTINATION "include/aws/lambda-runtime") + +install(FILES "include/aws/logging/logging.h" + DESTINATION "include/aws/logging") + +include(GNUInstallDirs) +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + @ONLY) + +export(EXPORT "${PROJECT_NAME}-targets" NAMESPACE AWS::) + +install(EXPORT "${PROJECT_NAME}-targets" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS::) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/") + +install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/packaging/packager" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/") + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..3b644668 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md new file mode 100644 index 00000000..e8c3aa58 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing Guidelines + +Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional +documentation, we greatly value feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests to ensure we have all the necessary +information to effectively respond to your bug report or contribution. + + +## Reporting Bugs/Feature Requests + +We welcome you to use the GitHub issue tracker to report bugs or suggest features. + +When filing an issue, please check [existing open](https://github.com/awslabs/aws-lambda-cpp-runtime/issues), or [recently closed](https://github.com/awslabs/aws-lambda-cpp-runtime/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already +reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: + +* A reproducible test case or series of steps +* The version of our code being used +* Any modifications you've made relevant to the bug +* Anything unusual about your environment or deployment + + +## Contributing via Pull Requests +Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: + +1. You are working against the latest source on the *master* branch. +2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. +3. You open an issue to discuss any significant work - we would hate for your time to be wasted. + +To send us a pull request, please: + +1. Fork the repository. +2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. +3. Ensure local tests pass. +4. Commit to your fork using clear commit messages. +5. Send us a pull request, answering any default questions in the pull request interface. +6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. + +GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). + + +## Finding contributions to work on +Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-lambda-cpp-runtime/labels/help%20wanted) issues is a great place to start. + + +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. + + +## Security issue notifications +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. + + +## Licensing + +See the [LICENSE](https://github.com/awslabs/aws-lambda-cpp-runtime/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. + +We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE new file mode 100644 index 00000000..34e186a0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/NOTICE @@ -0,0 +1,2 @@ +AWS Lambda Cpp Runtime +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md new file mode 100644 index 00000000..0812476a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/README.md @@ -0,0 +1,220 @@ +[![GitHub](https://img.shields.io/github/license/awslabs/aws-lambda-cpp.svg)](https://github.com/awslabs/aws-lambda-cpp/blob/master/LICENSE) +![CodeBuild](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiQkN1b0srbWtnUjNibFVyL2psNmdaM0l4RnVQNzVBeG84QnQvUjRmOEJVdXdHUXMxZ25iWnFZQUtGTkUxVGJhcGZaVEhXY2JOSTFHTlkvaGF2RDRIZlpVPSIsIml2UGFyYW1ldGVyU3BlYyI6IjRiS3hlRjFxVFZHSWViQmQiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master) +[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/awslabs/aws-lambda-cpp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/awslabs/aws-lambda-cpp/context:cpp) +## AWS Lambda C++ Runtime + +C++ implementation of the lambda runtime API + +## Design Goals +1. Negligible cold-start overhead (single digit millisecond). +2. Freedom of choice in compilers, build platforms and C standard library versions. + +## Building and Installing the Runtime +Since AWS Lambda runs on GNU/Linux, you should build this runtime library and your logic on GNU/Linux as well. + +### Prerequisites +Make sure you have the following packages installed first: +1. CMake (version 3.9 or later) +1. git +1. Make or Ninja +1. zip +1. libcurl-devel (on Debian-basded distros it's libcurl4-openssl-dev) + +In a terminal, run the following commands: +```bash +$ git clone https://github.com/awslabs/aws-lambda-cpp.git +$ cd aws-lambda-cpp +$ mkdir build +$ cd build +$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/lambda-install +$ make && make install +``` + +To consume this library in a project that is also using CMake, you would do: + +```cmake +cmake_minimum_required(VERSION 3.9) +set(CMAKE_CXX_STANDARD 11) +project(demo LANGUAGES CXX) +find_package(aws-lambda-runtime) +add_executable(${PROJECT_NAME} "main.cpp") +target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime) +target_compile_features(${PROJECT_NAME} PRIVATE "cxx_std_11") +target_compile_options(${PROJECT_NAME} PRIVATE "-Wall" "-Wextra") + +# this line creates a target that packages your binary and zips it up +aws_lambda_package_target(${PROJECT_NAME}) +``` + +And here is how a sample `main.cpp` would look like: +```cpp +#include + +using namespace aws::lambda_runtime; + +static invocation_response my_handler(invocation_request const& req) +{ + if (req.payload.length() > 42) { + return invocation_response::failure("error message here"/*error_message*/, + "error type here" /*error_type*/); + } + + return invocation_response::success("json payload here" /*payload*/, + "application/json" /*MIME type*/); +} + +int main() +{ + run_handler(my_handler); + return 0; +} +``` + +And finally, here's how you would package it all. Run the following commands from your application's root directory: + +```bash +$ mkdir build +$ cd build +$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/lambda-install +$ make +$ make aws-lambda-package-demo +``` +The last command above `make aws-lambda-package-demo` will create a zip file called `demo.zip` in the current directory. + +Now, create an IAM role and the Lambda function via the AWS CLI. + +First create the following trust policy JSON file + +``` +$ cat trust-policy.json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": ["lambda.amazonaws.com"] + }, + "Action": "sts:AssumeRole" + } + ] +} + +``` +Then create the IAM role: + +```bash +$ aws iam create-role --role-name lambda-demo --assume-role-policy-document file://trust-policy.json +``` + +Note down the role Arn returned to you after running that command. We'll need it in the next steps: + +Attach the following policy to allow Lambda to write logs in CloudWatch: +```bash +$ aws iam attach-role-policy --role-name lambda-demo --policy-arn arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole +``` + +Make sure you attach the appropriate policies and/or permissions for any other AWS services that you plan on using. + +And finally, create the Lambda function: + +``` +$ aws lambda create-function --function-name demo \ +--role \ +--runtime provided --timeout 15 --memory-size 128 \ +--handler demo --zip-file fileb://demo.zip +``` + +And to invoke the function: +```bash +$ aws lambda invoke --function-name demo --payload '{"answer":42}' output.txt +``` + +## Using the C++ SDK for AWS with this runtime +This library is completely independent from the AWS C++ SDK. You should treat the AWS C++ SDK as just another dependency in your application. +See [the examples section](https://github.com/awslabs/aws-lambda-cpp/tree/master/examples/) for a demo utilizing the AWS C++ SDK with this Lambda runtime. + +## Supported Compilers +Any *fully* compliant C++11 compiler targeting GNU/Linux x86-64 should work. Please avoid compiler versions that provide half-baked C++11 support. + +- Use GCC v5.x or above +- Use Clang v3.3 or above + +## Packaging, ABI, GNU C Library, Oh My! +Lambda runs your code on some version of Amazon Linux. It would be a less than ideal customer experience if you are forced to build your application on that platform and that platform only. + +However, the freedom to build on any linux distro brings a challenge. The GNU C Library ABI. There is no guarantee the platform used to build the Lambda function has the same GLIBC version as the one used by AWS Lambda. In fact, you might not even be using GNU's implementation. For example you could build a C++ Lambda function using musl libc. + +To ensure that your application will run correctly on Lambda, we must package the entire C runtime library with your function. +If you choose to build on the same [Amazon Linux version used by lambda](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html), you can avoid packaging the C runtime in your zip file. +This can be done by passing the `NO_LIBC` flag in CMake as follows: + +```cmake +aws_lambda_package_target(${PROJECT_NAME} NO_LIBC) +``` +### Common Pitfalls with Packaging + +* Any library dependency your Lambda function has that is dynamically loaded via `dlopen` will NOT be automatically packaged. You **must** add those dependencies manually to the zip file. +This applies to any configuration or resource files that your code depends on. + +* If you are making HTTP calls over TLS (https), keep in mind that the CA bundle location is different between distros. +For example, if you are using the AWS C++ SDK, it's best to set the following configuration options: + +```cpp +Aws::Client::ClientConfiguration config; +config.caFile = "/etc/pki/tls/certs/ca-bundle.crt"; +``` +If you are not using the AWS C++ SDK, but happen to be using libcurl directly, you can set the CA bundle location by doing: +```c +curl_easy_setopt(curl_handle, CURLOPT_CAINFO, "/etc/pki/tls/certs/ca-bundle.crt"); +``` + +## FAQ & Troubleshooting +1. **Why is the zip file so large? what are all those files?** + Typically, the zip file is large because we have to package the entire C standard library. + You can reduce the size by doing some or all of the following: + - Ensure you're building in release mode `-DCMAKE_BUILD_TYPE=Release` + - If possible, build your function using musl libc, it's tiny. The easiest way to do this, assuming your code is portable, is to build on Alpine linux, which uses musl libc by default. +1. **How to upload a zip file that's bigger than 50MB via the CLI?** + Upload your zip file to S3 first: + ```bash + $ aws s3 cp demo.zip s3://mys3bucket/demo.zip + ``` + NOTE: you must use the same region for your S3 bucket as the lambda. + + Then you can create the Lambda function this way: + + ```bash + $ aws lambda create-function --function-name demo \ + --role \ + --runtime provided --timeout 15 --memory-size 128 \ + --handler demo + --code "S3Bucket=mys3bucket,S3Key=demo.zip" + ``` +1. **My code is crashing, how can I debug it?** + + - Starting with [v0.2.0](https://github.com/awslabs/aws-lambda-cpp/releases/tag/v0.2.0) you should see a stack-trace of the crash site in the logs (which are typically stored in CloudWatch). + - To get a more detailed stack-trace with source-code information such as line numbers, file names, etc. you need to install one of the following packages: + - On Debian-based systems - `sudo apt install libdw-dev` or `sudo apt install binutils-dev` + - On RHEL based systems - `sudo yum install elfutils-devel` or `sudo yum install binutils-devel` + If you have either of those packages installed, CMake will detect them and automatically link to them. No other + steps are required. + - Turn up the logging verbosity to the maximum. + - Build the runtime in Debug mode. `-DCMAKE_BUILD_TYPE=Debug`. Verbose logs are enabled by default in Debug builds. + - To enable verbose logs in Release builds, build the runtime with the following CMake flag `-DLOG_VERBOSITY=3` + - If you are using the AWS C++ SDK, see [this FAQ](https://github.com/aws/aws-sdk-cpp/wiki#how-do-i-turn-on-logging) on how to adjust its logging verbosity + - Run your code locally on an Amazon Linux AMI or Docker container to reproduce the problem + - If you go the AMI route, [use the official one](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) recommended by AWS Lambda + - If you go the Docker route, use the following command to launch a container running AL2017.03 + `$ docker run -v /tmp:/tmp -it --security-opt seccomp=unconfined amazonlinux:2017.03` + The `security-opt` argument is necessary to run `gdb`, `strace`, etc. +1. **CURL problem with the SSL CA cert** + - Make sure you are using a `libcurl` version built with OpenSSL, or one of its flavors (BoringSSL, LibreSSL) + - Make sure you tell `libcurl` where to find the CA bundle file. + - You can try hitting the non-TLS version of the endpoint if available. (Not Recommended). +1. **No known conversion between `std::string` and `Aws::String`** + - Either turn off custom memory management in the AWS C++ SDK or build it as a static library (`-DBUILD_SHARED_LIBS=OFF`) + +## License + +This library is licensed under the Apache 2.0 License. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml new file mode 100644 index 00000000..eab1bafb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/amazonlinux-2017.03.yml @@ -0,0 +1,18 @@ +version: 0.1 +# This uses the docker image specified in ci/docker/amazon-linux-2017.03 +phases: + pre_build: + commands: + - alias cmake=cmake3 + - pip install awscli + - ci/codebuild/build-cpp-sdk.sh + build: + commands: + - echo Build started on `date` + - ci/codebuild/build.sh -DENABLE_TESTS=ON -DTEST_RESOURCE_PREFIX=amzn201703 + - ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun amzn201703 + - ci/codebuild/run-tests.sh aws-lambda-package-lambda-test-fun-no-glibc amzn201703 + post_build: + commands: + - echo Build completed on `date` + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh new file mode 100755 index 00000000..93ae7ebe --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build-cpp-sdk.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -euo pipefail + +# build the AWS C++ SDK +cd /aws-sdk-cpp +git pull +mkdir build +cd build +cmake .. -GNinja -DBUILD_ONLY="lambda" \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_UNITY_BUILD=ON \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_TESTING=OFF \ + -DCMAKE_INSTALL_PREFIX=/install $@ +ninja +ninja install diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh new file mode 100755 index 00000000..53a9544e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -euo pipefail + +# build the lambda-runtime +cd $CODEBUILD_SRC_DIR +mkdir build +cd build +cmake .. -GNinja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/install $@ +ninja +ninja install diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh new file mode 100755 index 00000000..3afb8023 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/ci/codebuild/format-check.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -euo pipefail + +CLANG_FORMAT=clang-format + +if NOT type $CLANG_FORMAT > /dev/null 2>&1; then + echo "No appropriate clang-format found." + exit 1 +fi + +FAIL=0 +SOURCE_FILES=$(find src include tests -type f -name "*.h" -o -name "*.cpp") +for i in $SOURCE_FILES +do + if [ $($CLANG_FORMAT -output-replacements-xml $i | grep -c " + DEPENDS ${target}) +endfunction() + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile new file mode 100644 index 00000000..aabb4dd4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine:latest + +RUN apk update && apk add cmake make git g++ bash curl-dev zlib-dev diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt new file mode 100644 index 00000000..02da6ccf --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.5) +set(CMAKE_CXX_STANDARD 11) + +project(api LANGUAGES CXX) + +find_package(aws-lambda-runtime REQUIRED) +find_package(AWSSDK COMPONENTS core) + +add_executable(${PROJECT_NAME} "main.cpp") +target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-lambda-runtime ${AWSSDK_LINK_LIBRARIES}) + +aws_lambda_package_target(${PROJECT_NAME}) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md new file mode 100644 index 00000000..d184165b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/README.md @@ -0,0 +1,81 @@ +# Example using the AWS C++ Lambda runtime and Amazon API Gateway + +In this example, we'll build a simple "Hello, World" lambda function that can be invoked using an api endpoint created using Amazon API gateway. This example can be viewed as the C++ counterpart to the NodeJS "Hello, World" API example as viewed [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html). At the end of this example, you should be able to invoke your lambda via an api endpoint and receive a raw JSON response. This example employs the use of the AWS C++ SDK to parse the request and write the necessary response. + +## Build the AWS C++ SDK +Start by building the SDK from source. + +```bash +$ mkdir ~/install +$ git clone https://github.com/aws/aws-sdk-cpp.git +$ cd aws-sdk-cpp +$ mkdir build +$ cd build +$ cmake .. -DBUILD_ONLY="core" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_UNITY_BUILD=ON \ + -DCUSTOM_MEMORY_MANAGEMENT=OFF \ + -DCMAKE_INSTALL_PREFIX=~/install \ + -DENABLE_UNITY_BUILD=ON +$ make +$ make install +``` + +## Build the Runtime +We need to build the C++ Lambda runtime as outlined in the other examples. + +```bash +$ git clone https://github.com/awslabs/aws-lambda-cpp-runtime.git +$ cd aws-lambda-cpp-runtime +$ mkdir build +$ cd build +$ cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_PREFIX=~/install \ +$ make +$ make install +``` + +## Build the application +The next step is to build the Lambda function in `main.cpp` and run the packaging command as follows: + +```bash +$ mkdir build +$ cd build +$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install +$ make +$ make aws-lambda-package-api +``` + +You should now have a zip file called `api.zip`. Follow the instructions in the main README to upload it and return here once complete. + +## Using Amazon API Gateway +For the rest of this example, we will use the AWS Management Console to create the API endpoint using Amazon API Gateway. + +1. Navigate to AWS Lambda within the console [here](https://console.aws.amazon.com/lambda/home) +1. Select the newly created function. Within the specific function, the "Designer" window should appear. +1. Simply click "Add trigger" -> "API Gateway" -> "Create an API". Please view the settings below. + * API Type: HTTP API + * Security: Open + * API name: Hello-World-API (or desired name) + * Deployment stage: default +1. Once you have added the API gateway, locate the newly created endpoint. View how to test the endpoint below. + +## Test the endpoint +Feel free to test the endpoint any way you desire. Below is a way to test using cURL: + +``` +curl -v -X POST \ + '?name=Bradley&city=Chicago' \ + -H 'content-type: application/json' \ + -H 'day: Sunday' \ + -d '{ "time": "evening" }' +``` + +With the expected response being: +``` +{ + "message": "Good evening, Bradley of Chicago. Happy Sunday!" +} +``` diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp new file mode 100644 index 00000000..90f10355 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/api-gateway/main.cpp @@ -0,0 +1,61 @@ +#include +#include +#include + +using namespace aws::lambda_runtime; + +invocation_response my_handler(invocation_request const& request) +{ + + using namespace Aws::Utils::Json; + + JsonValue json(request.payload); + if (!json.WasParseSuccessful()) { + return invocation_response::failure("Failed to parse input JSON", "InvalidJSON"); + } + + auto v = json.View(); + Aws::SimpleStringStream ss; + ss << "Good "; + + if (v.ValueExists("body") && v.GetObject("body").IsString()) { + auto body = v.GetString("body"); + JsonValue body_json(body); + + if (body_json.WasParseSuccessful()) { + auto body_v = body_json.View(); + ss << (body_v.ValueExists("time") && body_v.GetObject("time").IsString() ? body_v.GetString("time") : ""); + } + } + ss << ", "; + + if (v.ValueExists("queryStringParameters")) { + auto query_params = v.GetObject("queryStringParameters"); + ss << (query_params.ValueExists("name") && query_params.GetObject("name").IsString() + ? query_params.GetString("name") + : "") + << " of "; + ss << (query_params.ValueExists("city") && query_params.GetObject("city").IsString() + ? query_params.GetString("city") + : "") + << ". "; + } + + if (v.ValueExists("headers")) { + auto headers = v.GetObject("headers"); + ss << "Happy " + << (headers.ValueExists("day") && headers.GetObject("day").IsString() ? headers.GetString("day") : "") + << "!"; + } + + JsonValue resp; + resp.WithString("message", ss.str()); + + return invocation_response::success(resp.View().WriteCompact(), "application/json"); +} + +int main() +{ + run_handler(my_handler); + return 0; +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt new file mode 100644 index 00000000..8447e019 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.5) +set(CMAKE_CXX_STANDARD 11) +project(ddb-demo LANGUAGES CXX) + +find_package(aws-lambda-runtime) +find_package(AWSSDK COMPONENTS dynamodb) + +add_executable(${PROJECT_NAME} "main.cpp") + +target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-lambda-runtime ${AWSSDK_LINK_LIBRARIES}) + +target_compile_options(${PROJECT_NAME} PRIVATE + "-fno-exceptions" + "-fno-rtti" + "-Wall" + "-Wextra" + "-Werror" + "-Wconversion" + "-Wno-sign-conversion") + +target_compile_features(${PROJECT_NAME} PRIVATE "cxx_std_11") + +aws_lambda_package_target(${PROJECT_NAME}) + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md new file mode 100644 index 00000000..db84fd87 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/README.md @@ -0,0 +1,52 @@ +# Example using the AWS C++ SDK with Lambda & DynamoDB + +We'll build a Lambda function that can be used as an API Gateway proxy to fetch records from a DynamoDB table. +To also show case how this can be done on a Linux distro other than Amazon Linux, you can use the Dockerfile in this directory to create an Alpine Linux environment in which you can run the following instructions. + +That being said, the instructions below should work on any Linux distribution. + +## Build the AWS C++ SDK +Start by building the SDK from source. +```bash +$ mkdir ~/install +$ git clone https://github.com/aws/aws-sdk-cpp.git +$ cd aws-sdk-cpp +$ mkdir build +$ cd build +$ cmake .. -DBUILD_ONLY="dynamodb" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_UNITY_BUILD=ON \ + -DCUSTOM_MEMORY_MANAGEMENT=OFF \ + -DCMAKE_INSTALL_PREFIX=~/install \ + -DENABLE_UNITY_BUILD=ON + +$ make -j 4 +$ make install +``` + +## Build the Runtime +Now let's build the C++ Lambda runtime, so in a separate directory clone this repository and follow these steps: + +```bash +$ git clone https://github.com/awslabs/aws-lambda-cpp-runtime.git +$ cd aws-lambda-cpp-runtime +$ mkdir build +$ cd build +$ cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_PREFIX=~/install \ +$ make +$ make install +``` + +## Build the application +The last step is to build the Lambda function in `main.cpp` and run the packaging command as follows: + +```bash +$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install +$ make +$ make aws-lambda-package-ddb-demo +``` + +You should now have a zip file called `ddb-demo.zip`. Follow the instructions in the main README to upload it and invoke the lambda. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp new file mode 100644 index 00000000..a8b86621 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/dynamodb/main.cpp @@ -0,0 +1,229 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// API Gateway Input format +// { +// "resource": "Resource path", +// "path": "Path parameter", +// "httpMethod": "Incoming request's method name" +// "headers": {String containing incoming request headers} +// "multiValueHeaders": {List of strings containing incoming request headers} +// "queryStringParameters": {query string parameters } +// "multiValueQueryStringParameters": {List of query string parameters} +// "pathParameters": {path parameters} +// "stageVariables": {Applicable stage variables} +// "requestContext": {Request context, including authorizer-returned key-value pairs} +// "body": "A JSON string of the request payload." +// "isBase64Encoded": "A boolean flag to indicate if the applicable request payload is Base64-encode" +// } + +static char const TAG[] = "lambda"; + +struct criteria { + criteria(Aws::Utils::Json::JsonView data) : error_msg(nullptr) + { + using namespace Aws::Utils; + auto path_params = data.GetObject("pathParameters"); + if (!path_params.ValueExists("productId")) { + error_msg = "Missing URL parameter {productId}."; + return; + } + + product_id = path_params.GetString("productId"); + auto qs = data.GetObject("queryStringParameters"); + + if (!qs.ValueExists("startDate")) { + error_msg = "Missing query string parameter 'startDate'."; + return; + } + start_date = DateTime(qs.GetString("startDate"), DateFormat::ISO_8601); + if (!start_date.WasParseSuccessful()) { + error_msg = "Invalid input format. startDate must be in ISO 8601 format."; + return; + } + + if (!qs.ValueExists("endDate")) { + error_msg = "Missing query string parameter 'endDate'."; + return; + } + end_date = DateTime(qs.GetString("endDate"), DateFormat::ISO_8601); + if (!end_date.WasParseSuccessful()) { + error_msg = "Invalid input format. endDate must be in ISO 8601 format."; + return; + } + } + + std::string product_id; + Aws::Utils::DateTime start_date; + Aws::Utils::DateTime end_date; + char const* error_msg; +}; + +Aws::Utils::Json::JsonValue query(criteria const cr, Aws::DynamoDB::DynamoDBClient const& client) +{ + using namespace Aws::DynamoDB; + using namespace Aws::DynamoDB::Model; + using namespace Aws::Utils::Json; + + AWS_LOGSTREAM_DEBUG( + TAG, + "criteria is: product_id: " << cr.product_id << " start_date epoch: " << cr.start_date.Millis() + << " end_date epoch: " << cr.end_date.Millis()); + + QueryRequest query; + + auto const& table_name = Aws::Environment::GetEnv("TABLE_NAME"); + query.SetTableName(table_name); + query.SetKeyConditionExpression("#H = :h AND #R BETWEEN :s AND :e"); + query.AddExpressionAttributeNames("#H", "product_id"); + query.AddExpressionAttributeNames("#R", "date_time"); + + query.AddExpressionAttributeValues(":h", AttributeValue(cr.product_id)); + AttributeValue date; + date.SetN(std::to_string(cr.start_date.Millis() / 1000)); + query.AddExpressionAttributeValues(":s", date); + + date.SetN(std::to_string(cr.end_date.Millis() / 1000)); + query.AddExpressionAttributeValues(":e", date); + + auto outcome = client.Query(query); + if (outcome.IsSuccess()) { + auto const& maps = outcome.GetResult().GetItems(); // returns vector of map + if (maps.empty()) { + AWS_LOGSTREAM_DEBUG(TAG, "No data returned from query"); + return {}; + } + + // Schema + // string_attr :product_id, hash_key: true + // epoch_time_attr :date_time, range_key: true + // string_attr :product_title + // string_attr :marketplace + // string_attr :product_category + // date_attr :review_date + // integer_attr :star_rating + // float_attr :postive + // float_attr :mixed + // float_attr :neutral + // float_attr :negative + + JsonValue output; + output.WithString("product", maps[0].find("product_title")->second.GetS()); + output.WithString("category", maps[0].find("product_category")->second.GetS()); + Aws::Utils::Array sentiments(maps.size()); + for (size_t i = 0; i < maps.size(); i++) { + JsonValue review; + auto&& m = maps[i]; + + auto it = m.find("review_date"); + if (it != m.end()) { + review.WithString("date", it->second.GetS()); + } + + it = m.find("positive"); + if (it != m.end()) { + review.WithString("positive", it->second.GetN()); + } + + it = m.find("negative"); + if (it != m.end()) { + review.WithString("negative", it->second.GetN()); + } + + it = m.find("mixed"); + if (it != m.end()) { + review.WithString("mixed", it->second.GetN()); + } + + it = m.find("neutral"); + if (it != m.end()) { + review.WithString("neutral", it->second.GetN()); + } + + sentiments[i] = std::move(review); + } + output.WithArray("sentiment", sentiments); + return output; + } + + AWS_LOGSTREAM_ERROR(TAG, "database query failed: " << outcome.GetError()); + return {}; +} + + +aws::lambda_runtime::invocation_response my_handler( + aws::lambda_runtime::invocation_request const& req, + Aws::DynamoDB::DynamoDBClient const& client) +{ + using namespace Aws::Utils::Json; + AWS_LOGSTREAM_DEBUG(TAG, "received payload: " << req.payload); + JsonValue eventJson(req.payload); + assert(eventJson.WasParseSuccessful()); + const criteria cr(eventJson); + if (cr.error_msg) { + JsonValue response; + response.WithString("body", cr.error_msg).WithInteger("statusCode", 400); + auto const apig_response = response.View().WriteCompact(); + AWS_LOGSTREAM_ERROR(TAG, "Validation failed. " << apig_response); + return aws::lambda_runtime::invocation_response::success(apig_response, "application/json"); + } + + auto result = query(cr, client); + auto const query_response = result.View().WriteCompact(); + AWS_LOGSTREAM_DEBUG(TAG, "query response: " << query_response); + + JsonValue response; + if (result.View().ValueExists("product")) { + response.WithString("body", query_response).WithInteger("statusCode", 200); + } + else { + response.WithString("body", "No data found for this product.").WithInteger("statusCode", 400); + } + + auto const apig_response = response.View().WriteCompact(); + AWS_LOGSTREAM_DEBUG(TAG, "api gateway response: " << apig_response); + + return aws::lambda_runtime::invocation_response::success(apig_response, "application/json"); +} + +std::function()> GetConsoleLoggerFactory() +{ + return [] { + return Aws::MakeShared( + "console_logger", Aws::Utils::Logging::LogLevel::Trace); + }; +} + +int main() +{ + using namespace Aws; + SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + options.loggingOptions.logger_create_fn = GetConsoleLoggerFactory(); + InitAPI(options); + { + Aws::Client::ClientConfiguration config; + config.region = Aws::Environment::GetEnv("AWS_REGION"); + config.caFile = "/etc/pki/tls/certs/ca-bundle.crt"; + config.disableExpectHeader = true; + + auto credentialsProvider = Aws::MakeShared(TAG); + Aws::DynamoDB::DynamoDBClient client(credentialsProvider, config); + auto handler_fn = [&client](aws::lambda_runtime::invocation_request const& req) { + return my_handler(req, client); + }; + aws::lambda_runtime::run_handler(handler_fn); + } + ShutdownAPI(options); + return 0; +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt new file mode 100644 index 00000000..b398a4e2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.5) +set(CMAKE_CXX_STANDARD 11) +project(encoder LANGUAGES CXX) + +find_package(aws-lambda-runtime) +find_package(AWSSDK COMPONENTS s3) + +add_executable(${PROJECT_NAME} "main.cpp") + +target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime ${AWSSDK_LINK_LIBRARIES}) + +target_compile_options(${PROJECT_NAME} PRIVATE + "-Wall" + "-Wextra" + "-Wconversion" + "-Wshadow" + "-Wno-sign-conversion") + +target_compile_features(${PROJECT_NAME} PRIVATE "cxx_std_11") + +aws_lambda_package_target(${PROJECT_NAME}) + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md new file mode 100644 index 00000000..8bc3255a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/README.md @@ -0,0 +1,51 @@ +# Example using the AWS C++ SDK with Lambda + +We'll build a lambda that downloads an image file from S3 and sends it back in the response as Base64 encoded that can be displayed in a web page for example. +To also show case how this can be done on a Linux distro other than Amazon Linux, you can use the Dockerfile in this directory to create an Alpine Linux environment in which you can run the following instructions. + +That being said, the instructions below should work on any Linux distribution. + +## Build the AWS C++ SDK +Start by building the SDK from source. +```bash +$ mkdir ~/install +$ git clone https://github.com/aws/aws-sdk-cpp.git +$ cd aws-sdk-cpp +$ mkdir build +$ cd build +$ cmake .. -DBUILD_ONLY="s3" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DCUSTOM_MEMORY_MANAGEMENT=OFF \ + -DCMAKE_INSTALL_PREFIX=~/install \ + -DENABLE_UNITY_BUILD=ON + +$ make +$ make install +``` + +## Build the Runtime +Now let's build the C++ Lambda runtime, so in a separate directory clone this repository and follow these steps: + +```bash +$ git clone https://github.com/awslabs/aws-lambda-cpp-runtime.git +$ cd aws-lambda-cpp-runtime +$ mkdir build +$ cd build +$ cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_PREFIX=~/install \ +$ make +$ make install +``` + +## Build the application +The last step is to build the Lambda function in `main.cpp` and run the packaging command as follows: + +```bash +$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/install +$ make +$ make aws-lambda-package-encoder +``` + +You should now have a zip file called `encoder.zip`. Follow the instructions in the main README to upload it and invoke the lambda. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp new file mode 100644 index 00000000..45b935bf --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/examples/s3/main.cpp @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace aws::lambda_runtime; + +std::string download_and_encode_file( + Aws::S3::S3Client const& client, + Aws::String const& bucket, + Aws::String const& key, + Aws::String& encoded_output); + +std::string encode(Aws::String const& filename, Aws::String& output); +char const TAG[] = "LAMBDA_ALLOC"; + +static invocation_response my_handler(invocation_request const& req, Aws::S3::S3Client const& client) +{ + using namespace Aws::Utils::Json; + JsonValue json(req.payload); + if (!json.WasParseSuccessful()) { + return invocation_response::failure("Failed to parse input JSON", "InvalidJSON"); + } + + auto v = json.View(); + + if (!v.ValueExists("s3bucket") || !v.ValueExists("s3key") || !v.GetObject("s3bucket").IsString() || + !v.GetObject("s3key").IsString()) { + return invocation_response::failure("Missing input value s3bucket or s3key", "InvalidJSON"); + } + + auto bucket = v.GetString("s3bucket"); + auto key = v.GetString("s3key"); + + AWS_LOGSTREAM_INFO(TAG, "Attempting to download file from s3://" << bucket << "/" << key); + + Aws::String base64_encoded_file; + auto err = download_and_encode_file(client, bucket, key, base64_encoded_file); + if (!err.empty()) { + return invocation_response::failure(err, "DownloadFailure"); + } + + return invocation_response::success(base64_encoded_file, "application/base64"); +} + +std::function()> GetConsoleLoggerFactory() +{ + return [] { + return Aws::MakeShared( + "console_logger", Aws::Utils::Logging::LogLevel::Trace); + }; +} + +int main() +{ + using namespace Aws; + SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + options.loggingOptions.logger_create_fn = GetConsoleLoggerFactory(); + InitAPI(options); + { + Client::ClientConfiguration config; + config.region = Aws::Environment::GetEnv("AWS_REGION"); + config.caFile = "/etc/pki/tls/certs/ca-bundle.crt"; + + auto credentialsProvider = Aws::MakeShared(TAG); + S3::S3Client client(credentialsProvider, config); + auto handler_fn = [&client](aws::lambda_runtime::invocation_request const& req) { + return my_handler(req, client); + }; + run_handler(handler_fn); + } + ShutdownAPI(options); + return 0; +} + +std::string encode(Aws::IOStream& stream, Aws::String& output) +{ + Aws::Vector bits; + bits.reserve(stream.tellp()); + stream.seekg(0, stream.beg); + + char streamBuffer[1024 * 4]; + while (stream.good()) { + stream.read(streamBuffer, sizeof(streamBuffer)); + auto bytesRead = stream.gcount(); + + if (bytesRead > 0) { + bits.insert(bits.end(), (unsigned char*)streamBuffer, (unsigned char*)streamBuffer + bytesRead); + } + } + Aws::Utils::ByteBuffer bb(bits.data(), bits.size()); + output = Aws::Utils::HashingUtils::Base64Encode(bb); + return {}; +} + +std::string download_and_encode_file( + Aws::S3::S3Client const& client, + Aws::String const& bucket, + Aws::String const& key, + Aws::String& encoded_output) +{ + using namespace Aws; + + S3::Model::GetObjectRequest request; + request.WithBucket(bucket).WithKey(key); + + auto outcome = client.GetObject(request); + if (outcome.IsSuccess()) { + AWS_LOGSTREAM_INFO(TAG, "Download completed!"); + auto& s = outcome.GetResult().GetBody(); + return encode(s, encoded_output); + } + else { + AWS_LOGSTREAM_ERROR(TAG, "Failed with error: " << outcome.GetError()); + return outcome.GetError().GetMessage(); + } +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h new file mode 100644 index 00000000..9b8cbda1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/http/response.h @@ -0,0 +1,174 @@ +#pragma once +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include +#include +#include +#include // tolower +#include + +namespace aws { +namespace http { +enum class response_code; +class response { +public: + /** + * lower-case the name but store the value as is + */ + inline void add_header(std::string name, std::string const& value); + inline void append_body(const char* p, size_t sz); + inline bool has_header(char const* header) const; + inline std::string const& get_header(char const* header) const; + inline response_code get_response_code() const { return m_response_code; } + inline void set_response_code(aws::http::response_code c); + inline void set_content_type(char const* ct); + inline std::string const& get_body() const; + +private: + response_code m_response_code; + using key_value_collection = std::vector>; + key_value_collection m_headers; + std::string m_body; + std::string m_content_type; +}; + +enum class response_code { + REQUEST_NOT_MADE = -1, + CONTINUE = 100, + SWITCHING_PROTOCOLS = 101, + PROCESSING = 102, + OK = 200, + CREATED = 201, + ACCEPTED = 202, + NON_AUTHORITATIVE_INFORMATION = 203, + NO_CONTENT = 204, + RESET_CONTENT = 205, + PARTIAL_CONTENT = 206, + MULTI_STATUS = 207, + ALREADY_REPORTED = 208, + IM_USED = 226, + MULTIPLE_CHOICES = 300, + MOVED_PERMANENTLY = 301, + FOUND = 302, + SEE_OTHER = 303, + NOT_MODIFIED = 304, + USE_PROXY = 305, + SWITCH_PROXY = 306, + TEMPORARY_REDIRECT = 307, + PERMANENT_REDIRECT = 308, + BAD_REQUEST = 400, + UNAUTHORIZED = 401, + PAYMENT_REQUIRED = 402, + FORBIDDEN = 403, + NOT_FOUND = 404, + METHOD_NOT_ALLOWED = 405, + NOT_ACCEPTABLE = 406, + PROXY_AUTHENTICATION_REQUIRED = 407, + REQUEST_TIMEOUT = 408, + CONFLICT = 409, + GONE = 410, + LENGTH_REQUIRED = 411, + PRECONDITION_FAILED = 412, + REQUEST_ENTITY_TOO_LARGE = 413, + REQUEST_URI_TOO_LONG = 414, + UNSUPPORTED_MEDIA_TYPE = 415, + REQUESTED_RANGE_NOT_SATISFIABLE = 416, + EXPECTATION_FAILED = 417, + IM_A_TEAPOT = 418, + AUTHENTICATION_TIMEOUT = 419, + METHOD_FAILURE = 420, + UNPROC_ENTITY = 422, + LOCKED = 423, + FAILED_DEPENDENCY = 424, + UPGRADE_REQUIRED = 426, + PRECONDITION_REQUIRED = 427, + TOO_MANY_REQUESTS = 429, + REQUEST_HEADER_FIELDS_TOO_LARGE = 431, + LOGIN_TIMEOUT = 440, + NO_RESPONSE = 444, + RETRY_WITH = 449, + BLOCKED = 450, + REDIRECT = 451, + REQUEST_HEADER_TOO_LARGE = 494, + CERT_ERROR = 495, + NO_CERT = 496, + HTTP_TO_HTTPS = 497, + CLIENT_CLOSED_TO_REQUEST = 499, + INTERNAL_SERVER_ERROR = 500, + NOT_IMPLEMENTED = 501, + BAD_GATEWAY = 502, + SERVICE_UNAVAILABLE = 503, + GATEWAY_TIMEOUT = 504, + HTTP_VERSION_NOT_SUPPORTED = 505, + VARIANT_ALSO_NEGOTIATES = 506, + INSUFFICIENT_STORAGE = 506, + LOOP_DETECTED = 508, + BANDWIDTH_LIMIT_EXCEEDED = 509, + NOT_EXTENDED = 510, + NETWORK_AUTHENTICATION_REQUIRED = 511, + NETWORK_READ_TIMEOUT = 598, + NETWORK_CONNECT_TIMEOUT = 599 +}; + +inline void response::set_response_code(http::response_code c) +{ + m_response_code = c; +} + +inline void response::set_content_type(char const* ct) +{ + m_content_type = ct; +} + +inline std::string const& response::get_body() const +{ + return m_body; +} +inline void response::add_header(std::string name, std::string const& value) +{ + std::transform(name.begin(), name.end(), name.begin(), ::tolower); + m_headers.emplace_back(name, value); +} + +inline void response::append_body(const char* p, size_t sz) +{ + // simple and generates significantly less code than std::stringstream + constexpr size_t min_capacity = 512; + if (m_body.capacity() < min_capacity) { + m_body.reserve(min_capacity); + } + + m_body.append(p, sz); +} + +inline bool response::has_header(char const* header) const +{ + return std::any_of(m_headers.begin(), m_headers.end(), [header](std::pair const& p) { + return p.first == header; + }); +} + +inline std::string const& response::get_header(char const* header) const +{ + auto it = std::find_if(m_headers.begin(), m_headers.end(), [header](std::pair const& p) { + return p.first == header; + }); + assert(it != m_headers.end()); + return it->second; +} + +} // namespace http +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h new file mode 100644 index 00000000..b5d0b8b0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/outcome.h @@ -0,0 +1,96 @@ +#pragma once +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include +#include + +namespace aws { +namespace lambda_runtime { + +template +class outcome { +public: + outcome(TResult const& s) : m_s(s), m_success(true) {} + outcome(TResult&& s) : m_s(std::move(s)), m_success(true) {} + + outcome(TFailure const& f) : m_f(f), m_success(false) {} + outcome(TFailure&& f) : m_f(std::move(f)), m_success(false) {} + + outcome(outcome const& other) : m_success(other.m_success) + { + if (m_success) { + new (&m_s) TResult(other.m_s); + } + else { + new (&m_f) TFailure(other.m_f); + } + } + + outcome(outcome&& other) noexcept : m_success(other.m_success) + { + if (m_success) { + new (&m_s) TResult(std::move(other.m_s)); + } + else { + new (&m_f) TFailure(std::move(other.m_f)); + } + } + + ~outcome() + { + if (m_success) { + m_s.~TResult(); + } + else { + m_f.~TFailure(); + } + } + + TResult const& get_result() const& + { + assert(m_success); + return m_s; + } + + TResult&& get_result() && + { + assert(m_success); + return std::move(m_s); + } + + TFailure const& get_failure() const& + { + assert(!m_success); + return m_f; + } + + TFailure&& get_failure() && + { + assert(!m_success); + return std::move(m_f); + } + + bool is_success() const { return m_success; } + +private: + union { + TResult m_s; + TFailure m_f; + }; + bool m_success; +}; +} // namespace lambda_runtime +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h new file mode 100644 index 00000000..94e1e22c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/runtime.h @@ -0,0 +1,183 @@ +#pragma once +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include +#include +#include +#include +#include +#include "aws/lambda-runtime/outcome.h" +#include "aws/http/response.h" + +namespace aws { +namespace lambda_runtime { + +struct invocation_request { + /** + * The user's payload represented as a UTF-8 string. + */ + std::string payload; + + /** + * An identifier unique to the current invocation. + */ + std::string request_id; + + /** + * X-Ray tracing ID of the current invocation. + */ + std::string xray_trace_id; + + /** + * Information about the client application and device when invoked through the AWS Mobile SDK. + */ + std::string client_context; + + /** + * Information about the Amazon Cognito identity provider when invoked through the AWS Mobile SDK. + */ + std::string cognito_identity; + + /** + * The ARN requested. This can be different in each invoke that executes the same version. + */ + std::string function_arn; + + /** + * Function execution deadline counted in milliseconds since the Unix epoch. + */ + std::chrono::time_point deadline; + + /** + * The number of milliseconds left before lambda terminates the current execution. + */ + inline std::chrono::milliseconds get_time_remaining() const; +}; + +class invocation_response { +private: + /** + * The output of the function which is sent to the lambda caller. + */ + std::string m_payload; + + /** + * The MIME type of the payload. + * This is always set to 'application/json' in unsuccessful invocations. + */ + std::string m_content_type; + + /** + * Flag to distinguish if the contents are for successful or unsuccessful invocations. + */ + bool m_success; + + /** + * Instantiate an empty response. Used by the static functions 'success' and 'failure' to create a populated + * invocation_response + */ + invocation_response() = default; + +public: + // Create a success or failure response. Typically, you should use the static functions invocation_response::success + // and invocation_response::failure, however, invocation_response::failure doesn't allow for arbitrary payloads. + // To support clients that need to control the entire error response body (e.g. adding a stack trace), this + // constructor should be used instead. + // Note: adding an overload to invocation_response::failure is not feasible since the parameter types are the same. + invocation_response(std::string const& payload, std::string const& content_type, bool success) + : m_payload(payload), m_content_type(content_type), m_success(success) + { + } + + /** + * Create a successful invocation response with the given payload and content-type. + */ + static invocation_response success(std::string const& payload, std::string const& content_type); + + /** + * Create a failure response with the given error message and error type. + * The content-type is always set to application/json in this case. + */ + static invocation_response failure(std::string const& error_message, std::string const& error_type); + + /** + * Get the MIME type of the payload. + */ + std::string const& get_content_type() const { return m_content_type; } + + /** + * Get the payload string. The string is assumed to be UTF-8 encoded. + */ + std::string const& get_payload() const { return m_payload; } + + /** + * Returns true if the payload and content-type are set. Returns false if the error message and error types are set. + */ + bool is_success() const { return m_success; } +}; + +struct no_result { +}; + +class runtime { +public: + using next_outcome = aws::lambda_runtime::outcome; + using post_outcome = aws::lambda_runtime::outcome; + + runtime(std::string const& endpoint, std::string const& user_agent); + runtime(std::string const& endpoint); + ~runtime(); + + /** + * Ask lambda for an invocation. + */ + next_outcome get_next(); + + /** + * Tells lambda that the function has succeeded. + */ + post_outcome post_success(std::string const& request_id, invocation_response const& handler_response); + + /** + * Tells lambda that the function has failed. + */ + post_outcome post_failure(std::string const& request_id, invocation_response const& handler_response); + +private: + void set_curl_next_options(); + void set_curl_post_result_options(); + post_outcome do_post( + std::string const& url, + std::string const& request_id, + invocation_response const& handler_response); + +private: + std::string const m_user_agent_header; + std::array const m_endpoints; + CURL* const m_curl_handle; +}; + +inline std::chrono::milliseconds invocation_request::get_time_remaining() const +{ + using namespace std::chrono; + return duration_cast(deadline - system_clock::now()); +} + +// Entry method +void run_handler(std::function const& handler); + +} // namespace lambda_runtime +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h new file mode 100644 index 00000000..eafcbde7 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/lambda-runtime/version.h @@ -0,0 +1,41 @@ +#pragma once +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +namespace aws { +namespace lambda_runtime { + +/** + * Returns the major component of the library version. + */ +unsigned get_version_major(); + +/** + * Returns the minor component of the library version. + */ +unsigned get_version_minor(); + +/** + * Returns the patch component of the library version. + */ +unsigned get_version_patch(); + +/** + * Returns the semantic version of the library in the form Major.Minor.Patch + */ +char const* get_version(); + +} // namespace lambda_runtime +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h new file mode 100644 index 00000000..0b5d0ef9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/include/aws/logging/logging.h @@ -0,0 +1,67 @@ +#pragma once +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include + +namespace aws { +namespace logging { + +enum class verbosity { + error, + info, + debug, +}; + +void log(verbosity v, char const* tag, char const* msg, va_list args); + +[[gnu::format(printf, 2, 3)]] inline void log_error(char const* tag, char const* msg, ...) +{ + va_list args; + va_start(args, msg); + log(verbosity::error, tag, msg, args); + va_end(args); + (void)tag; + (void)msg; +} + +[[gnu::format(printf, 2, 3)]] inline void log_info(char const* tag, char const* msg, ...) +{ +#if AWS_LAMBDA_LOG >= 1 + va_list args; + va_start(args, msg); + log(verbosity::info, tag, msg, args); + va_end(args); +#else + (void)tag; + (void)msg; +#endif +} + +[[gnu::format(printf, 2, 3)]] inline void log_debug(char const* tag, char const* msg, ...) +{ +#if AWS_LAMBDA_LOG >= 2 + va_list args; + va_start(args, msg); + log(verbosity::debug, tag, msg, args); + va_end(args); +#else + (void)tag; + (void)msg; +#endif +} + +} // namespace logging +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager new file mode 100755 index 00000000..d3338916 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/packaging/packager @@ -0,0 +1,180 @@ +#!/bin/bash +# Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). +# You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://aws.amazon.com/apache2.0 +# +# or in the "license" file accompanying this file. This file is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. See the License for the specific language governing +# permissions and limitations under the License. + +set -euo pipefail + +print_help() { + echo -e "Usage: packager [OPTIONS] \n" + echo -e "OPTIONS\n" + echo -e "\t-d,--default-libc\t Use the target host libc libraries. This will not package the C library files.\n" +} + +if [ $# -lt 1 ]; then + echo -e "Error: missing arguments\n" + print_help + exit 1 +fi + +POSITIONAL=() +INCLUDE_LIBC=true +while [[ $# -gt 0 ]] +do + key="$1" + case $key in + -d|--default-libc) + INCLUDE_LIBC=false + shift # past argument + ;; + *) # unknown option + POSITIONAL+=("$1") # save it in an array for later + shift # past argument + ;; + esac +done +set -- "${POSITIONAL[@]}" # restore positional parameters + +PKG_BIN_PATH=$1 + +if [ ! -f "$PKG_BIN_PATH" ]; then + echo "$PKG_BIN_PATH" - No such file.; + exit 1; +fi + +if ! type zip > /dev/null 2>&1; then + echo "zip utility is not found. Please install it and re-run this script" + exit 1 +fi +function package_libc_via_pacman { + if grep --extended-regexp "Arch Linux|Manjaro Linux" < /etc/os-release > /dev/null 2>&1; then + if type pacman > /dev/null 2>&1; then + pacman --query --list --quiet glibc | sed -E '/\.so$|\.so\.[0-9]+$/!d' + fi + fi +} + +function package_libc_via_dpkg() { + if type dpkg-query > /dev/null 2>&1; then + if [[ $(dpkg-query --listfiles libc6 | wc -l) -gt 0 ]]; then + dpkg-query --listfiles libc6 | sed -E '/\.so$|\.so\.[0-9]+$/!d' + fi + fi +} + +function package_libc_via_rpm() { + if type rpm > /dev/null 2>&1; then + if [[ $(rpm --query --list glibc.x86_64 | wc -l) -gt 1 ]]; then + rpm --query --list glibc.x86_64 | sed -E '/\.so$|\.so\.[0-9]+$/!d' + fi + fi +} + +# hasElement expects an element and an array parameter +# it's equivalent to array.contains(element) +# e.g. hasElement "needle" ${haystack[@]} +function hasElement() { + local el key=$1 + shift + for el in "$@" + do + [[ "$el" == "$key" ]] && return 0 + done + return 1 +} + +PKG_BIN_FILENAME=$(basename "$PKG_BIN_PATH") +PKG_DIR=tmp +PKG_LD="" + +list=$(ldd "$PKG_BIN_PATH" | awk '{print $(NF-1)}') +libc_libs=() +libc_libs+=($(package_libc_via_dpkg)) +libc_libs+=($(package_libc_via_rpm)) +libc_libs+=($(package_libc_via_pacman)) + +mkdir -p "$PKG_DIR/bin" "$PKG_DIR/lib" + +for i in $list +do + if [[ ! -f $i ]]; then # ignore linux-vdso.so.1 + continue + fi + + # Do not copy libc files which are directly linked unless it's the dynamic loader + if hasElement "$i" "${libc_libs[@]}"; then + filename=$(basename "$i") + if [[ -z "${filename##ld-*}" ]]; then + PKG_LD=$filename # Use this file as the loader + cp "$i" "$PKG_DIR/lib" + fi + continue + fi + + cp "$i" $PKG_DIR/lib +done + +if [[ $INCLUDE_LIBC == true ]]; then + for i in "${libc_libs[@]}" + do + filename=$(basename "$i") + if [[ -z "${filename##ld-*}" ]]; then + # if the loader is empty, then the binary is probably linked to a symlink of the loader. The symlink will + # not show up when quering the package manager for libc files. So, in this case, we want to copy the loader + if [[ -z "$PKG_LD" ]]; then + PKG_LD=$filename + cp "$i" "$PKG_DIR/lib" # we want to follow the symlink (default behavior) + fi + continue # We don't want the dynamic loader's symlink because its target is an absolute path (/lib/ld-*). + fi + cp --no-dereference "$i" "$PKG_DIR/lib" + done +fi + +if [[ -z "$PKG_LD" ]]; then + echo "Failed to identify, locate or package the loader. Please file an issue on Github!" 1>&2 + exit 1 +fi + +bootstrap_script=$(cat < "$PKG_DIR/bootstrap" +else + echo -e "$bootstrap_script_no_libc" > "$PKG_DIR/bootstrap" +fi +chmod +x "$PKG_DIR/bootstrap" +# some shenanigans to create the right layout in the zip file without extraneous directories +pushd "$PKG_DIR" > /dev/null +zip --symlinks --recurse-paths "$PKG_BIN_FILENAME".zip -- * +ORIGIN_DIR=$(dirs -l +1) +mv "$PKG_BIN_FILENAME".zip "$ORIGIN_DIR" +popd > /dev/null +rm -r "$PKG_DIR" +echo Created "$ORIGIN_DIR/$PKG_BIN_FILENAME".zip + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp new file mode 100644 index 00000000..cc64abdb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.cpp @@ -0,0 +1,32 @@ +// Pick your poison. +// +// On GNU/Linux, you have few choices to get the most out of your stack trace. +// +// By default you get: +// - object filename +// - function name +// +// In order to add: +// - source filename +// - line and column numbers +// - source code snippet (assuming the file is accessible) + +// Install one of the following library then uncomment one of the macro (or +// better, add the detection of the lib and the macro definition in your build +// system) + +// - apt-get install libdw-dev ... +// - g++/clang++ -ldw ... +// #define BACKWARD_HAS_DW 1 + +// - apt-get install binutils-dev ... +// - g++/clang++ -lbfd ... +// #define BACKWARD_HAS_BFD 1 + +#include "backward.h" + +namespace backward { + +backward::SignalHandling sh; + +} // namespace backward diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h new file mode 100644 index 00000000..e9e56c79 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/backward.h @@ -0,0 +1,4291 @@ +// clang-format off +/* + * backward.hpp + * Copyright 2013 Google Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef H_6B9572DA_A64B_49E6_B234_051480991C89 +#define H_6B9572DA_A64B_49E6_B234_051480991C89 + +#ifndef __cplusplus +# error "It's not going to compile without a C++ compiler..." +#endif + +#if defined(BACKWARD_CXX11) +#elif defined(BACKWARD_CXX98) +#else +# if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800) +# define BACKWARD_CXX11 +# define BACKWARD_ATLEAST_CXX11 +# define BACKWARD_ATLEAST_CXX98 +# else +# define BACKWARD_CXX98 +# define BACKWARD_ATLEAST_CXX98 +# endif +#endif + +// You can define one of the following (or leave it to the auto-detection): +// +// #define BACKWARD_SYSTEM_LINUX +// - specialization for linux +// +// #define BACKWARD_SYSTEM_DARWIN +// - specialization for Mac OS X 10.5 and later. +// +// #define BACKWARD_SYSTEM_UNKNOWN +// - placebo implementation, does nothing. +// +#if defined(BACKWARD_SYSTEM_LINUX) +#elif defined(BACKWARD_SYSTEM_DARWIN) +#elif defined(BACKWARD_SYSTEM_UNKNOWN) +#elif defined(BACKWARD_SYSTEM_WINDOWS) +#else +# if defined(__linux) || defined(__linux__) +# define BACKWARD_SYSTEM_LINUX +# elif defined(__APPLE__) +# define BACKWARD_SYSTEM_DARWIN +# elif defined(_WIN32) +# define BACKWARD_SYSTEM_WINDOWS +# else +# define BACKWARD_SYSTEM_UNKNOWN +# endif +#endif + +#define NOINLINE __attribute__((noinline)) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(BACKWARD_SYSTEM_LINUX) + +// On linux, backtrace can back-trace or "walk" the stack using the following +// libraries: +// +// #define BACKWARD_HAS_UNWIND 1 +// - unwind comes from libgcc, but I saw an equivalent inside clang itself. +// - with unwind, the stacktrace is as accurate as it can possibly be, since +// this is used by the C++ runtine in gcc/clang for stack unwinding on +// exception. +// - normally libgcc is already linked to your program by default. +// +// #define BACKWARD_HAS_BACKTRACE == 1 +// - backtrace seems to be a little bit more portable than libunwind, but on +// linux, it uses unwind anyway, but abstract away a tiny information that is +// sadly really important in order to get perfectly accurate stack traces. +// - backtrace is part of the (e)glib library. +// +// The default is: +// #define BACKWARD_HAS_UNWIND == 1 +// +// Note that only one of the define should be set to 1 at a time. +// +# if BACKWARD_HAS_UNWIND == 1 +# elif BACKWARD_HAS_BACKTRACE == 1 +# else +# undef BACKWARD_HAS_UNWIND +# define BACKWARD_HAS_UNWIND 1 +# undef BACKWARD_HAS_BACKTRACE +# define BACKWARD_HAS_BACKTRACE 0 +# endif + +// On linux, backward can extract detailed information about a stack trace +// using one of the following libraries: +// +// #define BACKWARD_HAS_DW 1 +// - libdw gives you the most juicy details out of your stack traces: +// - object filename +// - function name +// - source filename +// - line and column numbers +// - source code snippet (assuming the file is accessible) +// - variables name and values (if not optimized out) +// - You need to link with the lib "dw": +// - apt-get install libdw-dev +// - g++/clang++ -ldw ... +// +// #define BACKWARD_HAS_BFD 1 +// - With libbfd, you get a fair amount of details: +// - object filename +// - function name +// - source filename +// - line numbers +// - source code snippet (assuming the file is accessible) +// - You need to link with the lib "bfd": +// - apt-get install binutils-dev +// - g++/clang++ -lbfd ... +// +// #define BACKWARD_HAS_DWARF 1 +// - libdwarf gives you the most juicy details out of your stack traces: +// - object filename +// - function name +// - source filename +// - line and column numbers +// - source code snippet (assuming the file is accessible) +// - variables name and values (if not optimized out) +// - You need to link with the lib "dwarf": +// - apt-get install libdwarf-dev +// - g++/clang++ -ldwarf ... +// +// #define BACKWARD_HAS_BACKTRACE_SYMBOL 1 +// - backtrace provides minimal details for a stack trace: +// - object filename +// - function name +// - backtrace is part of the (e)glib library. +// +// The default is: +// #define BACKWARD_HAS_BACKTRACE_SYMBOL == 1 +// +// Note that only one of the define should be set to 1 at a time. +// +# if BACKWARD_HAS_DW == 1 +# elif BACKWARD_HAS_BFD == 1 +# elif BACKWARD_HAS_DWARF == 1 +# elif BACKWARD_HAS_BACKTRACE_SYMBOL == 1 +# else +# undef BACKWARD_HAS_DW +# define BACKWARD_HAS_DW 0 +# undef BACKWARD_HAS_BFD +# define BACKWARD_HAS_BFD 0 +# undef BACKWARD_HAS_DWARF +# define BACKWARD_HAS_DWARF 0 +# undef BACKWARD_HAS_BACKTRACE_SYMBOL +# define BACKWARD_HAS_BACKTRACE_SYMBOL 1 +# endif + +# include +# include +# ifdef __ANDROID__ +// Old Android API levels define _Unwind_Ptr in both link.h and +// unwind.h Rename the one in link.h as we are not going to be using +// it +# define _Unwind_Ptr _Unwind_Ptr_Custom +# include +# undef _Unwind_Ptr +# else +# include +# endif +# include +# include +# include +# include + +# if BACKWARD_HAS_BFD == 1 +// NOTE: defining PACKAGE{,_VERSION} is required before including +// bfd.h on some platforms, see also: +// https://sourceware.org/bugzilla/show_bug.cgi?id=14243 +# ifndef PACKAGE +# define PACKAGE +# endif +# ifndef PACKAGE_VERSION +# define PACKAGE_VERSION +# endif +# include +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# include +# undef _GNU_SOURCE +# else +# include +# endif +# endif + +# if BACKWARD_HAS_DW == 1 +# include +# include +# include +# endif + +# if BACKWARD_HAS_DWARF == 1 +# include +# include +# include +# include +# include +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# include +# undef _GNU_SOURCE +# else +# include +# endif +# endif + +# if (BACKWARD_HAS_BACKTRACE == 1) || (BACKWARD_HAS_BACKTRACE_SYMBOL == 1) +// then we shall rely on backtrace +# include +# endif + +#endif // defined(BACKWARD_SYSTEM_LINUX) + +#if defined(BACKWARD_SYSTEM_DARWIN) +// On Darwin, backtrace can back-trace or "walk" the stack using the following +// libraries: +// +// #define BACKWARD_HAS_UNWIND 1 +// - unwind comes from libgcc, but I saw an equivalent inside clang itself. +// - with unwind, the stacktrace is as accurate as it can possibly be, since +// this is used by the C++ runtine in gcc/clang for stack unwinding on +// exception. +// - normally libgcc is already linked to your program by default. +// +// #define BACKWARD_HAS_BACKTRACE == 1 +// - backtrace is available by default, though it does not produce as much +// information as another library might. +// +// The default is: +// #define BACKWARD_HAS_UNWIND == 1 +// +// Note that only one of the define should be set to 1 at a time. +// +# if BACKWARD_HAS_UNWIND == 1 +# elif BACKWARD_HAS_BACKTRACE == 1 +# else +# undef BACKWARD_HAS_UNWIND +# define BACKWARD_HAS_UNWIND 1 +# undef BACKWARD_HAS_BACKTRACE +# define BACKWARD_HAS_BACKTRACE 0 +# endif + +// On Darwin, backward can extract detailed information about a stack trace +// using one of the following libraries: +// +// #define BACKWARD_HAS_BACKTRACE_SYMBOL 1 +// - backtrace provides minimal details for a stack trace: +// - object filename +// - function name +// +// The default is: +// #define BACKWARD_HAS_BACKTRACE_SYMBOL == 1 +// +# if BACKWARD_HAS_BACKTRACE_SYMBOL == 1 +# else +# undef BACKWARD_HAS_BACKTRACE_SYMBOL +# define BACKWARD_HAS_BACKTRACE_SYMBOL 1 +# endif + +# include +# include +# include +# include +# include +# include + +# if (BACKWARD_HAS_BACKTRACE == 1) || (BACKWARD_HAS_BACKTRACE_SYMBOL == 1) +# include +# endif +#endif // defined(BACKWARD_SYSTEM_DARWIN) + +#if defined(BACKWARD_SYSTEM_WINDOWS) + +# include +# include +# include + +# include +typedef SSIZE_T ssize_t; + +# define NOMINMAX +# include +# include + +# include +# include + +# ifndef __clang__ +# undef NOINLINE +# define NOINLINE __declspec(noinline) +# endif + +# pragma comment(lib, "psapi.lib") +# pragma comment(lib, "dbghelp.lib") + +// Comment / packing is from stackoverflow: +// https://stackoverflow.com/questions/6205981/windows-c-stack-trace-from-a-running-app/28276227#28276227 +// Some versions of imagehlp.dll lack the proper packing directives themselves +// so we need to do it. +# pragma pack(push, before_imagehlp, 8) +# include +# pragma pack(pop, before_imagehlp) + +// TODO maybe these should be undefined somewhere else? +# undef BACKWARD_HAS_UNWIND +# undef BACKWARD_HAS_BACKTRACE +# if BACKWARD_HAS_PDB_SYMBOL == 1 +# else +# undef BACKWARD_HAS_PDB_SYMBOL +# define BACKWARD_HAS_PDB_SYMBOL 1 +# endif + +#endif + +#if BACKWARD_HAS_UNWIND == 1 + +# include +// while gcc's unwind.h defines something like that: +// extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); +// extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); +// +// clang's unwind.h defines something like this: +// uintptr_t _Unwind_GetIP(struct _Unwind_Context* __context); +// +// Even if the _Unwind_GetIPInfo can be linked to, it is not declared, worse we +// cannot just redeclare it because clang's unwind.h doesn't define _Unwind_Ptr +// anyway. +// +// Luckily we can play on the fact that the guard macros have a different name: +# ifdef __CLANG_UNWIND_H +// In fact, this function still comes from libgcc (on my different linux boxes, +// clang links against libgcc). +# include +extern "C" uintptr_t _Unwind_GetIPInfo(_Unwind_Context*, int*); +# endif + +#endif // BACKWARD_HAS_UNWIND == 1 + +#ifdef BACKWARD_ATLEAST_CXX11 +# include +# include // for std::swap +namespace backward { +namespace details { +template +struct hashtable { + typedef std::unordered_map type; +}; +using std::move; +} // namespace details +} // namespace backward +#else // NOT BACKWARD_ATLEAST_CXX11 +# define nullptr NULL +# define override +# include +namespace backward { +namespace details { +template +struct hashtable { + typedef std::map type; +}; +template +const T& move(const T& v) +{ + return v; +} +template +T& move(T& v) +{ + return v; +} +} // namespace details +} // namespace backward +#endif // BACKWARD_ATLEAST_CXX11 + +namespace backward { +namespace details { +#if defined(BACKWARD_SYSTEM_WINDOWS) +const char kBackwardPathDelimiter[] = ";"; +#else +const char kBackwardPathDelimiter[] = ":"; +#endif +} // namespace details +} // namespace backward + +namespace backward { + +namespace system_tag { +struct linux_tag; // seems that I cannot call that "linux" because the name +// is already defined... so I am adding _tag everywhere. +struct darwin_tag; +struct windows_tag; +struct unknown_tag; + +#if defined(BACKWARD_SYSTEM_LINUX) +typedef linux_tag current_tag; +#elif defined(BACKWARD_SYSTEM_DARWIN) +typedef darwin_tag current_tag; +#elif defined(BACKWARD_SYSTEM_WINDOWS) +typedef windows_tag current_tag; +#elif defined(BACKWARD_SYSTEM_UNKNOWN) +typedef unknown_tag current_tag; +#else +# error "May I please get my system defines?" +#endif +} // namespace system_tag + +namespace trace_resolver_tag { +#if defined(BACKWARD_SYSTEM_LINUX) +struct libdw; +struct libbfd; +struct libdwarf; +struct backtrace_symbol; + +# if BACKWARD_HAS_DW == 1 +typedef libdw current; +# elif BACKWARD_HAS_BFD == 1 +typedef libbfd current; +# elif BACKWARD_HAS_DWARF == 1 +typedef libdwarf current; +# elif BACKWARD_HAS_BACKTRACE_SYMBOL == 1 +typedef backtrace_symbol current; +# else +# error "You shall not pass, until you know what you want." +# endif +#elif defined(BACKWARD_SYSTEM_DARWIN) +struct backtrace_symbol; + +# if BACKWARD_HAS_BACKTRACE_SYMBOL == 1 +typedef backtrace_symbol current; +# else +# error "You shall not pass, until you know what you want." +# endif +#elif defined(BACKWARD_SYSTEM_WINDOWS) +struct pdb_symbol; +# if BACKWARD_HAS_PDB_SYMBOL == 1 +typedef pdb_symbol current; +# else +# error "You shall not pass, until you know what you want." +# endif +#endif +} // namespace trace_resolver_tag + +namespace details { + +template +struct rm_ptr { + typedef T type; +}; + +template +struct rm_ptr { + typedef T type; +}; + +template +struct rm_ptr { + typedef const T type; +}; + +template +struct deleter { + template + void operator()(U& ptr) const + { + (*F)(ptr); + } +}; + +template +struct default_delete { + void operator()(T& ptr) const { delete ptr; } +}; + +template > +class handle { + struct dummy; + T _val; + bool _empty; + +#ifdef BACKWARD_ATLEAST_CXX11 + handle(const handle&) = delete; + handle& operator=(const handle&) = delete; +#endif + +public: + ~handle() + { + if (!_empty) { + Deleter()(_val); + } + } + + explicit handle() : _val(), _empty(true) {} + explicit handle(T val) : _val(val), _empty(false) + { + if (!_val) + _empty = true; + } + +#ifdef BACKWARD_ATLEAST_CXX11 + handle(handle&& from) : _empty(true) { swap(from); } + handle& operator=(handle&& from) + { + swap(from); + return *this; + } +#else + explicit handle(const handle& from) : _empty(true) + { + // some sort of poor man's move semantic. + swap(const_cast(from)); + } + handle& operator=(const handle& from) + { + // some sort of poor man's move semantic. + swap(const_cast(from)); + return *this; + } +#endif + + void reset(T new_val) + { + handle tmp(new_val); + swap(tmp); + } + + void update(T new_val) + { + _val = new_val; + _empty = static_cast(new_val); + } + + operator const dummy*() const + { + if (_empty) { + return nullptr; + } + return reinterpret_cast(_val); + } + T get() { return _val; } + T release() + { + _empty = true; + return _val; + } + void swap(handle& b) + { + using std::swap; + swap(b._val, _val); // can throw, we are safe here. + swap(b._empty, _empty); // should not throw: if you cannot swap two + // bools without throwing... It's a lost cause anyway! + } + + T& operator->() { return _val; } + const T& operator->() const { return _val; } + + typedef typename rm_ptr::type& ref_t; + typedef const typename rm_ptr::type& const_ref_t; + ref_t operator*() { return *_val; } + const_ref_t operator*() const { return *_val; } + ref_t operator[](size_t idx) { return _val[idx]; } + + // Watch out, we've got a badass over here + T* operator&() + { + _empty = false; + return &_val; + } +}; + +// Default demangler implementation (do nothing). +template +struct demangler_impl { + static std::string demangle(const char* funcname) { return funcname; } +}; + +#if defined(BACKWARD_SYSTEM_LINUX) || defined(BACKWARD_SYSTEM_DARWIN) + +template <> +struct demangler_impl { + demangler_impl() : _demangle_buffer_length(0) {} + + std::string demangle(const char* funcname) + { + using namespace details; + char* result = abi::__cxa_demangle(funcname, _demangle_buffer.get(), &_demangle_buffer_length, nullptr); + if (result) { + _demangle_buffer.update(result); + return result; + } + return funcname; + } + +private: + details::handle _demangle_buffer; + size_t _demangle_buffer_length; +}; + +#endif // BACKWARD_SYSTEM_LINUX || BACKWARD_SYSTEM_DARWIN + +struct demangler : public demangler_impl { +}; + +// Split a string on the platform's PATH delimiter. Example: if delimiter +// is ":" then: +// "" --> [] +// ":" --> ["",""] +// "::" --> ["","",""] +// "/a/b/c" --> ["/a/b/c"] +// "/a/b/c:/d/e/f" --> ["/a/b/c","/d/e/f"] +// etc. +inline std::vector split_source_prefixes(const std::string& s) +{ + std::vector out; + size_t last = 0; + size_t next = 0; + size_t delimiter_size = sizeof(kBackwardPathDelimiter) - 1; + while ((next = s.find(kBackwardPathDelimiter, last)) != std::string::npos) { + out.push_back(s.substr(last, next - last)); + last = next + delimiter_size; + } + if (last <= s.length()) { + out.push_back(s.substr(last)); + } + return out; +} + +} // namespace details + +/*************** A TRACE ***************/ + +struct Trace { + void* addr; + size_t idx; + + Trace() : addr(nullptr), idx(0) {} + + explicit Trace(void* _addr, size_t _idx) : addr(_addr), idx(_idx) {} +}; + +struct ResolvedTrace : public Trace { + + struct SourceLoc { + std::string function; + std::string filename; + unsigned line; + unsigned col; + + SourceLoc() : line(0), col(0) {} + + bool operator==(const SourceLoc& b) const + { + return function == b.function && filename == b.filename && line == b.line && col == b.col; + } + + bool operator!=(const SourceLoc& b) const { return !(*this == b); } + }; + + // In which binary object this trace is located. + std::string object_filename; + + // The function in the object that contain the trace. This is not the same + // as source.function which can be an function inlined in object_function. + std::string object_function; + + // The source location of this trace. It is possible for filename to be + // empty and for line/col to be invalid (value 0) if this information + // couldn't be deduced, for example if there is no debug information in the + // binary object. + SourceLoc source; + + // An optionals list of "inliners". All the successive sources location + // from where the source location of the trace (the attribute right above) + // is inlined. It is especially useful when you compiled with optimization. + typedef std::vector source_locs_t; + source_locs_t inliners; + + ResolvedTrace() : Trace() {} + ResolvedTrace(const Trace& mini_trace) : Trace(mini_trace) {} +}; + +/*************** STACK TRACE ***************/ + +// default implemention. +template +class StackTraceImpl { +public: + size_t size() const { return 0; } + Trace operator[](size_t) const { return Trace(); } + size_t load_here(size_t = 0) { return 0; } + size_t load_from(void*, size_t = 0) { return 0; } + size_t thread_id() const { return 0; } + void skip_n_firsts(size_t) {} +}; + +class StackTraceImplBase { +public: + StackTraceImplBase() : _thread_id(0), _skip(0) {} + + size_t thread_id() const { return _thread_id; } + + void skip_n_firsts(size_t n) { _skip = n; } + +protected: + void load_thread_info() + { +#ifdef BACKWARD_SYSTEM_LINUX +# ifndef __ANDROID__ + _thread_id = static_cast(syscall(SYS_gettid)); +# else + _thread_id = static_cast(gettid()); +# endif + if (_thread_id == static_cast(getpid())) { + // If the thread is the main one, let's hide that. + // I like to keep little secret sometimes. + _thread_id = 0; + } +#elif defined(BACKWARD_SYSTEM_DARWIN) + _thread_id = reinterpret_cast(pthread_self()); + if (pthread_main_np() == 1) { + // If the thread is the main one, let's hide that. + _thread_id = 0; + } +#endif + } + + size_t skip_n_firsts() const { return _skip; } + +private: + size_t _thread_id; + size_t _skip; +}; + +class StackTraceImplHolder : public StackTraceImplBase { +public: + size_t size() const { return _stacktrace.size() ? _stacktrace.size() - skip_n_firsts() : 0; } + Trace operator[](size_t idx) const + { + if (idx >= size()) { + return Trace(); + } + return Trace(_stacktrace[idx + skip_n_firsts()], idx); + } + void* const* begin() const + { + if (size()) { + return &_stacktrace[skip_n_firsts()]; + } + return nullptr; + } + +protected: + std::vector _stacktrace; +}; + +#if BACKWARD_HAS_UNWIND == 1 + +namespace details { + +template +class Unwinder { +public: + size_t operator()(F& f, size_t depth) + { + _f = &f; + _index = -1; + _depth = depth; + _Unwind_Backtrace(&this->backtrace_trampoline, this); + return static_cast(_index); + } + +private: + F* _f; + ssize_t _index; + size_t _depth; + + static _Unwind_Reason_Code backtrace_trampoline(_Unwind_Context* ctx, void* self) + { + return (static_cast(self))->backtrace(ctx); + } + + _Unwind_Reason_Code backtrace(_Unwind_Context* ctx) + { + if (_index >= 0 && static_cast(_index) >= _depth) + return _URC_END_OF_STACK; + + int ip_before_instruction = 0; + uintptr_t ip = _Unwind_GetIPInfo(ctx, &ip_before_instruction); + + if (!ip_before_instruction) { + // calculating 0-1 for unsigned, looks like a possible bug to sanitiziers, + // so let's do it explicitly: + if (ip == 0) { + ip = std::numeric_limits::max(); // set it to 0xffff... (as + // from casting 0-1) + } + else { + ip -= 1; // else just normally decrement it (no overflow/underflow will + // happen) + } + } + + if (_index >= 0) { // ignore first frame. + (*_f)(static_cast(_index), reinterpret_cast(ip)); + } + _index += 1; + return _URC_NO_REASON; + } +}; + +template +size_t unwind(F f, size_t depth) +{ + Unwinder unwinder; + return unwinder(f, depth); +} + +} // namespace details + +template <> +class StackTraceImpl : public StackTraceImplHolder { +public: + NOINLINE + size_t load_here(size_t depth = 32) + { + load_thread_info(); + if (depth == 0) { + return 0; + } + _stacktrace.resize(depth); + size_t trace_cnt = details::unwind(callback(*this), depth); + _stacktrace.resize(trace_cnt); + skip_n_firsts(0); + return size(); + } + size_t load_from(void* addr, size_t depth = 32) + { + load_here(depth + 8); + + for (size_t i = 0; i < _stacktrace.size(); ++i) { + if (_stacktrace[i] == addr) { + skip_n_firsts(i); + break; + } + } + + _stacktrace.resize(std::min(_stacktrace.size(), skip_n_firsts() + depth)); + return size(); + } + +private: + struct callback { + StackTraceImpl& self; + callback(StackTraceImpl& _self) : self(_self) {} + + void operator()(size_t idx, void* addr) { self._stacktrace[idx] = addr; } + }; +}; + +#elif defined(BACKWARD_HAS_BACKTRACE) + +template <> +class StackTraceImpl : public StackTraceImplHolder { +public: + NOINLINE + size_t load_here(size_t depth = 32) + { + load_thread_info(); + if (depth == 0) { + return 0; + } + _stacktrace.resize(depth + 1); + size_t trace_cnt = backtrace(&_stacktrace[0], _stacktrace.size()); + _stacktrace.resize(trace_cnt); + skip_n_firsts(1); + return size(); + } + + size_t load_from(void* addr, size_t depth = 32) + { + load_here(depth + 8); + + for (size_t i = 0; i < _stacktrace.size(); ++i) { + if (_stacktrace[i] == addr) { + skip_n_firsts(i); + _stacktrace[i] = (void*)((uintptr_t)_stacktrace[i] + 1); + break; + } + } + + _stacktrace.resize(std::min(_stacktrace.size(), skip_n_firsts() + depth)); + return size(); + } +}; + +#elif defined(BACKWARD_SYSTEM_WINDOWS) + +template <> +class StackTraceImpl : public StackTraceImplHolder { +public: + // We have to load the machine type from the image info + // So we first initialize the resolver, and it tells us this info + void set_machine_type(DWORD machine_type) { machine_type_ = machine_type; } + void set_context(CONTEXT* ctx) { ctx_ = ctx; } + void set_thread_handle(HANDLE handle) { thd_ = handle; } + + NOINLINE + size_t load_here(size_t depth = 32) + { + + CONTEXT localCtx; // used when no context is provided + + if (depth == 0) { + return 0; + } + + if (!ctx_) { + ctx_ = &localCtx; + RtlCaptureContext(ctx_); + } + + if (!thd_) { + thd_ = GetCurrentThread(); + } + + HANDLE process = GetCurrentProcess(); + + STACKFRAME64 s; + memset(&s, 0, sizeof(STACKFRAME64)); + + // TODO: 32 bit context capture + s.AddrStack.Mode = AddrModeFlat; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrPC.Mode = AddrModeFlat; +# ifdef _M_X64 + s.AddrPC.Offset = ctx_->Rip; + s.AddrStack.Offset = ctx_->Rsp; + s.AddrFrame.Offset = ctx_->Rbp; +# else + s.AddrPC.Offset = ctx_->Eip; + s.AddrStack.Offset = ctx_->Esp; + s.AddrFrame.Offset = ctx_->Ebp; +# endif + + if (!machine_type_) { +# ifdef _M_X64 + machine_type_ = IMAGE_FILE_MACHINE_AMD64; +# else + machine_type_ = IMAGE_FILE_MACHINE_I386; +# endif + } + + for (;;) { + // NOTE: this only works if PDBs are already loaded! + SetLastError(0); + if (!StackWalk64( + machine_type_, process, thd_, &s, ctx_, NULL, SymFunctionTableAccess64, SymGetModuleBase64, NULL)) + break; + + if (s.AddrReturn.Offset == 0) + break; + + _stacktrace.push_back(reinterpret_cast(s.AddrPC.Offset)); + + if (size() >= depth) + break; + } + + return size(); + } + + size_t load_from(void* addr, size_t depth = 32) + { + load_here(depth + 8); + + for (size_t i = 0; i < _stacktrace.size(); ++i) { + if (_stacktrace[i] == addr) { + skip_n_firsts(i); + break; + } + } + + _stacktrace.resize(std::min(_stacktrace.size(), skip_n_firsts() + depth)); + return size(); + } + +private: + DWORD machine_type_ = 0; + HANDLE thd_ = 0; + CONTEXT* ctx_ = nullptr; +}; + +#endif + +class StackTrace : public StackTraceImpl { +}; + +/*************** TRACE RESOLVER ***************/ + +template +class TraceResolverImpl; + +#ifdef BACKWARD_SYSTEM_UNKNOWN + +template <> +class TraceResolverImpl { +public: + template + void load_stacktrace(ST&) + { + } + ResolvedTrace resolve(ResolvedTrace t) { return t; } +}; + +#endif + +class TraceResolverImplBase { +protected: + std::string demangle(const char* funcname) { return _demangler.demangle(funcname); } + +private: + details::demangler _demangler; +}; + +#ifdef BACKWARD_SYSTEM_LINUX + +class TraceResolverLinuxBase : public TraceResolverImplBase { +public: + TraceResolverLinuxBase() : argv0_(get_argv0()), exec_path_(read_symlink("/proc/self/exe")) {} + std::string resolve_exec_path(Dl_info& symbol_info) const + { + // mutates symbol_info.dli_fname to be filename to open and returns filename + // to display + if (symbol_info.dli_fname == argv0_) { + // dladdr returns argv[0] in dli_fname for symbols contained in + // the main executable, which is not a valid path if the + // executable was found by a search of the PATH environment + // variable; In that case, we actually open /proc/self/exe, which + // is always the actual executable (even if it was deleted/replaced!) + // but display the path that /proc/self/exe links to. + symbol_info.dli_fname = "/proc/self/exe"; + return exec_path_; + } + else { + return symbol_info.dli_fname; + } + } + +private: + std::string argv0_; + std::string exec_path_; + + static std::string get_argv0() + { + std::string argv0; + std::ifstream ifs("/proc/self/cmdline"); + std::getline(ifs, argv0, '\0'); + return argv0; + } + + static std::string read_symlink(std::string const& symlink_path) + { + std::string path; + path.resize(100); + + while (true) { + ssize_t len = ::readlink(symlink_path.c_str(), &*path.begin(), path.size()); + if (len < 0) { + return ""; + } + if (static_cast(len) == path.size()) { + path.resize(path.size() * 2); + } + else { + path.resize(static_cast(len)); + break; + } + } + + return path; + } +}; + +template +class TraceResolverLinuxImpl; + +# if BACKWARD_HAS_BACKTRACE_SYMBOL == 1 + +template <> +class TraceResolverLinuxImpl : public TraceResolverLinuxBase { +public: + template + void load_stacktrace(ST& st) + { + using namespace details; + if (st.size() == 0) { + return; + } + _symbols.reset(backtrace_symbols(st.begin(), (int)st.size())); + } + + ResolvedTrace resolve(ResolvedTrace trace) + { + char* filename = _symbols[trace.idx]; + char* funcname = filename; + while (*funcname && *funcname != '(') { + funcname += 1; + } + trace.object_filename.assign( + filename, + funcname); // ok even if funcname is the ending + // \0 (then we assign entire string) + + if (*funcname) { // if it's not end of string (e.g. from last frame ip==0) + funcname += 1; + char* funcname_end = funcname; + while (*funcname_end && *funcname_end != ')' && *funcname_end != '+') { + funcname_end += 1; + } + *funcname_end = '\0'; + trace.object_function = this->demangle(funcname); + trace.source.function = trace.object_function; // we cannot do better. + } + return trace; + } + +private: + details::handle _symbols; +}; + +# endif // BACKWARD_HAS_BACKTRACE_SYMBOL == 1 + +# if BACKWARD_HAS_BFD == 1 + +template <> +class TraceResolverLinuxImpl : public TraceResolverLinuxBase { +public: + TraceResolverLinuxImpl() : _bfd_loaded(false) {} + + template + void load_stacktrace(ST&) + { + } + + ResolvedTrace resolve(ResolvedTrace trace) + { + Dl_info symbol_info; + + // trace.addr is a virtual address in memory pointing to some code. + // Let's try to find from which loaded object it comes from. + // The loaded object can be yourself btw. + if (!dladdr(trace.addr, &symbol_info)) { + return trace; // dat broken trace... + } + + // Now we get in symbol_info: + // .dli_fname: + // pathname of the shared object that contains the address. + // .dli_fbase: + // where the object is loaded in memory. + // .dli_sname: + // the name of the nearest symbol to trace.addr, we expect a + // function name. + // .dli_saddr: + // the exact address corresponding to .dli_sname. + + if (symbol_info.dli_sname) { + trace.object_function = demangle(symbol_info.dli_sname); + } + + if (!symbol_info.dli_fname) { + return trace; + } + + trace.object_filename = resolve_exec_path(symbol_info); + bfd_fileobject& fobj = load_object_with_bfd(symbol_info.dli_fname); + if (!fobj.handle) { + return trace; // sad, we couldn't load the object :( + } + + find_sym_result* details_selected; // to be filled. + + // trace.addr is the next instruction to be executed after returning + // from the nested stack frame. In C++ this usually relate to the next + // statement right after the function call that leaded to a new stack + // frame. This is not usually what you want to see when printing out a + // stacktrace... + find_sym_result details_call_site = find_symbol_details(fobj, trace.addr, symbol_info.dli_fbase); + details_selected = &details_call_site; + +# if BACKWARD_HAS_UNWIND == 0 + // ...this is why we also try to resolve the symbol that is right + // before the return address. If we are lucky enough, we will get the + // line of the function that was called. But if the code is optimized, + // we might get something absolutely not related since the compiler + // can reschedule the return address with inline functions and + // tail-call optimisation (among other things that I don't even know + // or cannot even dream about with my tiny limited brain). + find_sym_result details_adjusted_call_site = + find_symbol_details(fobj, (void*)(uintptr_t(trace.addr) - 1), symbol_info.dli_fbase); + + // In debug mode, we should always get the right thing(TM). + if (details_call_site.found && details_adjusted_call_site.found) { + // Ok, we assume that details_adjusted_call_site is a better estimation. + details_selected = &details_adjusted_call_site; + trace.addr = (void*)(uintptr_t(trace.addr) - 1); + } + + if (details_selected == &details_call_site && details_call_site.found) { + // we have to re-resolve the symbol in order to reset some + // internal state in BFD... so we can call backtrace_inliners + // thereafter... + details_call_site = find_symbol_details(fobj, trace.addr, symbol_info.dli_fbase); + } +# endif // BACKWARD_HAS_UNWIND + + if (details_selected->found) { + if (details_selected->filename) { + trace.source.filename = details_selected->filename; + } + trace.source.line = details_selected->line; + + if (details_selected->funcname) { + // this time we get the name of the function where the code is + // located, instead of the function were the address is + // located. In short, if the code was inlined, we get the + // function correspoding to the code. Else we already got in + // trace.function. + trace.source.function = demangle(details_selected->funcname); + + if (!symbol_info.dli_sname) { + // for the case dladdr failed to find the symbol name of + // the function, we might as well try to put something + // here. + trace.object_function = trace.source.function; + } + } + + // Maybe the source of the trace got inlined inside the function + // (trace.source.function). Let's see if we can get all the inlined + // calls along the way up to the initial call site. + trace.inliners = backtrace_inliners(fobj, *details_selected); + +# if 0 + if (trace.inliners.size() == 0) { + // Maybe the trace was not inlined... or maybe it was and we + // are lacking the debug information. Let's try to make the + // world better and see if we can get the line number of the + // function (trace.source.function) now. + // + // We will get the location of where the function start (to be + // exact: the first instruction that really start the + // function), not where the name of the function is defined. + // This can be quite far away from the name of the function + // btw. + // + // If the source of the function is the same as the source of + // the trace, we cannot say if the trace was really inlined or + // not. However, if the filename of the source is different + // between the function and the trace... we can declare it as + // an inliner. This is not 100% accurate, but better than + // nothing. + + if (symbol_info.dli_saddr) { + find_sym_result details = find_symbol_details(fobj, + symbol_info.dli_saddr, + symbol_info.dli_fbase); + + if (details.found) { + ResolvedTrace::SourceLoc diy_inliner; + diy_inliner.line = details.line; + if (details.filename) { + diy_inliner.filename = details.filename; + } + if (details.funcname) { + diy_inliner.function = demangle(details.funcname); + } else { + diy_inliner.function = trace.source.function; + } + if (diy_inliner != trace.source) { + trace.inliners.push_back(diy_inliner); + } + } + } + } +# endif + } + + return trace; + } + +private: + bool _bfd_loaded; + + typedef details::handle> bfd_handle_t; + + typedef details::handle bfd_symtab_t; + + struct bfd_fileobject { + bfd_handle_t handle; + bfd_vma base_addr; + bfd_symtab_t symtab; + bfd_symtab_t dynamic_symtab; + }; + + typedef details::hashtable::type fobj_bfd_map_t; + fobj_bfd_map_t _fobj_bfd_map; + + bfd_fileobject& load_object_with_bfd(const std::string& filename_object) + { + using namespace details; + + if (!_bfd_loaded) { + using namespace details; + bfd_init(); + _bfd_loaded = true; + } + + fobj_bfd_map_t::iterator it = _fobj_bfd_map.find(filename_object); + if (it != _fobj_bfd_map.end()) { + return it->second; + } + + // this new object is empty for now. + bfd_fileobject& r = _fobj_bfd_map[filename_object]; + + // we do the work temporary in this one; + bfd_handle_t bfd_handle; + + int fd = open(filename_object.c_str(), O_RDONLY); + bfd_handle.reset(bfd_fdopenr(filename_object.c_str(), "default", fd)); + if (!bfd_handle) { + close(fd); + return r; + } + + if (!bfd_check_format(bfd_handle.get(), bfd_object)) { + return r; // not an object? You lose. + } + + if ((bfd_get_file_flags(bfd_handle.get()) & HAS_SYMS) == 0) { + return r; // that's what happen when you forget to compile in debug. + } + + ssize_t symtab_storage_size = bfd_get_symtab_upper_bound(bfd_handle.get()); + + ssize_t dyn_symtab_storage_size = bfd_get_dynamic_symtab_upper_bound(bfd_handle.get()); + + if (symtab_storage_size <= 0 && dyn_symtab_storage_size <= 0) { + return r; // weird, is the file is corrupted? + } + + bfd_symtab_t symtab, dynamic_symtab; + ssize_t symcount = 0, dyn_symcount = 0; + + if (symtab_storage_size > 0) { + symtab.reset(static_cast(malloc(static_cast(symtab_storage_size)))); + symcount = bfd_canonicalize_symtab(bfd_handle.get(), symtab.get()); + } + + if (dyn_symtab_storage_size > 0) { + dynamic_symtab.reset(static_cast(malloc(static_cast(dyn_symtab_storage_size)))); + dyn_symcount = bfd_canonicalize_dynamic_symtab(bfd_handle.get(), dynamic_symtab.get()); + } + + if (symcount <= 0 && dyn_symcount <= 0) { + return r; // damned, that's a stripped file that you got there! + } + + r.handle = move(bfd_handle); + r.symtab = move(symtab); + r.dynamic_symtab = move(dynamic_symtab); + return r; + } + + struct find_sym_result { + bool found; + const char* filename; + const char* funcname; + unsigned int line; + }; + + struct find_sym_context { + TraceResolverLinuxImpl* self; + bfd_fileobject* fobj; + void* addr; + void* base_addr; + find_sym_result result; + }; + + find_sym_result find_symbol_details(bfd_fileobject& fobj, void* addr, void* base_addr) + { + find_sym_context context; + context.self = this; + context.fobj = &fobj; + context.addr = addr; + context.base_addr = base_addr; + context.result.found = false; + bfd_map_over_sections(fobj.handle.get(), &find_in_section_trampoline, static_cast(&context)); + return context.result; + } + + static void find_in_section_trampoline(bfd*, asection* section, void* data) + { + find_sym_context* context = static_cast(data); + context->self->find_in_section( + reinterpret_cast(context->addr), + reinterpret_cast(context->base_addr), + *context->fobj, + section, + context->result); + } + + void find_in_section( + bfd_vma addr, + bfd_vma base_addr, + bfd_fileobject& fobj, + asection* section, + find_sym_result& result) + { + if (result.found) + return; + +# ifdef bfd_get_section_flags + if ((bfd_get_section_flags(fobj.handle.get(), section) & SEC_ALLOC) == 0) +# else + if ((bfd_section_flags(section) & SEC_ALLOC) == 0) +# endif + return; // a debug section is never loaded automatically. + +# ifdef bfd_get_section_vma + bfd_vma sec_addr = bfd_get_section_vma(fobj.handle.get(), section); +# else + bfd_vma sec_addr = bfd_section_vma(section); +# endif +# ifdef bfd_get_section_size + bfd_size_type size = bfd_get_section_size(section); +# else + bfd_size_type size = bfd_section_size(section); +# endif + + // are we in the boundaries of the section? + if (addr < sec_addr || addr >= sec_addr + size) { + addr -= base_addr; // oups, a relocated object, lets try again... + if (addr < sec_addr || addr >= sec_addr + size) { + return; + } + } + +# if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +# endif + if (!result.found && fobj.symtab) { + result.found = bfd_find_nearest_line( + fobj.handle.get(), + section, + fobj.symtab.get(), + addr - sec_addr, + &result.filename, + &result.funcname, + &result.line); + } + + if (!result.found && fobj.dynamic_symtab) { + result.found = bfd_find_nearest_line( + fobj.handle.get(), + section, + fobj.dynamic_symtab.get(), + addr - sec_addr, + &result.filename, + &result.funcname, + &result.line); + } +# if defined(__clang__) +# pragma clang diagnostic pop +# endif + } + + ResolvedTrace::source_locs_t backtrace_inliners(bfd_fileobject& fobj, find_sym_result previous_result) + { + // This function can be called ONLY after a SUCCESSFUL call to + // find_symbol_details. The state is global to the bfd_handle. + ResolvedTrace::source_locs_t results; + while (previous_result.found) { + find_sym_result result; + result.found = bfd_find_inliner_info(fobj.handle.get(), &result.filename, &result.funcname, &result.line); + + if (result.found) /* and not ( + cstrings_eq(previous_result.filename, + result.filename) and + cstrings_eq(previous_result.funcname, result.funcname) + and result.line == previous_result.line + )) */ + { + ResolvedTrace::SourceLoc src_loc; + src_loc.line = result.line; + if (result.filename) { + src_loc.filename = result.filename; + } + if (result.funcname) { + src_loc.function = demangle(result.funcname); + } + results.push_back(src_loc); + } + previous_result = result; + } + return results; + } + + bool cstrings_eq(const char* a, const char* b) + { + if (!a || !b) { + return false; + } + return strcmp(a, b) == 0; + } +}; +# endif // BACKWARD_HAS_BFD == 1 + +# if BACKWARD_HAS_DW == 1 + +template <> +class TraceResolverLinuxImpl : public TraceResolverLinuxBase { +public: + TraceResolverLinuxImpl() : _dwfl_handle_initialized(false) {} + + template + void load_stacktrace(ST&) + { + } + + ResolvedTrace resolve(ResolvedTrace trace) + { + using namespace details; + + Dwarf_Addr trace_addr = (Dwarf_Addr)trace.addr; + + if (!_dwfl_handle_initialized) { + // initialize dwfl... + _dwfl_cb.reset(new Dwfl_Callbacks); + _dwfl_cb->find_elf = &dwfl_linux_proc_find_elf; + _dwfl_cb->find_debuginfo = &dwfl_standard_find_debuginfo; + _dwfl_cb->debuginfo_path = 0; + + _dwfl_handle.reset(dwfl_begin(_dwfl_cb.get())); + _dwfl_handle_initialized = true; + + if (!_dwfl_handle) { + return trace; + } + + // ...from the current process. + dwfl_report_begin(_dwfl_handle.get()); + int r = dwfl_linux_proc_report(_dwfl_handle.get(), getpid()); + dwfl_report_end(_dwfl_handle.get(), NULL, NULL); + if (r < 0) { + return trace; + } + } + + if (!_dwfl_handle) { + return trace; + } + + // find the module (binary object) that contains the trace's address. + // This is not using any debug information, but the addresses ranges of + // all the currently loaded binary object. + Dwfl_Module* mod = dwfl_addrmodule(_dwfl_handle.get(), trace_addr); + if (mod) { + // now that we found it, lets get the name of it, this will be the + // full path to the running binary or one of the loaded library. + const char* module_name = dwfl_module_info(mod, 0, 0, 0, 0, 0, 0, 0); + if (module_name) { + trace.object_filename = module_name; + } + // We also look after the name of the symbol, equal or before this + // address. This is found by walking the symtab. We should get the + // symbol corresponding to the function (mangled) containing the + // address. If the code corresponding to the address was inlined, + // this is the name of the out-most inliner function. + const char* sym_name = dwfl_module_addrname(mod, trace_addr); + if (sym_name) { + trace.object_function = demangle(sym_name); + } + } + + // now let's get serious, and find out the source location (file and + // line number) of the address. + + // This function will look in .debug_aranges for the address and map it + // to the location of the compilation unit DIE in .debug_info and + // return it. + Dwarf_Addr mod_bias = 0; + Dwarf_Die* cudie = dwfl_module_addrdie(mod, trace_addr, &mod_bias); + +# if 1 + if (!cudie) { + // Sadly clang does not generate the section .debug_aranges, thus + // dwfl_module_addrdie will fail early. Clang doesn't either set + // the lowpc/highpc/range info for every compilation unit. + // + // So in order to save the world: + // for every compilation unit, we will iterate over every single + // DIEs. Normally functions should have a lowpc/highpc/range, which + // we will use to infer the compilation unit. + + // note that this is probably badly inefficient. + while ((cudie = dwfl_module_nextcu(mod, cudie, &mod_bias))) { + Dwarf_Die die_mem; + Dwarf_Die* fundie = find_fundie_by_pc(cudie, trace_addr - mod_bias, &die_mem); + if (fundie) { + break; + } + } + } +# endif + +//#define BACKWARD_I_DO_NOT_RECOMMEND_TO_ENABLE_THIS_HORRIBLE_PIECE_OF_CODE +# ifdef BACKWARD_I_DO_NOT_RECOMMEND_TO_ENABLE_THIS_HORRIBLE_PIECE_OF_CODE + if (!cudie) { + // If it's still not enough, lets dive deeper in the shit, and try + // to save the world again: for every compilation unit, we will + // load the corresponding .debug_line section, and see if we can + // find our address in it. + + Dwarf_Addr cfi_bias; + Dwarf_CFI* cfi_cache = dwfl_module_eh_cfi(mod, &cfi_bias); + + Dwarf_Addr bias; + while ((cudie = dwfl_module_nextcu(mod, cudie, &bias))) { + if (dwarf_getsrc_die(cudie, trace_addr - bias)) { + + // ...but if we get a match, it might be a false positive + // because our (address - bias) might as well be valid in a + // different compilation unit. So we throw our last card on + // the table and lookup for the address into the .eh_frame + // section. + + handle frame; + dwarf_cfi_addrframe(cfi_cache, trace_addr - cfi_bias, &frame); + if (frame) { + break; + } + } + } + } +# endif + + if (!cudie) { + return trace; // this time we lost the game :/ + } + + // Now that we have a compilation unit DIE, this function will be able + // to load the corresponding section in .debug_line (if not already + // loaded) and hopefully find the source location mapped to our + // address. + Dwarf_Line* srcloc = dwarf_getsrc_die(cudie, trace_addr - mod_bias); + + if (srcloc) { + const char* srcfile = dwarf_linesrc(srcloc, 0, 0); + if (srcfile) { + trace.source.filename = srcfile; + } + int line = 0, col = 0; + dwarf_lineno(srcloc, &line); + dwarf_linecol(srcloc, &col); + trace.source.line = line; + trace.source.col = col; + } + + deep_first_search_by_pc(cudie, trace_addr - mod_bias, inliners_search_cb(trace)); + if (trace.source.function.size() == 0) { + // fallback. + trace.source.function = trace.object_function; + } + + return trace; + } + +private: + typedef details::handle> dwfl_handle_t; + details::handle> _dwfl_cb; + dwfl_handle_t _dwfl_handle; + bool _dwfl_handle_initialized; + + // defined here because in C++98, template function cannot take locally + // defined types... grrr. + struct inliners_search_cb { + void operator()(Dwarf_Die* die) + { + switch (dwarf_tag(die)) { + const char* name; + case DW_TAG_subprogram: + if ((name = dwarf_diename(die))) { + trace.source.function = name; + } + break; + + case DW_TAG_inlined_subroutine: + ResolvedTrace::SourceLoc sloc; + Dwarf_Attribute attr_mem; + + if ((name = dwarf_diename(die))) { + sloc.function = name; + } + if ((name = die_call_file(die))) { + sloc.filename = name; + } + + Dwarf_Word line = 0, col = 0; + dwarf_formudata(dwarf_attr(die, DW_AT_call_line, &attr_mem), &line); + dwarf_formudata(dwarf_attr(die, DW_AT_call_column, &attr_mem), &col); + sloc.line = (unsigned)line; + sloc.col = (unsigned)col; + + trace.inliners.push_back(sloc); + break; + }; + } + ResolvedTrace& trace; + inliners_search_cb(ResolvedTrace& t) : trace(t) {} + }; + + static bool die_has_pc(Dwarf_Die* die, Dwarf_Addr pc) + { + Dwarf_Addr low, high; + + // continuous range + if (dwarf_hasattr(die, DW_AT_low_pc) && dwarf_hasattr(die, DW_AT_high_pc)) { + if (dwarf_lowpc(die, &low) != 0) { + return false; + } + if (dwarf_highpc(die, &high) != 0) { + Dwarf_Attribute attr_mem; + Dwarf_Attribute* attr = dwarf_attr(die, DW_AT_high_pc, &attr_mem); + Dwarf_Word value; + if (dwarf_formudata(attr, &value) != 0) { + return false; + } + high = low + value; + } + return pc >= low && pc < high; + } + + // non-continuous range. + Dwarf_Addr base; + ptrdiff_t offset = 0; + while ((offset = dwarf_ranges(die, offset, &base, &low, &high)) > 0) { + if (pc >= low && pc < high) { + return true; + } + } + return false; + } + + static Dwarf_Die* find_fundie_by_pc(Dwarf_Die* parent_die, Dwarf_Addr pc, Dwarf_Die* result) + { + if (dwarf_child(parent_die, result) != 0) { + return 0; + } + + Dwarf_Die* die = result; + do { + switch (dwarf_tag(die)) { + case DW_TAG_subprogram: + case DW_TAG_inlined_subroutine: + if (die_has_pc(die, pc)) { + return result; + } + }; + bool declaration = false; + Dwarf_Attribute attr_mem; + dwarf_formflag(dwarf_attr(die, DW_AT_declaration, &attr_mem), &declaration); + if (!declaration) { + // let's be curious and look deeper in the tree, + // function are not necessarily at the first level, but + // might be nested inside a namespace, structure etc. + Dwarf_Die die_mem; + Dwarf_Die* indie = find_fundie_by_pc(die, pc, &die_mem); + if (indie) { + *result = die_mem; + return result; + } + } + } while (dwarf_siblingof(die, result) == 0); + return 0; + } + + template + static bool deep_first_search_by_pc(Dwarf_Die* parent_die, Dwarf_Addr pc, CB cb) + { + Dwarf_Die die_mem; + if (dwarf_child(parent_die, &die_mem) != 0) { + return false; + } + + bool branch_has_pc = false; + Dwarf_Die* die = &die_mem; + do { + bool declaration = false; + Dwarf_Attribute attr_mem; + dwarf_formflag(dwarf_attr(die, DW_AT_declaration, &attr_mem), &declaration); + if (!declaration) { + // let's be curious and look deeper in the tree, function are + // not necessarily at the first level, but might be nested + // inside a namespace, structure, a function, an inlined + // function etc. + branch_has_pc = deep_first_search_by_pc(die, pc, cb); + } + if (!branch_has_pc) { + branch_has_pc = die_has_pc(die, pc); + } + if (branch_has_pc) { + cb(die); + } + } while (dwarf_siblingof(die, &die_mem) == 0); + return branch_has_pc; + } + + static const char* die_call_file(Dwarf_Die* die) + { + Dwarf_Attribute attr_mem; + Dwarf_Sword file_idx = 0; + + dwarf_formsdata(dwarf_attr(die, DW_AT_call_file, &attr_mem), &file_idx); + + if (file_idx == 0) { + return 0; + } + + Dwarf_Die die_mem; + Dwarf_Die* cudie = dwarf_diecu(die, &die_mem, 0, 0); + if (!cudie) { + return 0; + } + + Dwarf_Files* files = 0; + size_t nfiles; + dwarf_getsrcfiles(cudie, &files, &nfiles); + if (!files) { + return 0; + } + + return dwarf_filesrc(files, file_idx, 0, 0); + } +}; +# endif // BACKWARD_HAS_DW == 1 + +# if BACKWARD_HAS_DWARF == 1 + +template <> +class TraceResolverLinuxImpl : public TraceResolverLinuxBase { +public: + TraceResolverLinuxImpl() : _dwarf_loaded(false) {} + + template + void load_stacktrace(ST&) + { + } + + ResolvedTrace resolve(ResolvedTrace trace) + { + // trace.addr is a virtual address in memory pointing to some code. + // Let's try to find from which loaded object it comes from. + // The loaded object can be yourself btw. + + Dl_info symbol_info; + int dladdr_result = 0; +# if defined(__GLIBC__) + link_map* link_map; + // We request the link map so we can get information about offsets + dladdr_result = dladdr1(trace.addr, &symbol_info, reinterpret_cast(&link_map), RTLD_DL_LINKMAP); +# else + // Android doesn't have dladdr1. Don't use the linker map. + dladdr_result = dladdr(trace.addr, &symbol_info); +# endif + if (!dladdr_result) { + return trace; // dat broken trace... + } + + // Now we get in symbol_info: + // .dli_fname: + // pathname of the shared object that contains the address. + // .dli_fbase: + // where the object is loaded in memory. + // .dli_sname: + // the name of the nearest symbol to trace.addr, we expect a + // function name. + // .dli_saddr: + // the exact address corresponding to .dli_sname. + // + // And in link_map: + // .l_addr: + // difference between the address in the ELF file and the address + // in memory + // l_name: + // absolute pathname where the object was found + + if (symbol_info.dli_sname) { + trace.object_function = demangle(symbol_info.dli_sname); + } + + if (!symbol_info.dli_fname) { + return trace; + } + + trace.object_filename = resolve_exec_path(symbol_info); + dwarf_fileobject& fobj = load_object_with_dwarf(symbol_info.dli_fname); + if (!fobj.dwarf_handle) { + return trace; // sad, we couldn't load the object :( + } + +# if defined(__GLIBC__) + // Convert the address to a module relative one by looking at + // the module's loading address in the link map + Dwarf_Addr address = reinterpret_cast(trace.addr) - reinterpret_cast(link_map->l_addr); +# else + Dwarf_Addr address = reinterpret_cast(trace.addr); +# endif + + if (trace.object_function.empty()) { + symbol_cache_t::iterator it = fobj.symbol_cache.lower_bound(address); + + if (it != fobj.symbol_cache.end()) { + if (it->first != address) { + if (it != fobj.symbol_cache.begin()) { + --it; + } + } + trace.object_function = demangle(it->second.c_str()); + } + } + + // Get the Compilation Unit DIE for the address + Dwarf_Die die = find_die(fobj, address); + + if (!die) { + return trace; // this time we lost the game :/ + } + + // libdwarf doesn't give us direct access to its objects, it always + // allocates a copy for the caller. We keep that copy alive in a cache + // and we deallocate it later when it's no longer required. + die_cache_entry& die_object = get_die_cache(fobj, die); + if (die_object.isEmpty()) + return trace; // We have no line section for this DIE + + die_linemap_t::iterator it = die_object.line_section.lower_bound(address); + + if (it != die_object.line_section.end()) { + if (it->first != address) { + if (it == die_object.line_section.begin()) { + // If we are on the first item of the line section + // but the address does not match it means that + // the address is below the range of the DIE. Give up. + return trace; + } + else { + --it; + } + } + } + else { + return trace; // We didn't find the address. + } + + // Get the Dwarf_Line that the address points to and call libdwarf + // to get source file, line and column info. + Dwarf_Line line = die_object.line_buffer[it->second]; + Dwarf_Error error = DW_DLE_NE; + + char* filename; + if (dwarf_linesrc(line, &filename, &error) == DW_DLV_OK) { + trace.source.filename = std::string(filename); + dwarf_dealloc(fobj.dwarf_handle.get(), filename, DW_DLA_STRING); + } + + Dwarf_Unsigned number = 0; + if (dwarf_lineno(line, &number, &error) == DW_DLV_OK) { + trace.source.line = number; + } + else { + trace.source.line = 0; + } + + if (dwarf_lineoff_b(line, &number, &error) == DW_DLV_OK) { + trace.source.col = number; + } + else { + trace.source.col = 0; + } + + std::vector namespace_stack; + deep_first_search_by_pc(fobj, die, address, namespace_stack, inliners_search_cb(trace, fobj, die)); + + dwarf_dealloc(fobj.dwarf_handle.get(), die, DW_DLA_DIE); + + return trace; + } + +public: + static int close_dwarf(Dwarf_Debug dwarf) { return dwarf_finish(dwarf, NULL); } + +private: + bool _dwarf_loaded; + + typedef details::handle> dwarf_file_t; + + typedef details::handle> dwarf_elf_t; + + typedef details::handle> dwarf_handle_t; + + typedef std::map die_linemap_t; + + typedef std::map die_specmap_t; + + struct die_cache_entry { + die_specmap_t spec_section; + die_linemap_t line_section; + Dwarf_Line* line_buffer; + Dwarf_Signed line_count; + Dwarf_Line_Context line_context; + + inline bool isEmpty() + { + return line_buffer == NULL || line_count == 0 || line_context == NULL || line_section.empty(); + } + + die_cache_entry() : line_buffer(0), line_count(0), line_context(0) {} + + ~die_cache_entry() + { + if (line_context) { + dwarf_srclines_dealloc_b(line_context); + } + } + }; + + typedef std::map die_cache_t; + + typedef std::map symbol_cache_t; + + struct dwarf_fileobject { + dwarf_file_t file_handle; + dwarf_elf_t elf_handle; + dwarf_handle_t dwarf_handle; + symbol_cache_t symbol_cache; + + // Die cache + die_cache_t die_cache; + die_cache_entry* current_cu; + }; + + typedef details::hashtable::type fobj_dwarf_map_t; + fobj_dwarf_map_t _fobj_dwarf_map; + + static bool cstrings_eq(const char* a, const char* b) + { + if (!a || !b) { + return false; + } + return strcmp(a, b) == 0; + } + + dwarf_fileobject& load_object_with_dwarf(const std::string& filename_object) + { + + if (!_dwarf_loaded) { + // Set the ELF library operating version + // If that fails there's nothing we can do + _dwarf_loaded = elf_version(EV_CURRENT) != EV_NONE; + } + + fobj_dwarf_map_t::iterator it = _fobj_dwarf_map.find(filename_object); + if (it != _fobj_dwarf_map.end()) { + return it->second; + } + + // this new object is empty for now + dwarf_fileobject& r = _fobj_dwarf_map[filename_object]; + + dwarf_file_t file_handle; + file_handle.reset(open(filename_object.c_str(), O_RDONLY)); + if (file_handle.get() < 0) { + return r; + } + + // Try to get an ELF handle. We need to read the ELF sections + // because we want to see if there is a .gnu_debuglink section + // that points to a split debug file + dwarf_elf_t elf_handle; + elf_handle.reset(elf_begin(file_handle.get(), ELF_C_READ, NULL)); + if (!elf_handle) { + return r; + } + + const char* e_ident = elf_getident(elf_handle.get(), 0); + if (!e_ident) { + return r; + } + + // Get the number of sections + // We use the new APIs as elf_getshnum is deprecated + size_t shdrnum = 0; + if (elf_getshdrnum(elf_handle.get(), &shdrnum) == -1) { + return r; + } + + // Get the index to the string section + size_t shdrstrndx = 0; + if (elf_getshdrstrndx(elf_handle.get(), &shdrstrndx) == -1) { + return r; + } + + std::string debuglink; + // Iterate through the ELF sections to try to get a gnu_debuglink + // note and also to cache the symbol table. + // We go the preprocessor way to avoid having to create templated + // classes or using gelf (which might throw a compiler error if 64 bit + // is not supported +# define ELF_GET_DATA(ARCH) \ + Elf_Scn* elf_section = 0; \ + Elf_Data* elf_data = 0; \ + Elf##ARCH##_Shdr* section_header = 0; \ + Elf_Scn* symbol_section = 0; \ + size_t symbol_count = 0; \ + size_t symbol_strings = 0; \ + Elf##ARCH##_Sym* symbol = 0; \ + const char* section_name = 0; \ + \ + while ((elf_section = elf_nextscn(elf_handle.get(), elf_section)) != NULL) { \ + section_header = elf##ARCH##_getshdr(elf_section); \ + if (section_header == NULL) { \ + return r; \ + } \ + \ + if ((section_name = elf_strptr(elf_handle.get(), shdrstrndx, section_header->sh_name)) == NULL) { \ + return r; \ + } \ + \ + if (cstrings_eq(section_name, ".gnu_debuglink")) { \ + elf_data = elf_getdata(elf_section, NULL); \ + if (elf_data && elf_data->d_size > 0) { \ + debuglink = std::string(reinterpret_cast(elf_data->d_buf)); \ + } \ + } \ + \ + switch (section_header->sh_type) { \ + case SHT_SYMTAB: \ + symbol_section = elf_section; \ + symbol_count = section_header->sh_size / section_header->sh_entsize; \ + symbol_strings = section_header->sh_link; \ + break; \ + \ + /* We use .dynsyms as a last resort, we prefer .symtab */ \ + case SHT_DYNSYM: \ + if (!symbol_section) { \ + symbol_section = elf_section; \ + symbol_count = section_header->sh_size / section_header->sh_entsize; \ + symbol_strings = section_header->sh_link; \ + } \ + break; \ + } \ + } \ + \ + if (symbol_section && symbol_count && symbol_strings) { \ + elf_data = elf_getdata(symbol_section, NULL); \ + symbol = reinterpret_cast(elf_data->d_buf); \ + for (size_t i = 0; i < symbol_count; ++i) { \ + int type = ELF##ARCH##_ST_TYPE(symbol->st_info); \ + if (type == STT_FUNC && symbol->st_value > 0) { \ + r.symbol_cache[symbol->st_value] = \ + std::string(elf_strptr(elf_handle.get(), symbol_strings, symbol->st_name)); \ + } \ + ++symbol; \ + } \ + } + + if (e_ident[EI_CLASS] == ELFCLASS32) { + ELF_GET_DATA(32) + } + else if (e_ident[EI_CLASS] == ELFCLASS64) { + // libelf might have been built without 64 bit support +# if __LIBELF64 + ELF_GET_DATA(64) +# endif + } + + if (!debuglink.empty()) { + // We have a debuglink section! Open an elf instance on that + // file instead. If we can't open the file, then return + // the elf handle we had already opened. + dwarf_file_t debuglink_file; + debuglink_file.reset(open(debuglink.c_str(), O_RDONLY)); + if (debuglink_file.get() > 0) { + dwarf_elf_t debuglink_elf; + debuglink_elf.reset(elf_begin(debuglink_file.get(), ELF_C_READ, NULL)); + + // If we have a valid elf handle, return the new elf handle + // and file handle and discard the original ones + if (debuglink_elf) { + elf_handle = move(debuglink_elf); + file_handle = move(debuglink_file); + } + } + } + + // Ok, we have a valid ELF handle, let's try to get debug symbols + Dwarf_Debug dwarf_debug; + Dwarf_Error error = DW_DLE_NE; + dwarf_handle_t dwarf_handle; + + int dwarf_result = dwarf_elf_init(elf_handle.get(), DW_DLC_READ, NULL, NULL, &dwarf_debug, &error); + + // We don't do any special handling for DW_DLV_NO_ENTRY specially. + // If we get an error, or the file doesn't have debug information + // we just return. + if (dwarf_result != DW_DLV_OK) { + return r; + } + + dwarf_handle.reset(dwarf_debug); + + r.file_handle = move(file_handle); + r.elf_handle = move(elf_handle); + r.dwarf_handle = move(dwarf_handle); + + return r; + } + + die_cache_entry& get_die_cache(dwarf_fileobject& fobj, Dwarf_Die die) + { + Dwarf_Error error = DW_DLE_NE; + + // Get the die offset, we use it as the cache key + Dwarf_Off die_offset; + if (dwarf_dieoffset(die, &die_offset, &error) != DW_DLV_OK) { + die_offset = 0; + } + + die_cache_t::iterator it = fobj.die_cache.find(die_offset); + + if (it != fobj.die_cache.end()) { + fobj.current_cu = &it->second; + return it->second; + } + + die_cache_entry& de = fobj.die_cache[die_offset]; + fobj.current_cu = &de; + + Dwarf_Addr line_addr; + Dwarf_Small table_count; + + // The addresses in the line section are not fully sorted (they might + // be sorted by block of code belonging to the same file), which makes + // it necessary to do so before searching is possible. + // + // As libdwarf allocates a copy of everything, let's get the contents + // of the line section and keep it around. We also create a map of + // program counter to line table indices so we can search by address + // and get the line buffer index. + // + // To make things more difficult, the same address can span more than + // one line, so we need to keep the index pointing to the first line + // by using insert instead of the map's [ operator. + + // Get the line context for the DIE + if (dwarf_srclines_b(die, 0, &table_count, &de.line_context, &error) == DW_DLV_OK) { + // Get the source lines for this line context, to be deallocated + // later + if (dwarf_srclines_from_linecontext(de.line_context, &de.line_buffer, &de.line_count, &error) == + DW_DLV_OK) { + + // Add all the addresses to our map + for (int i = 0; i < de.line_count; i++) { + if (dwarf_lineaddr(de.line_buffer[i], &line_addr, &error) != DW_DLV_OK) { + line_addr = 0; + } + de.line_section.insert(std::pair(line_addr, i)); + } + } + } + + // For each CU, cache the function DIEs that contain the + // DW_AT_specification attribute. When building with -g3 the function + // DIEs are separated in declaration and specification, with the + // declaration containing only the name and parameters and the + // specification the low/high pc and other compiler attributes. + // + // We cache those specifications so we don't skip over the declarations, + // because they have no pc, and we can do namespace resolution for + // DWARF function names. + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + Dwarf_Die current_die = 0; + if (dwarf_child(die, ¤t_die, &error) == DW_DLV_OK) { + for (;;) { + Dwarf_Die sibling_die = 0; + + Dwarf_Half tag_value; + dwarf_tag(current_die, &tag_value, &error); + + if (tag_value == DW_TAG_subprogram || tag_value == DW_TAG_inlined_subroutine) { + + Dwarf_Bool has_attr = 0; + if (dwarf_hasattr(current_die, DW_AT_specification, &has_attr, &error) == DW_DLV_OK) { + if (has_attr) { + Dwarf_Attribute attr_mem; + if (dwarf_attr(current_die, DW_AT_specification, &attr_mem, &error) == DW_DLV_OK) { + Dwarf_Off spec_offset = 0; + if (dwarf_formref(attr_mem, &spec_offset, &error) == DW_DLV_OK) { + Dwarf_Off spec_die_offset; + if (dwarf_dieoffset(current_die, &spec_die_offset, &error) == DW_DLV_OK) { + de.spec_section[spec_offset] = spec_die_offset; + } + } + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + } + } + + int result = dwarf_siblingof(dwarf, current_die, &sibling_die, &error); + if (result == DW_DLV_ERROR) { + break; + } + else if (result == DW_DLV_NO_ENTRY) { + break; + } + + if (current_die != die) { + dwarf_dealloc(dwarf, current_die, DW_DLA_DIE); + current_die = 0; + } + + current_die = sibling_die; + } + } + return de; + } + + static Dwarf_Die get_referenced_die(Dwarf_Debug dwarf, Dwarf_Die die, Dwarf_Half attr, bool global) + { + Dwarf_Error error = DW_DLE_NE; + Dwarf_Attribute attr_mem; + + Dwarf_Die found_die = NULL; + if (dwarf_attr(die, attr, &attr_mem, &error) == DW_DLV_OK) { + Dwarf_Off offset; + int result = 0; + if (global) { + result = dwarf_global_formref(attr_mem, &offset, &error); + } + else { + result = dwarf_formref(attr_mem, &offset, &error); + } + + if (result == DW_DLV_OK) { + if (dwarf_offdie(dwarf, offset, &found_die, &error) != DW_DLV_OK) { + found_die = NULL; + } + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + return found_die; + } + + static std::string get_referenced_die_name(Dwarf_Debug dwarf, Dwarf_Die die, Dwarf_Half attr, bool global) + { + Dwarf_Error error = DW_DLE_NE; + std::string value; + + Dwarf_Die found_die = get_referenced_die(dwarf, die, attr, global); + + if (found_die) { + char* name; + if (dwarf_diename(found_die, &name, &error) == DW_DLV_OK) { + if (name) { + value = std::string(name); + } + dwarf_dealloc(dwarf, name, DW_DLA_STRING); + } + dwarf_dealloc(dwarf, found_die, DW_DLA_DIE); + } + + return value; + } + + // Returns a spec DIE linked to the passed one. The caller should + // deallocate the DIE + static Dwarf_Die get_spec_die(dwarf_fileobject& fobj, Dwarf_Die die) + { + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + Dwarf_Error error = DW_DLE_NE; + Dwarf_Off die_offset; + if (fobj.current_cu && dwarf_die_CU_offset(die, &die_offset, &error) == DW_DLV_OK) { + die_specmap_t::iterator it = fobj.current_cu->spec_section.find(die_offset); + + // If we have a DIE that completes the current one, check if + // that one has the pc we are looking for + if (it != fobj.current_cu->spec_section.end()) { + Dwarf_Die spec_die = 0; + if (dwarf_offdie(dwarf, it->second, &spec_die, &error) == DW_DLV_OK) { + return spec_die; + } + } + } + + // Maybe we have an abstract origin DIE with the function information? + return get_referenced_die(fobj.dwarf_handle.get(), die, DW_AT_abstract_origin, true); + } + + static bool die_has_pc(dwarf_fileobject& fobj, Dwarf_Die die, Dwarf_Addr pc) + { + Dwarf_Addr low_pc = 0, high_pc = 0; + Dwarf_Half high_pc_form = 0; + Dwarf_Form_Class return_class; + Dwarf_Error error = DW_DLE_NE; + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + bool has_lowpc = false; + bool has_highpc = false; + bool has_ranges = false; + + if (dwarf_lowpc(die, &low_pc, &error) == DW_DLV_OK) { + // If we have a low_pc check if there is a high pc. + // If we don't have a high pc this might mean we have a base + // address for the ranges list or just an address. + has_lowpc = true; + + if (dwarf_highpc_b(die, &high_pc, &high_pc_form, &return_class, &error) == DW_DLV_OK) { + // We do have a high pc. In DWARF 4+ this is an offset from the + // low pc, but in earlier versions it's an absolute address. + + has_highpc = true; + // In DWARF 2/3 this would be a DW_FORM_CLASS_ADDRESS + if (return_class == DW_FORM_CLASS_CONSTANT) { + high_pc = low_pc + high_pc; + } + + // We have low and high pc, check if our address + // is in that range + return pc >= low_pc && pc < high_pc; + } + } + else { + // Reset the low_pc, in case dwarf_lowpc failing set it to some + // undefined value. + low_pc = 0; + } + + // Check if DW_AT_ranges is present and search for the PC in the + // returned ranges list. We always add the low_pc, as it not set it will + // be 0, in case we had a DW_AT_low_pc and DW_AT_ranges pair + bool result = false; + + Dwarf_Attribute attr; + if (dwarf_attr(die, DW_AT_ranges, &attr, &error) == DW_DLV_OK) { + + Dwarf_Off offset; + if (dwarf_global_formref(attr, &offset, &error) == DW_DLV_OK) { + Dwarf_Ranges* ranges; + Dwarf_Signed ranges_count = 0; + Dwarf_Unsigned byte_count = 0; + + if (dwarf_get_ranges_a(dwarf, offset, die, &ranges, &ranges_count, &byte_count, &error) == DW_DLV_OK) { + has_ranges = ranges_count != 0; + for (int i = 0; i < ranges_count; i++) { + if (ranges[i].dwr_addr1 != 0 && pc >= ranges[i].dwr_addr1 + low_pc && + pc < ranges[i].dwr_addr2 + low_pc) { + result = true; + break; + } + } + dwarf_ranges_dealloc(dwarf, ranges, ranges_count); + } + } + } + + // Last attempt. We might have a single address set as low_pc. + if (!result && low_pc != 0 && pc == low_pc) { + result = true; + } + + // If we don't have lowpc, highpc and ranges maybe this DIE is a + // declaration that relies on a DW_AT_specification DIE that happens + // later. Use the specification cache we filled when we loaded this CU. + if (!result && (!has_lowpc && !has_highpc && !has_ranges)) { + Dwarf_Die spec_die = get_spec_die(fobj, die); + if (spec_die) { + result = die_has_pc(fobj, spec_die, pc); + dwarf_dealloc(dwarf, spec_die, DW_DLA_DIE); + } + } + + return result; + } + + static void get_type(Dwarf_Debug dwarf, Dwarf_Die die, std::string& type) + { + Dwarf_Error error = DW_DLE_NE; + + Dwarf_Die child = 0; + if (dwarf_child(die, &child, &error) == DW_DLV_OK) { + get_type(dwarf, child, type); + } + + if (child) { + type.insert(0, "::"); + dwarf_dealloc(dwarf, child, DW_DLA_DIE); + } + + char* name; + if (dwarf_diename(die, &name, &error) == DW_DLV_OK) { + type.insert(0, std::string(name)); + dwarf_dealloc(dwarf, name, DW_DLA_STRING); + } + else { + type.insert(0, ""); + } + } + + static std::string get_type_by_signature(Dwarf_Debug dwarf, Dwarf_Die die) + { + Dwarf_Error error = DW_DLE_NE; + + Dwarf_Sig8 signature; + Dwarf_Bool has_attr = 0; + if (dwarf_hasattr(die, DW_AT_signature, &has_attr, &error) == DW_DLV_OK) { + if (has_attr) { + Dwarf_Attribute attr_mem; + if (dwarf_attr(die, DW_AT_signature, &attr_mem, &error) == DW_DLV_OK) { + if (dwarf_formsig8(attr_mem, &signature, &error) != DW_DLV_OK) { + return std::string(""); + } + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + } + + Dwarf_Unsigned next_cu_header; + Dwarf_Sig8 tu_signature; + std::string result; + bool found = false; + + while (dwarf_next_cu_header_d(dwarf, 0, 0, 0, 0, 0, 0, 0, &tu_signature, 0, &next_cu_header, 0, &error) == + DW_DLV_OK) { + + if (strncmp(signature.signature, tu_signature.signature, 8) == 0) { + Dwarf_Die type_cu_die = 0; + if (dwarf_siblingof_b(dwarf, 0, 0, &type_cu_die, &error) == DW_DLV_OK) { + Dwarf_Die child_die = 0; + if (dwarf_child(type_cu_die, &child_die, &error) == DW_DLV_OK) { + get_type(dwarf, child_die, result); + found = !result.empty(); + dwarf_dealloc(dwarf, child_die, DW_DLA_DIE); + } + dwarf_dealloc(dwarf, type_cu_die, DW_DLA_DIE); + } + } + } + + if (found) { + while (dwarf_next_cu_header_d(dwarf, 0, 0, 0, 0, 0, 0, 0, 0, 0, &next_cu_header, 0, &error) == DW_DLV_OK) { + // Reset the cu header state. Unfortunately, libdwarf's + // next_cu_header API keeps its own iterator per Dwarf_Debug + // that can't be reset. We need to keep fetching elements until + // the end. + } + } + else { + // If we couldn't resolve the type just print out the signature + std::ostringstream string_stream; + string_stream << "<0x" << std::hex << std::setfill('0'); + for (int i = 0; i < 8; ++i) { + string_stream << std::setw(2) << std::hex << (int)(unsigned char)(signature.signature[i]); + } + string_stream << ">"; + result = string_stream.str(); + } + return result; + } + + struct type_context_t { + bool is_const; + bool is_typedef; + bool has_type; + bool has_name; + std::string text; + + type_context_t() : is_const(false), is_typedef(false), has_type(false), has_name(false) {} + }; + + // Types are resolved from right to left: we get the variable name first + // and then all specifiers (like const or pointer) in a chain of DW_AT_type + // DIEs. Call this function recursively until we get a complete type + // string. + static void set_parameter_string(dwarf_fileobject& fobj, Dwarf_Die die, type_context_t& context) + { + char* name; + Dwarf_Error error = DW_DLE_NE; + + // typedefs contain also the base type, so we skip it and only + // print the typedef name + if (!context.is_typedef) { + if (dwarf_diename(die, &name, &error) == DW_DLV_OK) { + if (!context.text.empty()) { + context.text.insert(0, " "); + } + context.text.insert(0, std::string(name)); + dwarf_dealloc(fobj.dwarf_handle.get(), name, DW_DLA_STRING); + } + } + else { + context.is_typedef = false; + context.has_type = true; + if (context.is_const) { + context.text.insert(0, "const "); + context.is_const = false; + } + } + + bool next_type_is_const = false; + bool is_keyword = true; + + Dwarf_Half tag = 0; + Dwarf_Bool has_attr = 0; + if (dwarf_tag(die, &tag, &error) == DW_DLV_OK) { + switch (tag) { + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_class_type: + case DW_TAG_enumeration_type: + context.has_type = true; + if (dwarf_hasattr(die, DW_AT_signature, &has_attr, &error) == DW_DLV_OK) { + // If we have a signature it means the type is defined + // in .debug_types, so we need to load the DIE pointed + // at by the signature and resolve it + if (has_attr) { + std::string type = get_type_by_signature(fobj.dwarf_handle.get(), die); + if (context.is_const) + type.insert(0, "const "); + + if (!context.text.empty()) + context.text.insert(0, " "); + context.text.insert(0, type); + } + + // Treat enums like typedefs, and skip printing its + // base type + context.is_typedef = (tag == DW_TAG_enumeration_type); + } + break; + case DW_TAG_const_type: + next_type_is_const = true; + break; + case DW_TAG_pointer_type: + context.text.insert(0, "*"); + break; + case DW_TAG_reference_type: + context.text.insert(0, "&"); + break; + case DW_TAG_restrict_type: + context.text.insert(0, "restrict "); + break; + case DW_TAG_rvalue_reference_type: + context.text.insert(0, "&&"); + break; + case DW_TAG_volatile_type: + context.text.insert(0, "volatile "); + break; + case DW_TAG_typedef: + // Propagate the const-ness to the next type + // as typedefs are linked to its base type + next_type_is_const = context.is_const; + context.is_typedef = true; + context.has_type = true; + break; + case DW_TAG_base_type: + context.has_type = true; + break; + case DW_TAG_formal_parameter: + context.has_name = true; + break; + default: + is_keyword = false; + break; + } + } + + if (!is_keyword && context.is_const) { + context.text.insert(0, "const "); + } + + context.is_const = next_type_is_const; + + Dwarf_Die ref = get_referenced_die(fobj.dwarf_handle.get(), die, DW_AT_type, true); + if (ref) { + set_parameter_string(fobj, ref, context); + dwarf_dealloc(fobj.dwarf_handle.get(), ref, DW_DLA_DIE); + } + + if (!context.has_type && context.has_name) { + context.text.insert(0, "void "); + context.has_type = true; + } + } + + // Resolve the function return type and parameters + static void set_function_parameters( + std::string& function_name, + std::vector& ns, + dwarf_fileobject& fobj, + Dwarf_Die die) + { + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + Dwarf_Error error = DW_DLE_NE; + Dwarf_Die current_die = 0; + std::string parameters; + bool has_spec = true; + // Check if we have a spec DIE. If we do we use it as it contains + // more information, like parameter names. + Dwarf_Die spec_die = get_spec_die(fobj, die); + if (!spec_die) { + has_spec = false; + spec_die = die; + } + + std::vector::const_iterator it = ns.begin(); + std::string ns_name; + for (it = ns.begin(); it < ns.end(); ++it) { + ns_name.append(*it).append("::"); + } + + if (!ns_name.empty()) { + function_name.insert(0, ns_name); + } + + // See if we have a function return type. It can be either on the + // current die or in its spec one (usually true for inlined functions) + std::string return_type = get_referenced_die_name(dwarf, die, DW_AT_type, true); + if (return_type.empty()) { + return_type = get_referenced_die_name(dwarf, spec_die, DW_AT_type, true); + } + if (!return_type.empty()) { + return_type.append(" "); + function_name.insert(0, return_type); + } + + if (dwarf_child(spec_die, ¤t_die, &error) == DW_DLV_OK) { + for (;;) { + Dwarf_Die sibling_die = 0; + + Dwarf_Half tag_value; + dwarf_tag(current_die, &tag_value, &error); + + if (tag_value == DW_TAG_formal_parameter) { + // Ignore artificial (ie, compiler generated) parameters + bool is_artificial = false; + Dwarf_Attribute attr_mem; + if (dwarf_attr(current_die, DW_AT_artificial, &attr_mem, &error) == DW_DLV_OK) { + Dwarf_Bool flag = 0; + if (dwarf_formflag(attr_mem, &flag, &error) == DW_DLV_OK) { + is_artificial = flag != 0; + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + + if (!is_artificial) { + type_context_t context; + set_parameter_string(fobj, current_die, context); + + if (parameters.empty()) { + parameters.append("("); + } + else { + parameters.append(", "); + } + parameters.append(context.text); + } + } + + int result = dwarf_siblingof(dwarf, current_die, &sibling_die, &error); + if (result == DW_DLV_ERROR) { + break; + } + else if (result == DW_DLV_NO_ENTRY) { + break; + } + + if (current_die != die) { + dwarf_dealloc(dwarf, current_die, DW_DLA_DIE); + current_die = 0; + } + + current_die = sibling_die; + } + } + if (parameters.empty()) + parameters = "("; + parameters.append(")"); + + // If we got a spec DIE we need to deallocate it + if (has_spec) + dwarf_dealloc(dwarf, spec_die, DW_DLA_DIE); + + function_name.append(parameters); + } + + // defined here because in C++98, template function cannot take locally + // defined types... grrr. + struct inliners_search_cb { + void operator()(Dwarf_Die die, std::vector& ns) + { + Dwarf_Error error = DW_DLE_NE; + Dwarf_Half tag_value; + Dwarf_Attribute attr_mem; + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + + dwarf_tag(die, &tag_value, &error); + + switch (tag_value) { + char* name; + case DW_TAG_subprogram: + if (!trace.source.function.empty()) + break; + if (dwarf_diename(die, &name, &error) == DW_DLV_OK) { + trace.source.function = std::string(name); + dwarf_dealloc(dwarf, name, DW_DLA_STRING); + } + else { + // We don't have a function name in this DIE. + // Check if there is a referenced non-defining + // declaration. + trace.source.function = get_referenced_die_name(dwarf, die, DW_AT_abstract_origin, true); + if (trace.source.function.empty()) { + trace.source.function = get_referenced_die_name(dwarf, die, DW_AT_specification, true); + } + } + + // Append the function parameters, if available + set_function_parameters(trace.source.function, ns, fobj, die); + + // If the object function name is empty, it's possible that + // there is no dynamic symbol table (maybe the executable + // was stripped or not built with -rdynamic). See if we have + // a DWARF linkage name to use instead. We try both + // linkage_name and MIPS_linkage_name because the MIPS tag + // was the unofficial one until it was adopted in DWARF4. + // Old gcc versions generate MIPS_linkage_name + if (trace.object_function.empty()) { + details::demangler demangler; + + if (dwarf_attr(die, DW_AT_linkage_name, &attr_mem, &error) != DW_DLV_OK) { + if (dwarf_attr(die, DW_AT_MIPS_linkage_name, &attr_mem, &error) != DW_DLV_OK) { + break; + } + } + + char* linkage; + if (dwarf_formstring(attr_mem, &linkage, &error) == DW_DLV_OK) { + trace.object_function = demangler.demangle(linkage); + dwarf_dealloc(dwarf, linkage, DW_DLA_STRING); + } + dwarf_dealloc(dwarf, name, DW_DLA_ATTR); + } + break; + + case DW_TAG_inlined_subroutine: + ResolvedTrace::SourceLoc sloc; + + if (dwarf_diename(die, &name, &error) == DW_DLV_OK) { + sloc.function = std::string(name); + dwarf_dealloc(dwarf, name, DW_DLA_STRING); + } + else { + // We don't have a name for this inlined DIE, it could + // be that there is an abstract origin instead. + // Get the DW_AT_abstract_origin value, which is a + // reference to the source DIE and try to get its name + sloc.function = get_referenced_die_name(dwarf, die, DW_AT_abstract_origin, true); + } + + set_function_parameters(sloc.function, ns, fobj, die); + + std::string file = die_call_file(dwarf, die, cu_die); + if (!file.empty()) + sloc.filename = file; + + Dwarf_Unsigned number = 0; + if (dwarf_attr(die, DW_AT_call_line, &attr_mem, &error) == DW_DLV_OK) { + if (dwarf_formudata(attr_mem, &number, &error) == DW_DLV_OK) { + sloc.line = number; + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + + if (dwarf_attr(die, DW_AT_call_column, &attr_mem, &error) == DW_DLV_OK) { + if (dwarf_formudata(attr_mem, &number, &error) == DW_DLV_OK) { + sloc.col = number; + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + + trace.inliners.push_back(sloc); + break; + }; + } + ResolvedTrace& trace; + dwarf_fileobject& fobj; + Dwarf_Die cu_die; + inliners_search_cb(ResolvedTrace& t, dwarf_fileobject& f, Dwarf_Die c) : trace(t), fobj(f), cu_die(c) {} + }; + + static Dwarf_Die find_fundie_by_pc(dwarf_fileobject& fobj, Dwarf_Die parent_die, Dwarf_Addr pc, Dwarf_Die result) + { + Dwarf_Die current_die = 0; + Dwarf_Error error = DW_DLE_NE; + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + + if (dwarf_child(parent_die, ¤t_die, &error) != DW_DLV_OK) { + return NULL; + } + + for (;;) { + Dwarf_Die sibling_die = 0; + Dwarf_Half tag_value; + dwarf_tag(current_die, &tag_value, &error); + + switch (tag_value) { + case DW_TAG_subprogram: + case DW_TAG_inlined_subroutine: + if (die_has_pc(fobj, current_die, pc)) { + return current_die; + } + }; + bool declaration = false; + Dwarf_Attribute attr_mem; + if (dwarf_attr(current_die, DW_AT_declaration, &attr_mem, &error) == DW_DLV_OK) { + Dwarf_Bool flag = 0; + if (dwarf_formflag(attr_mem, &flag, &error) == DW_DLV_OK) { + declaration = flag != 0; + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + + if (!declaration) { + // let's be curious and look deeper in the tree, functions are + // not necessarily at the first level, but might be nested + // inside a namespace, structure, a function, an inlined + // function etc. + Dwarf_Die die_mem = 0; + Dwarf_Die indie = find_fundie_by_pc(fobj, current_die, pc, die_mem); + if (indie) { + result = die_mem; + return result; + } + } + + int res = dwarf_siblingof(dwarf, current_die, &sibling_die, &error); + if (res == DW_DLV_ERROR) { + return NULL; + } + else if (res == DW_DLV_NO_ENTRY) { + break; + } + + if (current_die != parent_die) { + dwarf_dealloc(dwarf, current_die, DW_DLA_DIE); + current_die = 0; + } + + current_die = sibling_die; + } + return NULL; + } + + template + static bool deep_first_search_by_pc( + dwarf_fileobject& fobj, + Dwarf_Die parent_die, + Dwarf_Addr pc, + std::vector& ns, + CB cb) + { + Dwarf_Die current_die = 0; + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + Dwarf_Error error = DW_DLE_NE; + + if (dwarf_child(parent_die, ¤t_die, &error) != DW_DLV_OK) { + return false; + } + + bool branch_has_pc = false; + bool has_namespace = false; + for (;;) { + Dwarf_Die sibling_die = 0; + + Dwarf_Half tag; + if (dwarf_tag(current_die, &tag, &error) == DW_DLV_OK) { + if (tag == DW_TAG_namespace || tag == DW_TAG_class_type) { + char* ns_name = NULL; + if (dwarf_diename(current_die, &ns_name, &error) == DW_DLV_OK) { + if (ns_name) { + ns.push_back(std::string(ns_name)); + } + else { + ns.push_back(""); + } + dwarf_dealloc(dwarf, ns_name, DW_DLA_STRING); + } + else { + ns.push_back(""); + } + has_namespace = true; + } + } + + bool declaration = false; + Dwarf_Attribute attr_mem; + if (tag != DW_TAG_class_type && + dwarf_attr(current_die, DW_AT_declaration, &attr_mem, &error) == DW_DLV_OK) { + Dwarf_Bool flag = 0; + if (dwarf_formflag(attr_mem, &flag, &error) == DW_DLV_OK) { + declaration = flag != 0; + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + } + + if (!declaration) { + // let's be curious and look deeper in the tree, function are + // not necessarily at the first level, but might be nested + // inside a namespace, structure, a function, an inlined + // function etc. + branch_has_pc = deep_first_search_by_pc(fobj, current_die, pc, ns, cb); + } + + if (!branch_has_pc) { + branch_has_pc = die_has_pc(fobj, current_die, pc); + } + + if (branch_has_pc) { + cb(current_die, ns); + } + + int result = dwarf_siblingof(dwarf, current_die, &sibling_die, &error); + if (result == DW_DLV_ERROR) { + return false; + } + else if (result == DW_DLV_NO_ENTRY) { + break; + } + + if (current_die != parent_die) { + dwarf_dealloc(dwarf, current_die, DW_DLA_DIE); + current_die = 0; + } + + if (has_namespace) { + has_namespace = false; + ns.pop_back(); + } + current_die = sibling_die; + } + + if (has_namespace) { + ns.pop_back(); + } + return branch_has_pc; + } + + static std::string die_call_file(Dwarf_Debug dwarf, Dwarf_Die die, Dwarf_Die cu_die) + { + Dwarf_Attribute attr_mem; + Dwarf_Error error = DW_DLE_NE; + Dwarf_Signed file_index; + + std::string file; + + if (dwarf_attr(die, DW_AT_call_file, &attr_mem, &error) == DW_DLV_OK) { + if (dwarf_formsdata(attr_mem, &file_index, &error) != DW_DLV_OK) { + file_index = 0; + } + dwarf_dealloc(dwarf, attr_mem, DW_DLA_ATTR); + + if (file_index == 0) { + return file; + } + + char** srcfiles = 0; + Dwarf_Signed file_count = 0; + if (dwarf_srcfiles(cu_die, &srcfiles, &file_count, &error) == DW_DLV_OK) { + if (file_index <= file_count) + file = std::string(srcfiles[file_index - 1]); + + // Deallocate all strings! + for (int i = 0; i < file_count; ++i) { + dwarf_dealloc(dwarf, srcfiles[i], DW_DLA_STRING); + } + dwarf_dealloc(dwarf, srcfiles, DW_DLA_LIST); + } + } + return file; + } + + Dwarf_Die find_die(dwarf_fileobject& fobj, Dwarf_Addr addr) + { + // Let's get to work! First see if we have a debug_aranges section so + // we can speed up the search + + Dwarf_Debug dwarf = fobj.dwarf_handle.get(); + Dwarf_Error error = DW_DLE_NE; + Dwarf_Arange* aranges; + Dwarf_Signed arange_count; + + Dwarf_Die returnDie; + bool found = false; + if (dwarf_get_aranges(dwarf, &aranges, &arange_count, &error) != DW_DLV_OK) { + aranges = NULL; + } + + if (aranges) { + // We have aranges. Get the one where our address is. + Dwarf_Arange arange; + if (dwarf_get_arange(aranges, arange_count, addr, &arange, &error) == DW_DLV_OK) { + + // We found our address. Get the compilation-unit DIE offset + // represented by the given address range. + Dwarf_Off cu_die_offset; + if (dwarf_get_cu_die_offset(arange, &cu_die_offset, &error) == DW_DLV_OK) { + // Get the DIE at the offset returned by the aranges search. + // We set is_info to 1 to specify that the offset is from + // the .debug_info section (and not .debug_types) + int dwarf_result = dwarf_offdie_b(dwarf, cu_die_offset, 1, &returnDie, &error); + + found = dwarf_result == DW_DLV_OK; + } + dwarf_dealloc(dwarf, arange, DW_DLA_ARANGE); + } + } + + if (found) + return returnDie; // The caller is responsible for freeing the die + + // The search for aranges failed. Try to find our address by scanning + // all compilation units. + Dwarf_Unsigned next_cu_header; + Dwarf_Half tag = 0; + returnDie = 0; + + while (!found && + dwarf_next_cu_header_d(dwarf, 1, 0, 0, 0, 0, 0, 0, 0, 0, &next_cu_header, 0, &error) == DW_DLV_OK) { + + if (returnDie) + dwarf_dealloc(dwarf, returnDie, DW_DLA_DIE); + + if (dwarf_siblingof(dwarf, 0, &returnDie, &error) == DW_DLV_OK) { + if ((dwarf_tag(returnDie, &tag, &error) == DW_DLV_OK) && tag == DW_TAG_compile_unit) { + if (die_has_pc(fobj, returnDie, addr)) { + found = true; + } + } + } + } + + if (found) { + while (dwarf_next_cu_header_d(dwarf, 1, 0, 0, 0, 0, 0, 0, 0, 0, &next_cu_header, 0, &error) == DW_DLV_OK) { + // Reset the cu header state. Libdwarf's next_cu_header API + // keeps its own iterator per Dwarf_Debug that can't be reset. + // We need to keep fetching elements until the end. + } + } + + if (found) + return returnDie; + + // We couldn't find any compilation units with ranges or a high/low pc. + // Try again by looking at all DIEs in all compilation units. + Dwarf_Die cudie; + while (dwarf_next_cu_header_d(dwarf, 1, 0, 0, 0, 0, 0, 0, 0, 0, &next_cu_header, 0, &error) == DW_DLV_OK) { + if (dwarf_siblingof(dwarf, 0, &cudie, &error) == DW_DLV_OK) { + Dwarf_Die die_mem = 0; + Dwarf_Die resultDie = find_fundie_by_pc(fobj, cudie, addr, die_mem); + + if (resultDie) { + found = true; + break; + } + } + } + + if (found) { + while (dwarf_next_cu_header_d(dwarf, 1, 0, 0, 0, 0, 0, 0, 0, 0, &next_cu_header, 0, &error) == DW_DLV_OK) { + // Reset the cu header state. Libdwarf's next_cu_header API + // keeps its own iterator per Dwarf_Debug that can't be reset. + // We need to keep fetching elements until the end. + } + } + + if (found) + return cudie; + + // We failed. + return NULL; + } +}; +# endif // BACKWARD_HAS_DWARF == 1 + +template <> +class TraceResolverImpl : public TraceResolverLinuxImpl { +}; + +#endif // BACKWARD_SYSTEM_LINUX + +#ifdef BACKWARD_SYSTEM_DARWIN + +template +class TraceResolverDarwinImpl; + +template <> +class TraceResolverDarwinImpl : public TraceResolverImplBase { +public: + template + void load_stacktrace(ST& st) + { + using namespace details; + if (st.size() == 0) { + return; + } + _symbols.reset(backtrace_symbols(st.begin(), st.size())); + } + + ResolvedTrace resolve(ResolvedTrace trace) + { + // parse: + // + + char* filename = _symbols[trace.idx]; + + // skip " " + while (*filename && *filename != ' ') + filename++; + while (*filename == ' ') + filename++; + + // find start of from end ( may contain a space) + char* p = filename + strlen(filename) - 1; + // skip to start of " + " + while (p > filename && *p != ' ') + p--; + while (p > filename && *p == ' ') + p--; + while (p > filename && *p != ' ') + p--; + while (p > filename && *p == ' ') + p--; + char* funcname_end = p + 1; + + // skip to start of "" + while (p > filename && *p != ' ') + p--; + char* funcname = p + 1; + + // skip to start of " " + while (p > filename && *p == ' ') + p--; + while (p > filename && *p != ' ') + p--; + while (p > filename && *p == ' ') + p--; + + // skip "", handling the case where it contains a + char* filename_end = p + 1; + if (p == filename) { + // something went wrong, give up + filename_end = filename + strlen(filename); + funcname = filename_end; + } + trace.object_filename.assign(filename, filename_end); // ok even if filename_end is the ending \0 + // (then we assign entire string) + + if (*funcname) { // if it's not end of string + *funcname_end = '\0'; + + trace.object_function = this->demangle(funcname); + trace.object_function += " "; + trace.object_function += (funcname_end + 1); + trace.source.function = trace.object_function; // we cannot do better. + } + return trace; + } + +private: + details::handle _symbols; +}; + +template <> +class TraceResolverImpl : public TraceResolverDarwinImpl { +}; + +#endif // BACKWARD_SYSTEM_DARWIN + +#ifdef BACKWARD_SYSTEM_WINDOWS + +// Load all symbol info +// Based on: +// https://stackoverflow.com/questions/6205981/windows-c-stack-trace-from-a-running-app/28276227#28276227 + +struct module_data { + std::string image_name; + std::string module_name; + void* base_address; + DWORD load_size; +}; + +class get_mod_info { + HANDLE process; + static const int buffer_length = 4096; + +public: + get_mod_info(HANDLE h) : process(h) {} + + module_data operator()(HMODULE module) + { + module_data ret; + char temp[buffer_length]; + MODULEINFO mi; + + GetModuleInformation(process, module, &mi, sizeof(mi)); + ret.base_address = mi.lpBaseOfDll; + ret.load_size = mi.SizeOfImage; + + GetModuleFileNameEx(process, module, temp, sizeof(temp)); + ret.image_name = temp; + GetModuleBaseName(process, module, temp, sizeof(temp)); + ret.module_name = temp; + std::vector img(ret.image_name.begin(), ret.image_name.end()); + std::vector mod(ret.module_name.begin(), ret.module_name.end()); + SymLoadModule64(process, 0, &img[0], &mod[0], (DWORD64)ret.base_address, ret.load_size); + return ret; + } +}; + +template <> +class TraceResolverImpl { +public: + TraceResolverImpl() + { + + HANDLE process = GetCurrentProcess(); + + std::vector modules; + DWORD cbNeeded; + std::vector module_handles(1); + SymInitialize(process, NULL, false); + DWORD symOptions = SymGetOptions(); + symOptions |= SYMOPT_LOAD_LINES | SYMOPT_UNDNAME; + SymSetOptions(symOptions); + EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded); + module_handles.resize(cbNeeded / sizeof(HMODULE)); + EnumProcessModules(process, &module_handles[0], module_handles.size() * sizeof(HMODULE), &cbNeeded); + std::transform( + module_handles.begin(), module_handles.end(), std::back_inserter(modules), get_mod_info(process)); + void* base = modules[0].base_address; + IMAGE_NT_HEADERS* h = ImageNtHeader(base); + image_type = h->FileHeader.Machine; + } + + template + void load_stacktrace(ST&) + { + } + + static const int max_sym_len = 255; + struct symbol_t { + SYMBOL_INFO sym; + char buffer[max_sym_len]; + } sym; + + DWORD64 displacement; + + ResolvedTrace resolve(ResolvedTrace t) + { + HANDLE process = GetCurrentProcess(); + + char name[256]; + + memset(&sym, 0, sizeof sym); + sym.sym.SizeOfStruct = sizeof(SYMBOL_INFO); + sym.sym.MaxNameLen = max_sym_len; + + if (!SymFromAddr(process, (ULONG64)t.addr, &displacement, &sym.sym)) { + // TODO: error handling everywhere + LPTSTR lpMsgBuf; + DWORD dw = GetLastError(); + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + dw, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&lpMsgBuf, + 0, + NULL); + + printf(lpMsgBuf); + + // abort(); + } + UnDecorateSymbolName(sym.sym.Name, (PSTR)name, 256, UNDNAME_COMPLETE); + + DWORD offset = 0; + IMAGEHLP_LINE line; + if (SymGetLineFromAddr(process, (ULONG64)t.addr, &offset, &line)) { + t.object_filename = line.FileName; + t.source.filename = line.FileName; + t.source.line = line.LineNumber; + t.source.col = offset; + } + + t.source.function = name; + t.object_filename = ""; + t.object_function = name; + + return t; + } + + DWORD machine_type() const { return image_type; } + +private: + DWORD image_type; +}; + +#endif + +class TraceResolver : public TraceResolverImpl { +}; + +/*************** CODE SNIPPET ***************/ + +class SourceFile { +public: + typedef std::vector> lines_t; + + SourceFile() {} + SourceFile(const std::string& path) + { + // 1. If BACKWARD_CXX_SOURCE_PREFIXES is set then assume it contains + // a colon-separated list of path prefixes. Try prepending each + // to the given path until a valid file is found. + const std::vector& prefixes = get_paths_from_env_variable(); + for (size_t i = 0; i < prefixes.size(); ++i) { + // Double slashes (//) should not be a problem. + std::string new_path = prefixes[i] + '/' + path; + _file.reset(new std::ifstream(new_path.c_str())); + if (is_open()) + break; + } + // 2. If no valid file found then fallback to opening the path as-is. + if (!_file || !is_open()) { + _file.reset(new std::ifstream(path.c_str())); + } + } + bool is_open() const { return _file->is_open(); } + + lines_t& get_lines(unsigned line_start, unsigned line_count, lines_t& lines) + { + using namespace std; + // This function make uses of the dumbest algo ever: + // 1) seek(0) + // 2) read lines one by one and discard until line_start + // 3) read line one by one until line_start + line_count + // + // If you are getting snippets many time from the same file, it is + // somewhat a waste of CPU, feel free to benchmark and propose a + // better solution ;) + + _file->clear(); + _file->seekg(0); + string line; + unsigned line_idx; + + for (line_idx = 1; line_idx < line_start; ++line_idx) { + std::getline(*_file, line); + if (!*_file) { + return lines; + } + } + + // think of it like a lambda in C++98 ;) + // but look, I will reuse it two times! + // What a good boy am I. + struct isspace { + bool operator()(char c) { return std::isspace(c); } + }; + + bool started = false; + for (; line_idx < line_start + line_count; ++line_idx) { + getline(*_file, line); + if (!*_file) { + return lines; + } + if (!started) { + if (std::find_if(line.begin(), line.end(), not_isspace()) == line.end()) + continue; + started = true; + } + lines.push_back(make_pair(line_idx, line)); + } + + lines.erase(std::find_if(lines.rbegin(), lines.rend(), not_isempty()).base(), lines.end()); + return lines; + } + + lines_t get_lines(unsigned line_start, unsigned line_count) + { + lines_t lines; + return get_lines(line_start, line_count, lines); + } + + // there is no find_if_not in C++98, lets do something crappy to + // workaround. + struct not_isspace { + bool operator()(char c) { return !std::isspace(c); } + }; + // and define this one here because C++98 is not happy with local defined + // struct passed to template functions, fuuuu. + struct not_isempty { + bool operator()(const lines_t::value_type& p) + { + return !(std::find_if(p.second.begin(), p.second.end(), not_isspace()) == p.second.end()); + } + }; + + void swap(SourceFile& b) { _file.swap(b._file); } + +#ifdef BACKWARD_ATLEAST_CXX11 + SourceFile(SourceFile&& from) : _file(nullptr) { swap(from); } + SourceFile& operator=(SourceFile&& from) + { + swap(from); + return *this; + } +#else + explicit SourceFile(const SourceFile& from) + { + // some sort of poor man's move semantic. + swap(const_cast(from)); + } + SourceFile& operator=(const SourceFile& from) + { + // some sort of poor man's move semantic. + swap(const_cast(from)); + return *this; + } +#endif + +private: + details::handle> _file; + + std::vector get_paths_from_env_variable_impl() + { + std::vector paths; + const char* prefixes_str = std::getenv("BACKWARD_CXX_SOURCE_PREFIXES"); + if (prefixes_str && prefixes_str[0]) { + paths = details::split_source_prefixes(prefixes_str); + } + return paths; + } + + const std::vector& get_paths_from_env_variable() + { + static std::vector paths = get_paths_from_env_variable_impl(); + return paths; + } + +#ifdef BACKWARD_ATLEAST_CXX11 + SourceFile(const SourceFile&) = delete; + SourceFile& operator=(const SourceFile&) = delete; +#endif +}; + +class SnippetFactory { +public: + typedef SourceFile::lines_t lines_t; + + lines_t get_snippet(const std::string& filename, unsigned line_start, unsigned context_size) + { + + SourceFile& src_file = get_src_file(filename); + unsigned start = line_start - context_size / 2; + return src_file.get_lines(start, context_size); + } + + lines_t get_combined_snippet( + const std::string& filename_a, + unsigned line_a, + const std::string& filename_b, + unsigned line_b, + unsigned context_size) + { + SourceFile& src_file_a = get_src_file(filename_a); + SourceFile& src_file_b = get_src_file(filename_b); + + lines_t lines = src_file_a.get_lines(line_a - context_size / 4, context_size / 2); + src_file_b.get_lines(line_b - context_size / 4, context_size / 2, lines); + return lines; + } + + lines_t get_coalesced_snippet(const std::string& filename, unsigned line_a, unsigned line_b, unsigned context_size) + { + SourceFile& src_file = get_src_file(filename); + + using std::max; + using std::min; + unsigned a = min(line_a, line_b); + unsigned b = max(line_a, line_b); + + if ((b - a) < (context_size / 3)) { + return src_file.get_lines((a + b - context_size + 1) / 2, context_size); + } + + lines_t lines = src_file.get_lines(a - context_size / 4, context_size / 2); + src_file.get_lines(b - context_size / 4, context_size / 2, lines); + return lines; + } + +private: + typedef details::hashtable::type src_files_t; + src_files_t _src_files; + + SourceFile& get_src_file(const std::string& filename) + { + src_files_t::iterator it = _src_files.find(filename); + if (it != _src_files.end()) { + return it->second; + } + SourceFile& new_src_file = _src_files[filename]; + new_src_file = SourceFile(filename); + return new_src_file; + } +}; + +/*************** PRINTER ***************/ + +namespace ColorMode { +enum type { automatic, never, always }; +} + +class cfile_streambuf : public std::streambuf { +public: + cfile_streambuf(FILE* _sink) : sink(_sink) {} + int_type underflow() override { return traits_type::eof(); } + int_type overflow(int_type ch) override + { + if (traits_type::not_eof(ch) && fwrite(&ch, sizeof ch, 1, sink) == 1) { + return ch; + } + return traits_type::eof(); + } + + std::streamsize xsputn(const char_type* s, std::streamsize count) override + { + return static_cast(fwrite(s, sizeof *s, static_cast(count), sink)); + } + +#ifdef BACKWARD_ATLEAST_CXX11 +public: + cfile_streambuf(const cfile_streambuf&) = delete; + cfile_streambuf& operator=(const cfile_streambuf&) = delete; +#else +private: + cfile_streambuf(const cfile_streambuf&); + cfile_streambuf& operator=(const cfile_streambuf&); +#endif + +private: + FILE* sink; + std::vector buffer; +}; + +#ifdef BACKWARD_SYSTEM_LINUX + +namespace Color { +enum type { yellow = 33, purple = 35, reset = 39 }; +} // namespace Color + +class Colorize { +public: + Colorize(std::ostream& os) : _os(os), _reset(false), _enabled(false) {} + + void activate(ColorMode::type mode) { _enabled = mode == ColorMode::always; } + + void activate(ColorMode::type mode, FILE* fp) { activate(mode, fileno(fp)); } + + void set_color(Color::type ccode) + { + if (!_enabled) + return; + + // I assume that the terminal can handle basic colors. Seriously I + // don't want to deal with all the termcap shit. + _os << "\033[" << static_cast(ccode) << "m"; + _reset = (ccode != Color::reset); + } + + ~Colorize() + { + if (_reset) { + set_color(Color::reset); + } + } + +private: + void activate(ColorMode::type mode, int fd) + { + activate(mode == ColorMode::automatic && isatty(fd) ? ColorMode::always : mode); + } + + std::ostream& _os; + bool _reset; + bool _enabled; +}; + +#else // ndef BACKWARD_SYSTEM_LINUX + +namespace Color { +enum type { yellow = 0, purple = 0, reset = 0 }; +} // namespace Color + +class Colorize { +public: + Colorize(std::ostream&) {} + void activate(ColorMode::type) {} + void activate(ColorMode::type, FILE*) {} + void set_color(Color::type) {} +}; + +#endif // BACKWARD_SYSTEM_LINUX + +class Printer { +public: + bool snippet; + ColorMode::type color_mode; + bool address; + bool object; + int inliner_context_size; + int trace_context_size; + + Printer() + : snippet(true), color_mode(ColorMode::automatic), address(false), object(false), inliner_context_size(5), + trace_context_size(7) + { + } + + template + FILE* print(ST& st, FILE* fp = stderr) + { + cfile_streambuf obuf(fp); + std::ostream os(&obuf); + Colorize colorize(os); + colorize.activate(color_mode, fp); + print_stacktrace(st, os, colorize); + return fp; + } + + template + std::ostream& print(ST& st, std::ostream& os) + { + Colorize colorize(os); + colorize.activate(color_mode); + print_stacktrace(st, os, colorize); + return os; + } + + template + FILE* print(IT begin, IT end, FILE* fp = stderr, size_t thread_id = 0) + { + cfile_streambuf obuf(fp); + std::ostream os(&obuf); + Colorize colorize(os); + colorize.activate(color_mode, fp); + print_stacktrace(begin, end, os, thread_id, colorize); + return fp; + } + + template + std::ostream& print(IT begin, IT end, std::ostream& os, size_t thread_id = 0) + { + Colorize colorize(os); + colorize.activate(color_mode); + print_stacktrace(begin, end, os, thread_id, colorize); + return os; + } + + TraceResolver const& resolver() const { return _resolver; } + +private: + TraceResolver _resolver; + SnippetFactory _snippets; + + template + void print_stacktrace(ST& st, std::ostream& os, Colorize& colorize) + { + print_header(os, st.thread_id()); + _resolver.load_stacktrace(st); + for (size_t trace_idx = st.size(); trace_idx > 0; --trace_idx) { + print_trace(os, _resolver.resolve(st[trace_idx - 1]), colorize); + } + } + + template + void print_stacktrace(IT begin, IT end, std::ostream& os, size_t thread_id, Colorize& colorize) + { + print_header(os, thread_id); + for (; begin != end; ++begin) { + print_trace(os, *begin, colorize); + } + } + + void print_header(std::ostream& os, size_t thread_id) + { + os << "Stack trace (most recent call last)"; + if (thread_id) { + os << " in thread " << thread_id; + } + os << ":\n"; + } + + void print_trace(std::ostream& os, const ResolvedTrace& trace, Colorize& colorize) + { + os << "#" << std::left << std::setw(2) << trace.idx << std::right; + bool already_indented = true; + + if (!trace.source.filename.size() || object) { + os << " Object \"" << trace.object_filename << "\", at " << trace.addr << ", in " << trace.object_function + << "\n"; + already_indented = false; + } + + for (size_t inliner_idx = trace.inliners.size(); inliner_idx > 0; --inliner_idx) { + if (!already_indented) { + os << " "; + } + const ResolvedTrace::SourceLoc& inliner_loc = trace.inliners[inliner_idx - 1]; + print_source_loc(os, " | ", inliner_loc); + if (snippet) { + print_snippet(os, " | ", inliner_loc, colorize, Color::purple, inliner_context_size); + } + already_indented = false; + } + + if (trace.source.filename.size()) { + if (!already_indented) { + os << " "; + } + print_source_loc(os, " ", trace.source, trace.addr); + if (snippet) { + print_snippet(os, " ", trace.source, colorize, Color::yellow, trace_context_size); + } + } + } + + void print_snippet( + std::ostream& os, + const char* indent, + const ResolvedTrace::SourceLoc& source_loc, + Colorize& colorize, + Color::type color_code, + int context_size) + { + using namespace std; + typedef SnippetFactory::lines_t lines_t; + + lines_t lines = + _snippets.get_snippet(source_loc.filename, source_loc.line, static_cast(context_size)); + + for (lines_t::const_iterator it = lines.begin(); it != lines.end(); ++it) { + if (it->first == source_loc.line) { + colorize.set_color(color_code); + os << indent << ">"; + } + else { + os << indent << " "; + } + os << std::setw(4) << it->first << ": " << it->second << "\n"; + if (it->first == source_loc.line) { + colorize.set_color(Color::reset); + } + } + } + + void print_source_loc( + std::ostream& os, + const char* indent, + const ResolvedTrace::SourceLoc& source_loc, + void* addr = nullptr) + { + os << indent << "Source \"" << source_loc.filename << "\", line " << source_loc.line << ", in " + << source_loc.function; + + if (address && addr != nullptr) { + os << " [" << addr << "]"; + } + os << "\n"; + } +}; + +/*************** SIGNALS HANDLING ***************/ + +#if defined(BACKWARD_SYSTEM_LINUX) || defined(BACKWARD_SYSTEM_DARWIN) + +class SignalHandling { +public: + static std::vector make_default_signals() + { + const int posix_signals[] = { + // Signals for which the default action is "Core". + SIGABRT, // Abort signal from abort(3) + SIGBUS, // Bus error (bad memory access) + SIGFPE, // Floating point exception + SIGILL, // Illegal Instruction + SIGIOT, // IOT trap. A synonym for SIGABRT + SIGQUIT, // Quit from keyboard + SIGSEGV, // Invalid memory reference + SIGSYS, // Bad argument to routine (SVr4) + SIGTRAP, // Trace/breakpoint trap + SIGXCPU, // CPU time limit exceeded (4.2BSD) + SIGXFSZ, // File size limit exceeded (4.2BSD) +# if defined(BACKWARD_SYSTEM_DARWIN) + SIGEMT, // emulation instruction executed +# endif + }; + return std::vector(posix_signals, posix_signals + sizeof posix_signals / sizeof posix_signals[0]); + } + + SignalHandling(const std::vector& posix_signals = make_default_signals()) : _loaded(false) + { + bool success = true; + + const size_t stack_size = 1024 * 1024 * 8; + _stack_content.reset(static_cast(malloc(stack_size))); + if (_stack_content) { + stack_t ss; + ss.ss_sp = _stack_content.get(); + ss.ss_size = stack_size; + ss.ss_flags = 0; + if (sigaltstack(&ss, nullptr) < 0) { + success = false; + } + } + else { + success = false; + } + + for (size_t i = 0; i < posix_signals.size(); ++i) { + struct sigaction action; + memset(&action, 0, sizeof action); + action.sa_flags = static_cast(SA_SIGINFO | SA_ONSTACK | SA_NODEFER | SA_RESETHAND); + sigfillset(&action.sa_mask); + sigdelset(&action.sa_mask, posix_signals[i]); +# if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdisabled-macro-expansion" +# endif + action.sa_sigaction = &sig_handler; +# if defined(__clang__) +# pragma clang diagnostic pop +# endif + + int r = sigaction(posix_signals[i], &action, nullptr); + if (r < 0) + success = false; + } + + _loaded = success; + } + + bool loaded() const { return _loaded; } + + static void handleSignal(int, siginfo_t* info, void* _ctx) + { + ucontext_t* uctx = static_cast(_ctx); + + StackTrace st; + void* error_addr = nullptr; +# ifdef REG_RIP // x86_64 + error_addr = reinterpret_cast(uctx->uc_mcontext.gregs[REG_RIP]); +# elif defined(REG_EIP) // x86_32 + error_addr = reinterpret_cast(uctx->uc_mcontext.gregs[REG_EIP]); +# elif defined(__arm__) + error_addr = reinterpret_cast(uctx->uc_mcontext.arm_pc); +# elif defined(__aarch64__) + error_addr = reinterpret_cast(uctx->uc_mcontext.pc); +# elif defined(__mips__) + error_addr = reinterpret_cast(reinterpret_cast(&uctx->uc_mcontext)->sc_pc); +# elif defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) + error_addr = reinterpret_cast(uctx->uc_mcontext.regs->nip); +# elif defined(__s390x__) + error_addr = reinterpret_cast(uctx->uc_mcontext.psw.addr); +# elif defined(__APPLE__) && defined(__x86_64__) + error_addr = reinterpret_cast(uctx->uc_mcontext->__ss.__rip); +# elif defined(__APPLE__) + error_addr = reinterpret_cast(uctx->uc_mcontext->__ss.__eip); +# else +# warning ":/ sorry, ain't know no nothing none not of your architecture!" +# endif + if (error_addr) { + st.load_from(error_addr, 32); + } + else { + st.load_here(32); + } + + Printer printer; + printer.address = true; + printer.print(st, stderr); + +# if _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L + psiginfo(info, nullptr); +# else + (void)info; +# endif + } + +private: + details::handle _stack_content; + bool _loaded; + +# ifdef __GNUC__ + __attribute__((noreturn)) +# endif + static void + sig_handler(int signo, siginfo_t* info, void* _ctx) + { + handleSignal(signo, info, _ctx); + + // try to forward the signal. + raise(info->si_signo); + + // terminate the process immediately. + puts("watf? exit"); + _exit(EXIT_FAILURE); + } +}; + +#endif // BACKWARD_SYSTEM_LINUX || BACKWARD_SYSTEM_DARWIN + +#ifdef BACKWARD_SYSTEM_WINDOWS + +class SignalHandling { +public: + SignalHandling(const std::vector& = std::vector()) + : reporter_thread_([]() { + /* We handle crashes in a utility thread: + backward structures and some Windows functions called here + need stack space, which we do not have when we encounter a + stack overflow. + To support reporting stack traces during a stack overflow, + we create a utility thread at startup, which waits until a + crash happens or the program exits normally. */ + + { + std::unique_lock lk(mtx()); + cv().wait(lk, [] { return crashed() != crash_status::running; }); + } + if (crashed() == crash_status::crashed) { + handle_stacktrace(skip_recs()); + } + { + std::unique_lock lk(mtx()); + crashed() = crash_status::ending; + } + cv().notify_one(); + }) + { + SetUnhandledExceptionFilter(crash_handler); + + signal(SIGABRT, signal_handler); + _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); + + set_terminate(&terminator); + set_unexpected(&terminator); + _set_purecall_handler(&terminator); + _set_invalid_parameter_handler(&invalid_parameter_handler); + } + bool loaded() const { return true; } + + ~SignalHandling() + { + { + std::unique_lock lk(mtx()); + crashed() = crash_status::normal_exit; + } + + cv().notify_one(); + + reporter_thread_.join(); + } + +private: + static CONTEXT* ctx() + { + static CONTEXT data; + return &data; + } + + enum class crash_status { running, crashed, normal_exit, ending }; + + static crash_status& crashed() + { + static crash_status data; + return data; + } + + static std::mutex& mtx() + { + static std::mutex data; + return data; + } + + static std::condition_variable& cv() + { + static std::condition_variable data; + return data; + } + + static HANDLE& thread_handle() + { + static HANDLE handle; + return handle; + } + + std::thread reporter_thread_; + + // TODO: how not to hardcode these? + static const constexpr int signal_skip_recs = +# ifdef __clang__ + // With clang, RtlCaptureContext also captures the stack frame of the + // current function Below that, there ar 3 internal Windows functions + 4 +# else + // With MSVC cl, RtlCaptureContext misses the stack frame of the current + // function The first entries during StackWalk are the 3 internal Windows + // functions + 3 +# endif + ; + + static int& skip_recs() + { + static int data; + return data; + } + + static inline void terminator() + { + crash_handler(signal_skip_recs); + abort(); + } + + static inline void signal_handler(int) + { + crash_handler(signal_skip_recs); + abort(); + } + + static inline void __cdecl invalid_parameter_handler( + const wchar_t*, + const wchar_t*, + const wchar_t*, + unsigned int, + uintptr_t) + { + crash_handler(signal_skip_recs); + abort(); + } + + NOINLINE static LONG WINAPI crash_handler(EXCEPTION_POINTERS* info) + { + // The exception info supplies a trace from exactly where the issue was, + // no need to skip records + crash_handler(0, info->ContextRecord); + return EXCEPTION_CONTINUE_SEARCH; + } + + NOINLINE static void crash_handler(int skip, CONTEXT* ct = nullptr) + { + + if (ct == nullptr) { + RtlCaptureContext(ctx()); + } + else { + memcpy(ctx(), ct, sizeof(CONTEXT)); + } + DuplicateHandle( + GetCurrentProcess(), + GetCurrentThread(), + GetCurrentProcess(), + &thread_handle(), + 0, + FALSE, + DUPLICATE_SAME_ACCESS); + + skip_recs() = skip; + + { + std::unique_lock lk(mtx()); + crashed() = crash_status::crashed; + } + + cv().notify_one(); + + { + std::unique_lock lk(mtx()); + cv().wait(lk, [] { return crashed() != crash_status::crashed; }); + } + } + + static void handle_stacktrace(int skip_frames = 0) + { + // printer creates the TraceResolver, which can supply us a machine type + // for stack walking. Without this, StackTrace can only guess using some + // macros. + // StackTrace also requires that the PDBs are already loaded, which is done + // in the constructor of TraceResolver + Printer printer; + + StackTrace st; + st.set_machine_type(printer.resolver().machine_type()); + st.set_context(ctx()); + st.set_thread_handle(thread_handle()); + st.load_here(32 + skip_frames); + st.skip_n_firsts(skip_frames); + + printer.address = true; + printer.print(st, std::cerr); + } +}; + +#endif // BACKWARD_SYSTEM_WINDOWS + +#ifdef BACKWARD_SYSTEM_UNKNOWN + +class SignalHandling { +public: + SignalHandling(const std::vector& = std::vector()) {} + bool init() { return false; } + bool loaded() { return false; } +}; + +#endif // BACKWARD_SYSTEM_UNKNOWN + +} // namespace backward + +#endif /* H_GUARD */ +// clang-format on diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/logging.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/logging.cpp new file mode 100644 index 00000000..e68aafa2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/logging.cpp @@ -0,0 +1,70 @@ +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +#include "aws/logging/logging.h" +#include +#include +#include + +#define LAMBDA_RUNTIME_API __attribute__((visibility("default"))) + +namespace aws { +namespace logging { + +static inline char const* get_prefix(verbosity v) +{ + switch (v) { + case verbosity::error: + return "[ERROR]"; + case verbosity::info: + return "[INFO]"; + case verbosity::debug: + return "[DEBUG]"; + default: + return "[UNKNOWN]"; + } +} + +LAMBDA_RUNTIME_API +void log(verbosity v, char const* tag, char const* msg, va_list args) +{ + va_list copy; + va_copy(copy, args); + const int sz = vsnprintf(nullptr, 0, msg, args) + 1; + if (sz < 0) { + puts("error occurred during log formatting!\n"); + va_end(copy); + return; + } + constexpr int max_stack_buffer_size = 512; + std::array buf; + char* out = buf.data(); + if (sz >= max_stack_buffer_size) { + out = new char[sz]; + } + + vsnprintf(out, sz, msg, copy); + va_end(copy); + auto ms = std::chrono::duration_cast( + std::chrono::high_resolution_clock::now().time_since_epoch()); + printf("%s [%lld] %s %s\n", get_prefix(v), static_cast(ms.count()), tag, out); + // stdout is not line-buffered when redirected (for example to a file or to another process) so we must flush it + // manually. + fflush(stdout); + if (out != buf.data()) { + delete[] out; + } +} +} // namespace logging +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/runtime.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/runtime.cpp new file mode 100644 index 00000000..91750840 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/runtime.cpp @@ -0,0 +1,521 @@ +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include "aws/lambda-runtime/runtime.h" +#include "aws/lambda-runtime/version.h" +#include "aws/lambda-runtime/outcome.h" +#include "aws/logging/logging.h" +#include "aws/http/response.h" + +#include +#include +#include // for ULONG_MAX +#include +#include +#include +#include // for strtoul +#include + +#define AWS_LAMBDA_RUNTIME_API __attribute__((visibility("default"))) + +namespace aws { +namespace lambda_runtime { + +static constexpr auto LOG_TAG = "LAMBDA_RUNTIME"; +static constexpr auto REQUEST_ID_HEADER = "lambda-runtime-aws-request-id"; +static constexpr auto TRACE_ID_HEADER = "lambda-runtime-trace-id"; +static constexpr auto CLIENT_CONTEXT_HEADER = "lambda-runtime-client-context"; +static constexpr auto COGNITO_IDENTITY_HEADER = "lambda-runtime-cognito-identity"; +static constexpr auto DEADLINE_MS_HEADER = "lambda-runtime-deadline-ms"; +static constexpr auto FUNCTION_ARN_HEADER = "lambda-runtime-invoked-function-arn"; + +enum Endpoints { + INIT, + NEXT, + RESULT, +}; + +static bool is_success(aws::http::response_code httpcode) +{ + constexpr auto http_first_success_error_code = 200; + constexpr auto http_last_success_error_code = 299; + auto const code = static_cast(httpcode); + return code >= http_first_success_error_code && code <= http_last_success_error_code; +} + +static size_t write_data(char* ptr, size_t size, size_t nmemb, void* userdata) +{ + if (!ptr) { + return 0; + } + + auto const resp = static_cast(userdata); + assert(size == 1); + (void)size; // avoid warning in release builds + assert(resp); + resp->append_body(ptr, nmemb); + return nmemb; +} + +// std::isspace has a few edge cases that would trigger UB. In particular, the documentation says: +// "The behavior is undefined if the value of the input is not representable as unsigned char and is not equal to EOF." +// So, this function does the simple obvious thing instead. +static inline bool is_whitespace(int ch) +{ + constexpr int space = 0x20; // space (0x20, ' ') + constexpr int form_feed = 0x0c; // form feed (0x0c, '\f') + constexpr int line_feed = 0x0a; // line feed (0x0a, '\n') + constexpr int carriage_return = 0x0d; // carriage return (0x0d, '\r') + constexpr int horizontal_tab = 0x09; // horizontal tab (0x09, '\t') + constexpr int vertical_tab = 0x0b; // vertical tab (0x0b, '\v') + switch (ch) { + case space: + case form_feed: + case line_feed: + case carriage_return: + case horizontal_tab: + case vertical_tab: + return true; + default: + return false; + } +} + +static inline std::string trim(std::string s) +{ + // trim right + s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !is_whitespace(ch); }).base(), s.end()); + // trim left + s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !is_whitespace(ch); })); + return s; +} + +static size_t write_header(char* ptr, size_t size, size_t nmemb, void* userdata) +{ + if (!ptr) { + return 0; + } + + logging::log_debug(LOG_TAG, "received header: %s", std::string(ptr, nmemb).c_str()); + + auto const resp = static_cast(userdata); + assert(resp); + for (size_t i = 0; i < nmemb; i++) { + if (ptr[i] != ':') { + continue; + } + std::string key{ptr, i}; + std::string value{ptr + i + 1, nmemb - i - 1}; + resp->add_header(trim(key), trim(value)); + break; + } + return size * nmemb; +} + +static size_t read_data(char* buffer, size_t size, size_t nitems, void* userdata) +{ + auto const limit = size * nitems; + auto ctx = static_cast*>(userdata); + assert(ctx); + auto const unread = ctx->first.length() - ctx->second; + if (0 == unread) { + return 0; + } + + if (unread <= limit) { + std::copy_n(ctx->first.begin() + ctx->second, unread, buffer); + ctx->second += unread; + return unread; + } + + std::copy_n(ctx->first.begin() + ctx->second, limit, buffer); + ctx->second += limit; + return limit; +} + +#ifndef NDEBUG +static int rt_curl_debug_callback(CURL* handle, curl_infotype type, char* data, size_t size, void* userdata) +{ + (void)handle; + (void)type; + (void)userdata; + std::string s(data, size); + logging::log_debug(LOG_TAG, "CURL DBG: %s", s.c_str()); + return 0; +} +#endif + +runtime::runtime(std::string const& endpoint) : runtime(endpoint, "AWS_Lambda_Cpp/" + std::string(get_version())) {} + +runtime::runtime(std::string const& endpoint, std::string const& user_agent) + : m_user_agent_header("User-Agent: " + user_agent), m_endpoints{{endpoint + "/2018-06-01/runtime/init/error", + endpoint + "/2018-06-01/runtime/invocation/next", + endpoint + "/2018-06-01/runtime/invocation/"}}, + m_curl_handle(curl_easy_init()) +{ + if (!m_curl_handle) { + logging::log_error(LOG_TAG, "Failed to acquire curl easy handle for next."); + } +} + +runtime::~runtime() +{ + curl_easy_cleanup(m_curl_handle); +} + +void runtime::set_curl_next_options() +{ + // lambda freezes the container when no further tasks are available. The freezing period could be longer than the + // request timeout, which causes the following get_next request to fail with a timeout error. + curl_easy_reset(m_curl_handle); + curl_easy_setopt(m_curl_handle, CURLOPT_TIMEOUT, 0L); + curl_easy_setopt(m_curl_handle, CURLOPT_CONNECTTIMEOUT, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_TCP_NODELAY, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + + curl_easy_setopt(m_curl_handle, CURLOPT_HTTPGET, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_URL, m_endpoints[Endpoints::NEXT].c_str()); + + curl_easy_setopt(m_curl_handle, CURLOPT_WRITEFUNCTION, write_data); + curl_easy_setopt(m_curl_handle, CURLOPT_HEADERFUNCTION, write_header); + + curl_easy_setopt(m_curl_handle, CURLOPT_PROXY, ""); + +#ifndef NDEBUG + curl_easy_setopt(m_curl_handle, CURLOPT_VERBOSE, 1); + curl_easy_setopt(m_curl_handle, CURLOPT_DEBUGFUNCTION, rt_curl_debug_callback); +#endif +} + +void runtime::set_curl_post_result_options() +{ + curl_easy_reset(m_curl_handle); + curl_easy_setopt(m_curl_handle, CURLOPT_TIMEOUT, 0L); + curl_easy_setopt(m_curl_handle, CURLOPT_CONNECTTIMEOUT, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_TCP_NODELAY, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + + curl_easy_setopt(m_curl_handle, CURLOPT_POST, 1L); + curl_easy_setopt(m_curl_handle, CURLOPT_READFUNCTION, read_data); + curl_easy_setopt(m_curl_handle, CURLOPT_WRITEFUNCTION, write_data); + curl_easy_setopt(m_curl_handle, CURLOPT_HEADERFUNCTION, write_header); + + curl_easy_setopt(m_curl_handle, CURLOPT_PROXY, ""); + +#ifndef NDEBUG + curl_easy_setopt(m_curl_handle, CURLOPT_VERBOSE, 1); + curl_easy_setopt(m_curl_handle, CURLOPT_DEBUGFUNCTION, rt_curl_debug_callback); +#endif +} + +runtime::next_outcome runtime::get_next() +{ + http::response resp; + set_curl_next_options(); + curl_easy_setopt(m_curl_handle, CURLOPT_WRITEDATA, &resp); + curl_easy_setopt(m_curl_handle, CURLOPT_HEADERDATA, &resp); + + curl_slist* headers = nullptr; + headers = curl_slist_append(headers, m_user_agent_header.c_str()); + curl_easy_setopt(m_curl_handle, CURLOPT_HTTPHEADER, headers); + + logging::log_debug(LOG_TAG, "Making request to %s", m_endpoints[Endpoints::NEXT].c_str()); + CURLcode curl_code = curl_easy_perform(m_curl_handle); + logging::log_debug(LOG_TAG, "Completed request to %s", m_endpoints[Endpoints::NEXT].c_str()); + curl_slist_free_all(headers); + + if (curl_code != CURLE_OK) { + logging::log_debug(LOG_TAG, "CURL returned error code %d - %s", curl_code, curl_easy_strerror(curl_code)); + logging::log_error(LOG_TAG, "Failed to get next invocation. No Response from endpoint"); + return aws::http::response_code::REQUEST_NOT_MADE; + } + + { + long resp_code; + curl_easy_getinfo(m_curl_handle, CURLINFO_RESPONSE_CODE, &resp_code); + resp.set_response_code(static_cast(resp_code)); + } + + { + char* content_type = nullptr; + curl_easy_getinfo(m_curl_handle, CURLINFO_CONTENT_TYPE, &content_type); + resp.set_content_type(content_type); + } + + if (!is_success(resp.get_response_code())) { + logging::log_error( + LOG_TAG, + "Failed to get next invocation. Http Response code: %d", + static_cast(resp.get_response_code())); + return resp.get_response_code(); + } + + if (!resp.has_header(REQUEST_ID_HEADER)) { + logging::log_error(LOG_TAG, "Failed to find header %s in response", REQUEST_ID_HEADER); + return aws::http::response_code::REQUEST_NOT_MADE; + } + invocation_request req; + req.payload = resp.get_body(); + req.request_id = resp.get_header(REQUEST_ID_HEADER); + + if (resp.has_header(TRACE_ID_HEADER)) { + req.xray_trace_id = resp.get_header(TRACE_ID_HEADER); + } + + if (resp.has_header(CLIENT_CONTEXT_HEADER)) { + req.client_context = resp.get_header(CLIENT_CONTEXT_HEADER); + } + + if (resp.has_header(COGNITO_IDENTITY_HEADER)) { + req.cognito_identity = resp.get_header(COGNITO_IDENTITY_HEADER); + } + + if (resp.has_header(FUNCTION_ARN_HEADER)) { + req.function_arn = resp.get_header(FUNCTION_ARN_HEADER); + } + + if (resp.has_header(DEADLINE_MS_HEADER)) { + auto const& deadline_string = resp.get_header(DEADLINE_MS_HEADER); + constexpr int base = 10; + unsigned long ms = strtoul(deadline_string.c_str(), nullptr, base); + assert(ms > 0); + assert(ms < ULONG_MAX); + req.deadline += std::chrono::milliseconds(ms); + logging::log_info( + LOG_TAG, + "Received payload: %s\nTime remaining: %" PRId64, + req.payload.c_str(), + static_cast(req.get_time_remaining().count())); + } + return next_outcome(req); +} + +runtime::post_outcome runtime::post_success(std::string const& request_id, invocation_response const& handler_response) +{ + std::string const url = m_endpoints[Endpoints::RESULT] + request_id + "/response"; + return do_post(url, request_id, handler_response); +} + +runtime::post_outcome runtime::post_failure(std::string const& request_id, invocation_response const& handler_response) +{ + std::string const url = m_endpoints[Endpoints::RESULT] + request_id + "/error"; + return do_post(url, request_id, handler_response); +} + +runtime::post_outcome runtime::do_post( + std::string const& url, + std::string const& request_id, + invocation_response const& handler_response) +{ + set_curl_post_result_options(); + curl_easy_setopt(m_curl_handle, CURLOPT_URL, url.c_str()); + logging::log_info(LOG_TAG, "Making request to %s", url.c_str()); + + curl_slist* headers = nullptr; + if (handler_response.get_content_type().empty()) { + headers = curl_slist_append(headers, "content-type: text/html"); + } + else { + headers = curl_slist_append(headers, ("content-type: " + handler_response.get_content_type()).c_str()); + } + + headers = curl_slist_append(headers, "Expect:"); + headers = curl_slist_append(headers, "transfer-encoding:"); + headers = curl_slist_append(headers, m_user_agent_header.c_str()); + auto const& payload = handler_response.get_payload(); + logging::log_debug( + LOG_TAG, "calculating content length... %s", ("content-length: " + std::to_string(payload.length())).c_str()); + headers = curl_slist_append(headers, ("content-length: " + std::to_string(payload.length())).c_str()); + + std::pair ctx{payload, 0}; + aws::http::response resp; + curl_easy_setopt(m_curl_handle, CURLOPT_WRITEDATA, &resp); + curl_easy_setopt(m_curl_handle, CURLOPT_HEADERDATA, &resp); + curl_easy_setopt(m_curl_handle, CURLOPT_READDATA, &ctx); + curl_easy_setopt(m_curl_handle, CURLOPT_HTTPHEADER, headers); + CURLcode curl_code = curl_easy_perform(m_curl_handle); + curl_slist_free_all(headers); + + if (curl_code != CURLE_OK) { + logging::log_debug( + LOG_TAG, + "CURL returned error code %d - %s, for invocation %s", + curl_code, + curl_easy_strerror(curl_code), + request_id.c_str()); + return aws::http::response_code::REQUEST_NOT_MADE; + } + + long http_response_code; + curl_easy_getinfo(m_curl_handle, CURLINFO_RESPONSE_CODE, &http_response_code); + + if (!is_success(aws::http::response_code(http_response_code))) { + logging::log_error( + LOG_TAG, "Failed to post handler success response. Http response code: %ld.", http_response_code); + return aws::http::response_code(http_response_code); + } + + return post_outcome(no_result{}); +} + +static bool handle_post_outcome(runtime::post_outcome const& o, std::string const& request_id) +{ + if (o.is_success()) { + return true; + } + + if (o.get_failure() == aws::http::response_code::REQUEST_NOT_MADE) { + logging::log_error(LOG_TAG, "Failed to send HTTP request for invocation %s.", request_id.c_str()); + return false; + } + + logging::log_info( + LOG_TAG, + "HTTP Request for invocation %s was not successful. HTTP response code: %d.", + request_id.c_str(), + static_cast(o.get_failure())); + return false; +} + +AWS_LAMBDA_RUNTIME_API +void run_handler(std::function const& handler) +{ + logging::log_info(LOG_TAG, "Initializing the C++ Lambda Runtime version %s", aws::lambda_runtime::get_version()); + std::string endpoint("http://"); + if (auto ep = std::getenv("AWS_LAMBDA_RUNTIME_API")) { + assert(ep); + logging::log_debug(LOG_TAG, "LAMBDA_SERVER_ADDRESS defined in environment as: %s", ep); + endpoint += ep; + } + + runtime rt(endpoint); + + size_t retries = 0; + size_t const max_retries = 3; + + while (retries < max_retries) { + auto next_outcome = rt.get_next(); + if (!next_outcome.is_success()) { + if (next_outcome.get_failure() == aws::http::response_code::REQUEST_NOT_MADE) { + ++retries; + continue; + } + + logging::log_info( + LOG_TAG, + "HTTP request was not successful. HTTP response code: %d. Retrying..", + static_cast(next_outcome.get_failure())); + ++retries; + continue; + } + + retries = 0; + + auto const req = std::move(next_outcome).get_result(); + logging::log_info(LOG_TAG, "Invoking user handler"); + invocation_response res = handler(req); + logging::log_info(LOG_TAG, "Invoking user handler completed."); + + if (res.is_success()) { + const auto post_outcome = rt.post_success(req.request_id, res); + if (!handle_post_outcome(post_outcome, req.request_id)) { + return; // TODO: implement a better retry strategy + } + } + else { + const auto post_outcome = rt.post_failure(req.request_id, res); + if (!handle_post_outcome(post_outcome, req.request_id)) { + return; // TODO: implement a better retry strategy + } + } + } + + if (retries == max_retries) { + logging::log_error( + LOG_TAG, "Exhausted all retries. This is probably a bug in libcurl v" LIBCURL_VERSION " Exiting!"); + } +} + +static std::string json_escape(std::string const& in) +{ + constexpr char last_non_printable_character = 31; + std::string out; + out.reserve(in.length()); // most strings will end up identical + for (char ch : in) { + if (ch > last_non_printable_character && ch != '\"' && ch != '\\') { + out.append(1, ch); + } + else { + out.append(1, '\\'); + switch (ch) { + case '\\': + out.append(1, '\\'); + break; + case '"': + out.append(1, '"'); + break; + case '\b': + out.append(1, 'b'); + break; + case '\f': + out.append(1, 'f'); + break; + case '\n': + out.append(1, 'n'); + break; + case '\r': + out.append(1, 'r'); + break; + case '\t': + out.append(1, 't'); + break; + default: + // escape and print as unicode codepoint + constexpr int printed_unicode_length = 6; // 4 hex + letter 'u' + \0 + std::array buf; + sprintf(buf.data(), "u%04x", ch); + out.append(buf.data(), buf.size() - 1); // add only five, discarding the null terminator. + break; + } + } + } + return out; +} + +AWS_LAMBDA_RUNTIME_API +invocation_response invocation_response::success(std::string const& payload, std::string const& content_type) +{ + invocation_response r; + r.m_success = true; + r.m_content_type = content_type; + r.m_payload = payload; + return r; +} + +AWS_LAMBDA_RUNTIME_API +invocation_response invocation_response::failure(std::string const& error_message, std::string const& error_type) +{ + invocation_response r; + r.m_success = false; + r.m_content_type = "application/json"; + r.m_payload = R"({"errorMessage":")" + json_escape(error_message) + R"(","errorType":")" + json_escape(error_type) + + R"(", "stackTrace":[]})"; + return r; +} + +} // namespace lambda_runtime +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/version.cpp.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/version.cpp.in new file mode 100644 index 00000000..e13b1e18 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/src/version.cpp.in @@ -0,0 +1,48 @@ +/* + * Copyright 2018-present Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#define AWS_LAMBDA_RUNTIME_API __attribute__((visibility("default"))) + +namespace aws { +namespace lambda_runtime { + +/* clang-format off */ +AWS_LAMBDA_RUNTIME_API +unsigned get_version_major() +{ + return @PROJECT_VERSION_MAJOR@; // NOLINT +} + +AWS_LAMBDA_RUNTIME_API +unsigned get_version_minor() +{ + return @PROJECT_VERSION_MINOR@; // NOLINT +} + +AWS_LAMBDA_RUNTIME_API +unsigned get_version_patch() +{ + return @PROJECT_VERSION_PATCH@; // NOLINT +} +/* clang-format on */ + +AWS_LAMBDA_RUNTIME_API +char const* get_version() +{ + return "@PROJECT_VERSION@"; +} + +} // namespace lambda_runtime +} // namespace aws diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/CMakeLists.txt new file mode 100644 index 00000000..ddec1a80 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/CMakeLists.txt @@ -0,0 +1,16 @@ +project(aws-lambda-runtime-tests LANGUAGES CXX) +find_package(AWSSDK COMPONENTS lambda iam) + +add_executable(${PROJECT_NAME} + main.cpp + runtime_tests.cpp + version_tests.cpp + gtest/gtest-all.cc) + +target_link_libraries(${PROJECT_NAME} PRIVATE ${AWSSDK_LINK_LIBRARIES} aws-lambda-runtime) + +include(GoogleTest) +gtest_discover_tests(${PROJECT_NAME} EXTRA_ARGS "--aws_prefix=${TEST_RESOURCE_PREFIX}") # requires CMake 3.10 or later + +add_subdirectory(resources) + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/.clang-tidy b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/.clang-tidy new file mode 100644 index 00000000..34fafc4c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/.clang-tidy @@ -0,0 +1,3 @@ +--- +Checks: '-*,llvm-twine-local' +... diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest-all.cc b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest-all.cc new file mode 100644 index 00000000..99d2fc62 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest-all.cc @@ -0,0 +1,11763 @@ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// Google C++ Testing and Mocking Framework (Google Test) +// +// Sometimes it's desirable to build Google Test by compiling a single file. +// This file serves this purpose. + +// This line ensures that gtest.h can be compiled on its own, even +// when it's fused. +#include "gtest.h" + +// The following lines pull in the real gtest *.cc files. +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// The Google C++ Testing and Mocking Framework (Google Test) + +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// Utilities for testing Google Test itself and code that uses Google Test +// (e.g. frameworks built on top of Google Test). + +// GOOGLETEST_CM0004 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_SPI_H_ +#define GTEST_INCLUDE_GTEST_GTEST_SPI_H_ + + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +namespace testing { + +// This helper class can be used to mock out Google Test failure reporting +// so that we can test Google Test or code that builds on Google Test. +// +// An object of this class appends a TestPartResult object to the +// TestPartResultArray object given in the constructor whenever a Google Test +// failure is reported. It can either intercept only failures that are +// generated in the same thread that created this object or it can intercept +// all generated failures. The scope of this mock object can be controlled with +// the second argument to the two arguments constructor. +class GTEST_API_ ScopedFakeTestPartResultReporter + : public TestPartResultReporterInterface { + public: + // The two possible mocking modes of this object. + enum InterceptMode { + INTERCEPT_ONLY_CURRENT_THREAD, // Intercepts only thread local failures. + INTERCEPT_ALL_THREADS // Intercepts all failures. + }; + + // The c'tor sets this object as the test part result reporter used + // by Google Test. The 'result' parameter specifies where to report the + // results. This reporter will only catch failures generated in the current + // thread. DEPRECATED + explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result); + + // Same as above, but you can choose the interception scope of this object. + ScopedFakeTestPartResultReporter(InterceptMode intercept_mode, + TestPartResultArray* result); + + // The d'tor restores the previous test part result reporter. + ~ScopedFakeTestPartResultReporter() override; + + // Appends the TestPartResult object to the TestPartResultArray + // received in the constructor. + // + // This method is from the TestPartResultReporterInterface + // interface. + void ReportTestPartResult(const TestPartResult& result) override; + + private: + void Init(); + + const InterceptMode intercept_mode_; + TestPartResultReporterInterface* old_reporter_; + TestPartResultArray* const result_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter); +}; + +namespace internal { + +// A helper class for implementing EXPECT_FATAL_FAILURE() and +// EXPECT_NONFATAL_FAILURE(). Its destructor verifies that the given +// TestPartResultArray contains exactly one failure that has the given +// type and contains the given substring. If that's not the case, a +// non-fatal failure will be generated. +class GTEST_API_ SingleFailureChecker { + public: + // The constructor remembers the arguments. + SingleFailureChecker(const TestPartResultArray* results, + TestPartResult::Type type, const std::string& substr); + ~SingleFailureChecker(); + private: + const TestPartResultArray* const results_; + const TestPartResult::Type type_; + const std::string substr_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker); +}; + +} // namespace internal + +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +// A set of macros for testing Google Test assertions or code that's expected +// to generate Google Test fatal failures. It verifies that the given +// statement will cause exactly one fatal Google Test failure with 'substr' +// being part of the failure message. +// +// There are two different versions of this macro. EXPECT_FATAL_FAILURE only +// affects and considers failures generated in the current thread and +// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. +// +// The verification of the assertion is done correctly even when the statement +// throws an exception or aborts the current function. +// +// Known restrictions: +// - 'statement' cannot reference local non-static variables or +// non-static members of the current object. +// - 'statement' cannot return a value. +// - You cannot stream a failure message to this macro. +// +// Note that even though the implementations of the following two +// macros are much alike, we cannot refactor them to use a common +// helper macro, due to some peculiarity in how the preprocessor +// works. The AcceptsMacroThatExpandsToUnprotectedComma test in +// gtest_unittest.cc will fail to compile if we do that. +#define EXPECT_FATAL_FAILURE(statement, substr) \ + do { \ + class GTestExpectFatalFailureHelper {\ + public:\ + static void Execute() { statement; }\ + };\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kFatalFailure, (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter:: \ + INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ + GTestExpectFatalFailureHelper::Execute();\ + }\ + } while (::testing::internal::AlwaysFalse()) + +#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ + do { \ + class GTestExpectFatalFailureHelper {\ + public:\ + static void Execute() { statement; }\ + };\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kFatalFailure, (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter:: \ + INTERCEPT_ALL_THREADS, >est_failures);\ + GTestExpectFatalFailureHelper::Execute();\ + }\ + } while (::testing::internal::AlwaysFalse()) + +// A macro for testing Google Test assertions or code that's expected to +// generate Google Test non-fatal failures. It asserts that the given +// statement will cause exactly one non-fatal Google Test failure with 'substr' +// being part of the failure message. +// +// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only +// affects and considers failures generated in the current thread and +// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads. +// +// 'statement' is allowed to reference local variables and members of +// the current object. +// +// The verification of the assertion is done correctly even when the statement +// throws an exception or aborts the current function. +// +// Known restrictions: +// - You cannot stream a failure message to this macro. +// +// Note that even though the implementations of the following two +// macros are much alike, we cannot refactor them to use a common +// helper macro, due to some peculiarity in how the preprocessor +// works. If we do that, the code won't compile when the user gives +// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that +// expands to code containing an unprotected comma. The +// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc +// catches that. +// +// For the same reason, we have to write +// if (::testing::internal::AlwaysTrue()) { statement; } +// instead of +// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) +// to avoid an MSVC warning on unreachable code. +#define EXPECT_NONFATAL_FAILURE(statement, substr) \ + do {\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kNonFatalFailure, \ + (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter:: \ + INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);\ + if (::testing::internal::AlwaysTrue()) { statement; }\ + }\ + } while (::testing::internal::AlwaysFalse()) + +#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \ + do {\ + ::testing::TestPartResultArray gtest_failures;\ + ::testing::internal::SingleFailureChecker gtest_checker(\ + >est_failures, ::testing::TestPartResult::kNonFatalFailure, \ + (substr));\ + {\ + ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\ + ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, \ + >est_failures);\ + if (::testing::internal::AlwaysTrue()) { statement; }\ + }\ + } while (::testing::internal::AlwaysFalse()) + +#endif // GTEST_INCLUDE_GTEST_GTEST_SPI_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include // NOLINT +#include +#include + +#if GTEST_OS_LINUX + +# define GTEST_HAS_GETTIMEOFDAY_ 1 + +# include // NOLINT +# include // NOLINT +# include // NOLINT +// Declares vsnprintf(). This header is not available on Windows. +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include + +#elif GTEST_OS_ZOS +# define GTEST_HAS_GETTIMEOFDAY_ 1 +# include // NOLINT + +// On z/OS we additionally need strings.h for strcasecmp. +# include // NOLINT + +#elif GTEST_OS_WINDOWS_MOBILE // We are on Windows CE. + +# include // NOLINT +# undef min + +#elif GTEST_OS_WINDOWS // We are on Windows proper. + +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include // NOLINT + +# if GTEST_OS_WINDOWS_MINGW +// MinGW has gettimeofday() but not _ftime64(). +# define GTEST_HAS_GETTIMEOFDAY_ 1 +# include // NOLINT +# endif // GTEST_OS_WINDOWS_MINGW + +// cpplint thinks that the header is already included, so we want to +// silence it. +# include // NOLINT +# undef min + +#else + +// Assume other platforms have gettimeofday(). +# define GTEST_HAS_GETTIMEOFDAY_ 1 + +// cpplint thinks that the header is already included, so we want to +// silence it. +# include // NOLINT +# include // NOLINT + +#endif // GTEST_OS_LINUX + +#if GTEST_HAS_EXCEPTIONS +# include +#endif + +#if GTEST_CAN_STREAM_RESULTS_ +# include // NOLINT +# include // NOLINT +# include // NOLINT +# include // NOLINT +#endif + +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Utility functions and classes used by the Google C++ testing framework.// +// This file contains purely Google Test's internal implementation. Please +// DO NOT #INCLUDE IT IN A USER PROGRAM. + +#ifndef GTEST_SRC_GTEST_INTERNAL_INL_H_ +#define GTEST_SRC_GTEST_INTERNAL_INL_H_ + +#ifndef _WIN32_WCE +# include +#endif // !_WIN32_WCE +#include +#include // For strtoll/_strtoul64/malloc/free. +#include // For memmove. + +#include +#include +#include +#include + + +#if GTEST_CAN_STREAM_RESULTS_ +# include // NOLINT +# include // NOLINT +#endif + +#if GTEST_OS_WINDOWS +# include // NOLINT +#endif // GTEST_OS_WINDOWS + + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +namespace testing { + +// Declares the flags. +// +// We don't want the users to modify this flag in the code, but want +// Google Test's own unit tests to be able to access it. Therefore we +// declare it here as opposed to in gtest.h. +GTEST_DECLARE_bool_(death_test_use_fork); + +namespace internal { + +// The value of GetTestTypeId() as seen from within the Google Test +// library. This is solely for testing GetTestTypeId(). +GTEST_API_ extern const TypeId kTestTypeIdInGoogleTest; + +// Names of the flags (needed for parsing Google Test flags). +const char kAlsoRunDisabledTestsFlag[] = "also_run_disabled_tests"; +const char kBreakOnFailureFlag[] = "break_on_failure"; +const char kCatchExceptionsFlag[] = "catch_exceptions"; +const char kColorFlag[] = "color"; +const char kFilterFlag[] = "filter"; +const char kListTestsFlag[] = "list_tests"; +const char kOutputFlag[] = "output"; +const char kPrintTimeFlag[] = "print_time"; +const char kPrintUTF8Flag[] = "print_utf8"; +const char kRandomSeedFlag[] = "random_seed"; +const char kRepeatFlag[] = "repeat"; +const char kShuffleFlag[] = "shuffle"; +const char kStackTraceDepthFlag[] = "stack_trace_depth"; +const char kStreamResultToFlag[] = "stream_result_to"; +const char kThrowOnFailureFlag[] = "throw_on_failure"; +const char kFlagfileFlag[] = "flagfile"; + +// A valid random seed must be in [1, kMaxRandomSeed]. +const int kMaxRandomSeed = 99999; + +// g_help_flag is true iff the --help flag or an equivalent form is +// specified on the command line. +GTEST_API_ extern bool g_help_flag; + +// Returns the current time in milliseconds. +GTEST_API_ TimeInMillis GetTimeInMillis(); + +// Returns true iff Google Test should use colors in the output. +GTEST_API_ bool ShouldUseColor(bool stdout_is_tty); + +// Formats the given time in milliseconds as seconds. +GTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms); + +// Converts the given time in milliseconds to a date string in the ISO 8601 +// format, without the timezone information. N.B.: due to the use the +// non-reentrant localtime() function, this function is not thread safe. Do +// not use it in any code that can be called from multiple threads. +GTEST_API_ std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms); + +// Parses a string for an Int32 flag, in the form of "--flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +GTEST_API_ bool ParseInt32Flag( + const char* str, const char* flag, Int32* value); + +// Returns a random seed in range [1, kMaxRandomSeed] based on the +// given --gtest_random_seed flag value. +inline int GetRandomSeedFromFlag(Int32 random_seed_flag) { + const unsigned int raw_seed = (random_seed_flag == 0) ? + static_cast(GetTimeInMillis()) : + static_cast(random_seed_flag); + + // Normalizes the actual seed to range [1, kMaxRandomSeed] such that + // it's easy to type. + const int normalized_seed = + static_cast((raw_seed - 1U) % + static_cast(kMaxRandomSeed)) + 1; + return normalized_seed; +} + +// Returns the first valid random seed after 'seed'. The behavior is +// undefined if 'seed' is invalid. The seed after kMaxRandomSeed is +// considered to be 1. +inline int GetNextRandomSeed(int seed) { + GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed) + << "Invalid random seed " << seed << " - must be in [1, " + << kMaxRandomSeed << "]."; + const int next_seed = seed + 1; + return (next_seed > kMaxRandomSeed) ? 1 : next_seed; +} + +// This class saves the values of all Google Test flags in its c'tor, and +// restores them in its d'tor. +class GTestFlagSaver { + public: + // The c'tor. + GTestFlagSaver() { + also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests); + break_on_failure_ = GTEST_FLAG(break_on_failure); + catch_exceptions_ = GTEST_FLAG(catch_exceptions); + color_ = GTEST_FLAG(color); + death_test_style_ = GTEST_FLAG(death_test_style); + death_test_use_fork_ = GTEST_FLAG(death_test_use_fork); + filter_ = GTEST_FLAG(filter); + internal_run_death_test_ = GTEST_FLAG(internal_run_death_test); + list_tests_ = GTEST_FLAG(list_tests); + output_ = GTEST_FLAG(output); + print_time_ = GTEST_FLAG(print_time); + print_utf8_ = GTEST_FLAG(print_utf8); + random_seed_ = GTEST_FLAG(random_seed); + repeat_ = GTEST_FLAG(repeat); + shuffle_ = GTEST_FLAG(shuffle); + stack_trace_depth_ = GTEST_FLAG(stack_trace_depth); + stream_result_to_ = GTEST_FLAG(stream_result_to); + throw_on_failure_ = GTEST_FLAG(throw_on_failure); + } + + // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS. + ~GTestFlagSaver() { + GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_; + GTEST_FLAG(break_on_failure) = break_on_failure_; + GTEST_FLAG(catch_exceptions) = catch_exceptions_; + GTEST_FLAG(color) = color_; + GTEST_FLAG(death_test_style) = death_test_style_; + GTEST_FLAG(death_test_use_fork) = death_test_use_fork_; + GTEST_FLAG(filter) = filter_; + GTEST_FLAG(internal_run_death_test) = internal_run_death_test_; + GTEST_FLAG(list_tests) = list_tests_; + GTEST_FLAG(output) = output_; + GTEST_FLAG(print_time) = print_time_; + GTEST_FLAG(print_utf8) = print_utf8_; + GTEST_FLAG(random_seed) = random_seed_; + GTEST_FLAG(repeat) = repeat_; + GTEST_FLAG(shuffle) = shuffle_; + GTEST_FLAG(stack_trace_depth) = stack_trace_depth_; + GTEST_FLAG(stream_result_to) = stream_result_to_; + GTEST_FLAG(throw_on_failure) = throw_on_failure_; + } + + private: + // Fields for saving the original values of flags. + bool also_run_disabled_tests_; + bool break_on_failure_; + bool catch_exceptions_; + std::string color_; + std::string death_test_style_; + bool death_test_use_fork_; + std::string filter_; + std::string internal_run_death_test_; + bool list_tests_; + std::string output_; + bool print_time_; + bool print_utf8_; + internal::Int32 random_seed_; + internal::Int32 repeat_; + bool shuffle_; + internal::Int32 stack_trace_depth_; + std::string stream_result_to_; + bool throw_on_failure_; +} GTEST_ATTRIBUTE_UNUSED_; + +// Converts a Unicode code point to a narrow string in UTF-8 encoding. +// code_point parameter is of type UInt32 because wchar_t may not be +// wide enough to contain a code point. +// If the code_point is not a valid Unicode code point +// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted +// to "(Invalid Unicode 0xXXXXXXXX)". +GTEST_API_ std::string CodePointToUtf8(UInt32 code_point); + +// Converts a wide string to a narrow string in UTF-8 encoding. +// The wide string is assumed to have the following encoding: +// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin) +// UTF-32 if sizeof(wchar_t) == 4 (on Linux) +// Parameter str points to a null-terminated wide string. +// Parameter num_chars may additionally limit the number +// of wchar_t characters processed. -1 is used when the entire string +// should be processed. +// If the string contains code points that are not valid Unicode code points +// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output +// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding +// and contains invalid UTF-16 surrogate pairs, values in those pairs +// will be encoded as individual Unicode characters from Basic Normal Plane. +GTEST_API_ std::string WideStringToUtf8(const wchar_t* str, int num_chars); + +// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file +// if the variable is present. If a file already exists at this location, this +// function will write over it. If the variable is present, but the file cannot +// be created, prints an error and exits. +void WriteToShardStatusFileIfNeeded(); + +// Checks whether sharding is enabled by examining the relevant +// environment variable values. If the variables are present, +// but inconsistent (e.g., shard_index >= total_shards), prints +// an error and exits. If in_subprocess_for_death_test, sharding is +// disabled because it must only be applied to the original test +// process. Otherwise, we could filter out death tests we intended to execute. +GTEST_API_ bool ShouldShard(const char* total_shards_str, + const char* shard_index_str, + bool in_subprocess_for_death_test); + +// Parses the environment variable var as an Int32. If it is unset, +// returns default_val. If it is not an Int32, prints an error and +// and aborts. +GTEST_API_ Int32 Int32FromEnvOrDie(const char* env_var, Int32 default_val); + +// Given the total number of shards, the shard index, and the test id, +// returns true iff the test should be run on this shard. The test id is +// some arbitrary but unique non-negative integer assigned to each test +// method. Assumes that 0 <= shard_index < total_shards. +GTEST_API_ bool ShouldRunTestOnShard( + int total_shards, int shard_index, int test_id); + +// STL container utilities. + +// Returns the number of elements in the given container that satisfy +// the given predicate. +template +inline int CountIf(const Container& c, Predicate predicate) { + // Implemented as an explicit loop since std::count_if() in libCstd on + // Solaris has a non-standard signature. + int count = 0; + for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) { + if (predicate(*it)) + ++count; + } + return count; +} + +// Applies a function/functor to each element in the container. +template +void ForEach(const Container& c, Functor functor) { + std::for_each(c.begin(), c.end(), functor); +} + +// Returns the i-th element of the vector, or default_value if i is not +// in range [0, v.size()). +template +inline E GetElementOr(const std::vector& v, int i, E default_value) { + return (i < 0 || i >= static_cast(v.size())) ? default_value + : v[static_cast(i)]; +} + +// Performs an in-place shuffle of a range of the vector's elements. +// 'begin' and 'end' are element indices as an STL-style range; +// i.e. [begin, end) are shuffled, where 'end' == size() means to +// shuffle to the end of the vector. +template +void ShuffleRange(internal::Random* random, int begin, int end, + std::vector* v) { + const int size = static_cast(v->size()); + GTEST_CHECK_(0 <= begin && begin <= size) + << "Invalid shuffle range start " << begin << ": must be in range [0, " + << size << "]."; + GTEST_CHECK_(begin <= end && end <= size) + << "Invalid shuffle range finish " << end << ": must be in range [" + << begin << ", " << size << "]."; + + // Fisher-Yates shuffle, from + // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle + for (int range_width = end - begin; range_width >= 2; range_width--) { + const int last_in_range = begin + range_width - 1; + const int selected = + begin + + static_cast(random->Generate(static_cast(range_width))); + std::swap((*v)[static_cast(selected)], + (*v)[static_cast(last_in_range)]); + } +} + +// Performs an in-place shuffle of the vector's elements. +template +inline void Shuffle(internal::Random* random, std::vector* v) { + ShuffleRange(random, 0, static_cast(v->size()), v); +} + +// A function for deleting an object. Handy for being used as a +// functor. +template +static void Delete(T* x) { + delete x; +} + +// A predicate that checks the key of a TestProperty against a known key. +// +// TestPropertyKeyIs is copyable. +class TestPropertyKeyIs { + public: + // Constructor. + // + // TestPropertyKeyIs has NO default constructor. + explicit TestPropertyKeyIs(const std::string& key) : key_(key) {} + + // Returns true iff the test name of test property matches on key_. + bool operator()(const TestProperty& test_property) const { + return test_property.key() == key_; + } + + private: + std::string key_; +}; + +// Class UnitTestOptions. +// +// This class contains functions for processing options the user +// specifies when running the tests. It has only static members. +// +// In most cases, the user can specify an option using either an +// environment variable or a command line flag. E.g. you can set the +// test filter using either GTEST_FILTER or --gtest_filter. If both +// the variable and the flag are present, the latter overrides the +// former. +class GTEST_API_ UnitTestOptions { + public: + // Functions for processing the gtest_output flag. + + // Returns the output format, or "" for normal printed output. + static std::string GetOutputFormat(); + + // Returns the absolute path of the requested output file, or the + // default (test_detail.xml in the original working directory) if + // none was explicitly specified. + static std::string GetAbsolutePathToOutputFile(); + + // Functions for processing the gtest_filter flag. + + // Returns true iff the wildcard pattern matches the string. The + // first ':' or '\0' character in pattern marks the end of it. + // + // This recursive algorithm isn't very efficient, but is clear and + // works well enough for matching test names, which are short. + static bool PatternMatchesString(const char *pattern, const char *str); + + // Returns true iff the user-specified filter matches the test suite + // name and the test name. + static bool FilterMatchesTest(const std::string& test_suite_name, + const std::string& test_name); + +#if GTEST_OS_WINDOWS + // Function for supporting the gtest_catch_exception flag. + + // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the + // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. + // This function is useful as an __except condition. + static int GTestShouldProcessSEH(DWORD exception_code); +#endif // GTEST_OS_WINDOWS + + // Returns true if "name" matches the ':' separated list of glob-style + // filters in "filter". + static bool MatchesFilter(const std::string& name, const char* filter); +}; + +// Returns the current application's name, removing directory path if that +// is present. Used by UnitTestOptions::GetOutputFile. +GTEST_API_ FilePath GetCurrentExecutableName(); + +// The role interface for getting the OS stack trace as a string. +class OsStackTraceGetterInterface { + public: + OsStackTraceGetterInterface() {} + virtual ~OsStackTraceGetterInterface() {} + + // Returns the current OS stack trace as an std::string. Parameters: + // + // max_depth - the maximum number of stack frames to be included + // in the trace. + // skip_count - the number of top frames to be skipped; doesn't count + // against max_depth. + virtual std::string CurrentStackTrace(int max_depth, int skip_count) = 0; + + // UponLeavingGTest() should be called immediately before Google Test calls + // user code. It saves some information about the current stack that + // CurrentStackTrace() will use to find and hide Google Test stack frames. + virtual void UponLeavingGTest() = 0; + + // This string is inserted in place of stack frames that are part of + // Google Test's implementation. + static const char* const kElidedFramesMarker; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface); +}; + +// A working implementation of the OsStackTraceGetterInterface interface. +class OsStackTraceGetter : public OsStackTraceGetterInterface { + public: + OsStackTraceGetter() {} + + std::string CurrentStackTrace(int max_depth, int skip_count) override; + void UponLeavingGTest() override; + + private: +#if GTEST_HAS_ABSL + Mutex mutex_; // Protects all internal state. + + // We save the stack frame below the frame that calls user code. + // We do this because the address of the frame immediately below + // the user code changes between the call to UponLeavingGTest() + // and any calls to the stack trace code from within the user code. + void* caller_frame_ = nullptr; +#endif // GTEST_HAS_ABSL + + GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter); +}; + +// Information about a Google Test trace point. +struct TraceInfo { + const char* file; + int line; + std::string message; +}; + +// This is the default global test part result reporter used in UnitTestImpl. +// This class should only be used by UnitTestImpl. +class DefaultGlobalTestPartResultReporter + : public TestPartResultReporterInterface { + public: + explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test); + // Implements the TestPartResultReporterInterface. Reports the test part + // result in the current test. + void ReportTestPartResult(const TestPartResult& result) override; + + private: + UnitTestImpl* const unit_test_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter); +}; + +// This is the default per thread test part result reporter used in +// UnitTestImpl. This class should only be used by UnitTestImpl. +class DefaultPerThreadTestPartResultReporter + : public TestPartResultReporterInterface { + public: + explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test); + // Implements the TestPartResultReporterInterface. The implementation just + // delegates to the current global test part result reporter of *unit_test_. + void ReportTestPartResult(const TestPartResult& result) override; + + private: + UnitTestImpl* const unit_test_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter); +}; + +// The private implementation of the UnitTest class. We don't protect +// the methods under a mutex, as this class is not accessible by a +// user and the UnitTest class that delegates work to this class does +// proper locking. +class GTEST_API_ UnitTestImpl { + public: + explicit UnitTestImpl(UnitTest* parent); + virtual ~UnitTestImpl(); + + // There are two different ways to register your own TestPartResultReporter. + // You can register your own repoter to listen either only for test results + // from the current thread or for results from all threads. + // By default, each per-thread test result repoter just passes a new + // TestPartResult to the global test result reporter, which registers the + // test part result for the currently running test. + + // Returns the global test part result reporter. + TestPartResultReporterInterface* GetGlobalTestPartResultReporter(); + + // Sets the global test part result reporter. + void SetGlobalTestPartResultReporter( + TestPartResultReporterInterface* reporter); + + // Returns the test part result reporter for the current thread. + TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread(); + + // Sets the test part result reporter for the current thread. + void SetTestPartResultReporterForCurrentThread( + TestPartResultReporterInterface* reporter); + + // Gets the number of successful test suites. + int successful_test_suite_count() const; + + // Gets the number of failed test suites. + int failed_test_suite_count() const; + + // Gets the number of all test suites. + int total_test_suite_count() const; + + // Gets the number of all test suites that contain at least one test + // that should run. + int test_suite_to_run_count() const; + + // Gets the number of successful tests. + int successful_test_count() const; + + // Gets the number of skipped tests. + int skipped_test_count() const; + + // Gets the number of failed tests. + int failed_test_count() const; + + // Gets the number of disabled tests that will be reported in the XML report. + int reportable_disabled_test_count() const; + + // Gets the number of disabled tests. + int disabled_test_count() const; + + // Gets the number of tests to be printed in the XML report. + int reportable_test_count() const; + + // Gets the number of all tests. + int total_test_count() const; + + // Gets the number of tests that should run. + int test_to_run_count() const; + + // Gets the time of the test program start, in ms from the start of the + // UNIX epoch. + TimeInMillis start_timestamp() const { return start_timestamp_; } + + // Gets the elapsed time, in milliseconds. + TimeInMillis elapsed_time() const { return elapsed_time_; } + + // Returns true iff the unit test passed (i.e. all test suites passed). + bool Passed() const { return !Failed(); } + + // Returns true iff the unit test failed (i.e. some test suite failed + // or something outside of all tests failed). + bool Failed() const { + return failed_test_suite_count() > 0 || ad_hoc_test_result()->Failed(); + } + + // Gets the i-th test suite among all the test suites. i can range from 0 to + // total_test_suite_count() - 1. If i is not in that range, returns NULL. + const TestSuite* GetTestSuite(int i) const { + const int index = GetElementOr(test_suite_indices_, i, -1); + return index < 0 ? nullptr : test_suites_[static_cast(i)]; + } + + // Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + const TestCase* GetTestCase(int i) const { return GetTestSuite(i); } +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Gets the i-th test suite among all the test suites. i can range from 0 to + // total_test_suite_count() - 1. If i is not in that range, returns NULL. + TestSuite* GetMutableSuiteCase(int i) { + const int index = GetElementOr(test_suite_indices_, i, -1); + return index < 0 ? nullptr : test_suites_[static_cast(index)]; + } + + // Provides access to the event listener list. + TestEventListeners* listeners() { return &listeners_; } + + // Returns the TestResult for the test that's currently running, or + // the TestResult for the ad hoc test if no test is running. + TestResult* current_test_result(); + + // Returns the TestResult for the ad hoc test. + const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; } + + // Sets the OS stack trace getter. + // + // Does nothing if the input and the current OS stack trace getter + // are the same; otherwise, deletes the old getter and makes the + // input the current getter. + void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter); + + // Returns the current OS stack trace getter if it is not NULL; + // otherwise, creates an OsStackTraceGetter, makes it the current + // getter, and returns it. + OsStackTraceGetterInterface* os_stack_trace_getter(); + + // Returns the current OS stack trace as an std::string. + // + // The maximum number of stack frames to be included is specified by + // the gtest_stack_trace_depth flag. The skip_count parameter + // specifies the number of top frames to be skipped, which doesn't + // count against the number of frames to be included. + // + // For example, if Foo() calls Bar(), which in turn calls + // CurrentOsStackTraceExceptTop(1), Foo() will be included in the + // trace but Bar() and CurrentOsStackTraceExceptTop() won't. + std::string CurrentOsStackTraceExceptTop(int skip_count) GTEST_NO_INLINE_; + + // Finds and returns a TestSuite with the given name. If one doesn't + // exist, creates one and returns it. + // + // Arguments: + // + // test_suite_name: name of the test suite + // type_param: the name of the test's type parameter, or NULL if + // this is not a typed or a type-parameterized test. + // set_up_tc: pointer to the function that sets up the test suite + // tear_down_tc: pointer to the function that tears down the test suite + TestSuite* GetTestSuite(const char* test_suite_name, const char* type_param, + internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc); + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + TestCase* GetTestCase(const char* test_case_name, const char* type_param, + internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc) { + return GetTestSuite(test_case_name, type_param, set_up_tc, tear_down_tc); + } +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Adds a TestInfo to the unit test. + // + // Arguments: + // + // set_up_tc: pointer to the function that sets up the test suite + // tear_down_tc: pointer to the function that tears down the test suite + // test_info: the TestInfo object + void AddTestInfo(internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc, + TestInfo* test_info) { + // In order to support thread-safe death tests, we need to + // remember the original working directory when the test program + // was first invoked. We cannot do this in RUN_ALL_TESTS(), as + // the user may have changed the current directory before calling + // RUN_ALL_TESTS(). Therefore we capture the current directory in + // AddTestInfo(), which is called to register a TEST or TEST_F + // before main() is reached. + if (original_working_dir_.IsEmpty()) { + original_working_dir_.Set(FilePath::GetCurrentDir()); + GTEST_CHECK_(!original_working_dir_.IsEmpty()) + << "Failed to get the current working directory."; + } + + GetTestSuite(test_info->test_suite_name(), test_info->type_param(), + set_up_tc, tear_down_tc) + ->AddTestInfo(test_info); + } + + // Returns ParameterizedTestSuiteRegistry object used to keep track of + // value-parameterized tests and instantiate and register them. + internal::ParameterizedTestSuiteRegistry& parameterized_test_registry() { + return parameterized_test_registry_; + } + + // Sets the TestSuite object for the test that's currently running. + void set_current_test_suite(TestSuite* a_current_test_suite) { + current_test_suite_ = a_current_test_suite; + } + + // Sets the TestInfo object for the test that's currently running. If + // current_test_info is NULL, the assertion results will be stored in + // ad_hoc_test_result_. + void set_current_test_info(TestInfo* a_current_test_info) { + current_test_info_ = a_current_test_info; + } + + // Registers all parameterized tests defined using TEST_P and + // INSTANTIATE_TEST_SUITE_P, creating regular tests for each test/parameter + // combination. This method can be called more then once; it has guards + // protecting from registering the tests more then once. If + // value-parameterized tests are disabled, RegisterParameterizedTests is + // present but does nothing. + void RegisterParameterizedTests(); + + // Runs all tests in this UnitTest object, prints the result, and + // returns true if all tests are successful. If any exception is + // thrown during a test, this test is considered to be failed, but + // the rest of the tests will still be run. + bool RunAllTests(); + + // Clears the results of all tests, except the ad hoc tests. + void ClearNonAdHocTestResult() { + ForEach(test_suites_, TestSuite::ClearTestSuiteResult); + } + + // Clears the results of ad-hoc test assertions. + void ClearAdHocTestResult() { + ad_hoc_test_result_.Clear(); + } + + // Adds a TestProperty to the current TestResult object when invoked in a + // context of a test or a test suite, or to the global property set. If the + // result already contains a property with the same key, the value will be + // updated. + void RecordProperty(const TestProperty& test_property); + + enum ReactionToSharding { + HONOR_SHARDING_PROTOCOL, + IGNORE_SHARDING_PROTOCOL + }; + + // Matches the full name of each test against the user-specified + // filter to decide whether the test should run, then records the + // result in each TestSuite and TestInfo object. + // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests + // based on sharding variables in the environment. + // Returns the number of tests that should run. + int FilterTests(ReactionToSharding shard_tests); + + // Prints the names of the tests matching the user-specified filter flag. + void ListTestsMatchingFilter(); + + const TestSuite* current_test_suite() const { return current_test_suite_; } + TestInfo* current_test_info() { return current_test_info_; } + const TestInfo* current_test_info() const { return current_test_info_; } + + // Returns the vector of environments that need to be set-up/torn-down + // before/after the tests are run. + std::vector& environments() { return environments_; } + + // Getters for the per-thread Google Test trace stack. + std::vector& gtest_trace_stack() { + return *(gtest_trace_stack_.pointer()); + } + const std::vector& gtest_trace_stack() const { + return gtest_trace_stack_.get(); + } + +#if GTEST_HAS_DEATH_TEST + void InitDeathTestSubprocessControlInfo() { + internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag()); + } + // Returns a pointer to the parsed --gtest_internal_run_death_test + // flag, or NULL if that flag was not specified. + // This information is useful only in a death test child process. + // Must not be called before a call to InitGoogleTest. + const InternalRunDeathTestFlag* internal_run_death_test_flag() const { + return internal_run_death_test_flag_.get(); + } + + // Returns a pointer to the current death test factory. + internal::DeathTestFactory* death_test_factory() { + return death_test_factory_.get(); + } + + void SuppressTestEventsIfInSubprocess(); + + friend class ReplaceDeathTestFactory; +#endif // GTEST_HAS_DEATH_TEST + + // Initializes the event listener performing XML output as specified by + // UnitTestOptions. Must not be called before InitGoogleTest. + void ConfigureXmlOutput(); + +#if GTEST_CAN_STREAM_RESULTS_ + // Initializes the event listener for streaming test results to a socket. + // Must not be called before InitGoogleTest. + void ConfigureStreamingOutput(); +#endif + + // Performs initialization dependent upon flag values obtained in + // ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to + // ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest + // this function is also called from RunAllTests. Since this function can be + // called more than once, it has to be idempotent. + void PostFlagParsingInit(); + + // Gets the random seed used at the start of the current test iteration. + int random_seed() const { return random_seed_; } + + // Gets the random number generator. + internal::Random* random() { return &random_; } + + // Shuffles all test suites, and the tests within each test suite, + // making sure that death tests are still run first. + void ShuffleTests(); + + // Restores the test suites and tests to their order before the first shuffle. + void UnshuffleTests(); + + // Returns the value of GTEST_FLAG(catch_exceptions) at the moment + // UnitTest::Run() starts. + bool catch_exceptions() const { return catch_exceptions_; } + + private: + friend class ::testing::UnitTest; + + // Used by UnitTest::Run() to capture the state of + // GTEST_FLAG(catch_exceptions) at the moment it starts. + void set_catch_exceptions(bool value) { catch_exceptions_ = value; } + + // The UnitTest object that owns this implementation object. + UnitTest* const parent_; + + // The working directory when the first TEST() or TEST_F() was + // executed. + internal::FilePath original_working_dir_; + + // The default test part result reporters. + DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_; + DefaultPerThreadTestPartResultReporter + default_per_thread_test_part_result_reporter_; + + // Points to (but doesn't own) the global test part result reporter. + TestPartResultReporterInterface* global_test_part_result_repoter_; + + // Protects read and write access to global_test_part_result_reporter_. + internal::Mutex global_test_part_result_reporter_mutex_; + + // Points to (but doesn't own) the per-thread test part result reporter. + internal::ThreadLocal + per_thread_test_part_result_reporter_; + + // The vector of environments that need to be set-up/torn-down + // before/after the tests are run. + std::vector environments_; + + // The vector of TestSuites in their original order. It owns the + // elements in the vector. + std::vector test_suites_; + + // Provides a level of indirection for the test suite list to allow + // easy shuffling and restoring the test suite order. The i-th + // element of this vector is the index of the i-th test suite in the + // shuffled order. + std::vector test_suite_indices_; + + // ParameterizedTestRegistry object used to register value-parameterized + // tests. + internal::ParameterizedTestSuiteRegistry parameterized_test_registry_; + + // Indicates whether RegisterParameterizedTests() has been called already. + bool parameterized_tests_registered_; + + // Index of the last death test suite registered. Initially -1. + int last_death_test_suite_; + + // This points to the TestSuite for the currently running test. It + // changes as Google Test goes through one test suite after another. + // When no test is running, this is set to NULL and Google Test + // stores assertion results in ad_hoc_test_result_. Initially NULL. + TestSuite* current_test_suite_; + + // This points to the TestInfo for the currently running test. It + // changes as Google Test goes through one test after another. When + // no test is running, this is set to NULL and Google Test stores + // assertion results in ad_hoc_test_result_. Initially NULL. + TestInfo* current_test_info_; + + // Normally, a user only writes assertions inside a TEST or TEST_F, + // or inside a function called by a TEST or TEST_F. Since Google + // Test keeps track of which test is current running, it can + // associate such an assertion with the test it belongs to. + // + // If an assertion is encountered when no TEST or TEST_F is running, + // Google Test attributes the assertion result to an imaginary "ad hoc" + // test, and records the result in ad_hoc_test_result_. + TestResult ad_hoc_test_result_; + + // The list of event listeners that can be used to track events inside + // Google Test. + TestEventListeners listeners_; + + // The OS stack trace getter. Will be deleted when the UnitTest + // object is destructed. By default, an OsStackTraceGetter is used, + // but the user can set this field to use a custom getter if that is + // desired. + OsStackTraceGetterInterface* os_stack_trace_getter_; + + // True iff PostFlagParsingInit() has been called. + bool post_flag_parse_init_performed_; + + // The random number seed used at the beginning of the test run. + int random_seed_; + + // Our random number generator. + internal::Random random_; + + // The time of the test program start, in ms from the start of the + // UNIX epoch. + TimeInMillis start_timestamp_; + + // How long the test took to run, in milliseconds. + TimeInMillis elapsed_time_; + +#if GTEST_HAS_DEATH_TEST + // The decomposed components of the gtest_internal_run_death_test flag, + // parsed when RUN_ALL_TESTS is called. + std::unique_ptr internal_run_death_test_flag_; + std::unique_ptr death_test_factory_; +#endif // GTEST_HAS_DEATH_TEST + + // A per-thread stack of traces created by the SCOPED_TRACE() macro. + internal::ThreadLocal > gtest_trace_stack_; + + // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests() + // starts. + bool catch_exceptions_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl); +}; // class UnitTestImpl + +// Convenience function for accessing the global UnitTest +// implementation object. +inline UnitTestImpl* GetUnitTestImpl() { + return UnitTest::GetInstance()->impl(); +} + +#if GTEST_USES_SIMPLE_RE + +// Internal helper functions for implementing the simple regular +// expression matcher. +GTEST_API_ bool IsInSet(char ch, const char* str); +GTEST_API_ bool IsAsciiDigit(char ch); +GTEST_API_ bool IsAsciiPunct(char ch); +GTEST_API_ bool IsRepeat(char ch); +GTEST_API_ bool IsAsciiWhiteSpace(char ch); +GTEST_API_ bool IsAsciiWordChar(char ch); +GTEST_API_ bool IsValidEscape(char ch); +GTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch); +GTEST_API_ bool ValidateRegex(const char* regex); +GTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str); +GTEST_API_ bool MatchRepetitionAndRegexAtHead( + bool escaped, char ch, char repeat, const char* regex, const char* str); +GTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str); + +#endif // GTEST_USES_SIMPLE_RE + +// Parses the command line for Google Test flags, without initializing +// other parts of Google Test. +GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv); +GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv); + +#if GTEST_HAS_DEATH_TEST + +// Returns the message describing the last system error, regardless of the +// platform. +GTEST_API_ std::string GetLastErrnoDescription(); + +// Attempts to parse a string into a positive integer pointed to by the +// number parameter. Returns true if that is possible. +// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use +// it here. +template +bool ParseNaturalNumber(const ::std::string& str, Integer* number) { + // Fail fast if the given string does not begin with a digit; + // this bypasses strtoXXX's "optional leading whitespace and plus + // or minus sign" semantics, which are undesirable here. + if (str.empty() || !IsDigit(str[0])) { + return false; + } + errno = 0; + + char* end; + // BiggestConvertible is the largest integer type that system-provided + // string-to-number conversion routines can return. + +# if GTEST_OS_WINDOWS && !defined(__GNUC__) + + // MSVC and C++ Builder define __int64 instead of the standard long long. + typedef unsigned __int64 BiggestConvertible; + const BiggestConvertible parsed = _strtoui64(str.c_str(), &end, 10); + +# else + + typedef unsigned long long BiggestConvertible; // NOLINT + const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10); + +# endif // GTEST_OS_WINDOWS && !defined(__GNUC__) + + const bool parse_success = *end == '\0' && errno == 0; + + GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed)); + + const Integer result = static_cast(parsed); + if (parse_success && static_cast(result) == parsed) { + *number = result; + return true; + } + return false; +} +#endif // GTEST_HAS_DEATH_TEST + +// TestResult contains some private methods that should be hidden from +// Google Test user but are required for testing. This class allow our tests +// to access them. +// +// This class is supplied only for the purpose of testing Google Test's own +// constructs. Do not use it in user tests, either directly or indirectly. +class TestResultAccessor { + public: + static void RecordProperty(TestResult* test_result, + const std::string& xml_element, + const TestProperty& property) { + test_result->RecordProperty(xml_element, property); + } + + static void ClearTestPartResults(TestResult* test_result) { + test_result->ClearTestPartResults(); + } + + static const std::vector& test_part_results( + const TestResult& test_result) { + return test_result.test_part_results(); + } +}; + +#if GTEST_CAN_STREAM_RESULTS_ + +// Streams test results to the given port on the given host machine. +class StreamingListener : public EmptyTestEventListener { + public: + // Abstract base class for writing strings to a socket. + class AbstractSocketWriter { + public: + virtual ~AbstractSocketWriter() {} + + // Sends a string to the socket. + virtual void Send(const std::string& message) = 0; + + // Closes the socket. + virtual void CloseConnection() {} + + // Sends a string and a newline to the socket. + void SendLn(const std::string& message) { Send(message + "\n"); } + }; + + // Concrete class for actually writing strings to a socket. + class SocketWriter : public AbstractSocketWriter { + public: + SocketWriter(const std::string& host, const std::string& port) + : sockfd_(-1), host_name_(host), port_num_(port) { + MakeConnection(); + } + + ~SocketWriter() override { + if (sockfd_ != -1) + CloseConnection(); + } + + // Sends a string to the socket. + void Send(const std::string& message) override { + GTEST_CHECK_(sockfd_ != -1) + << "Send() can be called only when there is a connection."; + + const auto len = static_cast(message.length()); + if (write(sockfd_, message.c_str(), len) != static_cast(len)) { + GTEST_LOG_(WARNING) + << "stream_result_to: failed to stream to " + << host_name_ << ":" << port_num_; + } + } + + private: + // Creates a client socket and connects to the server. + void MakeConnection(); + + // Closes the socket. + void CloseConnection() override { + GTEST_CHECK_(sockfd_ != -1) + << "CloseConnection() can be called only when there is a connection."; + + close(sockfd_); + sockfd_ = -1; + } + + int sockfd_; // socket file descriptor + const std::string host_name_; + const std::string port_num_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(SocketWriter); + }; // class SocketWriter + + // Escapes '=', '&', '%', and '\n' characters in str as "%xx". + static std::string UrlEncode(const char* str); + + StreamingListener(const std::string& host, const std::string& port) + : socket_writer_(new SocketWriter(host, port)) { + Start(); + } + + explicit StreamingListener(AbstractSocketWriter* socket_writer) + : socket_writer_(socket_writer) { Start(); } + + void OnTestProgramStart(const UnitTest& /* unit_test */) override { + SendLn("event=TestProgramStart"); + } + + void OnTestProgramEnd(const UnitTest& unit_test) override { + // Note that Google Test current only report elapsed time for each + // test iteration, not for the entire test program. + SendLn("event=TestProgramEnd&passed=" + FormatBool(unit_test.Passed())); + + // Notify the streaming server to stop. + socket_writer_->CloseConnection(); + } + + void OnTestIterationStart(const UnitTest& /* unit_test */, + int iteration) override { + SendLn("event=TestIterationStart&iteration=" + + StreamableToString(iteration)); + } + + void OnTestIterationEnd(const UnitTest& unit_test, + int /* iteration */) override { + SendLn("event=TestIterationEnd&passed=" + + FormatBool(unit_test.Passed()) + "&elapsed_time=" + + StreamableToString(unit_test.elapsed_time()) + "ms"); + } + + // Note that "event=TestCaseStart" is a wire format and has to remain + // "case" for compatibilty + void OnTestCaseStart(const TestCase& test_case) override { + SendLn(std::string("event=TestCaseStart&name=") + test_case.name()); + } + + // Note that "event=TestCaseEnd" is a wire format and has to remain + // "case" for compatibilty + void OnTestCaseEnd(const TestCase& test_case) override { + SendLn("event=TestCaseEnd&passed=" + FormatBool(test_case.Passed()) + + "&elapsed_time=" + StreamableToString(test_case.elapsed_time()) + + "ms"); + } + + void OnTestStart(const TestInfo& test_info) override { + SendLn(std::string("event=TestStart&name=") + test_info.name()); + } + + void OnTestEnd(const TestInfo& test_info) override { + SendLn("event=TestEnd&passed=" + + FormatBool((test_info.result())->Passed()) + + "&elapsed_time=" + + StreamableToString((test_info.result())->elapsed_time()) + "ms"); + } + + void OnTestPartResult(const TestPartResult& test_part_result) override { + const char* file_name = test_part_result.file_name(); + if (file_name == nullptr) file_name = ""; + SendLn("event=TestPartResult&file=" + UrlEncode(file_name) + + "&line=" + StreamableToString(test_part_result.line_number()) + + "&message=" + UrlEncode(test_part_result.message())); + } + + private: + // Sends the given message and a newline to the socket. + void SendLn(const std::string& message) { socket_writer_->SendLn(message); } + + // Called at the start of streaming to notify the receiver what + // protocol we are using. + void Start() { SendLn("gtest_streaming_protocol_version=1.0"); } + + std::string FormatBool(bool value) { return value ? "1" : "0"; } + + const std::unique_ptr socket_writer_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener); +}; // class StreamingListener + +#endif // GTEST_CAN_STREAM_RESULTS_ + +} // namespace internal +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +#endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ + +#if GTEST_OS_WINDOWS +# define vsnprintf _vsnprintf +#endif // GTEST_OS_WINDOWS + +#if GTEST_OS_MAC +#ifndef GTEST_OS_IOS +#include +#endif +#endif + +#if GTEST_HAS_ABSL +#include "absl/debugging/failure_signal_handler.h" +#include "absl/debugging/stacktrace.h" +#include "absl/debugging/symbolize.h" +#include "absl/strings/str_cat.h" +#endif // GTEST_HAS_ABSL + +namespace testing { + +using internal::CountIf; +using internal::ForEach; +using internal::GetElementOr; +using internal::Shuffle; + +// Constants. + +// A test whose test suite name or test name matches this filter is +// disabled and not run. +static const char kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*"; + +// A test suite whose name matches this filter is considered a death +// test suite and will be run before test suites whose name doesn't +// match this filter. +static const char kDeathTestSuiteFilter[] = "*DeathTest:*DeathTest/*"; + +// A test filter that matches everything. +static const char kUniversalFilter[] = "*"; + +// The default output format. +static const char kDefaultOutputFormat[] = "xml"; +// The default output file. +static const char kDefaultOutputFile[] = "test_detail"; + +// The environment variable name for the test shard index. +static const char kTestShardIndex[] = "GTEST_SHARD_INDEX"; +// The environment variable name for the total number of test shards. +static const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS"; +// The environment variable name for the test shard status file. +static const char kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE"; + +namespace internal { + +// The text used in failure messages to indicate the start of the +// stack trace. +const char kStackTraceMarker[] = "\nStack trace:\n"; + +// g_help_flag is true iff the --help flag or an equivalent form is +// specified on the command line. +bool g_help_flag = false; + +// Utilty function to Open File for Writing +static FILE* OpenFileForWriting(const std::string& output_file) { + FILE* fileout = nullptr; + FilePath output_file_path(output_file); + FilePath output_dir(output_file_path.RemoveFileName()); + + if (output_dir.CreateDirectoriesRecursively()) { + fileout = posix::FOpen(output_file.c_str(), "w"); + } + if (fileout == nullptr) { + GTEST_LOG_(FATAL) << "Unable to open file \"" << output_file << "\""; + } + return fileout; +} + +} // namespace internal + +// Bazel passes in the argument to '--test_filter' via the TESTBRIDGE_TEST_ONLY +// environment variable. +static const char* GetDefaultFilter() { + const char* const testbridge_test_only = + internal::posix::GetEnv("TESTBRIDGE_TEST_ONLY"); + if (testbridge_test_only != nullptr) { + return testbridge_test_only; + } + return kUniversalFilter; +} + +GTEST_DEFINE_bool_( + also_run_disabled_tests, + internal::BoolFromGTestEnv("also_run_disabled_tests", false), + "Run disabled tests too, in addition to the tests normally being run."); + +GTEST_DEFINE_bool_( + break_on_failure, + internal::BoolFromGTestEnv("break_on_failure", false), + "True iff a failed assertion should be a debugger break-point."); + +GTEST_DEFINE_bool_( + catch_exceptions, + internal::BoolFromGTestEnv("catch_exceptions", true), + "True iff " GTEST_NAME_ + " should catch exceptions and treat them as test failures."); + +GTEST_DEFINE_string_( + color, + internal::StringFromGTestEnv("color", "auto"), + "Whether to use colors in the output. Valid values: yes, no, " + "and auto. 'auto' means to use colors if the output is " + "being sent to a terminal and the TERM environment variable " + "is set to a terminal type that supports colors."); + +GTEST_DEFINE_string_( + filter, + internal::StringFromGTestEnv("filter", GetDefaultFilter()), + "A colon-separated list of glob (not regex) patterns " + "for filtering the tests to run, optionally followed by a " + "'-' and a : separated list of negative patterns (tests to " + "exclude). A test is run if it matches one of the positive " + "patterns and does not match any of the negative patterns."); + +GTEST_DEFINE_bool_( + install_failure_signal_handler, + internal::BoolFromGTestEnv("install_failure_signal_handler", false), + "If true and supported on the current platform, " GTEST_NAME_ " should " + "install a signal handler that dumps debugging information when fatal " + "signals are raised."); + +GTEST_DEFINE_bool_(list_tests, false, + "List all tests without running them."); + +// The net priority order after flag processing is thus: +// --gtest_output command line flag +// GTEST_OUTPUT environment variable +// XML_OUTPUT_FILE environment variable +// '' +GTEST_DEFINE_string_( + output, + internal::StringFromGTestEnv("output", + internal::OutputFlagAlsoCheckEnvVar().c_str()), + "A format (defaults to \"xml\" but can be specified to be \"json\"), " + "optionally followed by a colon and an output file name or directory. " + "A directory is indicated by a trailing pathname separator. " + "Examples: \"xml:filename.xml\", \"xml::directoryname/\". " + "If a directory is specified, output files will be created " + "within that directory, with file-names based on the test " + "executable's name and, if necessary, made unique by adding " + "digits."); + +GTEST_DEFINE_bool_( + print_time, + internal::BoolFromGTestEnv("print_time", true), + "True iff " GTEST_NAME_ + " should display elapsed time in text output."); + +GTEST_DEFINE_bool_( + print_utf8, + internal::BoolFromGTestEnv("print_utf8", true), + "True iff " GTEST_NAME_ + " prints UTF8 characters as text."); + +GTEST_DEFINE_int32_( + random_seed, + internal::Int32FromGTestEnv("random_seed", 0), + "Random number seed to use when shuffling test orders. Must be in range " + "[1, 99999], or 0 to use a seed based on the current time."); + +GTEST_DEFINE_int32_( + repeat, + internal::Int32FromGTestEnv("repeat", 1), + "How many times to repeat each test. Specify a negative number " + "for repeating forever. Useful for shaking out flaky tests."); + +GTEST_DEFINE_bool_( + show_internal_stack_frames, false, + "True iff " GTEST_NAME_ " should include internal stack frames when " + "printing test failure stack traces."); + +GTEST_DEFINE_bool_( + shuffle, + internal::BoolFromGTestEnv("shuffle", false), + "True iff " GTEST_NAME_ + " should randomize tests' order on every run."); + +GTEST_DEFINE_int32_( + stack_trace_depth, + internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth), + "The maximum number of stack frames to print when an " + "assertion fails. The valid range is 0 through 100, inclusive."); + +GTEST_DEFINE_string_( + stream_result_to, + internal::StringFromGTestEnv("stream_result_to", ""), + "This flag specifies the host name and the port number on which to stream " + "test results. Example: \"localhost:555\". The flag is effective only on " + "Linux."); + +GTEST_DEFINE_bool_( + throw_on_failure, + internal::BoolFromGTestEnv("throw_on_failure", false), + "When this flag is specified, a failed assertion will throw an exception " + "if exceptions are enabled or exit the program with a non-zero code " + "otherwise. For use with an external test framework."); + +#if GTEST_USE_OWN_FLAGFILE_FLAG_ +GTEST_DEFINE_string_( + flagfile, + internal::StringFromGTestEnv("flagfile", ""), + "This flag specifies the flagfile to read command-line flags from."); +#endif // GTEST_USE_OWN_FLAGFILE_FLAG_ + +namespace internal { + +// Generates a random number from [0, range), using a Linear +// Congruential Generator (LCG). Crashes if 'range' is 0 or greater +// than kMaxRange. +UInt32 Random::Generate(UInt32 range) { + // These constants are the same as are used in glibc's rand(3). + // Use wider types than necessary to prevent unsigned overflow diagnostics. + state_ = static_cast(1103515245ULL*state_ + 12345U) % kMaxRange; + + GTEST_CHECK_(range > 0) + << "Cannot generate a number in the range [0, 0)."; + GTEST_CHECK_(range <= kMaxRange) + << "Generation of a number in [0, " << range << ") was requested, " + << "but this can only generate numbers in [0, " << kMaxRange << ")."; + + // Converting via modulus introduces a bit of downward bias, but + // it's simple, and a linear congruential generator isn't too good + // to begin with. + return state_ % range; +} + +// GTestIsInitialized() returns true iff the user has initialized +// Google Test. Useful for catching the user mistake of not initializing +// Google Test before calling RUN_ALL_TESTS(). +static bool GTestIsInitialized() { return GetArgvs().size() > 0; } + +// Iterates over a vector of TestSuites, keeping a running sum of the +// results of calling a given int-returning method on each. +// Returns the sum. +static int SumOverTestSuiteList(const std::vector& case_list, + int (TestSuite::*method)() const) { + int sum = 0; + for (size_t i = 0; i < case_list.size(); i++) { + sum += (case_list[i]->*method)(); + } + return sum; +} + +// Returns true iff the test suite passed. +static bool TestSuitePassed(const TestSuite* test_suite) { + return test_suite->should_run() && test_suite->Passed(); +} + +// Returns true iff the test suite failed. +static bool TestSuiteFailed(const TestSuite* test_suite) { + return test_suite->should_run() && test_suite->Failed(); +} + +// Returns true iff test_suite contains at least one test that should +// run. +static bool ShouldRunTestSuite(const TestSuite* test_suite) { + return test_suite->should_run(); +} + +// AssertHelper constructor. +AssertHelper::AssertHelper(TestPartResult::Type type, + const char* file, + int line, + const char* message) + : data_(new AssertHelperData(type, file, line, message)) { +} + +AssertHelper::~AssertHelper() { + delete data_; +} + +// Message assignment, for assertion streaming support. +void AssertHelper::operator=(const Message& message) const { + UnitTest::GetInstance()-> + AddTestPartResult(data_->type, data_->file, data_->line, + AppendUserMessage(data_->message, message), + UnitTest::GetInstance()->impl() + ->CurrentOsStackTraceExceptTop(1) + // Skips the stack frame for this function itself. + ); // NOLINT +} + +// A copy of all command line arguments. Set by InitGoogleTest(). +static ::std::vector g_argvs; + +::std::vector GetArgvs() { +#if defined(GTEST_CUSTOM_GET_ARGVS_) + // GTEST_CUSTOM_GET_ARGVS_() may return a container of std::string or + // ::string. This code converts it to the appropriate type. + const auto& custom = GTEST_CUSTOM_GET_ARGVS_(); + return ::std::vector(custom.begin(), custom.end()); +#else // defined(GTEST_CUSTOM_GET_ARGVS_) + return g_argvs; +#endif // defined(GTEST_CUSTOM_GET_ARGVS_) +} + +// Returns the current application's name, removing directory path if that +// is present. +FilePath GetCurrentExecutableName() { + FilePath result; + +#if GTEST_OS_WINDOWS || GTEST_OS_OS2 + result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe")); +#else + result.Set(FilePath(GetArgvs()[0])); +#endif // GTEST_OS_WINDOWS + + return result.RemoveDirectoryName(); +} + +// Functions for processing the gtest_output flag. + +// Returns the output format, or "" for normal printed output. +std::string UnitTestOptions::GetOutputFormat() { + const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); + const char* const colon = strchr(gtest_output_flag, ':'); + return (colon == nullptr) + ? std::string(gtest_output_flag) + : std::string(gtest_output_flag, + static_cast(colon - gtest_output_flag)); +} + +// Returns the name of the requested output file, or the default if none +// was explicitly specified. +std::string UnitTestOptions::GetAbsolutePathToOutputFile() { + const char* const gtest_output_flag = GTEST_FLAG(output).c_str(); + + std::string format = GetOutputFormat(); + if (format.empty()) + format = std::string(kDefaultOutputFormat); + + const char* const colon = strchr(gtest_output_flag, ':'); + if (colon == nullptr) + return internal::FilePath::MakeFileName( + internal::FilePath( + UnitTest::GetInstance()->original_working_dir()), + internal::FilePath(kDefaultOutputFile), 0, + format.c_str()).string(); + + internal::FilePath output_name(colon + 1); + if (!output_name.IsAbsolutePath()) + output_name = internal::FilePath::ConcatPaths( + internal::FilePath(UnitTest::GetInstance()->original_working_dir()), + internal::FilePath(colon + 1)); + + if (!output_name.IsDirectory()) + return output_name.string(); + + internal::FilePath result(internal::FilePath::GenerateUniqueFileName( + output_name, internal::GetCurrentExecutableName(), + GetOutputFormat().c_str())); + return result.string(); +} + +// Returns true iff the wildcard pattern matches the string. The +// first ':' or '\0' character in pattern marks the end of it. +// +// This recursive algorithm isn't very efficient, but is clear and +// works well enough for matching test names, which are short. +bool UnitTestOptions::PatternMatchesString(const char *pattern, + const char *str) { + switch (*pattern) { + case '\0': + case ':': // Either ':' or '\0' marks the end of the pattern. + return *str == '\0'; + case '?': // Matches any single character. + return *str != '\0' && PatternMatchesString(pattern + 1, str + 1); + case '*': // Matches any string (possibly empty) of characters. + return (*str != '\0' && PatternMatchesString(pattern, str + 1)) || + PatternMatchesString(pattern + 1, str); + default: // Non-special character. Matches itself. + return *pattern == *str && + PatternMatchesString(pattern + 1, str + 1); + } +} + +bool UnitTestOptions::MatchesFilter( + const std::string& name, const char* filter) { + const char *cur_pattern = filter; + for (;;) { + if (PatternMatchesString(cur_pattern, name.c_str())) { + return true; + } + + // Finds the next pattern in the filter. + cur_pattern = strchr(cur_pattern, ':'); + + // Returns if no more pattern can be found. + if (cur_pattern == nullptr) { + return false; + } + + // Skips the pattern separater (the ':' character). + cur_pattern++; + } +} + +// Returns true iff the user-specified filter matches the test suite +// name and the test name. +bool UnitTestOptions::FilterMatchesTest(const std::string& test_suite_name, + const std::string& test_name) { + const std::string& full_name = test_suite_name + "." + test_name.c_str(); + + // Split --gtest_filter at '-', if there is one, to separate into + // positive filter and negative filter portions + const char* const p = GTEST_FLAG(filter).c_str(); + const char* const dash = strchr(p, '-'); + std::string positive; + std::string negative; + if (dash == nullptr) { + positive = GTEST_FLAG(filter).c_str(); // Whole string is a positive filter + negative = ""; + } else { + positive = std::string(p, dash); // Everything up to the dash + negative = std::string(dash + 1); // Everything after the dash + if (positive.empty()) { + // Treat '-test1' as the same as '*-test1' + positive = kUniversalFilter; + } + } + + // A filter is a colon-separated list of patterns. It matches a + // test if any pattern in it matches the test. + return (MatchesFilter(full_name, positive.c_str()) && + !MatchesFilter(full_name, negative.c_str())); +} + +#if GTEST_HAS_SEH +// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the +// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise. +// This function is useful as an __except condition. +int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) { + // Google Test should handle a SEH exception if: + // 1. the user wants it to, AND + // 2. this is not a breakpoint exception, AND + // 3. this is not a C++ exception (VC++ implements them via SEH, + // apparently). + // + // SEH exception code for C++ exceptions. + // (see http://support.microsoft.com/kb/185294 for more information). + const DWORD kCxxExceptionCode = 0xe06d7363; + + bool should_handle = true; + + if (!GTEST_FLAG(catch_exceptions)) + should_handle = false; + else if (exception_code == EXCEPTION_BREAKPOINT) + should_handle = false; + else if (exception_code == kCxxExceptionCode) + should_handle = false; + + return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH; +} +#endif // GTEST_HAS_SEH + +} // namespace internal + +// The c'tor sets this object as the test part result reporter used by +// Google Test. The 'result' parameter specifies where to report the +// results. Intercepts only failures from the current thread. +ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( + TestPartResultArray* result) + : intercept_mode_(INTERCEPT_ONLY_CURRENT_THREAD), + result_(result) { + Init(); +} + +// The c'tor sets this object as the test part result reporter used by +// Google Test. The 'result' parameter specifies where to report the +// results. +ScopedFakeTestPartResultReporter::ScopedFakeTestPartResultReporter( + InterceptMode intercept_mode, TestPartResultArray* result) + : intercept_mode_(intercept_mode), + result_(result) { + Init(); +} + +void ScopedFakeTestPartResultReporter::Init() { + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + if (intercept_mode_ == INTERCEPT_ALL_THREADS) { + old_reporter_ = impl->GetGlobalTestPartResultReporter(); + impl->SetGlobalTestPartResultReporter(this); + } else { + old_reporter_ = impl->GetTestPartResultReporterForCurrentThread(); + impl->SetTestPartResultReporterForCurrentThread(this); + } +} + +// The d'tor restores the test part result reporter used by Google Test +// before. +ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() { + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + if (intercept_mode_ == INTERCEPT_ALL_THREADS) { + impl->SetGlobalTestPartResultReporter(old_reporter_); + } else { + impl->SetTestPartResultReporterForCurrentThread(old_reporter_); + } +} + +// Increments the test part result count and remembers the result. +// This method is from the TestPartResultReporterInterface interface. +void ScopedFakeTestPartResultReporter::ReportTestPartResult( + const TestPartResult& result) { + result_->Append(result); +} + +namespace internal { + +// Returns the type ID of ::testing::Test. We should always call this +// instead of GetTypeId< ::testing::Test>() to get the type ID of +// testing::Test. This is to work around a suspected linker bug when +// using Google Test as a framework on Mac OS X. The bug causes +// GetTypeId< ::testing::Test>() to return different values depending +// on whether the call is from the Google Test framework itself or +// from user test code. GetTestTypeId() is guaranteed to always +// return the same value, as it always calls GetTypeId<>() from the +// gtest.cc, which is within the Google Test framework. +TypeId GetTestTypeId() { + return GetTypeId(); +} + +// The value of GetTestTypeId() as seen from within the Google Test +// library. This is solely for testing GetTestTypeId(). +extern const TypeId kTestTypeIdInGoogleTest = GetTestTypeId(); + +// This predicate-formatter checks that 'results' contains a test part +// failure of the given type and that the failure message contains the +// given substring. +static AssertionResult HasOneFailure(const char* /* results_expr */, + const char* /* type_expr */, + const char* /* substr_expr */, + const TestPartResultArray& results, + TestPartResult::Type type, + const std::string& substr) { + const std::string expected(type == TestPartResult::kFatalFailure ? + "1 fatal failure" : + "1 non-fatal failure"); + Message msg; + if (results.size() != 1) { + msg << "Expected: " << expected << "\n" + << " Actual: " << results.size() << " failures"; + for (int i = 0; i < results.size(); i++) { + msg << "\n" << results.GetTestPartResult(i); + } + return AssertionFailure() << msg; + } + + const TestPartResult& r = results.GetTestPartResult(0); + if (r.type() != type) { + return AssertionFailure() << "Expected: " << expected << "\n" + << " Actual:\n" + << r; + } + + if (strstr(r.message(), substr.c_str()) == nullptr) { + return AssertionFailure() << "Expected: " << expected << " containing \"" + << substr << "\"\n" + << " Actual:\n" + << r; + } + + return AssertionSuccess(); +} + +// The constructor of SingleFailureChecker remembers where to look up +// test part results, what type of failure we expect, and what +// substring the failure message should contain. +SingleFailureChecker::SingleFailureChecker(const TestPartResultArray* results, + TestPartResult::Type type, + const std::string& substr) + : results_(results), type_(type), substr_(substr) {} + +// The destructor of SingleFailureChecker verifies that the given +// TestPartResultArray contains exactly one failure that has the given +// type and contains the given substring. If that's not the case, a +// non-fatal failure will be generated. +SingleFailureChecker::~SingleFailureChecker() { + EXPECT_PRED_FORMAT3(HasOneFailure, *results_, type_, substr_); +} + +DefaultGlobalTestPartResultReporter::DefaultGlobalTestPartResultReporter( + UnitTestImpl* unit_test) : unit_test_(unit_test) {} + +void DefaultGlobalTestPartResultReporter::ReportTestPartResult( + const TestPartResult& result) { + unit_test_->current_test_result()->AddTestPartResult(result); + unit_test_->listeners()->repeater()->OnTestPartResult(result); +} + +DefaultPerThreadTestPartResultReporter::DefaultPerThreadTestPartResultReporter( + UnitTestImpl* unit_test) : unit_test_(unit_test) {} + +void DefaultPerThreadTestPartResultReporter::ReportTestPartResult( + const TestPartResult& result) { + unit_test_->GetGlobalTestPartResultReporter()->ReportTestPartResult(result); +} + +// Returns the global test part result reporter. +TestPartResultReporterInterface* +UnitTestImpl::GetGlobalTestPartResultReporter() { + internal::MutexLock lock(&global_test_part_result_reporter_mutex_); + return global_test_part_result_repoter_; +} + +// Sets the global test part result reporter. +void UnitTestImpl::SetGlobalTestPartResultReporter( + TestPartResultReporterInterface* reporter) { + internal::MutexLock lock(&global_test_part_result_reporter_mutex_); + global_test_part_result_repoter_ = reporter; +} + +// Returns the test part result reporter for the current thread. +TestPartResultReporterInterface* +UnitTestImpl::GetTestPartResultReporterForCurrentThread() { + return per_thread_test_part_result_reporter_.get(); +} + +// Sets the test part result reporter for the current thread. +void UnitTestImpl::SetTestPartResultReporterForCurrentThread( + TestPartResultReporterInterface* reporter) { + per_thread_test_part_result_reporter_.set(reporter); +} + +// Gets the number of successful test suites. +int UnitTestImpl::successful_test_suite_count() const { + return CountIf(test_suites_, TestSuitePassed); +} + +// Gets the number of failed test suites. +int UnitTestImpl::failed_test_suite_count() const { + return CountIf(test_suites_, TestSuiteFailed); +} + +// Gets the number of all test suites. +int UnitTestImpl::total_test_suite_count() const { + return static_cast(test_suites_.size()); +} + +// Gets the number of all test suites that contain at least one test +// that should run. +int UnitTestImpl::test_suite_to_run_count() const { + return CountIf(test_suites_, ShouldRunTestSuite); +} + +// Gets the number of successful tests. +int UnitTestImpl::successful_test_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::successful_test_count); +} + +// Gets the number of skipped tests. +int UnitTestImpl::skipped_test_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::skipped_test_count); +} + +// Gets the number of failed tests. +int UnitTestImpl::failed_test_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::failed_test_count); +} + +// Gets the number of disabled tests that will be reported in the XML report. +int UnitTestImpl::reportable_disabled_test_count() const { + return SumOverTestSuiteList(test_suites_, + &TestSuite::reportable_disabled_test_count); +} + +// Gets the number of disabled tests. +int UnitTestImpl::disabled_test_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::disabled_test_count); +} + +// Gets the number of tests to be printed in the XML report. +int UnitTestImpl::reportable_test_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::reportable_test_count); +} + +// Gets the number of all tests. +int UnitTestImpl::total_test_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::total_test_count); +} + +// Gets the number of tests that should run. +int UnitTestImpl::test_to_run_count() const { + return SumOverTestSuiteList(test_suites_, &TestSuite::test_to_run_count); +} + +// Returns the current OS stack trace as an std::string. +// +// The maximum number of stack frames to be included is specified by +// the gtest_stack_trace_depth flag. The skip_count parameter +// specifies the number of top frames to be skipped, which doesn't +// count against the number of frames to be included. +// +// For example, if Foo() calls Bar(), which in turn calls +// CurrentOsStackTraceExceptTop(1), Foo() will be included in the +// trace but Bar() and CurrentOsStackTraceExceptTop() won't. +std::string UnitTestImpl::CurrentOsStackTraceExceptTop(int skip_count) { + return os_stack_trace_getter()->CurrentStackTrace( + static_cast(GTEST_FLAG(stack_trace_depth)), + skip_count + 1 + // Skips the user-specified number of frames plus this function + // itself. + ); // NOLINT +} + +// Returns the current time in milliseconds. +TimeInMillis GetTimeInMillis() { +#if GTEST_OS_WINDOWS_MOBILE || defined(__BORLANDC__) + // Difference between 1970-01-01 and 1601-01-01 in milliseconds. + // http://analogous.blogspot.com/2005/04/epoch.html + const TimeInMillis kJavaEpochToWinFileTimeDelta = + static_cast(116444736UL) * 100000UL; + const DWORD kTenthMicrosInMilliSecond = 10000; + + SYSTEMTIME now_systime; + FILETIME now_filetime; + ULARGE_INTEGER now_int64; + GetSystemTime(&now_systime); + if (SystemTimeToFileTime(&now_systime, &now_filetime)) { + now_int64.LowPart = now_filetime.dwLowDateTime; + now_int64.HighPart = now_filetime.dwHighDateTime; + now_int64.QuadPart = (now_int64.QuadPart / kTenthMicrosInMilliSecond) - + kJavaEpochToWinFileTimeDelta; + return now_int64.QuadPart; + } + return 0; +#elif GTEST_OS_WINDOWS && !GTEST_HAS_GETTIMEOFDAY_ + __timeb64 now; + + // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996 + // (deprecated function) there. + GTEST_DISABLE_MSC_DEPRECATED_PUSH_() + _ftime64(&now); + GTEST_DISABLE_MSC_DEPRECATED_POP_() + + return static_cast(now.time) * 1000 + now.millitm; +#elif GTEST_HAS_GETTIMEOFDAY_ + struct timeval now; + gettimeofday(&now, nullptr); + return static_cast(now.tv_sec) * 1000 + now.tv_usec / 1000; +#else +# error "Don't know how to get the current time on your system." +#endif +} + +// Utilities + +// class String. + +#if GTEST_OS_WINDOWS_MOBILE +// Creates a UTF-16 wide string from the given ANSI string, allocating +// memory using new. The caller is responsible for deleting the return +// value using delete[]. Returns the wide string, or NULL if the +// input is NULL. +LPCWSTR String::AnsiToUtf16(const char* ansi) { + if (!ansi) return nullptr; + const int length = strlen(ansi); + const int unicode_length = + MultiByteToWideChar(CP_ACP, 0, ansi, length, nullptr, 0); + WCHAR* unicode = new WCHAR[unicode_length + 1]; + MultiByteToWideChar(CP_ACP, 0, ansi, length, + unicode, unicode_length); + unicode[unicode_length] = 0; + return unicode; +} + +// Creates an ANSI string from the given wide string, allocating +// memory using new. The caller is responsible for deleting the return +// value using delete[]. Returns the ANSI string, or NULL if the +// input is NULL. +const char* String::Utf16ToAnsi(LPCWSTR utf16_str) { + if (!utf16_str) return nullptr; + const int ansi_length = WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, nullptr, + 0, nullptr, nullptr); + char* ansi = new char[ansi_length + 1]; + WideCharToMultiByte(CP_ACP, 0, utf16_str, -1, ansi, ansi_length, nullptr, + nullptr); + ansi[ansi_length] = 0; + return ansi; +} + +#endif // GTEST_OS_WINDOWS_MOBILE + +// Compares two C strings. Returns true iff they have the same content. +// +// Unlike strcmp(), this function can handle NULL argument(s). A NULL +// C string is considered different to any non-NULL C string, +// including the empty string. +bool String::CStringEquals(const char * lhs, const char * rhs) { + if (lhs == nullptr) return rhs == nullptr; + + if (rhs == nullptr) return false; + + return strcmp(lhs, rhs) == 0; +} + +#if GTEST_HAS_STD_WSTRING + +// Converts an array of wide chars to a narrow string using the UTF-8 +// encoding, and streams the result to the given Message object. +static void StreamWideCharsToMessage(const wchar_t* wstr, size_t length, + Message* msg) { + for (size_t i = 0; i != length; ) { // NOLINT + if (wstr[i] != L'\0') { + *msg << WideStringToUtf8(wstr + i, static_cast(length - i)); + while (i != length && wstr[i] != L'\0') + i++; + } else { + *msg << '\0'; + i++; + } + } +} + +#endif // GTEST_HAS_STD_WSTRING + +void SplitString(const ::std::string& str, char delimiter, + ::std::vector< ::std::string>* dest) { + ::std::vector< ::std::string> parsed; + ::std::string::size_type pos = 0; + while (::testing::internal::AlwaysTrue()) { + const ::std::string::size_type colon = str.find(delimiter, pos); + if (colon == ::std::string::npos) { + parsed.push_back(str.substr(pos)); + break; + } else { + parsed.push_back(str.substr(pos, colon - pos)); + pos = colon + 1; + } + } + dest->swap(parsed); +} + +} // namespace internal + +// Constructs an empty Message. +// We allocate the stringstream separately because otherwise each use of +// ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's +// stack frame leading to huge stack frames in some cases; gcc does not reuse +// the stack space. +Message::Message() : ss_(new ::std::stringstream) { + // By default, we want there to be enough precision when printing + // a double to a Message. + *ss_ << std::setprecision(std::numeric_limits::digits10 + 2); +} + +// These two overloads allow streaming a wide C string to a Message +// using the UTF-8 encoding. +Message& Message::operator <<(const wchar_t* wide_c_str) { + return *this << internal::String::ShowWideCString(wide_c_str); +} +Message& Message::operator <<(wchar_t* wide_c_str) { + return *this << internal::String::ShowWideCString(wide_c_str); +} + +#if GTEST_HAS_STD_WSTRING +// Converts the given wide string to a narrow string using the UTF-8 +// encoding, and streams the result to this Message object. +Message& Message::operator <<(const ::std::wstring& wstr) { + internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); + return *this; +} +#endif // GTEST_HAS_STD_WSTRING + +// Gets the text streamed to this object so far as an std::string. +// Each '\0' character in the buffer is replaced with "\\0". +std::string Message::GetString() const { + return internal::StringStreamToString(ss_.get()); +} + +// AssertionResult constructors. +// Used in EXPECT_TRUE/FALSE(assertion_result). +AssertionResult::AssertionResult(const AssertionResult& other) + : success_(other.success_), + message_(other.message_.get() != nullptr + ? new ::std::string(*other.message_) + : static_cast< ::std::string*>(nullptr)) {} + +// Swaps two AssertionResults. +void AssertionResult::swap(AssertionResult& other) { + using std::swap; + swap(success_, other.success_); + swap(message_, other.message_); +} + +// Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. +AssertionResult AssertionResult::operator!() const { + AssertionResult negation(!success_); + if (message_.get() != nullptr) negation << *message_; + return negation; +} + +// Makes a successful assertion result. +AssertionResult AssertionSuccess() { + return AssertionResult(true); +} + +// Makes a failed assertion result. +AssertionResult AssertionFailure() { + return AssertionResult(false); +} + +// Makes a failed assertion result with the given failure message. +// Deprecated; use AssertionFailure() << message. +AssertionResult AssertionFailure(const Message& message) { + return AssertionFailure() << message; +} + +namespace internal { + +namespace edit_distance { +std::vector CalculateOptimalEdits(const std::vector& left, + const std::vector& right) { + std::vector > costs( + left.size() + 1, std::vector(right.size() + 1)); + std::vector > best_move( + left.size() + 1, std::vector(right.size() + 1)); + + // Populate for empty right. + for (size_t l_i = 0; l_i < costs.size(); ++l_i) { + costs[l_i][0] = static_cast(l_i); + best_move[l_i][0] = kRemove; + } + // Populate for empty left. + for (size_t r_i = 1; r_i < costs[0].size(); ++r_i) { + costs[0][r_i] = static_cast(r_i); + best_move[0][r_i] = kAdd; + } + + for (size_t l_i = 0; l_i < left.size(); ++l_i) { + for (size_t r_i = 0; r_i < right.size(); ++r_i) { + if (left[l_i] == right[r_i]) { + // Found a match. Consume it. + costs[l_i + 1][r_i + 1] = costs[l_i][r_i]; + best_move[l_i + 1][r_i + 1] = kMatch; + continue; + } + + const double add = costs[l_i + 1][r_i]; + const double remove = costs[l_i][r_i + 1]; + const double replace = costs[l_i][r_i]; + if (add < remove && add < replace) { + costs[l_i + 1][r_i + 1] = add + 1; + best_move[l_i + 1][r_i + 1] = kAdd; + } else if (remove < add && remove < replace) { + costs[l_i + 1][r_i + 1] = remove + 1; + best_move[l_i + 1][r_i + 1] = kRemove; + } else { + // We make replace a little more expensive than add/remove to lower + // their priority. + costs[l_i + 1][r_i + 1] = replace + 1.00001; + best_move[l_i + 1][r_i + 1] = kReplace; + } + } + } + + // Reconstruct the best path. We do it in reverse order. + std::vector best_path; + for (size_t l_i = left.size(), r_i = right.size(); l_i > 0 || r_i > 0;) { + EditType move = best_move[l_i][r_i]; + best_path.push_back(move); + l_i -= move != kAdd; + r_i -= move != kRemove; + } + std::reverse(best_path.begin(), best_path.end()); + return best_path; +} + +namespace { + +// Helper class to convert string into ids with deduplication. +class InternalStrings { + public: + size_t GetId(const std::string& str) { + IdMap::iterator it = ids_.find(str); + if (it != ids_.end()) return it->second; + size_t id = ids_.size(); + return ids_[str] = id; + } + + private: + typedef std::map IdMap; + IdMap ids_; +}; + +} // namespace + +std::vector CalculateOptimalEdits( + const std::vector& left, + const std::vector& right) { + std::vector left_ids, right_ids; + { + InternalStrings intern_table; + for (size_t i = 0; i < left.size(); ++i) { + left_ids.push_back(intern_table.GetId(left[i])); + } + for (size_t i = 0; i < right.size(); ++i) { + right_ids.push_back(intern_table.GetId(right[i])); + } + } + return CalculateOptimalEdits(left_ids, right_ids); +} + +namespace { + +// Helper class that holds the state for one hunk and prints it out to the +// stream. +// It reorders adds/removes when possible to group all removes before all +// adds. It also adds the hunk header before printint into the stream. +class Hunk { + public: + Hunk(size_t left_start, size_t right_start) + : left_start_(left_start), + right_start_(right_start), + adds_(), + removes_(), + common_() {} + + void PushLine(char edit, const char* line) { + switch (edit) { + case ' ': + ++common_; + FlushEdits(); + hunk_.push_back(std::make_pair(' ', line)); + break; + case '-': + ++removes_; + hunk_removes_.push_back(std::make_pair('-', line)); + break; + case '+': + ++adds_; + hunk_adds_.push_back(std::make_pair('+', line)); + break; + } + } + + void PrintTo(std::ostream* os) { + PrintHeader(os); + FlushEdits(); + for (std::list >::const_iterator it = + hunk_.begin(); + it != hunk_.end(); ++it) { + *os << it->first << it->second << "\n"; + } + } + + bool has_edits() const { return adds_ || removes_; } + + private: + void FlushEdits() { + hunk_.splice(hunk_.end(), hunk_removes_); + hunk_.splice(hunk_.end(), hunk_adds_); + } + + // Print a unified diff header for one hunk. + // The format is + // "@@ -, +, @@" + // where the left/right parts are omitted if unnecessary. + void PrintHeader(std::ostream* ss) const { + *ss << "@@ "; + if (removes_) { + *ss << "-" << left_start_ << "," << (removes_ + common_); + } + if (removes_ && adds_) { + *ss << " "; + } + if (adds_) { + *ss << "+" << right_start_ << "," << (adds_ + common_); + } + *ss << " @@\n"; + } + + size_t left_start_, right_start_; + size_t adds_, removes_, common_; + std::list > hunk_, hunk_adds_, hunk_removes_; +}; + +} // namespace + +// Create a list of diff hunks in Unified diff format. +// Each hunk has a header generated by PrintHeader above plus a body with +// lines prefixed with ' ' for no change, '-' for deletion and '+' for +// addition. +// 'context' represents the desired unchanged prefix/suffix around the diff. +// If two hunks are close enough that their contexts overlap, then they are +// joined into one hunk. +std::string CreateUnifiedDiff(const std::vector& left, + const std::vector& right, + size_t context) { + const std::vector edits = CalculateOptimalEdits(left, right); + + size_t l_i = 0, r_i = 0, edit_i = 0; + std::stringstream ss; + while (edit_i < edits.size()) { + // Find first edit. + while (edit_i < edits.size() && edits[edit_i] == kMatch) { + ++l_i; + ++r_i; + ++edit_i; + } + + // Find the first line to include in the hunk. + const size_t prefix_context = std::min(l_i, context); + Hunk hunk(l_i - prefix_context + 1, r_i - prefix_context + 1); + for (size_t i = prefix_context; i > 0; --i) { + hunk.PushLine(' ', left[l_i - i].c_str()); + } + + // Iterate the edits until we found enough suffix for the hunk or the input + // is over. + size_t n_suffix = 0; + for (; edit_i < edits.size(); ++edit_i) { + if (n_suffix >= context) { + // Continue only if the next hunk is very close. + auto it = edits.begin() + static_cast(edit_i); + while (it != edits.end() && *it == kMatch) ++it; + if (it == edits.end() || + static_cast(it - edits.begin()) - edit_i >= context) { + // There is no next edit or it is too far away. + break; + } + } + + EditType edit = edits[edit_i]; + // Reset count when a non match is found. + n_suffix = edit == kMatch ? n_suffix + 1 : 0; + + if (edit == kMatch || edit == kRemove || edit == kReplace) { + hunk.PushLine(edit == kMatch ? ' ' : '-', left[l_i].c_str()); + } + if (edit == kAdd || edit == kReplace) { + hunk.PushLine('+', right[r_i].c_str()); + } + + // Advance indices, depending on edit type. + l_i += edit != kAdd; + r_i += edit != kRemove; + } + + if (!hunk.has_edits()) { + // We are done. We don't want this hunk. + break; + } + + hunk.PrintTo(&ss); + } + return ss.str(); +} + +} // namespace edit_distance + +namespace { + +// The string representation of the values received in EqFailure() are already +// escaped. Split them on escaped '\n' boundaries. Leave all other escaped +// characters the same. +std::vector SplitEscapedString(const std::string& str) { + std::vector lines; + size_t start = 0, end = str.size(); + if (end > 2 && str[0] == '"' && str[end - 1] == '"') { + ++start; + --end; + } + bool escaped = false; + for (size_t i = start; i + 1 < end; ++i) { + if (escaped) { + escaped = false; + if (str[i] == 'n') { + lines.push_back(str.substr(start, i - start - 1)); + start = i + 1; + } + } else { + escaped = str[i] == '\\'; + } + } + lines.push_back(str.substr(start, end - start)); + return lines; +} + +} // namespace + +// Constructs and returns the message for an equality assertion +// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. +// +// The first four parameters are the expressions used in the assertion +// and their values, as strings. For example, for ASSERT_EQ(foo, bar) +// where foo is 5 and bar is 6, we have: +// +// lhs_expression: "foo" +// rhs_expression: "bar" +// lhs_value: "5" +// rhs_value: "6" +// +// The ignoring_case parameter is true iff the assertion is a +// *_STRCASEEQ*. When it's true, the string "Ignoring case" will +// be inserted into the message. +AssertionResult EqFailure(const char* lhs_expression, + const char* rhs_expression, + const std::string& lhs_value, + const std::string& rhs_value, + bool ignoring_case) { + Message msg; + msg << "Expected equality of these values:"; + msg << "\n " << lhs_expression; + if (lhs_value != lhs_expression) { + msg << "\n Which is: " << lhs_value; + } + msg << "\n " << rhs_expression; + if (rhs_value != rhs_expression) { + msg << "\n Which is: " << rhs_value; + } + + if (ignoring_case) { + msg << "\nIgnoring case"; + } + + if (!lhs_value.empty() && !rhs_value.empty()) { + const std::vector lhs_lines = + SplitEscapedString(lhs_value); + const std::vector rhs_lines = + SplitEscapedString(rhs_value); + if (lhs_lines.size() > 1 || rhs_lines.size() > 1) { + msg << "\nWith diff:\n" + << edit_distance::CreateUnifiedDiff(lhs_lines, rhs_lines); + } + } + + return AssertionFailure() << msg; +} + +// Constructs a failure message for Boolean assertions such as EXPECT_TRUE. +std::string GetBoolAssertionFailureMessage( + const AssertionResult& assertion_result, + const char* expression_text, + const char* actual_predicate_value, + const char* expected_predicate_value) { + const char* actual_message = assertion_result.message(); + Message msg; + msg << "Value of: " << expression_text + << "\n Actual: " << actual_predicate_value; + if (actual_message[0] != '\0') + msg << " (" << actual_message << ")"; + msg << "\nExpected: " << expected_predicate_value; + return msg.GetString(); +} + +// Helper function for implementing ASSERT_NEAR. +AssertionResult DoubleNearPredFormat(const char* expr1, + const char* expr2, + const char* abs_error_expr, + double val1, + double val2, + double abs_error) { + const double diff = fabs(val1 - val2); + if (diff <= abs_error) return AssertionSuccess(); + + return AssertionFailure() + << "The difference between " << expr1 << " and " << expr2 + << " is " << diff << ", which exceeds " << abs_error_expr << ", where\n" + << expr1 << " evaluates to " << val1 << ",\n" + << expr2 << " evaluates to " << val2 << ", and\n" + << abs_error_expr << " evaluates to " << abs_error << "."; +} + + +// Helper template for implementing FloatLE() and DoubleLE(). +template +AssertionResult FloatingPointLE(const char* expr1, + const char* expr2, + RawType val1, + RawType val2) { + // Returns success if val1 is less than val2, + if (val1 < val2) { + return AssertionSuccess(); + } + + // or if val1 is almost equal to val2. + const FloatingPoint lhs(val1), rhs(val2); + if (lhs.AlmostEquals(rhs)) { + return AssertionSuccess(); + } + + // Note that the above two checks will both fail if either val1 or + // val2 is NaN, as the IEEE floating-point standard requires that + // any predicate involving a NaN must return false. + + ::std::stringstream val1_ss; + val1_ss << std::setprecision(std::numeric_limits::digits10 + 2) + << val1; + + ::std::stringstream val2_ss; + val2_ss << std::setprecision(std::numeric_limits::digits10 + 2) + << val2; + + return AssertionFailure() + << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n" + << " Actual: " << StringStreamToString(&val1_ss) << " vs " + << StringStreamToString(&val2_ss); +} + +} // namespace internal + +// Asserts that val1 is less than, or almost equal to, val2. Fails +// otherwise. In particular, it fails if either val1 or val2 is NaN. +AssertionResult FloatLE(const char* expr1, const char* expr2, + float val1, float val2) { + return internal::FloatingPointLE(expr1, expr2, val1, val2); +} + +// Asserts that val1 is less than, or almost equal to, val2. Fails +// otherwise. In particular, it fails if either val1 or val2 is NaN. +AssertionResult DoubleLE(const char* expr1, const char* expr2, + double val1, double val2) { + return internal::FloatingPointLE(expr1, expr2, val1, val2); +} + +namespace internal { + +// The helper function for {ASSERT|EXPECT}_EQ with int or enum +// arguments. +AssertionResult CmpHelperEQ(const char* lhs_expression, + const char* rhs_expression, + BiggestInt lhs, + BiggestInt rhs) { + if (lhs == rhs) { + return AssertionSuccess(); + } + + return EqFailure(lhs_expression, + rhs_expression, + FormatForComparisonFailureMessage(lhs, rhs), + FormatForComparisonFailureMessage(rhs, lhs), + false); +} + +// A macro for implementing the helper functions needed to implement +// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here +// just to avoid copy-and-paste of similar code. +#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ +AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ + BiggestInt val1, BiggestInt val2) {\ + if (val1 op val2) {\ + return AssertionSuccess();\ + } else {\ + return AssertionFailure() \ + << "Expected: (" << expr1 << ") " #op " (" << expr2\ + << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ + << " vs " << FormatForComparisonFailureMessage(val2, val1);\ + }\ +} + +// Implements the helper function for {ASSERT|EXPECT}_NE with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(NE, !=) +// Implements the helper function for {ASSERT|EXPECT}_LE with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(LE, <=) +// Implements the helper function for {ASSERT|EXPECT}_LT with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(LT, < ) +// Implements the helper function for {ASSERT|EXPECT}_GE with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(GE, >=) +// Implements the helper function for {ASSERT|EXPECT}_GT with int or +// enum arguments. +GTEST_IMPL_CMP_HELPER_(GT, > ) + +#undef GTEST_IMPL_CMP_HELPER_ + +// The helper function for {ASSERT|EXPECT}_STREQ. +AssertionResult CmpHelperSTREQ(const char* lhs_expression, + const char* rhs_expression, + const char* lhs, + const char* rhs) { + if (String::CStringEquals(lhs, rhs)) { + return AssertionSuccess(); + } + + return EqFailure(lhs_expression, + rhs_expression, + PrintToString(lhs), + PrintToString(rhs), + false); +} + +// The helper function for {ASSERT|EXPECT}_STRCASEEQ. +AssertionResult CmpHelperSTRCASEEQ(const char* lhs_expression, + const char* rhs_expression, + const char* lhs, + const char* rhs) { + if (String::CaseInsensitiveCStringEquals(lhs, rhs)) { + return AssertionSuccess(); + } + + return EqFailure(lhs_expression, + rhs_expression, + PrintToString(lhs), + PrintToString(rhs), + true); +} + +// The helper function for {ASSERT|EXPECT}_STRNE. +AssertionResult CmpHelperSTRNE(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2) { + if (!String::CStringEquals(s1, s2)) { + return AssertionSuccess(); + } else { + return AssertionFailure() << "Expected: (" << s1_expression << ") != (" + << s2_expression << "), actual: \"" + << s1 << "\" vs \"" << s2 << "\""; + } +} + +// The helper function for {ASSERT|EXPECT}_STRCASENE. +AssertionResult CmpHelperSTRCASENE(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2) { + if (!String::CaseInsensitiveCStringEquals(s1, s2)) { + return AssertionSuccess(); + } else { + return AssertionFailure() + << "Expected: (" << s1_expression << ") != (" + << s2_expression << ") (ignoring case), actual: \"" + << s1 << "\" vs \"" << s2 << "\""; + } +} + +} // namespace internal + +namespace { + +// Helper functions for implementing IsSubString() and IsNotSubstring(). + +// This group of overloaded functions return true iff needle is a +// substring of haystack. NULL is considered a substring of itself +// only. + +bool IsSubstringPred(const char* needle, const char* haystack) { + if (needle == nullptr || haystack == nullptr) return needle == haystack; + + return strstr(haystack, needle) != nullptr; +} + +bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { + if (needle == nullptr || haystack == nullptr) return needle == haystack; + + return wcsstr(haystack, needle) != nullptr; +} + +// StringType here can be either ::std::string or ::std::wstring. +template +bool IsSubstringPred(const StringType& needle, + const StringType& haystack) { + return haystack.find(needle) != StringType::npos; +} + +// This function implements either IsSubstring() or IsNotSubstring(), +// depending on the value of the expected_to_be_substring parameter. +// StringType here can be const char*, const wchar_t*, ::std::string, +// or ::std::wstring. +template +AssertionResult IsSubstringImpl( + bool expected_to_be_substring, + const char* needle_expr, const char* haystack_expr, + const StringType& needle, const StringType& haystack) { + if (IsSubstringPred(needle, haystack) == expected_to_be_substring) + return AssertionSuccess(); + + const bool is_wide_string = sizeof(needle[0]) > 1; + const char* const begin_string_quote = is_wide_string ? "L\"" : "\""; + return AssertionFailure() + << "Value of: " << needle_expr << "\n" + << " Actual: " << begin_string_quote << needle << "\"\n" + << "Expected: " << (expected_to_be_substring ? "" : "not ") + << "a substring of " << haystack_expr << "\n" + << "Which is: " << begin_string_quote << haystack << "\""; +} + +} // namespace + +// IsSubstring() and IsNotSubstring() check whether needle is a +// substring of haystack (NULL is considered a substring of itself +// only), and return an appropriate error message when they fail. + +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const char* needle, const char* haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const wchar_t* needle, const wchar_t* haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const char* needle, const char* haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const wchar_t* needle, const wchar_t* haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::string& needle, const ::std::string& haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::string& needle, const ::std::string& haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} + +#if GTEST_HAS_STD_WSTRING +AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::wstring& needle, const ::std::wstring& haystack) { + return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack); +} + +AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::wstring& needle, const ::std::wstring& haystack) { + return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack); +} +#endif // GTEST_HAS_STD_WSTRING + +namespace internal { + +#if GTEST_OS_WINDOWS + +namespace { + +// Helper function for IsHRESULT{SuccessFailure} predicates +AssertionResult HRESULTFailureHelper(const char* expr, + const char* expected, + long hr) { // NOLINT +# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_TV_TITLE + + // Windows CE doesn't support FormatMessage. + const char error_text[] = ""; + +# else + + // Looks up the human-readable system message for the HRESULT code + // and since we're not passing any params to FormatMessage, we don't + // want inserts expanded. + const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS; + const DWORD kBufSize = 4096; + // Gets the system's human readable message string for this HRESULT. + char error_text[kBufSize] = { '\0' }; + DWORD message_length = ::FormatMessageA(kFlags, + 0, // no source, we're asking system + static_cast(hr), // the error + 0, // no line width restrictions + error_text, // output buffer + kBufSize, // buf size + nullptr); // no arguments for inserts + // Trims tailing white space (FormatMessage leaves a trailing CR-LF) + for (; message_length && IsSpace(error_text[message_length - 1]); + --message_length) { + error_text[message_length - 1] = '\0'; + } + +# endif // GTEST_OS_WINDOWS_MOBILE + + const std::string error_hex("0x" + String::FormatHexInt(hr)); + return ::testing::AssertionFailure() + << "Expected: " << expr << " " << expected << ".\n" + << " Actual: " << error_hex << " " << error_text << "\n"; +} + +} // namespace + +AssertionResult IsHRESULTSuccess(const char* expr, long hr) { // NOLINT + if (SUCCEEDED(hr)) { + return AssertionSuccess(); + } + return HRESULTFailureHelper(expr, "succeeds", hr); +} + +AssertionResult IsHRESULTFailure(const char* expr, long hr) { // NOLINT + if (FAILED(hr)) { + return AssertionSuccess(); + } + return HRESULTFailureHelper(expr, "fails", hr); +} + +#endif // GTEST_OS_WINDOWS + +// Utility functions for encoding Unicode text (wide strings) in +// UTF-8. + +// A Unicode code-point can have up to 21 bits, and is encoded in UTF-8 +// like this: +// +// Code-point length Encoding +// 0 - 7 bits 0xxxxxxx +// 8 - 11 bits 110xxxxx 10xxxxxx +// 12 - 16 bits 1110xxxx 10xxxxxx 10xxxxxx +// 17 - 21 bits 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + +// The maximum code-point a one-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint1 = (static_cast(1) << 7) - 1; + +// The maximum code-point a two-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint2 = (static_cast(1) << (5 + 6)) - 1; + +// The maximum code-point a three-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint3 = (static_cast(1) << (4 + 2*6)) - 1; + +// The maximum code-point a four-byte UTF-8 sequence can represent. +const UInt32 kMaxCodePoint4 = (static_cast(1) << (3 + 3*6)) - 1; + +// Chops off the n lowest bits from a bit pattern. Returns the n +// lowest bits. As a side effect, the original bit pattern will be +// shifted to the right by n bits. +inline UInt32 ChopLowBits(UInt32* bits, int n) { + const UInt32 low_bits = *bits & ((static_cast(1) << n) - 1); + *bits >>= n; + return low_bits; +} + +// Converts a Unicode code point to a narrow string in UTF-8 encoding. +// code_point parameter is of type UInt32 because wchar_t may not be +// wide enough to contain a code point. +// If the code_point is not a valid Unicode code point +// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted +// to "(Invalid Unicode 0xXXXXXXXX)". +std::string CodePointToUtf8(UInt32 code_point) { + if (code_point > kMaxCodePoint4) { + return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")"; + } + + char str[5]; // Big enough for the largest valid code point. + if (code_point <= kMaxCodePoint1) { + str[1] = '\0'; + str[0] = static_cast(code_point); // 0xxxxxxx + } else if (code_point <= kMaxCodePoint2) { + str[2] = '\0'; + str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[0] = static_cast(0xC0 | code_point); // 110xxxxx + } else if (code_point <= kMaxCodePoint3) { + str[3] = '\0'; + str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[0] = static_cast(0xE0 | code_point); // 1110xxxx + } else { // code_point <= kMaxCodePoint4 + str[4] = '\0'; + str[3] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[2] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[1] = static_cast(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx + str[0] = static_cast(0xF0 | code_point); // 11110xxx + } + return str; +} + +// The following two functions only make sense if the system +// uses UTF-16 for wide string encoding. All supported systems +// with 16 bit wchar_t (Windows, Cygwin) do use UTF-16. + +// Determines if the arguments constitute UTF-16 surrogate pair +// and thus should be combined into a single Unicode code point +// using CreateCodePointFromUtf16SurrogatePair. +inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) { + return sizeof(wchar_t) == 2 && + (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00; +} + +// Creates a Unicode code point from UTF16 surrogate pair. +inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first, + wchar_t second) { + const auto first_u = static_cast(first); + const auto second_u = static_cast(second); + const UInt32 mask = (1 << 10) - 1; + return (sizeof(wchar_t) == 2) + ? (((first_u & mask) << 10) | (second_u & mask)) + 0x10000 + : + // This function should not be called when the condition is + // false, but we provide a sensible default in case it is. + first_u; +} + +// Converts a wide string to a narrow string in UTF-8 encoding. +// The wide string is assumed to have the following encoding: +// UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin) +// UTF-32 if sizeof(wchar_t) == 4 (on Linux) +// Parameter str points to a null-terminated wide string. +// Parameter num_chars may additionally limit the number +// of wchar_t characters processed. -1 is used when the entire string +// should be processed. +// If the string contains code points that are not valid Unicode code points +// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output +// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding +// and contains invalid UTF-16 surrogate pairs, values in those pairs +// will be encoded as individual Unicode characters from Basic Normal Plane. +std::string WideStringToUtf8(const wchar_t* str, int num_chars) { + if (num_chars == -1) + num_chars = static_cast(wcslen(str)); + + ::std::stringstream stream; + for (int i = 0; i < num_chars; ++i) { + UInt32 unicode_code_point; + + if (str[i] == L'\0') { + break; + } else if (i + 1 < num_chars && IsUtf16SurrogatePair(str[i], str[i + 1])) { + unicode_code_point = CreateCodePointFromUtf16SurrogatePair(str[i], + str[i + 1]); + i++; + } else { + unicode_code_point = static_cast(str[i]); + } + + stream << CodePointToUtf8(unicode_code_point); + } + return StringStreamToString(&stream); +} + +// Converts a wide C string to an std::string using the UTF-8 encoding. +// NULL will be converted to "(null)". +std::string String::ShowWideCString(const wchar_t * wide_c_str) { + if (wide_c_str == nullptr) return "(null)"; + + return internal::WideStringToUtf8(wide_c_str, -1); +} + +// Compares two wide C strings. Returns true iff they have the same +// content. +// +// Unlike wcscmp(), this function can handle NULL argument(s). A NULL +// C string is considered different to any non-NULL C string, +// including the empty string. +bool String::WideCStringEquals(const wchar_t * lhs, const wchar_t * rhs) { + if (lhs == nullptr) return rhs == nullptr; + + if (rhs == nullptr) return false; + + return wcscmp(lhs, rhs) == 0; +} + +// Helper function for *_STREQ on wide strings. +AssertionResult CmpHelperSTREQ(const char* lhs_expression, + const char* rhs_expression, + const wchar_t* lhs, + const wchar_t* rhs) { + if (String::WideCStringEquals(lhs, rhs)) { + return AssertionSuccess(); + } + + return EqFailure(lhs_expression, + rhs_expression, + PrintToString(lhs), + PrintToString(rhs), + false); +} + +// Helper function for *_STRNE on wide strings. +AssertionResult CmpHelperSTRNE(const char* s1_expression, + const char* s2_expression, + const wchar_t* s1, + const wchar_t* s2) { + if (!String::WideCStringEquals(s1, s2)) { + return AssertionSuccess(); + } + + return AssertionFailure() << "Expected: (" << s1_expression << ") != (" + << s2_expression << "), actual: " + << PrintToString(s1) + << " vs " << PrintToString(s2); +} + +// Compares two C strings, ignoring case. Returns true iff they have +// the same content. +// +// Unlike strcasecmp(), this function can handle NULL argument(s). A +// NULL C string is considered different to any non-NULL C string, +// including the empty string. +bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { + if (lhs == nullptr) return rhs == nullptr; + if (rhs == nullptr) return false; + return posix::StrCaseCmp(lhs, rhs) == 0; +} + + // Compares two wide C strings, ignoring case. Returns true iff they + // have the same content. + // + // Unlike wcscasecmp(), this function can handle NULL argument(s). + // A NULL C string is considered different to any non-NULL wide C string, + // including the empty string. + // NB: The implementations on different platforms slightly differ. + // On windows, this method uses _wcsicmp which compares according to LC_CTYPE + // environment variable. On GNU platform this method uses wcscasecmp + // which compares according to LC_CTYPE category of the current locale. + // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the + // current locale. +bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs, + const wchar_t* rhs) { + if (lhs == nullptr) return rhs == nullptr; + + if (rhs == nullptr) return false; + +#if GTEST_OS_WINDOWS + return _wcsicmp(lhs, rhs) == 0; +#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID + return wcscasecmp(lhs, rhs) == 0; +#else + // Android, Mac OS X and Cygwin don't define wcscasecmp. + // Other unknown OSes may not define it either. + wint_t left, right; + do { + left = towlower(*lhs++); + right = towlower(*rhs++); + } while (left && left == right); + return left == right; +#endif // OS selector +} + +// Returns true iff str ends with the given suffix, ignoring case. +// Any string is considered to end with an empty suffix. +bool String::EndsWithCaseInsensitive( + const std::string& str, const std::string& suffix) { + const size_t str_len = str.length(); + const size_t suffix_len = suffix.length(); + return (str_len >= suffix_len) && + CaseInsensitiveCStringEquals(str.c_str() + str_len - suffix_len, + suffix.c_str()); +} + +// Formats an int value as "%02d". +std::string String::FormatIntWidth2(int value) { + std::stringstream ss; + ss << std::setfill('0') << std::setw(2) << value; + return ss.str(); +} + +// Formats an int value as "%X". +std::string String::FormatHexUInt32(UInt32 value) { + std::stringstream ss; + ss << std::hex << std::uppercase << value; + return ss.str(); +} + +// Formats an int value as "%X". +std::string String::FormatHexInt(int value) { + return FormatHexUInt32(static_cast(value)); +} + +// Formats a byte as "%02X". +std::string String::FormatByte(unsigned char value) { + std::stringstream ss; + ss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase + << static_cast(value); + return ss.str(); +} + +// Converts the buffer in a stringstream to an std::string, converting NUL +// bytes to "\\0" along the way. +std::string StringStreamToString(::std::stringstream* ss) { + const ::std::string& str = ss->str(); + const char* const start = str.c_str(); + const char* const end = start + str.length(); + + std::string result; + result.reserve(static_cast(2 * (end - start))); + for (const char* ch = start; ch != end; ++ch) { + if (*ch == '\0') { + result += "\\0"; // Replaces NUL with "\\0"; + } else { + result += *ch; + } + } + + return result; +} + +// Appends the user-supplied message to the Google-Test-generated message. +std::string AppendUserMessage(const std::string& gtest_msg, + const Message& user_msg) { + // Appends the user message if it's non-empty. + const std::string user_msg_string = user_msg.GetString(); + if (user_msg_string.empty()) { + return gtest_msg; + } + + return gtest_msg + "\n" + user_msg_string; +} + +} // namespace internal + +// class TestResult + +// Creates an empty TestResult. +TestResult::TestResult() + : death_test_count_(0), + elapsed_time_(0) { +} + +// D'tor. +TestResult::~TestResult() { +} + +// Returns the i-th test part result among all the results. i can +// range from 0 to total_part_count() - 1. If i is not in that range, +// aborts the program. +const TestPartResult& TestResult::GetTestPartResult(int i) const { + if (i < 0 || i >= total_part_count()) + internal::posix::Abort(); + return test_part_results_.at(static_cast(i)); +} + +// Returns the i-th test property. i can range from 0 to +// test_property_count() - 1. If i is not in that range, aborts the +// program. +const TestProperty& TestResult::GetTestProperty(int i) const { + if (i < 0 || i >= test_property_count()) + internal::posix::Abort(); + return test_properties_.at(static_cast(i)); +} + +// Clears the test part results. +void TestResult::ClearTestPartResults() { + test_part_results_.clear(); +} + +// Adds a test part result to the list. +void TestResult::AddTestPartResult(const TestPartResult& test_part_result) { + test_part_results_.push_back(test_part_result); +} + +// Adds a test property to the list. If a property with the same key as the +// supplied property is already represented, the value of this test_property +// replaces the old value for that key. +void TestResult::RecordProperty(const std::string& xml_element, + const TestProperty& test_property) { + if (!ValidateTestProperty(xml_element, test_property)) { + return; + } + internal::MutexLock lock(&test_properites_mutex_); + const std::vector::iterator property_with_matching_key = + std::find_if(test_properties_.begin(), test_properties_.end(), + internal::TestPropertyKeyIs(test_property.key())); + if (property_with_matching_key == test_properties_.end()) { + test_properties_.push_back(test_property); + return; + } + property_with_matching_key->SetValue(test_property.value()); +} + +// The list of reserved attributes used in the element of XML +// output. +static const char* const kReservedTestSuitesAttributes[] = { + "disabled", + "errors", + "failures", + "name", + "random_seed", + "tests", + "time", + "timestamp" +}; + +// The list of reserved attributes used in the element of XML +// output. +static const char* const kReservedTestSuiteAttributes[] = { + "disabled", + "errors", + "failures", + "name", + "tests", + "time" +}; + +// The list of reserved attributes used in the element of XML output. +static const char* const kReservedTestCaseAttributes[] = { + "classname", "name", "status", "time", "type_param", + "value_param", "file", "line"}; + +// Use a slightly different set for allowed output to ensure existing tests can +// still RecordProperty("result") +static const char* const kReservedOutputTestCaseAttributes[] = { + "classname", "name", "status", "time", "type_param", + "value_param", "file", "line", "result"}; + +template +std::vector ArrayAsVector(const char* const (&array)[kSize]) { + return std::vector(array, array + kSize); +} + +static std::vector GetReservedAttributesForElement( + const std::string& xml_element) { + if (xml_element == "testsuites") { + return ArrayAsVector(kReservedTestSuitesAttributes); + } else if (xml_element == "testsuite") { + return ArrayAsVector(kReservedTestSuiteAttributes); + } else if (xml_element == "testcase") { + return ArrayAsVector(kReservedTestCaseAttributes); + } else { + GTEST_CHECK_(false) << "Unrecognized xml_element provided: " << xml_element; + } + // This code is unreachable but some compilers may not realizes that. + return std::vector(); +} + +// TODO(jdesprez): Merge the two getReserved attributes once skip is improved +static std::vector GetReservedOutputAttributesForElement( + const std::string& xml_element) { + if (xml_element == "testsuites") { + return ArrayAsVector(kReservedTestSuitesAttributes); + } else if (xml_element == "testsuite") { + return ArrayAsVector(kReservedTestSuiteAttributes); + } else if (xml_element == "testcase") { + return ArrayAsVector(kReservedOutputTestCaseAttributes); + } else { + GTEST_CHECK_(false) << "Unrecognized xml_element provided: " << xml_element; + } + // This code is unreachable but some compilers may not realizes that. + return std::vector(); +} + +static std::string FormatWordList(const std::vector& words) { + Message word_list; + for (size_t i = 0; i < words.size(); ++i) { + if (i > 0 && words.size() > 2) { + word_list << ", "; + } + if (i == words.size() - 1) { + word_list << "and "; + } + word_list << "'" << words[i] << "'"; + } + return word_list.GetString(); +} + +static bool ValidateTestPropertyName( + const std::string& property_name, + const std::vector& reserved_names) { + if (std::find(reserved_names.begin(), reserved_names.end(), property_name) != + reserved_names.end()) { + ADD_FAILURE() << "Reserved key used in RecordProperty(): " << property_name + << " (" << FormatWordList(reserved_names) + << " are reserved by " << GTEST_NAME_ << ")"; + return false; + } + return true; +} + +// Adds a failure if the key is a reserved attribute of the element named +// xml_element. Returns true if the property is valid. +bool TestResult::ValidateTestProperty(const std::string& xml_element, + const TestProperty& test_property) { + return ValidateTestPropertyName(test_property.key(), + GetReservedAttributesForElement(xml_element)); +} + +// Clears the object. +void TestResult::Clear() { + test_part_results_.clear(); + test_properties_.clear(); + death_test_count_ = 0; + elapsed_time_ = 0; +} + +// Returns true off the test part was skipped. +static bool TestPartSkipped(const TestPartResult& result) { + return result.skipped(); +} + +// Returns true iff the test was skipped. +bool TestResult::Skipped() const { + return !Failed() && CountIf(test_part_results_, TestPartSkipped) > 0; +} + +// Returns true iff the test failed. +bool TestResult::Failed() const { + for (int i = 0; i < total_part_count(); ++i) { + if (GetTestPartResult(i).failed()) + return true; + } + return false; +} + +// Returns true iff the test part fatally failed. +static bool TestPartFatallyFailed(const TestPartResult& result) { + return result.fatally_failed(); +} + +// Returns true iff the test fatally failed. +bool TestResult::HasFatalFailure() const { + return CountIf(test_part_results_, TestPartFatallyFailed) > 0; +} + +// Returns true iff the test part non-fatally failed. +static bool TestPartNonfatallyFailed(const TestPartResult& result) { + return result.nonfatally_failed(); +} + +// Returns true iff the test has a non-fatal failure. +bool TestResult::HasNonfatalFailure() const { + return CountIf(test_part_results_, TestPartNonfatallyFailed) > 0; +} + +// Gets the number of all test parts. This is the sum of the number +// of successful test parts and the number of failed test parts. +int TestResult::total_part_count() const { + return static_cast(test_part_results_.size()); +} + +// Returns the number of the test properties. +int TestResult::test_property_count() const { + return static_cast(test_properties_.size()); +} + +// class Test + +// Creates a Test object. + +// The c'tor saves the states of all flags. +Test::Test() + : gtest_flag_saver_(new GTEST_FLAG_SAVER_) { +} + +// The d'tor restores the states of all flags. The actual work is +// done by the d'tor of the gtest_flag_saver_ field, and thus not +// visible here. +Test::~Test() { +} + +// Sets up the test fixture. +// +// A sub-class may override this. +void Test::SetUp() { +} + +// Tears down the test fixture. +// +// A sub-class may override this. +void Test::TearDown() { +} + +// Allows user supplied key value pairs to be recorded for later output. +void Test::RecordProperty(const std::string& key, const std::string& value) { + UnitTest::GetInstance()->RecordProperty(key, value); +} + +// Allows user supplied key value pairs to be recorded for later output. +void Test::RecordProperty(const std::string& key, int value) { + Message value_message; + value_message << value; + RecordProperty(key, value_message.GetString().c_str()); +} + +namespace internal { + +void ReportFailureInUnknownLocation(TestPartResult::Type result_type, + const std::string& message) { + // This function is a friend of UnitTest and as such has access to + // AddTestPartResult. + UnitTest::GetInstance()->AddTestPartResult( + result_type, + nullptr, // No info about the source file where the exception occurred. + -1, // We have no info on which line caused the exception. + message, + ""); // No stack trace, either. +} + +} // namespace internal + +// Google Test requires all tests in the same test suite to use the same test +// fixture class. This function checks if the current test has the +// same fixture class as the first test in the current test suite. If +// yes, it returns true; otherwise it generates a Google Test failure and +// returns false. +bool Test::HasSameFixtureClass() { + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + const TestSuite* const test_suite = impl->current_test_suite(); + + // Info about the first test in the current test suite. + const TestInfo* const first_test_info = test_suite->test_info_list()[0]; + const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_; + const char* const first_test_name = first_test_info->name(); + + // Info about the current test. + const TestInfo* const this_test_info = impl->current_test_info(); + const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_; + const char* const this_test_name = this_test_info->name(); + + if (this_fixture_id != first_fixture_id) { + // Is the first test defined using TEST? + const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId(); + // Is this test defined using TEST? + const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId(); + + if (first_is_TEST || this_is_TEST) { + // Both TEST and TEST_F appear in same test suite, which is incorrect. + // Tell the user how to fix this. + + // Gets the name of the TEST and the name of the TEST_F. Note + // that first_is_TEST and this_is_TEST cannot both be true, as + // the fixture IDs are different for the two tests. + const char* const TEST_name = + first_is_TEST ? first_test_name : this_test_name; + const char* const TEST_F_name = + first_is_TEST ? this_test_name : first_test_name; + + ADD_FAILURE() + << "All tests in the same test suite must use the same test fixture\n" + << "class, so mixing TEST_F and TEST in the same test suite is\n" + << "illegal. In test suite " << this_test_info->test_suite_name() + << ",\n" + << "test " << TEST_F_name << " is defined using TEST_F but\n" + << "test " << TEST_name << " is defined using TEST. You probably\n" + << "want to change the TEST to TEST_F or move it to another test\n" + << "case."; + } else { + // Two fixture classes with the same name appear in two different + // namespaces, which is not allowed. Tell the user how to fix this. + ADD_FAILURE() + << "All tests in the same test suite must use the same test fixture\n" + << "class. However, in test suite " + << this_test_info->test_suite_name() << ",\n" + << "you defined test " << first_test_name << " and test " + << this_test_name << "\n" + << "using two different test fixture classes. This can happen if\n" + << "the two classes are from different namespaces or translation\n" + << "units and have the same name. You should probably rename one\n" + << "of the classes to put the tests into different test suites."; + } + return false; + } + + return true; +} + +#if GTEST_HAS_SEH + +// Adds an "exception thrown" fatal failure to the current test. This +// function returns its result via an output parameter pointer because VC++ +// prohibits creation of objects with destructors on stack in functions +// using __try (see error C2712). +static std::string* FormatSehExceptionMessage(DWORD exception_code, + const char* location) { + Message message; + message << "SEH exception with code 0x" << std::setbase(16) << + exception_code << std::setbase(10) << " thrown in " << location << "."; + + return new std::string(message.GetString()); +} + +#endif // GTEST_HAS_SEH + +namespace internal { + +#if GTEST_HAS_EXCEPTIONS + +// Adds an "exception thrown" fatal failure to the current test. +static std::string FormatCxxExceptionMessage(const char* description, + const char* location) { + Message message; + if (description != nullptr) { + message << "C++ exception with description \"" << description << "\""; + } else { + message << "Unknown C++ exception"; + } + message << " thrown in " << location << "."; + + return message.GetString(); +} + +static std::string PrintTestPartResultToString( + const TestPartResult& test_part_result); + +GoogleTestFailureException::GoogleTestFailureException( + const TestPartResult& failure) + : ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {} + +#endif // GTEST_HAS_EXCEPTIONS + +// We put these helper functions in the internal namespace as IBM's xlC +// compiler rejects the code if they were declared static. + +// Runs the given method and handles SEH exceptions it throws, when +// SEH is supported; returns the 0-value for type Result in case of an +// SEH exception. (Microsoft compilers cannot handle SEH and C++ +// exceptions in the same function. Therefore, we provide a separate +// wrapper function for handling SEH exceptions.) +template +Result HandleSehExceptionsInMethodIfSupported( + T* object, Result (T::*method)(), const char* location) { +#if GTEST_HAS_SEH + __try { + return (object->*method)(); + } __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT + GetExceptionCode())) { + // We create the exception message on the heap because VC++ prohibits + // creation of objects with destructors on stack in functions using __try + // (see error C2712). + std::string* exception_message = FormatSehExceptionMessage( + GetExceptionCode(), location); + internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure, + *exception_message); + delete exception_message; + return static_cast(0); + } +#else + (void)location; + return (object->*method)(); +#endif // GTEST_HAS_SEH +} + +// Runs the given method and catches and reports C++ and/or SEH-style +// exceptions, if they are supported; returns the 0-value for type +// Result in case of an SEH exception. +template +Result HandleExceptionsInMethodIfSupported( + T* object, Result (T::*method)(), const char* location) { + // NOTE: The user code can affect the way in which Google Test handles + // exceptions by setting GTEST_FLAG(catch_exceptions), but only before + // RUN_ALL_TESTS() starts. It is technically possible to check the flag + // after the exception is caught and either report or re-throw the + // exception based on the flag's value: + // + // try { + // // Perform the test method. + // } catch (...) { + // if (GTEST_FLAG(catch_exceptions)) + // // Report the exception as failure. + // else + // throw; // Re-throws the original exception. + // } + // + // However, the purpose of this flag is to allow the program to drop into + // the debugger when the exception is thrown. On most platforms, once the + // control enters the catch block, the exception origin information is + // lost and the debugger will stop the program at the point of the + // re-throw in this function -- instead of at the point of the original + // throw statement in the code under test. For this reason, we perform + // the check early, sacrificing the ability to affect Google Test's + // exception handling in the method where the exception is thrown. + if (internal::GetUnitTestImpl()->catch_exceptions()) { +#if GTEST_HAS_EXCEPTIONS + try { + return HandleSehExceptionsInMethodIfSupported(object, method, location); + } catch (const AssertionException&) { // NOLINT + // This failure was reported already. + } catch (const internal::GoogleTestFailureException&) { // NOLINT + // This exception type can only be thrown by a failed Google + // Test assertion with the intention of letting another testing + // framework catch it. Therefore we just re-throw it. + throw; + } catch (const std::exception& e) { // NOLINT + internal::ReportFailureInUnknownLocation( + TestPartResult::kFatalFailure, + FormatCxxExceptionMessage(e.what(), location)); + } catch (...) { // NOLINT + internal::ReportFailureInUnknownLocation( + TestPartResult::kFatalFailure, + FormatCxxExceptionMessage(nullptr, location)); + } + return static_cast(0); +#else + return HandleSehExceptionsInMethodIfSupported(object, method, location); +#endif // GTEST_HAS_EXCEPTIONS + } else { + return (object->*method)(); + } +} + +} // namespace internal + +// Runs the test and updates the test result. +void Test::Run() { + if (!HasSameFixtureClass()) return; + + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()"); + // We will run the test only if SetUp() was successful and didn't call + // GTEST_SKIP(). + if (!HasFatalFailure() && !IsSkipped()) { + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &Test::TestBody, "the test body"); + } + + // However, we want to clean up as much as possible. Hence we will + // always call TearDown(), even if SetUp() or the test body has + // failed. + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &Test::TearDown, "TearDown()"); +} + +// Returns true iff the current test has a fatal failure. +bool Test::HasFatalFailure() { + return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure(); +} + +// Returns true iff the current test has a non-fatal failure. +bool Test::HasNonfatalFailure() { + return internal::GetUnitTestImpl()->current_test_result()-> + HasNonfatalFailure(); +} + +// Returns true iff the current test was skipped. +bool Test::IsSkipped() { + return internal::GetUnitTestImpl()->current_test_result()->Skipped(); +} + +// class TestInfo + +// Constructs a TestInfo object. It assumes ownership of the test factory +// object. +TestInfo::TestInfo(const std::string& a_test_suite_name, + const std::string& a_name, const char* a_type_param, + const char* a_value_param, + internal::CodeLocation a_code_location, + internal::TypeId fixture_class_id, + internal::TestFactoryBase* factory) + : test_suite_name_(a_test_suite_name), + name_(a_name), + type_param_(a_type_param ? new std::string(a_type_param) : nullptr), + value_param_(a_value_param ? new std::string(a_value_param) : nullptr), + location_(a_code_location), + fixture_class_id_(fixture_class_id), + should_run_(false), + is_disabled_(false), + matches_filter_(false), + factory_(factory), + result_() {} + +// Destructs a TestInfo object. +TestInfo::~TestInfo() { delete factory_; } + +namespace internal { + +// Creates a new TestInfo object and registers it with Google Test; +// returns the created object. +// +// Arguments: +// +// test_suite_name: name of the test suite +// name: name of the test +// type_param: the name of the test's type parameter, or NULL if +// this is not a typed or a type-parameterized test. +// value_param: text representation of the test's value parameter, +// or NULL if this is not a value-parameterized test. +// code_location: code location where the test is defined +// fixture_class_id: ID of the test fixture class +// set_up_tc: pointer to the function that sets up the test suite +// tear_down_tc: pointer to the function that tears down the test suite +// factory: pointer to the factory that creates a test object. +// The newly created TestInfo instance will assume +// ownership of the factory object. +TestInfo* MakeAndRegisterTestInfo( + const char* test_suite_name, const char* name, const char* type_param, + const char* value_param, CodeLocation code_location, + TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc, + TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory) { + TestInfo* const test_info = + new TestInfo(test_suite_name, name, type_param, value_param, + code_location, fixture_class_id, factory); + GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info); + return test_info; +} + +void ReportInvalidTestSuiteType(const char* test_suite_name, + CodeLocation code_location) { + Message errors; + errors + << "Attempted redefinition of test suite " << test_suite_name << ".\n" + << "All tests in the same test suite must use the same test fixture\n" + << "class. However, in test suite " << test_suite_name << ", you tried\n" + << "to define a test using a fixture class different from the one\n" + << "used earlier. This can happen if the two fixture classes are\n" + << "from different namespaces and have the same name. You should\n" + << "probably rename one of the classes to put the tests into different\n" + << "test suites."; + + GTEST_LOG_(ERROR) << FormatFileLocation(code_location.file.c_str(), + code_location.line) + << " " << errors.GetString(); +} +} // namespace internal + +namespace { + +// A predicate that checks the test name of a TestInfo against a known +// value. +// +// This is used for implementation of the TestSuite class only. We put +// it in the anonymous namespace to prevent polluting the outer +// namespace. +// +// TestNameIs is copyable. +class TestNameIs { + public: + // Constructor. + // + // TestNameIs has NO default constructor. + explicit TestNameIs(const char* name) + : name_(name) {} + + // Returns true iff the test name of test_info matches name_. + bool operator()(const TestInfo * test_info) const { + return test_info && test_info->name() == name_; + } + + private: + std::string name_; +}; + +} // namespace + +namespace internal { + +// This method expands all parameterized tests registered with macros TEST_P +// and INSTANTIATE_TEST_SUITE_P into regular tests and registers those. +// This will be done just once during the program runtime. +void UnitTestImpl::RegisterParameterizedTests() { + if (!parameterized_tests_registered_) { + parameterized_test_registry_.RegisterTests(); + parameterized_tests_registered_ = true; + } +} + +} // namespace internal + +// Creates the test object, runs it, records its result, and then +// deletes it. +void TestInfo::Run() { + if (!should_run_) return; + + // Tells UnitTest where to store test result. + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + impl->set_current_test_info(this); + + TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); + + // Notifies the unit test event listeners that a test is about to start. + repeater->OnTestStart(*this); + + const TimeInMillis start = internal::GetTimeInMillis(); + + impl->os_stack_trace_getter()->UponLeavingGTest(); + + // Creates the test object. + Test* const test = internal::HandleExceptionsInMethodIfSupported( + factory_, &internal::TestFactoryBase::CreateTest, + "the test fixture's constructor"); + + // Runs the test if the constructor didn't generate a fatal failure or invoke + // GTEST_SKIP(). + // Note that the object will not be null + if (!Test::HasFatalFailure() && !Test::IsSkipped()) { + // This doesn't throw as all user code that can throw are wrapped into + // exception handling code. + test->Run(); + } + + if (test != nullptr) { + // Deletes the test object. + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + test, &Test::DeleteSelf_, "the test fixture's destructor"); + } + + result_.set_elapsed_time(internal::GetTimeInMillis() - start); + + // Notifies the unit test event listener that a test has just finished. + repeater->OnTestEnd(*this); + + // Tells UnitTest to stop associating assertion results to this + // test. + impl->set_current_test_info(nullptr); +} + +// class TestSuite + +// Gets the number of successful tests in this test suite. +int TestSuite::successful_test_count() const { + return CountIf(test_info_list_, TestPassed); +} + +// Gets the number of successful tests in this test suite. +int TestSuite::skipped_test_count() const { + return CountIf(test_info_list_, TestSkipped); +} + +// Gets the number of failed tests in this test suite. +int TestSuite::failed_test_count() const { + return CountIf(test_info_list_, TestFailed); +} + +// Gets the number of disabled tests that will be reported in the XML report. +int TestSuite::reportable_disabled_test_count() const { + return CountIf(test_info_list_, TestReportableDisabled); +} + +// Gets the number of disabled tests in this test suite. +int TestSuite::disabled_test_count() const { + return CountIf(test_info_list_, TestDisabled); +} + +// Gets the number of tests to be printed in the XML report. +int TestSuite::reportable_test_count() const { + return CountIf(test_info_list_, TestReportable); +} + +// Get the number of tests in this test suite that should run. +int TestSuite::test_to_run_count() const { + return CountIf(test_info_list_, ShouldRunTest); +} + +// Gets the number of all tests. +int TestSuite::total_test_count() const { + return static_cast(test_info_list_.size()); +} + +// Creates a TestSuite with the given name. +// +// Arguments: +// +// name: name of the test suite +// a_type_param: the name of the test suite's type parameter, or NULL if +// this is not a typed or a type-parameterized test suite. +// set_up_tc: pointer to the function that sets up the test suite +// tear_down_tc: pointer to the function that tears down the test suite +TestSuite::TestSuite(const char* a_name, const char* a_type_param, + internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc) + : name_(a_name), + type_param_(a_type_param ? new std::string(a_type_param) : nullptr), + set_up_tc_(set_up_tc), + tear_down_tc_(tear_down_tc), + should_run_(false), + elapsed_time_(0) {} + +// Destructor of TestSuite. +TestSuite::~TestSuite() { + // Deletes every Test in the collection. + ForEach(test_info_list_, internal::Delete); +} + +// Returns the i-th test among all the tests. i can range from 0 to +// total_test_count() - 1. If i is not in that range, returns NULL. +const TestInfo* TestSuite::GetTestInfo(int i) const { + const int index = GetElementOr(test_indices_, i, -1); + return index < 0 ? nullptr : test_info_list_[static_cast(index)]; +} + +// Returns the i-th test among all the tests. i can range from 0 to +// total_test_count() - 1. If i is not in that range, returns NULL. +TestInfo* TestSuite::GetMutableTestInfo(int i) { + const int index = GetElementOr(test_indices_, i, -1); + return index < 0 ? nullptr : test_info_list_[static_cast(index)]; +} + +// Adds a test to this test suite. Will delete the test upon +// destruction of the TestSuite object. +void TestSuite::AddTestInfo(TestInfo* test_info) { + test_info_list_.push_back(test_info); + test_indices_.push_back(static_cast(test_indices_.size())); +} + +// Runs every test in this TestSuite. +void TestSuite::Run() { + if (!should_run_) return; + + internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); + impl->set_current_test_suite(this); + + TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); + + // Call both legacy and the new API + repeater->OnTestSuiteStart(*this); +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI + repeater->OnTestCaseStart(*this); +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI + + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()"); + + const internal::TimeInMillis start = internal::GetTimeInMillis(); + for (int i = 0; i < total_test_count(); i++) { + GetMutableTestInfo(i)->Run(); + } + elapsed_time_ = internal::GetTimeInMillis() - start; + + impl->os_stack_trace_getter()->UponLeavingGTest(); + internal::HandleExceptionsInMethodIfSupported( + this, &TestSuite::RunTearDownTestSuite, "TearDownTestSuite()"); + + // Call both legacy and the new API + repeater->OnTestSuiteEnd(*this); +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI + repeater->OnTestCaseEnd(*this); +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI + + impl->set_current_test_suite(nullptr); +} + +// Clears the results of all tests in this test suite. +void TestSuite::ClearResult() { + ad_hoc_test_result_.Clear(); + ForEach(test_info_list_, TestInfo::ClearTestResult); +} + +// Shuffles the tests in this test suite. +void TestSuite::ShuffleTests(internal::Random* random) { + Shuffle(random, &test_indices_); +} + +// Restores the test order to before the first shuffle. +void TestSuite::UnshuffleTests() { + for (size_t i = 0; i < test_indices_.size(); i++) { + test_indices_[i] = static_cast(i); + } +} + +// Formats a countable noun. Depending on its quantity, either the +// singular form or the plural form is used. e.g. +// +// FormatCountableNoun(1, "formula", "formuli") returns "1 formula". +// FormatCountableNoun(5, "book", "books") returns "5 books". +static std::string FormatCountableNoun(int count, + const char * singular_form, + const char * plural_form) { + return internal::StreamableToString(count) + " " + + (count == 1 ? singular_form : plural_form); +} + +// Formats the count of tests. +static std::string FormatTestCount(int test_count) { + return FormatCountableNoun(test_count, "test", "tests"); +} + +// Formats the count of test suites. +static std::string FormatTestSuiteCount(int test_suite_count) { + return FormatCountableNoun(test_suite_count, "test suite", "test suites"); +} + +// Converts a TestPartResult::Type enum to human-friendly string +// representation. Both kNonFatalFailure and kFatalFailure are translated +// to "Failure", as the user usually doesn't care about the difference +// between the two when viewing the test result. +static const char * TestPartResultTypeToString(TestPartResult::Type type) { + switch (type) { + case TestPartResult::kSkip: + return "Skipped"; + case TestPartResult::kSuccess: + return "Success"; + + case TestPartResult::kNonFatalFailure: + case TestPartResult::kFatalFailure: +#ifdef _MSC_VER + return "error: "; +#else + return "Failure\n"; +#endif + default: + return "Unknown result type"; + } +} + +namespace internal { + +// Prints a TestPartResult to an std::string. +static std::string PrintTestPartResultToString( + const TestPartResult& test_part_result) { + return (Message() + << internal::FormatFileLocation(test_part_result.file_name(), + test_part_result.line_number()) + << " " << TestPartResultTypeToString(test_part_result.type()) + << test_part_result.message()).GetString(); +} + +// Prints a TestPartResult. +static void PrintTestPartResult(const TestPartResult& test_part_result) { + const std::string& result = + PrintTestPartResultToString(test_part_result); + printf("%s\n", result.c_str()); + fflush(stdout); + // If the test program runs in Visual Studio or a debugger, the + // following statements add the test part result message to the Output + // window such that the user can double-click on it to jump to the + // corresponding source code location; otherwise they do nothing. +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + // We don't call OutputDebugString*() on Windows Mobile, as printing + // to stdout is done by OutputDebugString() there already - we don't + // want the same message printed twice. + ::OutputDebugStringA(result.c_str()); + ::OutputDebugStringA("\n"); +#endif +} + +// class PrettyUnitTestResultPrinter +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \ + !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT && !GTEST_OS_WINDOWS_MINGW + +// Returns the character attribute for the given color. +static WORD GetColorAttribute(GTestColor color) { + switch (color) { + case COLOR_RED: return FOREGROUND_RED; + case COLOR_GREEN: return FOREGROUND_GREEN; + case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN; + default: return 0; + } +} + +static int GetBitOffset(WORD color_mask) { + if (color_mask == 0) return 0; + + int bitOffset = 0; + while ((color_mask & 1) == 0) { + color_mask >>= 1; + ++bitOffset; + } + return bitOffset; +} + +static WORD GetNewColor(GTestColor color, WORD old_color_attrs) { + // Let's reuse the BG + static const WORD background_mask = BACKGROUND_BLUE | BACKGROUND_GREEN | + BACKGROUND_RED | BACKGROUND_INTENSITY; + static const WORD foreground_mask = FOREGROUND_BLUE | FOREGROUND_GREEN | + FOREGROUND_RED | FOREGROUND_INTENSITY; + const WORD existing_bg = old_color_attrs & background_mask; + + WORD new_color = + GetColorAttribute(color) | existing_bg | FOREGROUND_INTENSITY; + static const int bg_bitOffset = GetBitOffset(background_mask); + static const int fg_bitOffset = GetBitOffset(foreground_mask); + + if (((new_color & background_mask) >> bg_bitOffset) == + ((new_color & foreground_mask) >> fg_bitOffset)) { + new_color ^= FOREGROUND_INTENSITY; // invert intensity + } + return new_color; +} + +#else + +// Returns the ANSI color code for the given color. COLOR_DEFAULT is +// an invalid input. +static const char* GetAnsiColorCode(GTestColor color) { + switch (color) { + case COLOR_RED: return "1"; + case COLOR_GREEN: return "2"; + case COLOR_YELLOW: return "3"; + default: + return nullptr; + } +} + +#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + +// Returns true iff Google Test should use colors in the output. +bool ShouldUseColor(bool stdout_is_tty) { + const char* const gtest_color = GTEST_FLAG(color).c_str(); + + if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) { +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW + // On Windows the TERM variable is usually not set, but the + // console there does support colors. + return stdout_is_tty; +#else + // On non-Windows platforms, we rely on the TERM variable. + const char* const term = posix::GetEnv("TERM"); + const bool term_supports_color = + String::CStringEquals(term, "xterm") || + String::CStringEquals(term, "xterm-color") || + String::CStringEquals(term, "xterm-256color") || + String::CStringEquals(term, "screen") || + String::CStringEquals(term, "screen-256color") || + String::CStringEquals(term, "tmux") || + String::CStringEquals(term, "tmux-256color") || + String::CStringEquals(term, "rxvt-unicode") || + String::CStringEquals(term, "rxvt-unicode-256color") || + String::CStringEquals(term, "linux") || + String::CStringEquals(term, "cygwin"); + return stdout_is_tty && term_supports_color; +#endif // GTEST_OS_WINDOWS + } + + return String::CaseInsensitiveCStringEquals(gtest_color, "yes") || + String::CaseInsensitiveCStringEquals(gtest_color, "true") || + String::CaseInsensitiveCStringEquals(gtest_color, "t") || + String::CStringEquals(gtest_color, "1"); + // We take "yes", "true", "t", and "1" as meaning "yes". If the + // value is neither one of these nor "auto", we treat it as "no" to + // be conservative. +} + +// Helpers for printing colored strings to stdout. Note that on Windows, we +// cannot simply emit special characters and have the terminal change colors. +// This routine must actually emit the characters rather than return a string +// that would be colored when printed, as can be done on Linux. +void ColoredPrintf(GTestColor color, const char* fmt, ...) { + va_list args; + va_start(args, fmt); + +#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_ZOS || GTEST_OS_IOS || \ + GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT + const bool use_color = AlwaysFalse(); +#else + static const bool in_color_mode = + ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0); + const bool use_color = in_color_mode && (color != COLOR_DEFAULT); +#endif // GTEST_OS_WINDOWS_MOBILE || GTEST_OS_ZOS + + if (!use_color) { + vprintf(fmt, args); + va_end(args); + return; + } + +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE && \ + !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT && !GTEST_OS_WINDOWS_MINGW + const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE); + + // Gets the current text color. + CONSOLE_SCREEN_BUFFER_INFO buffer_info; + GetConsoleScreenBufferInfo(stdout_handle, &buffer_info); + const WORD old_color_attrs = buffer_info.wAttributes; + const WORD new_color = GetNewColor(color, old_color_attrs); + + // We need to flush the stream buffers into the console before each + // SetConsoleTextAttribute call lest it affect the text that is already + // printed but has not yet reached the console. + fflush(stdout); + SetConsoleTextAttribute(stdout_handle, new_color); + + vprintf(fmt, args); + + fflush(stdout); + // Restores the text color. + SetConsoleTextAttribute(stdout_handle, old_color_attrs); +#else + printf("\033[0;3%sm", GetAnsiColorCode(color)); + vprintf(fmt, args); + printf("\033[m"); // Resets the terminal to default. +#endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE + va_end(args); +} + +// Text printed in Google Test's text output and --gtest_list_tests +// output to label the type parameter and value parameter for a test. +static const char kTypeParamLabel[] = "TypeParam"; +static const char kValueParamLabel[] = "GetParam()"; + +static void PrintFullTestCommentIfPresent(const TestInfo& test_info) { + const char* const type_param = test_info.type_param(); + const char* const value_param = test_info.value_param(); + + if (type_param != nullptr || value_param != nullptr) { + printf(", where "); + if (type_param != nullptr) { + printf("%s = %s", kTypeParamLabel, type_param); + if (value_param != nullptr) printf(" and "); + } + if (value_param != nullptr) { + printf("%s = %s", kValueParamLabel, value_param); + } + } +} + +// This class implements the TestEventListener interface. +// +// Class PrettyUnitTestResultPrinter is copyable. +class PrettyUnitTestResultPrinter : public TestEventListener { + public: + PrettyUnitTestResultPrinter() {} + static void PrintTestName(const char* test_suite, const char* test) { + printf("%s.%s", test_suite, test); + } + + // The following methods override what's in the TestEventListener class. + void OnTestProgramStart(const UnitTest& /*unit_test*/) override {} + void OnTestIterationStart(const UnitTest& unit_test, int iteration) override; + void OnEnvironmentsSetUpStart(const UnitTest& unit_test) override; + void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {} + void OnTestCaseStart(const TestSuite& test_suite) override; + void OnTestStart(const TestInfo& test_info) override; + void OnTestPartResult(const TestPartResult& result) override; + void OnTestEnd(const TestInfo& test_info) override; + void OnTestCaseEnd(const TestSuite& test_suite) override; + void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override; + void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {} + void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; + void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {} + + private: + static void PrintFailedTests(const UnitTest& unit_test); + static void PrintSkippedTests(const UnitTest& unit_test); +}; + + // Fired before each iteration of tests starts. +void PrettyUnitTestResultPrinter::OnTestIterationStart( + const UnitTest& unit_test, int iteration) { + if (GTEST_FLAG(repeat) != 1) + printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1); + + const char* const filter = GTEST_FLAG(filter).c_str(); + + // Prints the filter if it's not *. This reminds the user that some + // tests may be skipped. + if (!String::CStringEquals(filter, kUniversalFilter)) { + ColoredPrintf(COLOR_YELLOW, + "Note: %s filter = %s\n", GTEST_NAME_, filter); + } + + if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) { + const Int32 shard_index = Int32FromEnvOrDie(kTestShardIndex, -1); + ColoredPrintf(COLOR_YELLOW, + "Note: This is test shard %d of %s.\n", + static_cast(shard_index) + 1, + internal::posix::GetEnv(kTestTotalShards)); + } + + if (GTEST_FLAG(shuffle)) { + ColoredPrintf(COLOR_YELLOW, + "Note: Randomizing tests' orders with a seed of %d .\n", + unit_test.random_seed()); + } + + ColoredPrintf(COLOR_GREEN, "[==========] "); + printf("Running %s from %s.\n", + FormatTestCount(unit_test.test_to_run_count()).c_str(), + FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnEnvironmentsSetUpStart( + const UnitTest& /*unit_test*/) { + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("Global test environment set-up.\n"); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestSuite& test_suite) { + const std::string counts = + FormatCountableNoun(test_suite.test_to_run_count(), "test", "tests"); + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("%s from %s", counts.c_str(), test_suite.name()); + if (test_suite.type_param() == nullptr) { + printf("\n"); + } else { + printf(", where %s = %s\n", kTypeParamLabel, test_suite.type_param()); + } + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) { + ColoredPrintf(COLOR_GREEN, "[ RUN ] "); + PrintTestName(test_info.test_suite_name(), test_info.name()); + printf("\n"); + fflush(stdout); +} + +// Called after an assertion failure. +void PrettyUnitTestResultPrinter::OnTestPartResult( + const TestPartResult& result) { + switch (result.type()) { + // If the test part succeeded, or was skipped, + // we don't need to do anything. + case TestPartResult::kSkip: + case TestPartResult::kSuccess: + return; + default: + // Print failure message from the assertion + // (e.g. expected this and got that). + PrintTestPartResult(result); + fflush(stdout); + } +} + +void PrettyUnitTestResultPrinter::OnTestEnd(const TestInfo& test_info) { + if (test_info.result()->Passed()) { + ColoredPrintf(COLOR_GREEN, "[ OK ] "); + } else if (test_info.result()->Skipped()) { + ColoredPrintf(COLOR_GREEN, "[ SKIPPED ] "); + } else { + ColoredPrintf(COLOR_RED, "[ FAILED ] "); + } + PrintTestName(test_info.test_suite_name(), test_info.name()); + if (test_info.result()->Failed()) + PrintFullTestCommentIfPresent(test_info); + + if (GTEST_FLAG(print_time)) { + printf(" (%s ms)\n", internal::StreamableToString( + test_info.result()->elapsed_time()).c_str()); + } else { + printf("\n"); + } + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestSuite& test_suite) { + if (!GTEST_FLAG(print_time)) return; + + const std::string counts = + FormatCountableNoun(test_suite.test_to_run_count(), "test", "tests"); + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("%s from %s (%s ms total)\n\n", counts.c_str(), test_suite.name(), + internal::StreamableToString(test_suite.elapsed_time()).c_str()); + fflush(stdout); +} + +void PrettyUnitTestResultPrinter::OnEnvironmentsTearDownStart( + const UnitTest& /*unit_test*/) { + ColoredPrintf(COLOR_GREEN, "[----------] "); + printf("Global test environment tear-down\n"); + fflush(stdout); +} + +// Internal helper for printing the list of failed tests. +void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) { + const int failed_test_count = unit_test.failed_test_count(); + if (failed_test_count == 0) { + return; + } + + for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { + const TestSuite& test_suite = *unit_test.GetTestSuite(i); + if (!test_suite.should_run() || (test_suite.failed_test_count() == 0)) { + continue; + } + for (int j = 0; j < test_suite.total_test_count(); ++j) { + const TestInfo& test_info = *test_suite.GetTestInfo(j); + if (!test_info.should_run() || !test_info.result()->Failed()) { + continue; + } + ColoredPrintf(COLOR_RED, "[ FAILED ] "); + printf("%s.%s", test_suite.name(), test_info.name()); + PrintFullTestCommentIfPresent(test_info); + printf("\n"); + } + } +} + +// Internal helper for printing the list of skipped tests. +void PrettyUnitTestResultPrinter::PrintSkippedTests(const UnitTest& unit_test) { + const int skipped_test_count = unit_test.skipped_test_count(); + if (skipped_test_count == 0) { + return; + } + + for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { + const TestSuite& test_suite = *unit_test.GetTestSuite(i); + if (!test_suite.should_run() || (test_suite.skipped_test_count() == 0)) { + continue; + } + for (int j = 0; j < test_suite.total_test_count(); ++j) { + const TestInfo& test_info = *test_suite.GetTestInfo(j); + if (!test_info.should_run() || !test_info.result()->Skipped()) { + continue; + } + ColoredPrintf(COLOR_GREEN, "[ SKIPPED ] "); + printf("%s.%s", test_suite.name(), test_info.name()); + printf("\n"); + } + } +} + +void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, + int /*iteration*/) { + ColoredPrintf(COLOR_GREEN, "[==========] "); + printf("%s from %s ran.", + FormatTestCount(unit_test.test_to_run_count()).c_str(), + FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); + if (GTEST_FLAG(print_time)) { + printf(" (%s ms total)", + internal::StreamableToString(unit_test.elapsed_time()).c_str()); + } + printf("\n"); + ColoredPrintf(COLOR_GREEN, "[ PASSED ] "); + printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); + + const int skipped_test_count = unit_test.skipped_test_count(); + if (skipped_test_count > 0) { + ColoredPrintf(COLOR_GREEN, "[ SKIPPED ] "); + printf("%s, listed below:\n", FormatTestCount(skipped_test_count).c_str()); + PrintSkippedTests(unit_test); + } + + int num_failures = unit_test.failed_test_count(); + if (!unit_test.Passed()) { + const int failed_test_count = unit_test.failed_test_count(); + ColoredPrintf(COLOR_RED, "[ FAILED ] "); + printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str()); + PrintFailedTests(unit_test); + printf("\n%2d FAILED %s\n", num_failures, + num_failures == 1 ? "TEST" : "TESTS"); + } + + int num_disabled = unit_test.reportable_disabled_test_count(); + if (num_disabled && !GTEST_FLAG(also_run_disabled_tests)) { + if (!num_failures) { + printf("\n"); // Add a spacer if no FAILURE banner is displayed. + } + ColoredPrintf(COLOR_YELLOW, + " YOU HAVE %d DISABLED %s\n\n", + num_disabled, + num_disabled == 1 ? "TEST" : "TESTS"); + } + // Ensure that Google Test output is printed before, e.g., heapchecker output. + fflush(stdout); +} + +// End PrettyUnitTestResultPrinter + +// class TestEventRepeater +// +// This class forwards events to other event listeners. +class TestEventRepeater : public TestEventListener { + public: + TestEventRepeater() : forwarding_enabled_(true) {} + ~TestEventRepeater() override; + void Append(TestEventListener *listener); + TestEventListener* Release(TestEventListener* listener); + + // Controls whether events will be forwarded to listeners_. Set to false + // in death test child processes. + bool forwarding_enabled() const { return forwarding_enabled_; } + void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; } + + void OnTestProgramStart(const UnitTest& unit_test) override; + void OnTestIterationStart(const UnitTest& unit_test, int iteration) override; + void OnEnvironmentsSetUpStart(const UnitTest& unit_test) override; + void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) override; +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI + void OnTestCaseStart(const TestSuite& parameter) override; +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI + void OnTestSuiteStart(const TestSuite& parameter) override; + void OnTestStart(const TestInfo& test_info) override; + void OnTestPartResult(const TestPartResult& result) override; + void OnTestEnd(const TestInfo& test_info) override; +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI + void OnTestCaseEnd(const TestSuite& parameter) override; +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI + void OnTestSuiteEnd(const TestSuite& parameter) override; + void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override; + void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) override; + void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; + void OnTestProgramEnd(const UnitTest& unit_test) override; + + private: + // Controls whether events will be forwarded to listeners_. Set to false + // in death test child processes. + bool forwarding_enabled_; + // The list of listeners that receive events. + std::vector listeners_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater); +}; + +TestEventRepeater::~TestEventRepeater() { + ForEach(listeners_, Delete); +} + +void TestEventRepeater::Append(TestEventListener *listener) { + listeners_.push_back(listener); +} + +TestEventListener* TestEventRepeater::Release(TestEventListener *listener) { + for (size_t i = 0; i < listeners_.size(); ++i) { + if (listeners_[i] == listener) { + listeners_.erase(listeners_.begin() + static_cast(i)); + return listener; + } + } + + return nullptr; +} + +// Since most methods are very similar, use macros to reduce boilerplate. +// This defines a member that forwards the call to all listeners. +#define GTEST_REPEATER_METHOD_(Name, Type) \ +void TestEventRepeater::Name(const Type& parameter) { \ + if (forwarding_enabled_) { \ + for (size_t i = 0; i < listeners_.size(); i++) { \ + listeners_[i]->Name(parameter); \ + } \ + } \ +} +// This defines a member that forwards the call to all listeners in reverse +// order. +#define GTEST_REVERSE_REPEATER_METHOD_(Name, Type) \ + void TestEventRepeater::Name(const Type& parameter) { \ + if (forwarding_enabled_) { \ + for (size_t i = listeners_.size(); i != 0; i--) { \ + listeners_[i - 1]->Name(parameter); \ + } \ + } \ + } + +GTEST_REPEATER_METHOD_(OnTestProgramStart, UnitTest) +GTEST_REPEATER_METHOD_(OnEnvironmentsSetUpStart, UnitTest) +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +GTEST_REPEATER_METHOD_(OnTestCaseStart, TestSuite) +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +GTEST_REPEATER_METHOD_(OnTestSuiteStart, TestSuite) +GTEST_REPEATER_METHOD_(OnTestStart, TestInfo) +GTEST_REPEATER_METHOD_(OnTestPartResult, TestPartResult) +GTEST_REPEATER_METHOD_(OnEnvironmentsTearDownStart, UnitTest) +GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsSetUpEnd, UnitTest) +GTEST_REVERSE_REPEATER_METHOD_(OnEnvironmentsTearDownEnd, UnitTest) +GTEST_REVERSE_REPEATER_METHOD_(OnTestEnd, TestInfo) +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +GTEST_REVERSE_REPEATER_METHOD_(OnTestCaseEnd, TestSuite) +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +GTEST_REVERSE_REPEATER_METHOD_(OnTestSuiteEnd, TestSuite) +GTEST_REVERSE_REPEATER_METHOD_(OnTestProgramEnd, UnitTest) + +#undef GTEST_REPEATER_METHOD_ +#undef GTEST_REVERSE_REPEATER_METHOD_ + +void TestEventRepeater::OnTestIterationStart(const UnitTest& unit_test, + int iteration) { + if (forwarding_enabled_) { + for (size_t i = 0; i < listeners_.size(); i++) { + listeners_[i]->OnTestIterationStart(unit_test, iteration); + } + } +} + +void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test, + int iteration) { + if (forwarding_enabled_) { + for (size_t i = listeners_.size(); i > 0; i--) { + listeners_[i - 1]->OnTestIterationEnd(unit_test, iteration); + } + } +} + +// End TestEventRepeater + +// This class generates an XML output file. +class XmlUnitTestResultPrinter : public EmptyTestEventListener { + public: + explicit XmlUnitTestResultPrinter(const char* output_file); + + void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; + void ListTestsMatchingFilter(const std::vector& test_suites); + + // Prints an XML summary of all unit tests. + static void PrintXmlTestsList(std::ostream* stream, + const std::vector& test_suites); + + private: + // Is c a whitespace character that is normalized to a space character + // when it appears in an XML attribute value? + static bool IsNormalizableWhitespace(char c) { + return c == 0x9 || c == 0xA || c == 0xD; + } + + // May c appear in a well-formed XML document? + static bool IsValidXmlCharacter(char c) { + return IsNormalizableWhitespace(c) || c >= 0x20; + } + + // Returns an XML-escaped copy of the input string str. If + // is_attribute is true, the text is meant to appear as an attribute + // value, and normalizable whitespace is preserved by replacing it + // with character references. + static std::string EscapeXml(const std::string& str, bool is_attribute); + + // Returns the given string with all characters invalid in XML removed. + static std::string RemoveInvalidXmlCharacters(const std::string& str); + + // Convenience wrapper around EscapeXml when str is an attribute value. + static std::string EscapeXmlAttribute(const std::string& str) { + return EscapeXml(str, true); + } + + // Convenience wrapper around EscapeXml when str is not an attribute value. + static std::string EscapeXmlText(const char* str) { + return EscapeXml(str, false); + } + + // Verifies that the given attribute belongs to the given element and + // streams the attribute as XML. + static void OutputXmlAttribute(std::ostream* stream, + const std::string& element_name, + const std::string& name, + const std::string& value); + + // Streams an XML CDATA section, escaping invalid CDATA sequences as needed. + static void OutputXmlCDataSection(::std::ostream* stream, const char* data); + + // Streams an XML representation of a TestInfo object. + static void OutputXmlTestInfo(::std::ostream* stream, + const char* test_suite_name, + const TestInfo& test_info); + + // Prints an XML representation of a TestSuite object + static void PrintXmlTestSuite(::std::ostream* stream, + const TestSuite& test_suite); + + // Prints an XML summary of unit_test to output stream out. + static void PrintXmlUnitTest(::std::ostream* stream, + const UnitTest& unit_test); + + // Produces a string representing the test properties in a result as space + // delimited XML attributes based on the property key="value" pairs. + // When the std::string is not empty, it includes a space at the beginning, + // to delimit this attribute from prior attributes. + static std::string TestPropertiesAsXmlAttributes(const TestResult& result); + + // Streams an XML representation of the test properties of a TestResult + // object. + static void OutputXmlTestProperties(std::ostream* stream, + const TestResult& result); + + // The output file. + const std::string output_file_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter); +}; + +// Creates a new XmlUnitTestResultPrinter. +XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file) + : output_file_(output_file) { + if (output_file_.empty()) { + GTEST_LOG_(FATAL) << "XML output file may not be null"; + } +} + +// Called after the unit test ends. +void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, + int /*iteration*/) { + FILE* xmlout = OpenFileForWriting(output_file_); + std::stringstream stream; + PrintXmlUnitTest(&stream, unit_test); + fprintf(xmlout, "%s", StringStreamToString(&stream).c_str()); + fclose(xmlout); +} + +void XmlUnitTestResultPrinter::ListTestsMatchingFilter( + const std::vector& test_suites) { + FILE* xmlout = OpenFileForWriting(output_file_); + std::stringstream stream; + PrintXmlTestsList(&stream, test_suites); + fprintf(xmlout, "%s", StringStreamToString(&stream).c_str()); + fclose(xmlout); +} + +// Returns an XML-escaped copy of the input string str. If is_attribute +// is true, the text is meant to appear as an attribute value, and +// normalizable whitespace is preserved by replacing it with character +// references. +// +// Invalid XML characters in str, if any, are stripped from the output. +// It is expected that most, if not all, of the text processed by this +// module will consist of ordinary English text. +// If this module is ever modified to produce version 1.1 XML output, +// most invalid characters can be retained using character references. +std::string XmlUnitTestResultPrinter::EscapeXml( + const std::string& str, bool is_attribute) { + Message m; + + for (size_t i = 0; i < str.size(); ++i) { + const char ch = str[i]; + switch (ch) { + case '<': + m << "<"; + break; + case '>': + m << ">"; + break; + case '&': + m << "&"; + break; + case '\'': + if (is_attribute) + m << "'"; + else + m << '\''; + break; + case '"': + if (is_attribute) + m << """; + else + m << '"'; + break; + default: + if (IsValidXmlCharacter(ch)) { + if (is_attribute && IsNormalizableWhitespace(ch)) + m << "&#x" << String::FormatByte(static_cast(ch)) + << ";"; + else + m << ch; + } + break; + } + } + + return m.GetString(); +} + +// Returns the given string with all characters invalid in XML removed. +// Currently invalid characters are dropped from the string. An +// alternative is to replace them with certain characters such as . or ?. +std::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters( + const std::string& str) { + std::string output; + output.reserve(str.size()); + for (std::string::const_iterator it = str.begin(); it != str.end(); ++it) + if (IsValidXmlCharacter(*it)) + output.push_back(*it); + + return output; +} + +// The following routines generate an XML representation of a UnitTest +// object. +// GOOGLETEST_CM0009 DO NOT DELETE +// +// This is how Google Test concepts map to the DTD: +// +// <-- corresponds to a UnitTest object +// <-- corresponds to a TestSuite object +// <-- corresponds to a TestInfo object +// ... +// ... +// ... +// <-- individual assertion failures +// +// +// + +// Formats the given time in milliseconds as seconds. +std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) { + ::std::stringstream ss; + ss << (static_cast(ms) * 1e-3); + return ss.str(); +} + +static bool PortableLocaltime(time_t seconds, struct tm* out) { +#if defined(_MSC_VER) + return localtime_s(out, &seconds) == 0; +#elif defined(__MINGW32__) || defined(__MINGW64__) + // MINGW provides neither localtime_r nor localtime_s, but uses + // Windows' localtime(), which has a thread-local tm buffer. + struct tm* tm_ptr = localtime(&seconds); // NOLINT + if (tm_ptr == nullptr) return false; + *out = *tm_ptr; + return true; +#else + return localtime_r(&seconds, out) != nullptr; +#endif +} + +// Converts the given epoch time in milliseconds to a date string in the ISO +// 8601 format, without the timezone information. +std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms) { + struct tm time_struct; + if (!PortableLocaltime(static_cast(ms / 1000), &time_struct)) + return ""; + // YYYY-MM-DDThh:mm:ss + return StreamableToString(time_struct.tm_year + 1900) + "-" + + String::FormatIntWidth2(time_struct.tm_mon + 1) + "-" + + String::FormatIntWidth2(time_struct.tm_mday) + "T" + + String::FormatIntWidth2(time_struct.tm_hour) + ":" + + String::FormatIntWidth2(time_struct.tm_min) + ":" + + String::FormatIntWidth2(time_struct.tm_sec); +} + +// Streams an XML CDATA section, escaping invalid CDATA sequences as needed. +void XmlUnitTestResultPrinter::OutputXmlCDataSection(::std::ostream* stream, + const char* data) { + const char* segment = data; + *stream << ""); + if (next_segment != nullptr) { + stream->write( + segment, static_cast(next_segment - segment)); + *stream << "]]>]]>"); + } else { + *stream << segment; + break; + } + } + *stream << "]]>"; +} + +void XmlUnitTestResultPrinter::OutputXmlAttribute( + std::ostream* stream, + const std::string& element_name, + const std::string& name, + const std::string& value) { + const std::vector& allowed_names = + GetReservedOutputAttributesForElement(element_name); + + GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) != + allowed_names.end()) + << "Attribute " << name << " is not allowed for element <" << element_name + << ">."; + + *stream << " " << name << "=\"" << EscapeXmlAttribute(value) << "\""; +} + +// Prints an XML representation of a TestInfo object. +void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, + const char* test_suite_name, + const TestInfo& test_info) { + const TestResult& result = *test_info.result(); + const std::string kTestsuite = "testcase"; + + if (test_info.is_in_another_shard()) { + return; + } + + *stream << " \n"; + return; + } + + OutputXmlAttribute(stream, kTestsuite, "status", + test_info.should_run() ? "run" : "notrun"); + OutputXmlAttribute(stream, kTestsuite, "result", + test_info.should_run() + ? (result.Skipped() ? "skipped" : "completed") + : "suppressed"); + OutputXmlAttribute(stream, kTestsuite, "time", + FormatTimeInMillisAsSeconds(result.elapsed_time())); + OutputXmlAttribute(stream, kTestsuite, "classname", test_suite_name); + + int failures = 0; + for (int i = 0; i < result.total_part_count(); ++i) { + const TestPartResult& part = result.GetTestPartResult(i); + if (part.failed()) { + if (++failures == 1) { + *stream << ">\n"; + } + const std::string location = + internal::FormatCompilerIndependentFileLocation(part.file_name(), + part.line_number()); + const std::string summary = location + "\n" + part.summary(); + *stream << " "; + const std::string detail = location + "\n" + part.message(); + OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str()); + *stream << "\n"; + } + } + + if (failures == 0 && result.test_property_count() == 0) { + *stream << " />\n"; + } else { + if (failures == 0) { + *stream << ">\n"; + } + OutputXmlTestProperties(stream, result); + *stream << " \n"; + } +} + +// Prints an XML representation of a TestSuite object +void XmlUnitTestResultPrinter::PrintXmlTestSuite(std::ostream* stream, + const TestSuite& test_suite) { + const std::string kTestsuite = "testsuite"; + *stream << " <" << kTestsuite; + OutputXmlAttribute(stream, kTestsuite, "name", test_suite.name()); + OutputXmlAttribute(stream, kTestsuite, "tests", + StreamableToString(test_suite.reportable_test_count())); + if (!GTEST_FLAG(list_tests)) { + OutputXmlAttribute(stream, kTestsuite, "failures", + StreamableToString(test_suite.failed_test_count())); + OutputXmlAttribute( + stream, kTestsuite, "disabled", + StreamableToString(test_suite.reportable_disabled_test_count())); + OutputXmlAttribute(stream, kTestsuite, "errors", "0"); + OutputXmlAttribute(stream, kTestsuite, "time", + FormatTimeInMillisAsSeconds(test_suite.elapsed_time())); + *stream << TestPropertiesAsXmlAttributes(test_suite.ad_hoc_test_result()); + } + *stream << ">\n"; + for (int i = 0; i < test_suite.total_test_count(); ++i) { + if (test_suite.GetTestInfo(i)->is_reportable()) + OutputXmlTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i)); + } + *stream << " \n"; +} + +// Prints an XML summary of unit_test to output stream out. +void XmlUnitTestResultPrinter::PrintXmlUnitTest(std::ostream* stream, + const UnitTest& unit_test) { + const std::string kTestsuites = "testsuites"; + + *stream << "\n"; + *stream << "<" << kTestsuites; + + OutputXmlAttribute(stream, kTestsuites, "tests", + StreamableToString(unit_test.reportable_test_count())); + OutputXmlAttribute(stream, kTestsuites, "failures", + StreamableToString(unit_test.failed_test_count())); + OutputXmlAttribute( + stream, kTestsuites, "disabled", + StreamableToString(unit_test.reportable_disabled_test_count())); + OutputXmlAttribute(stream, kTestsuites, "errors", "0"); + OutputXmlAttribute( + stream, kTestsuites, "timestamp", + FormatEpochTimeInMillisAsIso8601(unit_test.start_timestamp())); + OutputXmlAttribute(stream, kTestsuites, "time", + FormatTimeInMillisAsSeconds(unit_test.elapsed_time())); + + if (GTEST_FLAG(shuffle)) { + OutputXmlAttribute(stream, kTestsuites, "random_seed", + StreamableToString(unit_test.random_seed())); + } + *stream << TestPropertiesAsXmlAttributes(unit_test.ad_hoc_test_result()); + + OutputXmlAttribute(stream, kTestsuites, "name", "AllTests"); + *stream << ">\n"; + + for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { + if (unit_test.GetTestSuite(i)->reportable_test_count() > 0) + PrintXmlTestSuite(stream, *unit_test.GetTestSuite(i)); + } + *stream << "\n"; +} + +void XmlUnitTestResultPrinter::PrintXmlTestsList( + std::ostream* stream, const std::vector& test_suites) { + const std::string kTestsuites = "testsuites"; + + *stream << "\n"; + *stream << "<" << kTestsuites; + + int total_tests = 0; + for (auto test_suite : test_suites) { + total_tests += test_suite->total_test_count(); + } + OutputXmlAttribute(stream, kTestsuites, "tests", + StreamableToString(total_tests)); + OutputXmlAttribute(stream, kTestsuites, "name", "AllTests"); + *stream << ">\n"; + + for (auto test_suite : test_suites) { + PrintXmlTestSuite(stream, *test_suite); + } + *stream << "\n"; +} + +// Produces a string representing the test properties in a result as space +// delimited XML attributes based on the property key="value" pairs. +std::string XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes( + const TestResult& result) { + Message attributes; + for (int i = 0; i < result.test_property_count(); ++i) { + const TestProperty& property = result.GetTestProperty(i); + attributes << " " << property.key() << "=" + << "\"" << EscapeXmlAttribute(property.value()) << "\""; + } + return attributes.GetString(); +} + +void XmlUnitTestResultPrinter::OutputXmlTestProperties( + std::ostream* stream, const TestResult& result) { + const std::string kProperties = "properties"; + const std::string kProperty = "property"; + + if (result.test_property_count() <= 0) { + return; + } + + *stream << "<" << kProperties << ">\n"; + for (int i = 0; i < result.test_property_count(); ++i) { + const TestProperty& property = result.GetTestProperty(i); + *stream << "<" << kProperty; + *stream << " name=\"" << EscapeXmlAttribute(property.key()) << "\""; + *stream << " value=\"" << EscapeXmlAttribute(property.value()) << "\""; + *stream << "/>\n"; + } + *stream << "\n"; +} + +// End XmlUnitTestResultPrinter + +// This class generates an JSON output file. +class JsonUnitTestResultPrinter : public EmptyTestEventListener { + public: + explicit JsonUnitTestResultPrinter(const char* output_file); + + void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; + + // Prints an JSON summary of all unit tests. + static void PrintJsonTestList(::std::ostream* stream, + const std::vector& test_suites); + + private: + // Returns an JSON-escaped copy of the input string str. + static std::string EscapeJson(const std::string& str); + + //// Verifies that the given attribute belongs to the given element and + //// streams the attribute as JSON. + static void OutputJsonKey(std::ostream* stream, + const std::string& element_name, + const std::string& name, + const std::string& value, + const std::string& indent, + bool comma = true); + static void OutputJsonKey(std::ostream* stream, + const std::string& element_name, + const std::string& name, + int value, + const std::string& indent, + bool comma = true); + + // Streams a JSON representation of a TestInfo object. + static void OutputJsonTestInfo(::std::ostream* stream, + const char* test_suite_name, + const TestInfo& test_info); + + // Prints a JSON representation of a TestSuite object + static void PrintJsonTestSuite(::std::ostream* stream, + const TestSuite& test_suite); + + // Prints a JSON summary of unit_test to output stream out. + static void PrintJsonUnitTest(::std::ostream* stream, + const UnitTest& unit_test); + + // Produces a string representing the test properties in a result as + // a JSON dictionary. + static std::string TestPropertiesAsJson(const TestResult& result, + const std::string& indent); + + // The output file. + const std::string output_file_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(JsonUnitTestResultPrinter); +}; + +// Creates a new JsonUnitTestResultPrinter. +JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(const char* output_file) + : output_file_(output_file) { + if (output_file_.empty()) { + GTEST_LOG_(FATAL) << "JSON output file may not be null"; + } +} + +void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, + int /*iteration*/) { + FILE* jsonout = OpenFileForWriting(output_file_); + std::stringstream stream; + PrintJsonUnitTest(&stream, unit_test); + fprintf(jsonout, "%s", StringStreamToString(&stream).c_str()); + fclose(jsonout); +} + +// Returns an JSON-escaped copy of the input string str. +std::string JsonUnitTestResultPrinter::EscapeJson(const std::string& str) { + Message m; + + for (size_t i = 0; i < str.size(); ++i) { + const char ch = str[i]; + switch (ch) { + case '\\': + case '"': + case '/': + m << '\\' << ch; + break; + case '\b': + m << "\\b"; + break; + case '\t': + m << "\\t"; + break; + case '\n': + m << "\\n"; + break; + case '\f': + m << "\\f"; + break; + case '\r': + m << "\\r"; + break; + default: + if (ch < ' ') { + m << "\\u00" << String::FormatByte(static_cast(ch)); + } else { + m << ch; + } + break; + } + } + + return m.GetString(); +} + +// The following routines generate an JSON representation of a UnitTest +// object. + +// Formats the given time in milliseconds as seconds. +static std::string FormatTimeInMillisAsDuration(TimeInMillis ms) { + ::std::stringstream ss; + ss << (static_cast(ms) * 1e-3) << "s"; + return ss.str(); +} + +// Converts the given epoch time in milliseconds to a date string in the +// RFC3339 format, without the timezone information. +static std::string FormatEpochTimeInMillisAsRFC3339(TimeInMillis ms) { + struct tm time_struct; + if (!PortableLocaltime(static_cast(ms / 1000), &time_struct)) + return ""; + // YYYY-MM-DDThh:mm:ss + return StreamableToString(time_struct.tm_year + 1900) + "-" + + String::FormatIntWidth2(time_struct.tm_mon + 1) + "-" + + String::FormatIntWidth2(time_struct.tm_mday) + "T" + + String::FormatIntWidth2(time_struct.tm_hour) + ":" + + String::FormatIntWidth2(time_struct.tm_min) + ":" + + String::FormatIntWidth2(time_struct.tm_sec) + "Z"; +} + +static inline std::string Indent(size_t width) { + return std::string(width, ' '); +} + +void JsonUnitTestResultPrinter::OutputJsonKey( + std::ostream* stream, + const std::string& element_name, + const std::string& name, + const std::string& value, + const std::string& indent, + bool comma) { + const std::vector& allowed_names = + GetReservedOutputAttributesForElement(element_name); + + GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) != + allowed_names.end()) + << "Key \"" << name << "\" is not allowed for value \"" << element_name + << "\"."; + + *stream << indent << "\"" << name << "\": \"" << EscapeJson(value) << "\""; + if (comma) + *stream << ",\n"; +} + +void JsonUnitTestResultPrinter::OutputJsonKey( + std::ostream* stream, + const std::string& element_name, + const std::string& name, + int value, + const std::string& indent, + bool comma) { + const std::vector& allowed_names = + GetReservedOutputAttributesForElement(element_name); + + GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) != + allowed_names.end()) + << "Key \"" << name << "\" is not allowed for value \"" << element_name + << "\"."; + + *stream << indent << "\"" << name << "\": " << StreamableToString(value); + if (comma) + *stream << ",\n"; +} + +// Prints a JSON representation of a TestInfo object. +void JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream, + const char* test_suite_name, + const TestInfo& test_info) { + const TestResult& result = *test_info.result(); + const std::string kTestsuite = "testcase"; + const std::string kIndent = Indent(10); + + *stream << Indent(8) << "{\n"; + OutputJsonKey(stream, kTestsuite, "name", test_info.name(), kIndent); + + if (test_info.value_param() != nullptr) { + OutputJsonKey(stream, kTestsuite, "value_param", test_info.value_param(), + kIndent); + } + if (test_info.type_param() != nullptr) { + OutputJsonKey(stream, kTestsuite, "type_param", test_info.type_param(), + kIndent); + } + if (GTEST_FLAG(list_tests)) { + OutputJsonKey(stream, kTestsuite, "file", test_info.file(), kIndent); + OutputJsonKey(stream, kTestsuite, "line", test_info.line(), kIndent, false); + *stream << "\n" << Indent(8) << "}"; + return; + } + + OutputJsonKey(stream, kTestsuite, "status", + test_info.should_run() ? "RUN" : "NOTRUN", kIndent); + OutputJsonKey(stream, kTestsuite, "result", + test_info.should_run() + ? (result.Skipped() ? "SKIPPED" : "COMPLETED") + : "SUPPRESSED", + kIndent); + OutputJsonKey(stream, kTestsuite, "time", + FormatTimeInMillisAsDuration(result.elapsed_time()), kIndent); + OutputJsonKey(stream, kTestsuite, "classname", test_suite_name, kIndent, + false); + *stream << TestPropertiesAsJson(result, kIndent); + + int failures = 0; + for (int i = 0; i < result.total_part_count(); ++i) { + const TestPartResult& part = result.GetTestPartResult(i); + if (part.failed()) { + *stream << ",\n"; + if (++failures == 1) { + *stream << kIndent << "\"" << "failures" << "\": [\n"; + } + const std::string location = + internal::FormatCompilerIndependentFileLocation(part.file_name(), + part.line_number()); + const std::string message = EscapeJson(location + "\n" + part.message()); + *stream << kIndent << " {\n" + << kIndent << " \"failure\": \"" << message << "\",\n" + << kIndent << " \"type\": \"\"\n" + << kIndent << " }"; + } + } + + if (failures > 0) + *stream << "\n" << kIndent << "]"; + *stream << "\n" << Indent(8) << "}"; +} + +// Prints an JSON representation of a TestSuite object +void JsonUnitTestResultPrinter::PrintJsonTestSuite( + std::ostream* stream, const TestSuite& test_suite) { + const std::string kTestsuite = "testsuite"; + const std::string kIndent = Indent(6); + + *stream << Indent(4) << "{\n"; + OutputJsonKey(stream, kTestsuite, "name", test_suite.name(), kIndent); + OutputJsonKey(stream, kTestsuite, "tests", test_suite.reportable_test_count(), + kIndent); + if (!GTEST_FLAG(list_tests)) { + OutputJsonKey(stream, kTestsuite, "failures", + test_suite.failed_test_count(), kIndent); + OutputJsonKey(stream, kTestsuite, "disabled", + test_suite.reportable_disabled_test_count(), kIndent); + OutputJsonKey(stream, kTestsuite, "errors", 0, kIndent); + OutputJsonKey(stream, kTestsuite, "time", + FormatTimeInMillisAsDuration(test_suite.elapsed_time()), + kIndent, false); + *stream << TestPropertiesAsJson(test_suite.ad_hoc_test_result(), kIndent) + << ",\n"; + } + + *stream << kIndent << "\"" << kTestsuite << "\": [\n"; + + bool comma = false; + for (int i = 0; i < test_suite.total_test_count(); ++i) { + if (test_suite.GetTestInfo(i)->is_reportable()) { + if (comma) { + *stream << ",\n"; + } else { + comma = true; + } + OutputJsonTestInfo(stream, test_suite.name(), *test_suite.GetTestInfo(i)); + } + } + *stream << "\n" << kIndent << "]\n" << Indent(4) << "}"; +} + +// Prints a JSON summary of unit_test to output stream out. +void JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream* stream, + const UnitTest& unit_test) { + const std::string kTestsuites = "testsuites"; + const std::string kIndent = Indent(2); + *stream << "{\n"; + + OutputJsonKey(stream, kTestsuites, "tests", unit_test.reportable_test_count(), + kIndent); + OutputJsonKey(stream, kTestsuites, "failures", unit_test.failed_test_count(), + kIndent); + OutputJsonKey(stream, kTestsuites, "disabled", + unit_test.reportable_disabled_test_count(), kIndent); + OutputJsonKey(stream, kTestsuites, "errors", 0, kIndent); + if (GTEST_FLAG(shuffle)) { + OutputJsonKey(stream, kTestsuites, "random_seed", unit_test.random_seed(), + kIndent); + } + OutputJsonKey(stream, kTestsuites, "timestamp", + FormatEpochTimeInMillisAsRFC3339(unit_test.start_timestamp()), + kIndent); + OutputJsonKey(stream, kTestsuites, "time", + FormatTimeInMillisAsDuration(unit_test.elapsed_time()), kIndent, + false); + + *stream << TestPropertiesAsJson(unit_test.ad_hoc_test_result(), kIndent) + << ",\n"; + + OutputJsonKey(stream, kTestsuites, "name", "AllTests", kIndent); + *stream << kIndent << "\"" << kTestsuites << "\": [\n"; + + bool comma = false; + for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { + if (unit_test.GetTestSuite(i)->reportable_test_count() > 0) { + if (comma) { + *stream << ",\n"; + } else { + comma = true; + } + PrintJsonTestSuite(stream, *unit_test.GetTestSuite(i)); + } + } + + *stream << "\n" << kIndent << "]\n" << "}\n"; +} + +void JsonUnitTestResultPrinter::PrintJsonTestList( + std::ostream* stream, const std::vector& test_suites) { + const std::string kTestsuites = "testsuites"; + const std::string kIndent = Indent(2); + *stream << "{\n"; + int total_tests = 0; + for (auto test_suite : test_suites) { + total_tests += test_suite->total_test_count(); + } + OutputJsonKey(stream, kTestsuites, "tests", total_tests, kIndent); + + OutputJsonKey(stream, kTestsuites, "name", "AllTests", kIndent); + *stream << kIndent << "\"" << kTestsuites << "\": [\n"; + + for (size_t i = 0; i < test_suites.size(); ++i) { + if (i != 0) { + *stream << ",\n"; + } + PrintJsonTestSuite(stream, *test_suites[i]); + } + + *stream << "\n" + << kIndent << "]\n" + << "}\n"; +} +// Produces a string representing the test properties in a result as +// a JSON dictionary. +std::string JsonUnitTestResultPrinter::TestPropertiesAsJson( + const TestResult& result, const std::string& indent) { + Message attributes; + for (int i = 0; i < result.test_property_count(); ++i) { + const TestProperty& property = result.GetTestProperty(i); + attributes << ",\n" << indent << "\"" << property.key() << "\": " + << "\"" << EscapeJson(property.value()) << "\""; + } + return attributes.GetString(); +} + +// End JsonUnitTestResultPrinter + +#if GTEST_CAN_STREAM_RESULTS_ + +// Checks if str contains '=', '&', '%' or '\n' characters. If yes, +// replaces them by "%xx" where xx is their hexadecimal value. For +// example, replaces "=" with "%3D". This algorithm is O(strlen(str)) +// in both time and space -- important as the input str may contain an +// arbitrarily long test failure message and stack trace. +std::string StreamingListener::UrlEncode(const char* str) { + std::string result; + result.reserve(strlen(str) + 1); + for (char ch = *str; ch != '\0'; ch = *++str) { + switch (ch) { + case '%': + case '=': + case '&': + case '\n': + result.append("%" + String::FormatByte(static_cast(ch))); + break; + default: + result.push_back(ch); + break; + } + } + return result; +} + +void StreamingListener::SocketWriter::MakeConnection() { + GTEST_CHECK_(sockfd_ == -1) + << "MakeConnection() can't be called when there is already a connection."; + + addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; // To allow both IPv4 and IPv6 addresses. + hints.ai_socktype = SOCK_STREAM; + addrinfo* servinfo = nullptr; + + // Use the getaddrinfo() to get a linked list of IP addresses for + // the given host name. + const int error_num = getaddrinfo( + host_name_.c_str(), port_num_.c_str(), &hints, &servinfo); + if (error_num != 0) { + GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: " + << gai_strerror(error_num); + } + + // Loop through all the results and connect to the first we can. + for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != nullptr; + cur_addr = cur_addr->ai_next) { + sockfd_ = socket( + cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol); + if (sockfd_ != -1) { + // Connect the client socket to the server socket. + if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) { + close(sockfd_); + sockfd_ = -1; + } + } + } + + freeaddrinfo(servinfo); // all done with this structure + + if (sockfd_ == -1) { + GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to " + << host_name_ << ":" << port_num_; + } +} + +// End of class Streaming Listener +#endif // GTEST_CAN_STREAM_RESULTS__ + +// class OsStackTraceGetter + +const char* const OsStackTraceGetterInterface::kElidedFramesMarker = + "... " GTEST_NAME_ " internal frames ..."; + +std::string OsStackTraceGetter::CurrentStackTrace(int max_depth, int skip_count) + GTEST_LOCK_EXCLUDED_(mutex_) { +#if GTEST_HAS_ABSL + std::string result; + + if (max_depth <= 0) { + return result; + } + + max_depth = std::min(max_depth, kMaxStackTraceDepth); + + std::vector raw_stack(max_depth); + // Skips the frames requested by the caller, plus this function. + const int raw_stack_size = + absl::GetStackTrace(&raw_stack[0], max_depth, skip_count + 1); + + void* caller_frame = nullptr; + { + MutexLock lock(&mutex_); + caller_frame = caller_frame_; + } + + for (int i = 0; i < raw_stack_size; ++i) { + if (raw_stack[i] == caller_frame && + !GTEST_FLAG(show_internal_stack_frames)) { + // Add a marker to the trace and stop adding frames. + absl::StrAppend(&result, kElidedFramesMarker, "\n"); + break; + } + + char tmp[1024]; + const char* symbol = "(unknown)"; + if (absl::Symbolize(raw_stack[i], tmp, sizeof(tmp))) { + symbol = tmp; + } + + char line[1024]; + snprintf(line, sizeof(line), " %p: %s\n", raw_stack[i], symbol); + result += line; + } + + return result; + +#else // !GTEST_HAS_ABSL + static_cast(max_depth); + static_cast(skip_count); + return ""; +#endif // GTEST_HAS_ABSL +} + +void OsStackTraceGetter::UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_) { +#if GTEST_HAS_ABSL + void* caller_frame = nullptr; + if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) { + caller_frame = nullptr; + } + + MutexLock lock(&mutex_); + caller_frame_ = caller_frame; +#endif // GTEST_HAS_ABSL +} + +// A helper class that creates the premature-exit file in its +// constructor and deletes the file in its destructor. +class ScopedPrematureExitFile { + public: + explicit ScopedPrematureExitFile(const char* premature_exit_filepath) + : premature_exit_filepath_(premature_exit_filepath ? + premature_exit_filepath : "") { + // If a path to the premature-exit file is specified... + if (!premature_exit_filepath_.empty()) { + // create the file with a single "0" character in it. I/O + // errors are ignored as there's nothing better we can do and we + // don't want to fail the test because of this. + FILE* pfile = posix::FOpen(premature_exit_filepath, "w"); + fwrite("0", 1, 1, pfile); + fclose(pfile); + } + } + + ~ScopedPrematureExitFile() { + if (!premature_exit_filepath_.empty()) { + int retval = remove(premature_exit_filepath_.c_str()); + if (retval) { + GTEST_LOG_(ERROR) << "Failed to remove premature exit filepath \"" + << premature_exit_filepath_ << "\" with error " + << retval; + } + } + } + + private: + const std::string premature_exit_filepath_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedPrematureExitFile); +}; + +} // namespace internal + +// class TestEventListeners + +TestEventListeners::TestEventListeners() + : repeater_(new internal::TestEventRepeater()), + default_result_printer_(nullptr), + default_xml_generator_(nullptr) {} + +TestEventListeners::~TestEventListeners() { delete repeater_; } + +// Returns the standard listener responsible for the default console +// output. Can be removed from the listeners list to shut down default +// console output. Note that removing this object from the listener list +// with Release transfers its ownership to the user. +void TestEventListeners::Append(TestEventListener* listener) { + repeater_->Append(listener); +} + +// Removes the given event listener from the list and returns it. It then +// becomes the caller's responsibility to delete the listener. Returns +// NULL if the listener is not found in the list. +TestEventListener* TestEventListeners::Release(TestEventListener* listener) { + if (listener == default_result_printer_) + default_result_printer_ = nullptr; + else if (listener == default_xml_generator_) + default_xml_generator_ = nullptr; + return repeater_->Release(listener); +} + +// Returns repeater that broadcasts the TestEventListener events to all +// subscribers. +TestEventListener* TestEventListeners::repeater() { return repeater_; } + +// Sets the default_result_printer attribute to the provided listener. +// The listener is also added to the listener list and previous +// default_result_printer is removed from it and deleted. The listener can +// also be NULL in which case it will not be added to the list. Does +// nothing if the previous and the current listener objects are the same. +void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) { + if (default_result_printer_ != listener) { + // It is an error to pass this method a listener that is already in the + // list. + delete Release(default_result_printer_); + default_result_printer_ = listener; + if (listener != nullptr) Append(listener); + } +} + +// Sets the default_xml_generator attribute to the provided listener. The +// listener is also added to the listener list and previous +// default_xml_generator is removed from it and deleted. The listener can +// also be NULL in which case it will not be added to the list. Does +// nothing if the previous and the current listener objects are the same. +void TestEventListeners::SetDefaultXmlGenerator(TestEventListener* listener) { + if (default_xml_generator_ != listener) { + // It is an error to pass this method a listener that is already in the + // list. + delete Release(default_xml_generator_); + default_xml_generator_ = listener; + if (listener != nullptr) Append(listener); + } +} + +// Controls whether events will be forwarded by the repeater to the +// listeners in the list. +bool TestEventListeners::EventForwardingEnabled() const { + return repeater_->forwarding_enabled(); +} + +void TestEventListeners::SuppressEventForwarding() { + repeater_->set_forwarding_enabled(false); +} + +// class UnitTest + +// Gets the singleton UnitTest object. The first time this method is +// called, a UnitTest object is constructed and returned. Consecutive +// calls will return the same object. +// +// We don't protect this under mutex_ as a user is not supposed to +// call this before main() starts, from which point on the return +// value will never change. +UnitTest* UnitTest::GetInstance() { + // CodeGear C++Builder insists on a public destructor for the + // default implementation. Use this implementation to keep good OO + // design with private destructor. + +#if defined(__BORLANDC__) + static UnitTest* const instance = new UnitTest; + return instance; +#else + static UnitTest instance; + return &instance; +#endif // defined(__BORLANDC__) +} + +// Gets the number of successful test suites. +int UnitTest::successful_test_suite_count() const { + return impl()->successful_test_suite_count(); +} + +// Gets the number of failed test suites. +int UnitTest::failed_test_suite_count() const { + return impl()->failed_test_suite_count(); +} + +// Gets the number of all test suites. +int UnitTest::total_test_suite_count() const { + return impl()->total_test_suite_count(); +} + +// Gets the number of all test suites that contain at least one test +// that should run. +int UnitTest::test_suite_to_run_count() const { + return impl()->test_suite_to_run_count(); +} + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +int UnitTest::successful_test_case_count() const { + return impl()->successful_test_suite_count(); +} +int UnitTest::failed_test_case_count() const { + return impl()->failed_test_suite_count(); +} +int UnitTest::total_test_case_count() const { + return impl()->total_test_suite_count(); +} +int UnitTest::test_case_to_run_count() const { + return impl()->test_suite_to_run_count(); +} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +// Gets the number of successful tests. +int UnitTest::successful_test_count() const { + return impl()->successful_test_count(); +} + +// Gets the number of skipped tests. +int UnitTest::skipped_test_count() const { + return impl()->skipped_test_count(); +} + +// Gets the number of failed tests. +int UnitTest::failed_test_count() const { return impl()->failed_test_count(); } + +// Gets the number of disabled tests that will be reported in the XML report. +int UnitTest::reportable_disabled_test_count() const { + return impl()->reportable_disabled_test_count(); +} + +// Gets the number of disabled tests. +int UnitTest::disabled_test_count() const { + return impl()->disabled_test_count(); +} + +// Gets the number of tests to be printed in the XML report. +int UnitTest::reportable_test_count() const { + return impl()->reportable_test_count(); +} + +// Gets the number of all tests. +int UnitTest::total_test_count() const { return impl()->total_test_count(); } + +// Gets the number of tests that should run. +int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); } + +// Gets the time of the test program start, in ms from the start of the +// UNIX epoch. +internal::TimeInMillis UnitTest::start_timestamp() const { + return impl()->start_timestamp(); +} + +// Gets the elapsed time, in milliseconds. +internal::TimeInMillis UnitTest::elapsed_time() const { + return impl()->elapsed_time(); +} + +// Returns true iff the unit test passed (i.e. all test suites passed). +bool UnitTest::Passed() const { return impl()->Passed(); } + +// Returns true iff the unit test failed (i.e. some test suite failed +// or something outside of all tests failed). +bool UnitTest::Failed() const { return impl()->Failed(); } + +// Gets the i-th test suite among all the test suites. i can range from 0 to +// total_test_suite_count() - 1. If i is not in that range, returns NULL. +const TestSuite* UnitTest::GetTestSuite(int i) const { + return impl()->GetTestSuite(i); +} + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +const TestCase* UnitTest::GetTestCase(int i) const { + return impl()->GetTestCase(i); +} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +// Returns the TestResult containing information on test failures and +// properties logged outside of individual test suites. +const TestResult& UnitTest::ad_hoc_test_result() const { + return *impl()->ad_hoc_test_result(); +} + +// Gets the i-th test suite among all the test suites. i can range from 0 to +// total_test_suite_count() - 1. If i is not in that range, returns NULL. +TestSuite* UnitTest::GetMutableTestSuite(int i) { + return impl()->GetMutableSuiteCase(i); +} + +// Returns the list of event listeners that can be used to track events +// inside Google Test. +TestEventListeners& UnitTest::listeners() { + return *impl()->listeners(); +} + +// Registers and returns a global test environment. When a test +// program is run, all global test environments will be set-up in the +// order they were registered. After all tests in the program have +// finished, all global test environments will be torn-down in the +// *reverse* order they were registered. +// +// The UnitTest object takes ownership of the given environment. +// +// We don't protect this under mutex_, as we only support calling it +// from the main thread. +Environment* UnitTest::AddEnvironment(Environment* env) { + if (env == nullptr) { + return nullptr; + } + + impl_->environments().push_back(env); + return env; +} + +// Adds a TestPartResult to the current TestResult object. All Google Test +// assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) eventually call +// this to report their results. The user code should use the +// assertion macros instead of calling this directly. +void UnitTest::AddTestPartResult( + TestPartResult::Type result_type, + const char* file_name, + int line_number, + const std::string& message, + const std::string& os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_) { + Message msg; + msg << message; + + internal::MutexLock lock(&mutex_); + if (impl_->gtest_trace_stack().size() > 0) { + msg << "\n" << GTEST_NAME_ << " trace:"; + + for (size_t i = impl_->gtest_trace_stack().size(); i > 0; --i) { + const internal::TraceInfo& trace = impl_->gtest_trace_stack()[i - 1]; + msg << "\n" << internal::FormatFileLocation(trace.file, trace.line) + << " " << trace.message; + } + } + + if (os_stack_trace.c_str() != nullptr && !os_stack_trace.empty()) { + msg << internal::kStackTraceMarker << os_stack_trace; + } + + const TestPartResult result = TestPartResult( + result_type, file_name, line_number, msg.GetString().c_str()); + impl_->GetTestPartResultReporterForCurrentThread()-> + ReportTestPartResult(result); + + if (result_type != TestPartResult::kSuccess && + result_type != TestPartResult::kSkip) { + // gtest_break_on_failure takes precedence over + // gtest_throw_on_failure. This allows a user to set the latter + // in the code (perhaps in order to use Google Test assertions + // with another testing framework) and specify the former on the + // command line for debugging. + if (GTEST_FLAG(break_on_failure)) { +#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT + // Using DebugBreak on Windows allows gtest to still break into a debugger + // when a failure happens and both the --gtest_break_on_failure and + // the --gtest_catch_exceptions flags are specified. + DebugBreak(); +#elif (!defined(__native_client__)) && \ + ((defined(__clang__) || defined(__GNUC__)) && \ + (defined(__x86_64__) || defined(__i386__))) + // with clang/gcc we can achieve the same effect on x86 by invoking int3 + asm("int3"); +#else + // Dereference nullptr through a volatile pointer to prevent the compiler + // from removing. We use this rather than abort() or __builtin_trap() for + // portability: some debuggers don't correctly trap abort(). + *static_cast(nullptr) = 1; +#endif // GTEST_OS_WINDOWS + } else if (GTEST_FLAG(throw_on_failure)) { +#if GTEST_HAS_EXCEPTIONS + throw internal::GoogleTestFailureException(result); +#else + // We cannot call abort() as it generates a pop-up in debug mode + // that cannot be suppressed in VC 7.1 or below. + exit(1); +#endif + } + } +} + +// Adds a TestProperty to the current TestResult object when invoked from +// inside a test, to current TestSuite's ad_hoc_test_result_ when invoked +// from SetUpTestSuite or TearDownTestSuite, or to the global property set +// when invoked elsewhere. If the result already contains a property with +// the same key, the value will be updated. +void UnitTest::RecordProperty(const std::string& key, + const std::string& value) { + impl_->RecordProperty(TestProperty(key, value)); +} + +// Runs all tests in this UnitTest object and prints the result. +// Returns 0 if successful, or 1 otherwise. +// +// We don't protect this under mutex_, as we only support calling it +// from the main thread. +int UnitTest::Run() { + const bool in_death_test_child_process = + internal::GTEST_FLAG(internal_run_death_test).length() > 0; + + // Google Test implements this protocol for catching that a test + // program exits before returning control to Google Test: + // + // 1. Upon start, Google Test creates a file whose absolute path + // is specified by the environment variable + // TEST_PREMATURE_EXIT_FILE. + // 2. When Google Test has finished its work, it deletes the file. + // + // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before + // running a Google-Test-based test program and check the existence + // of the file at the end of the test execution to see if it has + // exited prematurely. + + // If we are in the child process of a death test, don't + // create/delete the premature exit file, as doing so is unnecessary + // and will confuse the parent process. Otherwise, create/delete + // the file upon entering/leaving this function. If the program + // somehow exits before this function has a chance to return, the + // premature-exit file will be left undeleted, causing a test runner + // that understands the premature-exit-file protocol to report the + // test as having failed. + const internal::ScopedPrematureExitFile premature_exit_file( + in_death_test_child_process + ? nullptr + : internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE")); + + // Captures the value of GTEST_FLAG(catch_exceptions). This value will be + // used for the duration of the program. + impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions)); + +#if GTEST_OS_WINDOWS + // Either the user wants Google Test to catch exceptions thrown by the + // tests or this is executing in the context of death test child + // process. In either case the user does not want to see pop-up dialogs + // about crashes - they are expected. + if (impl()->catch_exceptions() || in_death_test_child_process) { +# if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT + // SetErrorMode doesn't exist on CE. + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | + SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); +# endif // !GTEST_OS_WINDOWS_MOBILE + +# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE + // Death test children can be terminated with _abort(). On Windows, + // _abort() can show a dialog with a warning message. This forces the + // abort message to go to stderr instead. + _set_error_mode(_OUT_TO_STDERR); +# endif + +# if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE + // In the debug version, Visual Studio pops up a separate dialog + // offering a choice to debug the aborted program. We need to suppress + // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement + // executed. Google Test will notify the user of any unexpected + // failure via stderr. + if (!GTEST_FLAG(break_on_failure)) + _set_abort_behavior( + 0x0, // Clear the following flags: + _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. +# endif + } +#endif // GTEST_OS_WINDOWS + + return internal::HandleExceptionsInMethodIfSupported( + impl(), + &internal::UnitTestImpl::RunAllTests, + "auxiliary test code (environments or event listeners)") ? 0 : 1; +} + +// Returns the working directory when the first TEST() or TEST_F() was +// executed. +const char* UnitTest::original_working_dir() const { + return impl_->original_working_dir_.c_str(); +} + +// Returns the TestSuite object for the test that's currently running, +// or NULL if no test is running. +const TestSuite* UnitTest::current_test_suite() const + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + return impl_->current_test_suite(); +} + +// Legacy API is still available but deprecated +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +const TestCase* UnitTest::current_test_case() const + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + return impl_->current_test_suite(); +} +#endif + +// Returns the TestInfo object for the test that's currently running, +// or NULL if no test is running. +const TestInfo* UnitTest::current_test_info() const + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + return impl_->current_test_info(); +} + +// Returns the random seed used at the start of the current test run. +int UnitTest::random_seed() const { return impl_->random_seed(); } + +// Returns ParameterizedTestSuiteRegistry object used to keep track of +// value-parameterized tests and instantiate and register them. +internal::ParameterizedTestSuiteRegistry& +UnitTest::parameterized_test_registry() GTEST_LOCK_EXCLUDED_(mutex_) { + return impl_->parameterized_test_registry(); +} + +// Creates an empty UnitTest. +UnitTest::UnitTest() { + impl_ = new internal::UnitTestImpl(this); +} + +// Destructor of UnitTest. +UnitTest::~UnitTest() { + delete impl_; +} + +// Pushes a trace defined by SCOPED_TRACE() on to the per-thread +// Google Test trace stack. +void UnitTest::PushGTestTrace(const internal::TraceInfo& trace) + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + impl_->gtest_trace_stack().push_back(trace); +} + +// Pops a trace from the per-thread Google Test trace stack. +void UnitTest::PopGTestTrace() + GTEST_LOCK_EXCLUDED_(mutex_) { + internal::MutexLock lock(&mutex_); + impl_->gtest_trace_stack().pop_back(); +} + +namespace internal { + +UnitTestImpl::UnitTestImpl(UnitTest* parent) + : parent_(parent), + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */) + default_global_test_part_result_reporter_(this), + default_per_thread_test_part_result_reporter_(this), + GTEST_DISABLE_MSC_WARNINGS_POP_() global_test_part_result_repoter_( + &default_global_test_part_result_reporter_), + per_thread_test_part_result_reporter_( + &default_per_thread_test_part_result_reporter_), + parameterized_test_registry_(), + parameterized_tests_registered_(false), + last_death_test_suite_(-1), + current_test_suite_(nullptr), + current_test_info_(nullptr), + ad_hoc_test_result_(), + os_stack_trace_getter_(nullptr), + post_flag_parse_init_performed_(false), + random_seed_(0), // Will be overridden by the flag before first use. + random_(0), // Will be reseeded before first use. + start_timestamp_(0), + elapsed_time_(0), +#if GTEST_HAS_DEATH_TEST + death_test_factory_(new DefaultDeathTestFactory), +#endif + // Will be overridden by the flag before first use. + catch_exceptions_(false) { + listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter); +} + +UnitTestImpl::~UnitTestImpl() { + // Deletes every TestSuite. + ForEach(test_suites_, internal::Delete); + + // Deletes every Environment. + ForEach(environments_, internal::Delete); + + delete os_stack_trace_getter_; +} + +// Adds a TestProperty to the current TestResult object when invoked in a +// context of a test, to current test suite's ad_hoc_test_result when invoke +// from SetUpTestSuite/TearDownTestSuite, or to the global property set +// otherwise. If the result already contains a property with the same key, +// the value will be updated. +void UnitTestImpl::RecordProperty(const TestProperty& test_property) { + std::string xml_element; + TestResult* test_result; // TestResult appropriate for property recording. + + if (current_test_info_ != nullptr) { + xml_element = "testcase"; + test_result = &(current_test_info_->result_); + } else if (current_test_suite_ != nullptr) { + xml_element = "testsuite"; + test_result = &(current_test_suite_->ad_hoc_test_result_); + } else { + xml_element = "testsuites"; + test_result = &ad_hoc_test_result_; + } + test_result->RecordProperty(xml_element, test_property); +} + +#if GTEST_HAS_DEATH_TEST +// Disables event forwarding if the control is currently in a death test +// subprocess. Must not be called before InitGoogleTest. +void UnitTestImpl::SuppressTestEventsIfInSubprocess() { + if (internal_run_death_test_flag_.get() != nullptr) + listeners()->SuppressEventForwarding(); +} +#endif // GTEST_HAS_DEATH_TEST + +// Initializes event listeners performing XML output as specified by +// UnitTestOptions. Must not be called before InitGoogleTest. +void UnitTestImpl::ConfigureXmlOutput() { + const std::string& output_format = UnitTestOptions::GetOutputFormat(); + if (output_format == "xml") { + listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter( + UnitTestOptions::GetAbsolutePathToOutputFile().c_str())); + } else if (output_format == "json") { + listeners()->SetDefaultXmlGenerator(new JsonUnitTestResultPrinter( + UnitTestOptions::GetAbsolutePathToOutputFile().c_str())); + } else if (output_format != "") { + GTEST_LOG_(WARNING) << "WARNING: unrecognized output format \"" + << output_format << "\" ignored."; + } +} + +#if GTEST_CAN_STREAM_RESULTS_ +// Initializes event listeners for streaming test results in string form. +// Must not be called before InitGoogleTest. +void UnitTestImpl::ConfigureStreamingOutput() { + const std::string& target = GTEST_FLAG(stream_result_to); + if (!target.empty()) { + const size_t pos = target.find(':'); + if (pos != std::string::npos) { + listeners()->Append(new StreamingListener(target.substr(0, pos), + target.substr(pos+1))); + } else { + GTEST_LOG_(WARNING) << "unrecognized streaming target \"" << target + << "\" ignored."; + } + } +} +#endif // GTEST_CAN_STREAM_RESULTS_ + +// Performs initialization dependent upon flag values obtained in +// ParseGoogleTestFlagsOnly. Is called from InitGoogleTest after the call to +// ParseGoogleTestFlagsOnly. In case a user neglects to call InitGoogleTest +// this function is also called from RunAllTests. Since this function can be +// called more than once, it has to be idempotent. +void UnitTestImpl::PostFlagParsingInit() { + // Ensures that this function does not execute more than once. + if (!post_flag_parse_init_performed_) { + post_flag_parse_init_performed_ = true; + +#if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_) + // Register to send notifications about key process state changes. + listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_()); +#endif // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_) + +#if GTEST_HAS_DEATH_TEST + InitDeathTestSubprocessControlInfo(); + SuppressTestEventsIfInSubprocess(); +#endif // GTEST_HAS_DEATH_TEST + + // Registers parameterized tests. This makes parameterized tests + // available to the UnitTest reflection API without running + // RUN_ALL_TESTS. + RegisterParameterizedTests(); + + // Configures listeners for XML output. This makes it possible for users + // to shut down the default XML output before invoking RUN_ALL_TESTS. + ConfigureXmlOutput(); + +#if GTEST_CAN_STREAM_RESULTS_ + // Configures listeners for streaming test results to the specified server. + ConfigureStreamingOutput(); +#endif // GTEST_CAN_STREAM_RESULTS_ + +#if GTEST_HAS_ABSL + if (GTEST_FLAG(install_failure_signal_handler)) { + absl::FailureSignalHandlerOptions options; + absl::InstallFailureSignalHandler(options); + } +#endif // GTEST_HAS_ABSL + } +} + +// A predicate that checks the name of a TestSuite against a known +// value. +// +// This is used for implementation of the UnitTest class only. We put +// it in the anonymous namespace to prevent polluting the outer +// namespace. +// +// TestSuiteNameIs is copyable. +class TestSuiteNameIs { + public: + // Constructor. + explicit TestSuiteNameIs(const std::string& name) : name_(name) {} + + // Returns true iff the name of test_suite matches name_. + bool operator()(const TestSuite* test_suite) const { + return test_suite != nullptr && + strcmp(test_suite->name(), name_.c_str()) == 0; + } + + private: + std::string name_; +}; + +// Finds and returns a TestSuite with the given name. If one doesn't +// exist, creates one and returns it. It's the CALLER'S +// RESPONSIBILITY to ensure that this function is only called WHEN THE +// TESTS ARE NOT SHUFFLED. +// +// Arguments: +// +// test_suite_name: name of the test suite +// type_param: the name of the test suite's type parameter, or NULL if +// this is not a typed or a type-parameterized test suite. +// set_up_tc: pointer to the function that sets up the test suite +// tear_down_tc: pointer to the function that tears down the test suite +TestSuite* UnitTestImpl::GetTestSuite( + const char* test_suite_name, const char* type_param, + internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc) { + // Can we find a TestSuite with the given name? + const auto test_suite = + std::find_if(test_suites_.rbegin(), test_suites_.rend(), + TestSuiteNameIs(test_suite_name)); + + if (test_suite != test_suites_.rend()) return *test_suite; + + // No. Let's create one. + auto* const new_test_suite = + new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc); + + // Is this a death test suite? + if (internal::UnitTestOptions::MatchesFilter(test_suite_name, + kDeathTestSuiteFilter)) { + // Yes. Inserts the test suite after the last death test suite + // defined so far. This only works when the test suites haven't + // been shuffled. Otherwise we may end up running a death test + // after a non-death test. + ++last_death_test_suite_; + test_suites_.insert(test_suites_.begin() + last_death_test_suite_, + new_test_suite); + } else { + // No. Appends to the end of the list. + test_suites_.push_back(new_test_suite); + } + + test_suite_indices_.push_back(static_cast(test_suite_indices_.size())); + return new_test_suite; +} + +// Helpers for setting up / tearing down the given environment. They +// are for use in the ForEach() function. +static void SetUpEnvironment(Environment* env) { env->SetUp(); } +static void TearDownEnvironment(Environment* env) { env->TearDown(); } + +// Runs all tests in this UnitTest object, prints the result, and +// returns true if all tests are successful. If any exception is +// thrown during a test, the test is considered to be failed, but the +// rest of the tests will still be run. +// +// When parameterized tests are enabled, it expands and registers +// parameterized tests first in RegisterParameterizedTests(). +// All other functions called from RunAllTests() may safely assume that +// parameterized tests are ready to be counted and run. +bool UnitTestImpl::RunAllTests() { + // True iff Google Test is initialized before RUN_ALL_TESTS() is called. + const bool gtest_is_initialized_before_run_all_tests = GTestIsInitialized(); + + // Do not run any test if the --help flag was specified. + if (g_help_flag) + return true; + + // Repeats the call to the post-flag parsing initialization in case the + // user didn't call InitGoogleTest. + PostFlagParsingInit(); + + // Even if sharding is not on, test runners may want to use the + // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding + // protocol. + internal::WriteToShardStatusFileIfNeeded(); + + // True iff we are in a subprocess for running a thread-safe-style + // death test. + bool in_subprocess_for_death_test = false; + +#if GTEST_HAS_DEATH_TEST + in_subprocess_for_death_test = + (internal_run_death_test_flag_.get() != nullptr); +# if defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_) + if (in_subprocess_for_death_test) { + GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_(); + } +# endif // defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_) +#endif // GTEST_HAS_DEATH_TEST + + const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex, + in_subprocess_for_death_test); + + // Compares the full test names with the filter to decide which + // tests to run. + const bool has_tests_to_run = FilterTests(should_shard + ? HONOR_SHARDING_PROTOCOL + : IGNORE_SHARDING_PROTOCOL) > 0; + + // Lists the tests and exits if the --gtest_list_tests flag was specified. + if (GTEST_FLAG(list_tests)) { + // This must be called *after* FilterTests() has been called. + ListTestsMatchingFilter(); + return true; + } + + random_seed_ = GTEST_FLAG(shuffle) ? + GetRandomSeedFromFlag(GTEST_FLAG(random_seed)) : 0; + + // True iff at least one test has failed. + bool failed = false; + + TestEventListener* repeater = listeners()->repeater(); + + start_timestamp_ = GetTimeInMillis(); + repeater->OnTestProgramStart(*parent_); + + // How many times to repeat the tests? We don't want to repeat them + // when we are inside the subprocess of a death test. + const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG(repeat); + // Repeats forever if the repeat count is negative. + const bool gtest_repeat_forever = repeat < 0; + for (int i = 0; gtest_repeat_forever || i != repeat; i++) { + // We want to preserve failures generated by ad-hoc test + // assertions executed before RUN_ALL_TESTS(). + ClearNonAdHocTestResult(); + + const TimeInMillis start = GetTimeInMillis(); + + // Shuffles test suites and tests if requested. + if (has_tests_to_run && GTEST_FLAG(shuffle)) { + random()->Reseed(static_cast(random_seed_)); + // This should be done before calling OnTestIterationStart(), + // such that a test event listener can see the actual test order + // in the event. + ShuffleTests(); + } + + // Tells the unit test event listeners that the tests are about to start. + repeater->OnTestIterationStart(*parent_, i); + + // Runs each test suite if there is at least one test to run. + if (has_tests_to_run) { + // Sets up all environments beforehand. + repeater->OnEnvironmentsSetUpStart(*parent_); + ForEach(environments_, SetUpEnvironment); + repeater->OnEnvironmentsSetUpEnd(*parent_); + + // Runs the tests only if there was no fatal failure or skip triggered + // during global set-up. + if (Test::IsSkipped()) { + // Emit diagnostics when global set-up calls skip, as it will not be + // emitted by default. + TestResult& test_result = + *internal::GetUnitTestImpl()->current_test_result(); + for (int j = 0; j < test_result.total_part_count(); ++j) { + const TestPartResult& test_part_result = + test_result.GetTestPartResult(j); + if (test_part_result.type() == TestPartResult::kSkip) { + const std::string& result = test_part_result.message(); + printf("%s\n", result.c_str()); + } + } + fflush(stdout); + } else if (!Test::HasFatalFailure()) { + for (int test_index = 0; test_index < total_test_suite_count(); + test_index++) { + GetMutableSuiteCase(test_index)->Run(); + } + } + + // Tears down all environments in reverse order afterwards. + repeater->OnEnvironmentsTearDownStart(*parent_); + std::for_each(environments_.rbegin(), environments_.rend(), + TearDownEnvironment); + repeater->OnEnvironmentsTearDownEnd(*parent_); + } + + elapsed_time_ = GetTimeInMillis() - start; + + // Tells the unit test event listener that the tests have just finished. + repeater->OnTestIterationEnd(*parent_, i); + + // Gets the result and clears it. + if (!Passed()) { + failed = true; + } + + // Restores the original test order after the iteration. This + // allows the user to quickly repro a failure that happens in the + // N-th iteration without repeating the first (N - 1) iterations. + // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in + // case the user somehow changes the value of the flag somewhere + // (it's always safe to unshuffle the tests). + UnshuffleTests(); + + if (GTEST_FLAG(shuffle)) { + // Picks a new random seed for each iteration. + random_seed_ = GetNextRandomSeed(random_seed_); + } + } + + repeater->OnTestProgramEnd(*parent_); + + if (!gtest_is_initialized_before_run_all_tests) { + ColoredPrintf( + COLOR_RED, + "\nIMPORTANT NOTICE - DO NOT IGNORE:\n" + "This test program did NOT call " GTEST_INIT_GOOGLE_TEST_NAME_ + "() before calling RUN_ALL_TESTS(). This is INVALID. Soon " GTEST_NAME_ + " will start to enforce the valid usage. " + "Please fix it ASAP, or IT WILL START TO FAIL.\n"); // NOLINT +#if GTEST_FOR_GOOGLE_ + ColoredPrintf(COLOR_RED, + "For more details, see http://wiki/Main/ValidGUnitMain.\n"); +#endif // GTEST_FOR_GOOGLE_ + } + + return !failed; +} + +// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file +// if the variable is present. If a file already exists at this location, this +// function will write over it. If the variable is present, but the file cannot +// be created, prints an error and exits. +void WriteToShardStatusFileIfNeeded() { + const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile); + if (test_shard_file != nullptr) { + FILE* const file = posix::FOpen(test_shard_file, "w"); + if (file == nullptr) { + ColoredPrintf(COLOR_RED, + "Could not write to the test shard status file \"%s\" " + "specified by the %s environment variable.\n", + test_shard_file, kTestShardStatusFile); + fflush(stdout); + exit(EXIT_FAILURE); + } + fclose(file); + } +} + +// Checks whether sharding is enabled by examining the relevant +// environment variable values. If the variables are present, +// but inconsistent (i.e., shard_index >= total_shards), prints +// an error and exits. If in_subprocess_for_death_test, sharding is +// disabled because it must only be applied to the original test +// process. Otherwise, we could filter out death tests we intended to execute. +bool ShouldShard(const char* total_shards_env, + const char* shard_index_env, + bool in_subprocess_for_death_test) { + if (in_subprocess_for_death_test) { + return false; + } + + const Int32 total_shards = Int32FromEnvOrDie(total_shards_env, -1); + const Int32 shard_index = Int32FromEnvOrDie(shard_index_env, -1); + + if (total_shards == -1 && shard_index == -1) { + return false; + } else if (total_shards == -1 && shard_index != -1) { + const Message msg = Message() + << "Invalid environment variables: you have " + << kTestShardIndex << " = " << shard_index + << ", but have left " << kTestTotalShards << " unset.\n"; + ColoredPrintf(COLOR_RED, "%s", msg.GetString().c_str()); + fflush(stdout); + exit(EXIT_FAILURE); + } else if (total_shards != -1 && shard_index == -1) { + const Message msg = Message() + << "Invalid environment variables: you have " + << kTestTotalShards << " = " << total_shards + << ", but have left " << kTestShardIndex << " unset.\n"; + ColoredPrintf(COLOR_RED, "%s", msg.GetString().c_str()); + fflush(stdout); + exit(EXIT_FAILURE); + } else if (shard_index < 0 || shard_index >= total_shards) { + const Message msg = Message() + << "Invalid environment variables: we require 0 <= " + << kTestShardIndex << " < " << kTestTotalShards + << ", but you have " << kTestShardIndex << "=" << shard_index + << ", " << kTestTotalShards << "=" << total_shards << ".\n"; + ColoredPrintf(COLOR_RED, "%s", msg.GetString().c_str()); + fflush(stdout); + exit(EXIT_FAILURE); + } + + return total_shards > 1; +} + +// Parses the environment variable var as an Int32. If it is unset, +// returns default_val. If it is not an Int32, prints an error +// and aborts. +Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) { + const char* str_val = posix::GetEnv(var); + if (str_val == nullptr) { + return default_val; + } + + Int32 result; + if (!ParseInt32(Message() << "The value of environment variable " << var, + str_val, &result)) { + exit(EXIT_FAILURE); + } + return result; +} + +// Given the total number of shards, the shard index, and the test id, +// returns true iff the test should be run on this shard. The test id is +// some arbitrary but unique non-negative integer assigned to each test +// method. Assumes that 0 <= shard_index < total_shards. +bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { + return (test_id % total_shards) == shard_index; +} + +// Compares the name of each test with the user-specified filter to +// decide whether the test should be run, then records the result in +// each TestSuite and TestInfo object. +// If shard_tests == true, further filters tests based on sharding +// variables in the environment - see +// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md +// . Returns the number of tests that should run. +int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) { + const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ? + Int32FromEnvOrDie(kTestTotalShards, -1) : -1; + const Int32 shard_index = shard_tests == HONOR_SHARDING_PROTOCOL ? + Int32FromEnvOrDie(kTestShardIndex, -1) : -1; + + // num_runnable_tests are the number of tests that will + // run across all shards (i.e., match filter and are not disabled). + // num_selected_tests are the number of tests to be run on + // this shard. + int num_runnable_tests = 0; + int num_selected_tests = 0; + for (auto* test_suite : test_suites_) { + const std::string& test_suite_name = test_suite->name(); + test_suite->set_should_run(false); + + for (size_t j = 0; j < test_suite->test_info_list().size(); j++) { + TestInfo* const test_info = test_suite->test_info_list()[j]; + const std::string test_name(test_info->name()); + // A test is disabled if test suite name or test name matches + // kDisableTestFilter. + const bool is_disabled = internal::UnitTestOptions::MatchesFilter( + test_suite_name, kDisableTestFilter) || + internal::UnitTestOptions::MatchesFilter( + test_name, kDisableTestFilter); + test_info->is_disabled_ = is_disabled; + + const bool matches_filter = internal::UnitTestOptions::FilterMatchesTest( + test_suite_name, test_name); + test_info->matches_filter_ = matches_filter; + + const bool is_runnable = + (GTEST_FLAG(also_run_disabled_tests) || !is_disabled) && + matches_filter; + + const bool is_in_another_shard = + shard_tests != IGNORE_SHARDING_PROTOCOL && + !ShouldRunTestOnShard(total_shards, shard_index, num_runnable_tests); + test_info->is_in_another_shard_ = is_in_another_shard; + const bool is_selected = is_runnable && !is_in_another_shard; + + num_runnable_tests += is_runnable; + num_selected_tests += is_selected; + + test_info->should_run_ = is_selected; + test_suite->set_should_run(test_suite->should_run() || is_selected); + } + } + return num_selected_tests; +} + +// Prints the given C-string on a single line by replacing all '\n' +// characters with string "\\n". If the output takes more than +// max_length characters, only prints the first max_length characters +// and "...". +static void PrintOnOneLine(const char* str, int max_length) { + if (str != nullptr) { + for (int i = 0; *str != '\0'; ++str) { + if (i >= max_length) { + printf("..."); + break; + } + if (*str == '\n') { + printf("\\n"); + i += 2; + } else { + printf("%c", *str); + ++i; + } + } + } +} + +// Prints the names of the tests matching the user-specified filter flag. +void UnitTestImpl::ListTestsMatchingFilter() { + // Print at most this many characters for each type/value parameter. + const int kMaxParamLength = 250; + + for (auto* test_suite : test_suites_) { + bool printed_test_suite_name = false; + + for (size_t j = 0; j < test_suite->test_info_list().size(); j++) { + const TestInfo* const test_info = test_suite->test_info_list()[j]; + if (test_info->matches_filter_) { + if (!printed_test_suite_name) { + printed_test_suite_name = true; + printf("%s.", test_suite->name()); + if (test_suite->type_param() != nullptr) { + printf(" # %s = ", kTypeParamLabel); + // We print the type parameter on a single line to make + // the output easy to parse by a program. + PrintOnOneLine(test_suite->type_param(), kMaxParamLength); + } + printf("\n"); + } + printf(" %s", test_info->name()); + if (test_info->value_param() != nullptr) { + printf(" # %s = ", kValueParamLabel); + // We print the value parameter on a single line to make the + // output easy to parse by a program. + PrintOnOneLine(test_info->value_param(), kMaxParamLength); + } + printf("\n"); + } + } + } + fflush(stdout); + const std::string& output_format = UnitTestOptions::GetOutputFormat(); + if (output_format == "xml" || output_format == "json") { + FILE* fileout = OpenFileForWriting( + UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); + std::stringstream stream; + if (output_format == "xml") { + XmlUnitTestResultPrinter( + UnitTestOptions::GetAbsolutePathToOutputFile().c_str()) + .PrintXmlTestsList(&stream, test_suites_); + } else if (output_format == "json") { + JsonUnitTestResultPrinter( + UnitTestOptions::GetAbsolutePathToOutputFile().c_str()) + .PrintJsonTestList(&stream, test_suites_); + } + fprintf(fileout, "%s", StringStreamToString(&stream).c_str()); + fclose(fileout); + } +} + +// Sets the OS stack trace getter. +// +// Does nothing if the input and the current OS stack trace getter are +// the same; otherwise, deletes the old getter and makes the input the +// current getter. +void UnitTestImpl::set_os_stack_trace_getter( + OsStackTraceGetterInterface* getter) { + if (os_stack_trace_getter_ != getter) { + delete os_stack_trace_getter_; + os_stack_trace_getter_ = getter; + } +} + +// Returns the current OS stack trace getter if it is not NULL; +// otherwise, creates an OsStackTraceGetter, makes it the current +// getter, and returns it. +OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() { + if (os_stack_trace_getter_ == nullptr) { +#ifdef GTEST_OS_STACK_TRACE_GETTER_ + os_stack_trace_getter_ = new GTEST_OS_STACK_TRACE_GETTER_; +#else + os_stack_trace_getter_ = new OsStackTraceGetter; +#endif // GTEST_OS_STACK_TRACE_GETTER_ + } + + return os_stack_trace_getter_; +} + +// Returns the most specific TestResult currently running. +TestResult* UnitTestImpl::current_test_result() { + if (current_test_info_ != nullptr) { + return ¤t_test_info_->result_; + } + if (current_test_suite_ != nullptr) { + return ¤t_test_suite_->ad_hoc_test_result_; + } + return &ad_hoc_test_result_; +} + +// Shuffles all test suites, and the tests within each test suite, +// making sure that death tests are still run first. +void UnitTestImpl::ShuffleTests() { + // Shuffles the death test suites. + ShuffleRange(random(), 0, last_death_test_suite_ + 1, &test_suite_indices_); + + // Shuffles the non-death test suites. + ShuffleRange(random(), last_death_test_suite_ + 1, + static_cast(test_suites_.size()), &test_suite_indices_); + + // Shuffles the tests inside each test suite. + for (auto& test_suite : test_suites_) { + test_suite->ShuffleTests(random()); + } +} + +// Restores the test suites and tests to their order before the first shuffle. +void UnitTestImpl::UnshuffleTests() { + for (size_t i = 0; i < test_suites_.size(); i++) { + // Unshuffles the tests in each test suite. + test_suites_[i]->UnshuffleTests(); + // Resets the index of each test suite. + test_suite_indices_[i] = static_cast(i); + } +} + +// Returns the current OS stack trace as an std::string. +// +// The maximum number of stack frames to be included is specified by +// the gtest_stack_trace_depth flag. The skip_count parameter +// specifies the number of top frames to be skipped, which doesn't +// count against the number of frames to be included. +// +// For example, if Foo() calls Bar(), which in turn calls +// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in +// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. +std::string GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/, + int skip_count) { + // We pass skip_count + 1 to skip this wrapper function in addition + // to what the user really wants to skip. + return GetUnitTestImpl()->CurrentOsStackTraceExceptTop(skip_count + 1); +} + +// Used by the GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ macro to +// suppress unreachable code warnings. +namespace { +class ClassUniqueToAlwaysTrue {}; +} + +bool IsTrue(bool condition) { return condition; } + +bool AlwaysTrue() { +#if GTEST_HAS_EXCEPTIONS + // This condition is always false so AlwaysTrue() never actually throws, + // but it makes the compiler think that it may throw. + if (IsTrue(false)) + throw ClassUniqueToAlwaysTrue(); +#endif // GTEST_HAS_EXCEPTIONS + return true; +} + +// If *pstr starts with the given prefix, modifies *pstr to be right +// past the prefix and returns true; otherwise leaves *pstr unchanged +// and returns false. None of pstr, *pstr, and prefix can be NULL. +bool SkipPrefix(const char* prefix, const char** pstr) { + const size_t prefix_len = strlen(prefix); + if (strncmp(*pstr, prefix, prefix_len) == 0) { + *pstr += prefix_len; + return true; + } + return false; +} + +// Parses a string as a command line flag. The string should have +// the format "--flag=value". When def_optional is true, the "=value" +// part can be omitted. +// +// Returns the value of the flag, or NULL if the parsing failed. +static const char* ParseFlagValue(const char* str, const char* flag, + bool def_optional) { + // str and flag must not be NULL. + if (str == nullptr || flag == nullptr) return nullptr; + + // The flag must start with "--" followed by GTEST_FLAG_PREFIX_. + const std::string flag_str = std::string("--") + GTEST_FLAG_PREFIX_ + flag; + const size_t flag_len = flag_str.length(); + if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr; + + // Skips the flag name. + const char* flag_end = str + flag_len; + + // When def_optional is true, it's OK to not have a "=value" part. + if (def_optional && (flag_end[0] == '\0')) { + return flag_end; + } + + // If def_optional is true and there are more characters after the + // flag name, or if def_optional is false, there must be a '=' after + // the flag name. + if (flag_end[0] != '=') return nullptr; + + // Returns the string after "=". + return flag_end + 1; +} + +// Parses a string for a bool flag, in the form of either +// "--flag=value" or "--flag". +// +// In the former case, the value is taken as true as long as it does +// not start with '0', 'f', or 'F'. +// +// In the latter case, the value is taken as true. +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +static bool ParseBoolFlag(const char* str, const char* flag, bool* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseFlagValue(str, flag, true); + + // Aborts if the parsing failed. + if (value_str == nullptr) return false; + + // Converts the string value to a bool. + *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); + return true; +} + +// Parses a string for an Int32 flag, in the form of +// "--flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +bool ParseInt32Flag(const char* str, const char* flag, Int32* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseFlagValue(str, flag, false); + + // Aborts if the parsing failed. + if (value_str == nullptr) return false; + + // Sets *value to the value of the flag. + return ParseInt32(Message() << "The value of flag --" << flag, + value_str, value); +} + +// Parses a string for a string flag, in the form of +// "--flag=value". +// +// On success, stores the value of the flag in *value, and returns +// true. On failure, returns false without changing *value. +template +static bool ParseStringFlag(const char* str, const char* flag, String* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseFlagValue(str, flag, false); + + // Aborts if the parsing failed. + if (value_str == nullptr) return false; + + // Sets *value to the value of the flag. + *value = value_str; + return true; +} + +// Determines whether a string has a prefix that Google Test uses for its +// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_. +// If Google Test detects that a command line flag has its prefix but is not +// recognized, it will print its help message. Flags starting with +// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test +// internal flags and do not trigger the help message. +static bool HasGoogleTestFlagPrefix(const char* str) { + return (SkipPrefix("--", &str) || + SkipPrefix("-", &str) || + SkipPrefix("/", &str)) && + !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) && + (SkipPrefix(GTEST_FLAG_PREFIX_, &str) || + SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str)); +} + +// Prints a string containing code-encoded text. The following escape +// sequences can be used in the string to control the text color: +// +// @@ prints a single '@' character. +// @R changes the color to red. +// @G changes the color to green. +// @Y changes the color to yellow. +// @D changes to the default terminal text color. +// +static void PrintColorEncoded(const char* str) { + GTestColor color = COLOR_DEFAULT; // The current color. + + // Conceptually, we split the string into segments divided by escape + // sequences. Then we print one segment at a time. At the end of + // each iteration, the str pointer advances to the beginning of the + // next segment. + for (;;) { + const char* p = strchr(str, '@'); + if (p == nullptr) { + ColoredPrintf(color, "%s", str); + return; + } + + ColoredPrintf(color, "%s", std::string(str, p).c_str()); + + const char ch = p[1]; + str = p + 2; + if (ch == '@') { + ColoredPrintf(color, "@"); + } else if (ch == 'D') { + color = COLOR_DEFAULT; + } else if (ch == 'R') { + color = COLOR_RED; + } else if (ch == 'G') { + color = COLOR_GREEN; + } else if (ch == 'Y') { + color = COLOR_YELLOW; + } else { + --str; + } + } +} + +static const char kColorEncodedHelpMessage[] = +"This program contains tests written using " GTEST_NAME_ ". You can use the\n" +"following command line flags to control its behavior:\n" +"\n" +"Test Selection:\n" +" @G--" GTEST_FLAG_PREFIX_ "list_tests@D\n" +" List the names of all tests instead of running them. The name of\n" +" TEST(Foo, Bar) is \"Foo.Bar\".\n" +" @G--" GTEST_FLAG_PREFIX_ "filter=@YPOSTIVE_PATTERNS" + "[@G-@YNEGATIVE_PATTERNS]@D\n" +" Run only the tests whose name matches one of the positive patterns but\n" +" none of the negative patterns. '?' matches any single character; '*'\n" +" matches any substring; ':' separates two patterns.\n" +" @G--" GTEST_FLAG_PREFIX_ "also_run_disabled_tests@D\n" +" Run all disabled tests too.\n" +"\n" +"Test Execution:\n" +" @G--" GTEST_FLAG_PREFIX_ "repeat=@Y[COUNT]@D\n" +" Run the tests repeatedly; use a negative count to repeat forever.\n" +" @G--" GTEST_FLAG_PREFIX_ "shuffle@D\n" +" Randomize tests' orders on every iteration.\n" +" @G--" GTEST_FLAG_PREFIX_ "random_seed=@Y[NUMBER]@D\n" +" Random number seed to use for shuffling test orders (between 1 and\n" +" 99999, or 0 to use a seed based on the current time).\n" +"\n" +"Test Output:\n" +" @G--" GTEST_FLAG_PREFIX_ "color=@Y(@Gyes@Y|@Gno@Y|@Gauto@Y)@D\n" +" Enable/disable colored output. The default is @Gauto@D.\n" +" -@G-" GTEST_FLAG_PREFIX_ "print_time=0@D\n" +" Don't print the elapsed time of each test.\n" +" @G--" GTEST_FLAG_PREFIX_ "output=@Y(@Gjson@Y|@Gxml@Y)[@G:@YDIRECTORY_PATH@G" + GTEST_PATH_SEP_ "@Y|@G:@YFILE_PATH]@D\n" +" Generate a JSON or XML report in the given directory or with the given\n" +" file name. @YFILE_PATH@D defaults to @Gtest_detail.xml@D.\n" +# if GTEST_CAN_STREAM_RESULTS_ +" @G--" GTEST_FLAG_PREFIX_ "stream_result_to=@YHOST@G:@YPORT@D\n" +" Stream test results to the given server.\n" +# endif // GTEST_CAN_STREAM_RESULTS_ +"\n" +"Assertion Behavior:\n" +# if GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS +" @G--" GTEST_FLAG_PREFIX_ "death_test_style=@Y(@Gfast@Y|@Gthreadsafe@Y)@D\n" +" Set the default death test style.\n" +# endif // GTEST_HAS_DEATH_TEST && !GTEST_OS_WINDOWS +" @G--" GTEST_FLAG_PREFIX_ "break_on_failure@D\n" +" Turn assertion failures into debugger break-points.\n" +" @G--" GTEST_FLAG_PREFIX_ "throw_on_failure@D\n" +" Turn assertion failures into C++ exceptions for use by an external\n" +" test framework.\n" +" @G--" GTEST_FLAG_PREFIX_ "catch_exceptions=0@D\n" +" Do not report exceptions as test failures. Instead, allow them\n" +" to crash the program or throw a pop-up (on Windows).\n" +"\n" +"Except for @G--" GTEST_FLAG_PREFIX_ "list_tests@D, you can alternatively set " + "the corresponding\n" +"environment variable of a flag (all letters in upper-case). For example, to\n" +"disable colored text output, you can either specify @G--" GTEST_FLAG_PREFIX_ + "color=no@D or set\n" +"the @G" GTEST_FLAG_PREFIX_UPPER_ "COLOR@D environment variable to @Gno@D.\n" +"\n" +"For more information, please read the " GTEST_NAME_ " documentation at\n" +"@G" GTEST_PROJECT_URL_ "@D. If you find a bug in " GTEST_NAME_ "\n" +"(not one in your own code or tests), please report it to\n" +"@G<" GTEST_DEV_EMAIL_ ">@D.\n"; + +static bool ParseGoogleTestFlag(const char* const arg) { + return ParseBoolFlag(arg, kAlsoRunDisabledTestsFlag, + >EST_FLAG(also_run_disabled_tests)) || + ParseBoolFlag(arg, kBreakOnFailureFlag, + >EST_FLAG(break_on_failure)) || + ParseBoolFlag(arg, kCatchExceptionsFlag, + >EST_FLAG(catch_exceptions)) || + ParseStringFlag(arg, kColorFlag, >EST_FLAG(color)) || + ParseStringFlag(arg, kDeathTestStyleFlag, + >EST_FLAG(death_test_style)) || + ParseBoolFlag(arg, kDeathTestUseFork, + >EST_FLAG(death_test_use_fork)) || + ParseStringFlag(arg, kFilterFlag, >EST_FLAG(filter)) || + ParseStringFlag(arg, kInternalRunDeathTestFlag, + >EST_FLAG(internal_run_death_test)) || + ParseBoolFlag(arg, kListTestsFlag, >EST_FLAG(list_tests)) || + ParseStringFlag(arg, kOutputFlag, >EST_FLAG(output)) || + ParseBoolFlag(arg, kPrintTimeFlag, >EST_FLAG(print_time)) || + ParseBoolFlag(arg, kPrintUTF8Flag, >EST_FLAG(print_utf8)) || + ParseInt32Flag(arg, kRandomSeedFlag, >EST_FLAG(random_seed)) || + ParseInt32Flag(arg, kRepeatFlag, >EST_FLAG(repeat)) || + ParseBoolFlag(arg, kShuffleFlag, >EST_FLAG(shuffle)) || + ParseInt32Flag(arg, kStackTraceDepthFlag, + >EST_FLAG(stack_trace_depth)) || + ParseStringFlag(arg, kStreamResultToFlag, + >EST_FLAG(stream_result_to)) || + ParseBoolFlag(arg, kThrowOnFailureFlag, + >EST_FLAG(throw_on_failure)); +} + +#if GTEST_USE_OWN_FLAGFILE_FLAG_ +static void LoadFlagsFromFile(const std::string& path) { + FILE* flagfile = posix::FOpen(path.c_str(), "r"); + if (!flagfile) { + GTEST_LOG_(FATAL) << "Unable to open file \"" << GTEST_FLAG(flagfile) + << "\""; + } + std::string contents(ReadEntireFile(flagfile)); + posix::FClose(flagfile); + std::vector lines; + SplitString(contents, '\n', &lines); + for (size_t i = 0; i < lines.size(); ++i) { + if (lines[i].empty()) + continue; + if (!ParseGoogleTestFlag(lines[i].c_str())) + g_help_flag = true; + } +} +#endif // GTEST_USE_OWN_FLAGFILE_FLAG_ + +// Parses the command line for Google Test flags, without initializing +// other parts of Google Test. The type parameter CharType can be +// instantiated to either char or wchar_t. +template +void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { + for (int i = 1; i < *argc; i++) { + const std::string arg_string = StreamableToString(argv[i]); + const char* const arg = arg_string.c_str(); + + using internal::ParseBoolFlag; + using internal::ParseInt32Flag; + using internal::ParseStringFlag; + + bool remove_flag = false; + if (ParseGoogleTestFlag(arg)) { + remove_flag = true; +#if GTEST_USE_OWN_FLAGFILE_FLAG_ + } else if (ParseStringFlag(arg, kFlagfileFlag, >EST_FLAG(flagfile))) { + LoadFlagsFromFile(GTEST_FLAG(flagfile)); + remove_flag = true; +#endif // GTEST_USE_OWN_FLAGFILE_FLAG_ + } else if (arg_string == "--help" || arg_string == "-h" || + arg_string == "-?" || arg_string == "/?" || + HasGoogleTestFlagPrefix(arg)) { + // Both help flag and unrecognized Google Test flags (excluding + // internal ones) trigger help display. + g_help_flag = true; + } + + if (remove_flag) { + // Shift the remainder of the argv list left by one. Note + // that argv has (*argc + 1) elements, the last one always being + // NULL. The following loop moves the trailing NULL element as + // well. + for (int j = i; j != *argc; j++) { + argv[j] = argv[j + 1]; + } + + // Decrements the argument count. + (*argc)--; + + // We also need to decrement the iterator as we just removed + // an element. + i--; + } + } + + if (g_help_flag) { + // We print the help here instead of in RUN_ALL_TESTS(), as the + // latter may not be called at all if the user is using Google + // Test with another testing framework. + PrintColorEncoded(kColorEncodedHelpMessage); + } +} + +// Parses the command line for Google Test flags, without initializing +// other parts of Google Test. +void ParseGoogleTestFlagsOnly(int* argc, char** argv) { + ParseGoogleTestFlagsOnlyImpl(argc, argv); + + // Fix the value of *_NSGetArgc() on macOS, but iff + // *_NSGetArgv() == argv + // Only applicable to char** version of argv +#if GTEST_OS_MAC +#ifndef GTEST_OS_IOS + if (*_NSGetArgv() == argv) { + *_NSGetArgc() = *argc; + } +#endif +#endif +} +void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) { + ParseGoogleTestFlagsOnlyImpl(argc, argv); +} + +// The internal implementation of InitGoogleTest(). +// +// The type parameter CharType can be instantiated to either char or +// wchar_t. +template +void InitGoogleTestImpl(int* argc, CharType** argv) { + // We don't want to run the initialization code twice. + if (GTestIsInitialized()) return; + + if (*argc <= 0) return; + + g_argvs.clear(); + for (int i = 0; i != *argc; i++) { + g_argvs.push_back(StreamableToString(argv[i])); + } + +#if GTEST_HAS_ABSL + absl::InitializeSymbolizer(g_argvs[0].c_str()); +#endif // GTEST_HAS_ABSL + + ParseGoogleTestFlagsOnly(argc, argv); + GetUnitTestImpl()->PostFlagParsingInit(); +} + +} // namespace internal + +// Initializes Google Test. This must be called before calling +// RUN_ALL_TESTS(). In particular, it parses a command line for the +// flags that Google Test recognizes. Whenever a Google Test flag is +// seen, it is removed from argv, and *argc is decremented. +// +// No value is returned. Instead, the Google Test flag variables are +// updated. +// +// Calling the function for the second time has no user-visible effect. +void InitGoogleTest(int* argc, char** argv) { +#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) + GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv); +#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) + internal::InitGoogleTestImpl(argc, argv); +#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) +} + +// This overloaded version can be used in Windows programs compiled in +// UNICODE mode. +void InitGoogleTest(int* argc, wchar_t** argv) { +#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) + GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv); +#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) + internal::InitGoogleTestImpl(argc, argv); +#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) +} + +// This overloaded version can be used on Arduino/embedded platforms where +// there is no argc/argv. +void InitGoogleTest() { + // Since Arduino doesn't have a command line, fake out the argc/argv arguments + int argc = 1; + const auto arg0 = "dummy"; + char* argv0 = const_cast(arg0); + char** argv = &argv0; + +#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) + GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(&argc, argv); +#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) + internal::InitGoogleTestImpl(&argc, argv); +#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) +} + +std::string TempDir() { +#if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_) + return GTEST_CUSTOM_TEMPDIR_FUNCTION_(); +#endif + +#if GTEST_OS_WINDOWS_MOBILE + return "\\temp\\"; +#elif GTEST_OS_WINDOWS + const char* temp_dir = internal::posix::GetEnv("TEMP"); + if (temp_dir == nullptr || temp_dir[0] == '\0') + return "\\temp\\"; + else if (temp_dir[strlen(temp_dir) - 1] == '\\') + return temp_dir; + else + return std::string(temp_dir) + "\\"; +#elif GTEST_OS_LINUX_ANDROID + return "/sdcard/"; +#else + return "/tmp/"; +#endif // GTEST_OS_WINDOWS_MOBILE +} + +// Class ScopedTrace + +// Pushes the given source file location and message onto a per-thread +// trace stack maintained by Google Test. +void ScopedTrace::PushTrace(const char* file, int line, std::string message) { + internal::TraceInfo trace; + trace.file = file; + trace.line = line; + trace.message.swap(message); + + UnitTest::GetInstance()->PushGTestTrace(trace); +} + +// Pops the info pushed by the c'tor. +ScopedTrace::~ScopedTrace() + GTEST_LOCK_EXCLUDED_(&UnitTest::mutex_) { + UnitTest::GetInstance()->PopGTestTrace(); +} + +} // namespace testing +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// This file implements death tests. + + +#include + + +#if GTEST_HAS_DEATH_TEST + +# if GTEST_OS_MAC +# include +# endif // GTEST_OS_MAC + +# include +# include +# include + +# if GTEST_OS_LINUX +# include +# endif // GTEST_OS_LINUX + +# include + +# if GTEST_OS_WINDOWS +# include +# else +# include +# include +# endif // GTEST_OS_WINDOWS + +# if GTEST_OS_QNX +# include +# endif // GTEST_OS_QNX + +# if GTEST_OS_FUCHSIA +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# endif // GTEST_OS_FUCHSIA + +#endif // GTEST_HAS_DEATH_TEST + + +namespace testing { + +// Constants. + +// The default death test style. +// +// This is defined in internal/gtest-port.h as "fast", but can be overridden by +// a definition in internal/custom/gtest-port.h. The recommended value, which is +// used internally at Google, is "threadsafe". +static const char kDefaultDeathTestStyle[] = GTEST_DEFAULT_DEATH_TEST_STYLE; + +GTEST_DEFINE_string_( + death_test_style, + internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle), + "Indicates how to run a death test in a forked child process: " + "\"threadsafe\" (child process re-executes the test binary " + "from the beginning, running only the specific death test) or " + "\"fast\" (child process runs the death test immediately " + "after forking)."); + +GTEST_DEFINE_bool_( + death_test_use_fork, + internal::BoolFromGTestEnv("death_test_use_fork", false), + "Instructs to use fork()/_exit() instead of clone() in death tests. " + "Ignored and always uses fork() on POSIX systems where clone() is not " + "implemented. Useful when running under valgrind or similar tools if " + "those do not support clone(). Valgrind 3.3.1 will just fail if " + "it sees an unsupported combination of clone() flags. " + "It is not recommended to use this flag w/o valgrind though it will " + "work in 99% of the cases. Once valgrind is fixed, this flag will " + "most likely be removed."); + +namespace internal { +GTEST_DEFINE_string_( + internal_run_death_test, "", + "Indicates the file, line number, temporal index of " + "the single death test to run, and a file descriptor to " + "which a success code may be sent, all separated by " + "the '|' characters. This flag is specified if and only if the current " + "process is a sub-process launched for running a thread-safe " + "death test. FOR INTERNAL USE ONLY."); +} // namespace internal + +#if GTEST_HAS_DEATH_TEST + +namespace internal { + +// Valid only for fast death tests. Indicates the code is running in the +// child process of a fast style death test. +# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA +static bool g_in_fast_death_test_child = false; +# endif + +// Returns a Boolean value indicating whether the caller is currently +// executing in the context of the death test child process. Tools such as +// Valgrind heap checkers may need this to modify their behavior in death +// tests. IMPORTANT: This is an internal utility. Using it may break the +// implementation of death tests. User code MUST NOT use it. +bool InDeathTestChild() { +# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA + + // On Windows and Fuchsia, death tests are thread-safe regardless of the value + // of the death_test_style flag. + return !GTEST_FLAG(internal_run_death_test).empty(); + +# else + + if (GTEST_FLAG(death_test_style) == "threadsafe") + return !GTEST_FLAG(internal_run_death_test).empty(); + else + return g_in_fast_death_test_child; +#endif +} + +} // namespace internal + +// ExitedWithCode constructor. +ExitedWithCode::ExitedWithCode(int exit_code) : exit_code_(exit_code) { +} + +// ExitedWithCode function-call operator. +bool ExitedWithCode::operator()(int exit_status) const { +# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA + + return exit_status == exit_code_; + +# else + + return WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == exit_code_; + +# endif // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA +} + +# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA +// KilledBySignal constructor. +KilledBySignal::KilledBySignal(int signum) : signum_(signum) { +} + +// KilledBySignal function-call operator. +bool KilledBySignal::operator()(int exit_status) const { +# if defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_) + { + bool result; + if (GTEST_KILLED_BY_SIGNAL_OVERRIDE_(signum_, exit_status, &result)) { + return result; + } + } +# endif // defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_) + return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_; +} +# endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA + +namespace internal { + +// Utilities needed for death tests. + +// Generates a textual description of a given exit code, in the format +// specified by wait(2). +static std::string ExitSummary(int exit_code) { + Message m; + +# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA + + m << "Exited with exit status " << exit_code; + +# else + + if (WIFEXITED(exit_code)) { + m << "Exited with exit status " << WEXITSTATUS(exit_code); + } else if (WIFSIGNALED(exit_code)) { + m << "Terminated by signal " << WTERMSIG(exit_code); + } +# ifdef WCOREDUMP + if (WCOREDUMP(exit_code)) { + m << " (core dumped)"; + } +# endif +# endif // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA + + return m.GetString(); +} + +// Returns true if exit_status describes a process that was terminated +// by a signal, or exited normally with a nonzero exit code. +bool ExitedUnsuccessfully(int exit_status) { + return !ExitedWithCode(0)(exit_status); +} + +# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA +// Generates a textual failure message when a death test finds more than +// one thread running, or cannot determine the number of threads, prior +// to executing the given statement. It is the responsibility of the +// caller not to pass a thread_count of 1. +static std::string DeathTestThreadWarning(size_t thread_count) { + Message msg; + msg << "Death tests use fork(), which is unsafe particularly" + << " in a threaded context. For this test, " << GTEST_NAME_ << " "; + if (thread_count == 0) { + msg << "couldn't detect the number of threads."; + } else { + msg << "detected " << thread_count << " threads."; + } + msg << " See " + "https://github.com/google/googletest/blob/master/googletest/docs/" + "advanced.md#death-tests-and-threads" + << " for more explanation and suggested solutions, especially if" + << " this is the last message you see before your test times out."; + return msg.GetString(); +} +# endif // !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA + +// Flag characters for reporting a death test that did not die. +static const char kDeathTestLived = 'L'; +static const char kDeathTestReturned = 'R'; +static const char kDeathTestThrew = 'T'; +static const char kDeathTestInternalError = 'I'; + +#if GTEST_OS_FUCHSIA + +// File descriptor used for the pipe in the child process. +static const int kFuchsiaReadPipeFd = 3; + +#endif + +// An enumeration describing all of the possible ways that a death test can +// conclude. DIED means that the process died while executing the test +// code; LIVED means that process lived beyond the end of the test code; +// RETURNED means that the test statement attempted to execute a return +// statement, which is not allowed; THREW means that the test statement +// returned control by throwing an exception. IN_PROGRESS means the test +// has not yet concluded. +enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }; + +// Routine for aborting the program which is safe to call from an +// exec-style death test child process, in which case the error +// message is propagated back to the parent process. Otherwise, the +// message is simply printed to stderr. In either case, the program +// then exits with status 1. +static void DeathTestAbort(const std::string& message) { + // On a POSIX system, this function may be called from a threadsafe-style + // death test child process, which operates on a very small stack. Use + // the heap for any additional non-minuscule memory requirements. + const InternalRunDeathTestFlag* const flag = + GetUnitTestImpl()->internal_run_death_test_flag(); + if (flag != nullptr) { + FILE* parent = posix::FDOpen(flag->write_fd(), "w"); + fputc(kDeathTestInternalError, parent); + fprintf(parent, "%s", message.c_str()); + fflush(parent); + _exit(1); + } else { + fprintf(stderr, "%s", message.c_str()); + fflush(stderr); + posix::Abort(); + } +} + +// A replacement for CHECK that calls DeathTestAbort if the assertion +// fails. +# define GTEST_DEATH_TEST_CHECK_(expression) \ + do { \ + if (!::testing::internal::IsTrue(expression)) { \ + DeathTestAbort( \ + ::std::string("CHECK failed: File ") + __FILE__ + ", line " \ + + ::testing::internal::StreamableToString(__LINE__) + ": " \ + + #expression); \ + } \ + } while (::testing::internal::AlwaysFalse()) + +// This macro is similar to GTEST_DEATH_TEST_CHECK_, but it is meant for +// evaluating any system call that fulfills two conditions: it must return +// -1 on failure, and set errno to EINTR when it is interrupted and +// should be tried again. The macro expands to a loop that repeatedly +// evaluates the expression as long as it evaluates to -1 and sets +// errno to EINTR. If the expression evaluates to -1 but errno is +// something other than EINTR, DeathTestAbort is called. +# define GTEST_DEATH_TEST_CHECK_SYSCALL_(expression) \ + do { \ + int gtest_retval; \ + do { \ + gtest_retval = (expression); \ + } while (gtest_retval == -1 && errno == EINTR); \ + if (gtest_retval == -1) { \ + DeathTestAbort( \ + ::std::string("CHECK failed: File ") + __FILE__ + ", line " \ + + ::testing::internal::StreamableToString(__LINE__) + ": " \ + + #expression + " != -1"); \ + } \ + } while (::testing::internal::AlwaysFalse()) + +// Returns the message describing the last system error in errno. +std::string GetLastErrnoDescription() { + return errno == 0 ? "" : posix::StrError(errno); +} + +// This is called from a death test parent process to read a failure +// message from the death test child process and log it with the FATAL +// severity. On Windows, the message is read from a pipe handle. On other +// platforms, it is read from a file descriptor. +static void FailFromInternalError(int fd) { + Message error; + char buffer[256]; + int num_read; + + do { + while ((num_read = posix::Read(fd, buffer, 255)) > 0) { + buffer[num_read] = '\0'; + error << buffer; + } + } while (num_read == -1 && errno == EINTR); + + if (num_read == 0) { + GTEST_LOG_(FATAL) << error.GetString(); + } else { + const int last_error = errno; + GTEST_LOG_(FATAL) << "Error while reading death test internal: " + << GetLastErrnoDescription() << " [" << last_error << "]"; + } +} + +// Death test constructor. Increments the running death test count +// for the current test. +DeathTest::DeathTest() { + TestInfo* const info = GetUnitTestImpl()->current_test_info(); + if (info == nullptr) { + DeathTestAbort("Cannot run a death test outside of a TEST or " + "TEST_F construct"); + } +} + +// Creates and returns a death test by dispatching to the current +// death test factory. +bool DeathTest::Create(const char* statement, + Matcher matcher, const char* file, + int line, DeathTest** test) { + return GetUnitTestImpl()->death_test_factory()->Create( + statement, std::move(matcher), file, line, test); +} + +const char* DeathTest::LastMessage() { + return last_death_test_message_.c_str(); +} + +void DeathTest::set_last_death_test_message(const std::string& message) { + last_death_test_message_ = message; +} + +std::string DeathTest::last_death_test_message_; + +// Provides cross platform implementation for some death functionality. +class DeathTestImpl : public DeathTest { + protected: + DeathTestImpl(const char* a_statement, Matcher matcher) + : statement_(a_statement), + matcher_(std::move(matcher)), + spawned_(false), + status_(-1), + outcome_(IN_PROGRESS), + read_fd_(-1), + write_fd_(-1) {} + + // read_fd_ is expected to be closed and cleared by a derived class. + ~DeathTestImpl() override { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } + + void Abort(AbortReason reason) override; + bool Passed(bool status_ok) override; + + const char* statement() const { return statement_; } + bool spawned() const { return spawned_; } + void set_spawned(bool is_spawned) { spawned_ = is_spawned; } + int status() const { return status_; } + void set_status(int a_status) { status_ = a_status; } + DeathTestOutcome outcome() const { return outcome_; } + void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outcome; } + int read_fd() const { return read_fd_; } + void set_read_fd(int fd) { read_fd_ = fd; } + int write_fd() const { return write_fd_; } + void set_write_fd(int fd) { write_fd_ = fd; } + + // Called in the parent process only. Reads the result code of the death + // test child process via a pipe, interprets it to set the outcome_ + // member, and closes read_fd_. Outputs diagnostics and terminates in + // case of unexpected codes. + void ReadAndInterpretStatusByte(); + + // Returns stderr output from the child process. + virtual std::string GetErrorLogs(); + + private: + // The textual content of the code this object is testing. This class + // doesn't own this string and should not attempt to delete it. + const char* const statement_; + // A matcher that's expected to match the stderr output by the child process. + Matcher matcher_; + // True if the death test child process has been successfully spawned. + bool spawned_; + // The exit status of the child process. + int status_; + // How the death test concluded. + DeathTestOutcome outcome_; + // Descriptor to the read end of the pipe to the child process. It is + // always -1 in the child process. The child keeps its write end of the + // pipe in write_fd_. + int read_fd_; + // Descriptor to the child's write end of the pipe to the parent process. + // It is always -1 in the parent process. The parent keeps its end of the + // pipe in read_fd_. + int write_fd_; +}; + +// Called in the parent process only. Reads the result code of the death +// test child process via a pipe, interprets it to set the outcome_ +// member, and closes read_fd_. Outputs diagnostics and terminates in +// case of unexpected codes. +void DeathTestImpl::ReadAndInterpretStatusByte() { + char flag; + int bytes_read; + + // The read() here blocks until data is available (signifying the + // failure of the death test) or until the pipe is closed (signifying + // its success), so it's okay to call this in the parent before + // the child process has exited. + do { + bytes_read = posix::Read(read_fd(), &flag, 1); + } while (bytes_read == -1 && errno == EINTR); + + if (bytes_read == 0) { + set_outcome(DIED); + } else if (bytes_read == 1) { + switch (flag) { + case kDeathTestReturned: + set_outcome(RETURNED); + break; + case kDeathTestThrew: + set_outcome(THREW); + break; + case kDeathTestLived: + set_outcome(LIVED); + break; + case kDeathTestInternalError: + FailFromInternalError(read_fd()); // Does not return. + break; + default: + GTEST_LOG_(FATAL) << "Death test child process reported " + << "unexpected status byte (" + << static_cast(flag) << ")"; + } + } else { + GTEST_LOG_(FATAL) << "Read from death test child process failed: " + << GetLastErrnoDescription(); + } + GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd())); + set_read_fd(-1); +} + +std::string DeathTestImpl::GetErrorLogs() { + return GetCapturedStderr(); +} + +// Signals that the death test code which should have exited, didn't. +// Should be called only in a death test child process. +// Writes a status byte to the child's status file descriptor, then +// calls _exit(1). +void DeathTestImpl::Abort(AbortReason reason) { + // The parent process considers the death test to be a failure if + // it finds any data in our pipe. So, here we write a single flag byte + // to the pipe, then exit. + const char status_ch = + reason == TEST_DID_NOT_DIE ? kDeathTestLived : + reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned; + + GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1)); + // We are leaking the descriptor here because on some platforms (i.e., + // when built as Windows DLL), destructors of global objects will still + // run after calling _exit(). On such systems, write_fd_ will be + // indirectly closed from the destructor of UnitTestImpl, causing double + // close if it is also closed here. On debug configurations, double close + // may assert. As there are no in-process buffers to flush here, we are + // relying on the OS to close the descriptor after the process terminates + // when the destructors are not run. + _exit(1); // Exits w/o any normal exit hooks (we were supposed to crash) +} + +// Returns an indented copy of stderr output for a death test. +// This makes distinguishing death test output lines from regular log lines +// much easier. +static ::std::string FormatDeathTestOutput(const ::std::string& output) { + ::std::string ret; + for (size_t at = 0; ; ) { + const size_t line_end = output.find('\n', at); + ret += "[ DEATH ] "; + if (line_end == ::std::string::npos) { + ret += output.substr(at); + break; + } + ret += output.substr(at, line_end + 1 - at); + at = line_end + 1; + } + return ret; +} + +// Assesses the success or failure of a death test, using both private +// members which have previously been set, and one argument: +// +// Private data members: +// outcome: An enumeration describing how the death test +// concluded: DIED, LIVED, THREW, or RETURNED. The death test +// fails in the latter three cases. +// status: The exit status of the child process. On *nix, it is in the +// in the format specified by wait(2). On Windows, this is the +// value supplied to the ExitProcess() API or a numeric code +// of the exception that terminated the program. +// matcher_: A matcher that's expected to match the stderr output by the child +// process. +// +// Argument: +// status_ok: true if exit_status is acceptable in the context of +// this particular death test, which fails if it is false +// +// Returns true iff all of the above conditions are met. Otherwise, the +// first failing condition, in the order given above, is the one that is +// reported. Also sets the last death test message string. +bool DeathTestImpl::Passed(bool status_ok) { + if (!spawned()) + return false; + + const std::string error_message = GetErrorLogs(); + + bool success = false; + Message buffer; + + buffer << "Death test: " << statement() << "\n"; + switch (outcome()) { + case LIVED: + buffer << " Result: failed to die.\n" + << " Error msg:\n" << FormatDeathTestOutput(error_message); + break; + case THREW: + buffer << " Result: threw an exception.\n" + << " Error msg:\n" << FormatDeathTestOutput(error_message); + break; + case RETURNED: + buffer << " Result: illegal return in test statement.\n" + << " Error msg:\n" << FormatDeathTestOutput(error_message); + break; + case DIED: + if (status_ok) { + if (matcher_.Matches(error_message)) { + success = true; + } else { + std::ostringstream stream; + matcher_.DescribeTo(&stream); + buffer << " Result: died but not with expected error.\n" + << " Expected: " << stream.str() << "\n" + << "Actual msg:\n" + << FormatDeathTestOutput(error_message); + } + } else { + buffer << " Result: died but not with expected exit code:\n" + << " " << ExitSummary(status()) << "\n" + << "Actual msg:\n" << FormatDeathTestOutput(error_message); + } + break; + case IN_PROGRESS: + default: + GTEST_LOG_(FATAL) + << "DeathTest::Passed somehow called before conclusion of test"; + } + + DeathTest::set_last_death_test_message(buffer.GetString()); + return success; +} + +# if GTEST_OS_WINDOWS +// WindowsDeathTest implements death tests on Windows. Due to the +// specifics of starting new processes on Windows, death tests there are +// always threadsafe, and Google Test considers the +// --gtest_death_test_style=fast setting to be equivalent to +// --gtest_death_test_style=threadsafe there. +// +// A few implementation notes: Like the Linux version, the Windows +// implementation uses pipes for child-to-parent communication. But due to +// the specifics of pipes on Windows, some extra steps are required: +// +// 1. The parent creates a communication pipe and stores handles to both +// ends of it. +// 2. The parent starts the child and provides it with the information +// necessary to acquire the handle to the write end of the pipe. +// 3. The child acquires the write end of the pipe and signals the parent +// using a Windows event. +// 4. Now the parent can release the write end of the pipe on its side. If +// this is done before step 3, the object's reference count goes down to +// 0 and it is destroyed, preventing the child from acquiring it. The +// parent now has to release it, or read operations on the read end of +// the pipe will not return when the child terminates. +// 5. The parent reads child's output through the pipe (outcome code and +// any possible error messages) from the pipe, and its stderr and then +// determines whether to fail the test. +// +// Note: to distinguish Win32 API calls from the local method and function +// calls, the former are explicitly resolved in the global namespace. +// +class WindowsDeathTest : public DeathTestImpl { + public: + WindowsDeathTest(const char* a_statement, Matcher matcher, + const char* file, int line) + : DeathTestImpl(a_statement, std::move(matcher)), + file_(file), + line_(line) {} + + // All of these virtual functions are inherited from DeathTest. + virtual int Wait(); + virtual TestRole AssumeRole(); + + private: + // The name of the file in which the death test is located. + const char* const file_; + // The line number on which the death test is located. + const int line_; + // Handle to the write end of the pipe to the child process. + AutoHandle write_handle_; + // Child process handle. + AutoHandle child_handle_; + // Event the child process uses to signal the parent that it has + // acquired the handle to the write end of the pipe. After seeing this + // event the parent can release its own handles to make sure its + // ReadFile() calls return when the child terminates. + AutoHandle event_handle_; +}; + +// Waits for the child in a death test to exit, returning its exit +// status, or 0 if no child process exists. As a side effect, sets the +// outcome data member. +int WindowsDeathTest::Wait() { + if (!spawned()) + return 0; + + // Wait until the child either signals that it has acquired the write end + // of the pipe or it dies. + const HANDLE wait_handles[2] = { child_handle_.Get(), event_handle_.Get() }; + switch (::WaitForMultipleObjects(2, + wait_handles, + FALSE, // Waits for any of the handles. + INFINITE)) { + case WAIT_OBJECT_0: + case WAIT_OBJECT_0 + 1: + break; + default: + GTEST_DEATH_TEST_CHECK_(false); // Should not get here. + } + + // The child has acquired the write end of the pipe or exited. + // We release the handle on our side and continue. + write_handle_.Reset(); + event_handle_.Reset(); + + ReadAndInterpretStatusByte(); + + // Waits for the child process to exit if it haven't already. This + // returns immediately if the child has already exited, regardless of + // whether previous calls to WaitForMultipleObjects synchronized on this + // handle or not. + GTEST_DEATH_TEST_CHECK_( + WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(), + INFINITE)); + DWORD status_code; + GTEST_DEATH_TEST_CHECK_( + ::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE); + child_handle_.Reset(); + set_status(static_cast(status_code)); + return status(); +} + +// The AssumeRole process for a Windows death test. It creates a child +// process with the same executable as the current process to run the +// death test. The child process is given the --gtest_filter and +// --gtest_internal_run_death_test flags such that it knows to run the +// current death test only. +DeathTest::TestRole WindowsDeathTest::AssumeRole() { + const UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const TestInfo* const info = impl->current_test_info(); + const int death_test_index = info->result()->death_test_count(); + + if (flag != nullptr) { + // ParseInternalRunDeathTestFlag() has performed all the necessary + // processing. + set_write_fd(flag->write_fd()); + return EXECUTE_TEST; + } + + // WindowsDeathTest uses an anonymous pipe to communicate results of + // a death test. + SECURITY_ATTRIBUTES handles_are_inheritable = {sizeof(SECURITY_ATTRIBUTES), + nullptr, TRUE}; + HANDLE read_handle, write_handle; + GTEST_DEATH_TEST_CHECK_( + ::CreatePipe(&read_handle, &write_handle, &handles_are_inheritable, + 0) // Default buffer size. + != FALSE); + set_read_fd(::_open_osfhandle(reinterpret_cast(read_handle), + O_RDONLY)); + write_handle_.Reset(write_handle); + event_handle_.Reset(::CreateEvent( + &handles_are_inheritable, + TRUE, // The event will automatically reset to non-signaled state. + FALSE, // The initial state is non-signalled. + nullptr)); // The even is unnamed. + GTEST_DEATH_TEST_CHECK_(event_handle_.Get() != nullptr); + const std::string filter_flag = std::string("--") + GTEST_FLAG_PREFIX_ + + kFilterFlag + "=" + info->test_suite_name() + + "." + info->name(); + const std::string internal_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + + "=" + file_ + "|" + StreamableToString(line_) + "|" + + StreamableToString(death_test_index) + "|" + + StreamableToString(static_cast(::GetCurrentProcessId())) + + // size_t has the same width as pointers on both 32-bit and 64-bit + // Windows platforms. + // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx. + "|" + StreamableToString(reinterpret_cast(write_handle)) + + "|" + StreamableToString(reinterpret_cast(event_handle_.Get())); + + char executable_path[_MAX_PATH + 1]; // NOLINT + GTEST_DEATH_TEST_CHECK_(_MAX_PATH + 1 != ::GetModuleFileNameA(nullptr, + executable_path, + _MAX_PATH)); + + std::string command_line = + std::string(::GetCommandLineA()) + " " + filter_flag + " \"" + + internal_flag + "\""; + + DeathTest::set_last_death_test_message(""); + + CaptureStderr(); + // Flush the log buffers since the log streams are shared with the child. + FlushInfoLog(); + + // The child process will share the standard handles with the parent. + STARTUPINFOA startup_info; + memset(&startup_info, 0, sizeof(STARTUPINFO)); + startup_info.dwFlags = STARTF_USESTDHANDLES; + startup_info.hStdInput = ::GetStdHandle(STD_INPUT_HANDLE); + startup_info.hStdOutput = ::GetStdHandle(STD_OUTPUT_HANDLE); + startup_info.hStdError = ::GetStdHandle(STD_ERROR_HANDLE); + + PROCESS_INFORMATION process_info; + GTEST_DEATH_TEST_CHECK_( + ::CreateProcessA( + executable_path, const_cast(command_line.c_str()), + nullptr, // Retuned process handle is not inheritable. + nullptr, // Retuned thread handle is not inheritable. + TRUE, // Child inherits all inheritable handles (for write_handle_). + 0x0, // Default creation flags. + nullptr, // Inherit the parent's environment. + UnitTest::GetInstance()->original_working_dir(), &startup_info, + &process_info) != FALSE); + child_handle_.Reset(process_info.hProcess); + ::CloseHandle(process_info.hThread); + set_spawned(true); + return OVERSEE_TEST; +} + +# elif GTEST_OS_FUCHSIA + +class FuchsiaDeathTest : public DeathTestImpl { + public: + FuchsiaDeathTest(const char* a_statement, Matcher matcher, + const char* file, int line) + : DeathTestImpl(a_statement, std::move(matcher)), + file_(file), + line_(line) {} + + // All of these virtual functions are inherited from DeathTest. + int Wait() override; + TestRole AssumeRole() override; + std::string GetErrorLogs() override; + + private: + // The name of the file in which the death test is located. + const char* const file_; + // The line number on which the death test is located. + const int line_; + // The stderr data captured by the child process. + std::string captured_stderr_; + + zx::process child_process_; + zx::port port_; + zx::socket stderr_socket_; +}; + +// Utility class for accumulating command-line arguments. +class Arguments { + public: + Arguments() { args_.push_back(nullptr); } + + ~Arguments() { + for (std::vector::iterator i = args_.begin(); i != args_.end(); + ++i) { + free(*i); + } + } + void AddArgument(const char* argument) { + args_.insert(args_.end() - 1, posix::StrDup(argument)); + } + + template + void AddArguments(const ::std::vector& arguments) { + for (typename ::std::vector::const_iterator i = arguments.begin(); + i != arguments.end(); + ++i) { + args_.insert(args_.end() - 1, posix::StrDup(i->c_str())); + } + } + char* const* Argv() { + return &args_[0]; + } + + int size() { + return args_.size() - 1; + } + + private: + std::vector args_; +}; + +// Waits for the child in a death test to exit, returning its exit +// status, or 0 if no child process exists. As a side effect, sets the +// outcome data member. +int FuchsiaDeathTest::Wait() { + const int kProcessKey = 0; + const int kSocketKey = 1; + + if (!spawned()) + return 0; + + // Register to wait for the child process to terminate. + zx_status_t status_zx; + status_zx = child_process_.wait_async( + port_, kProcessKey, ZX_PROCESS_TERMINATED, ZX_WAIT_ASYNC_ONCE); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); + // Register to wait for the socket to be readable or closed. + status_zx = stderr_socket_.wait_async( + port_, kSocketKey, ZX_SOCKET_READABLE | ZX_SOCKET_PEER_CLOSED, + ZX_WAIT_ASYNC_ONCE); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); + + bool process_terminated = false; + bool socket_closed = false; + do { + zx_port_packet_t packet = {}; + status_zx = port_.wait(zx::time::infinite(), &packet); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); + + if (packet.key == kProcessKey) { + if (ZX_PKT_IS_EXCEPTION(packet.type)) { + // Process encountered an exception. Kill it directly rather than + // letting other handlers process the event. We will get a second + // kProcessKey event when the process actually terminates. + status_zx = child_process_.kill(); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); + } else { + // Process terminated. + GTEST_DEATH_TEST_CHECK_(ZX_PKT_IS_SIGNAL_ONE(packet.type)); + GTEST_DEATH_TEST_CHECK_(packet.signal.observed & ZX_PROCESS_TERMINATED); + process_terminated = true; + } + } else if (packet.key == kSocketKey) { + GTEST_DEATH_TEST_CHECK_(ZX_PKT_IS_SIGNAL_ONE(packet.type)); + if (packet.signal.observed & ZX_SOCKET_READABLE) { + // Read data from the socket. + constexpr size_t kBufferSize = 1024; + do { + size_t old_length = captured_stderr_.length(); + size_t bytes_read = 0; + captured_stderr_.resize(old_length + kBufferSize); + status_zx = stderr_socket_.read( + 0, &captured_stderr_.front() + old_length, kBufferSize, + &bytes_read); + captured_stderr_.resize(old_length + bytes_read); + } while (status_zx == ZX_OK); + if (status_zx == ZX_ERR_PEER_CLOSED) { + socket_closed = true; + } else { + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_ERR_SHOULD_WAIT); + status_zx = stderr_socket_.wait_async( + port_, kSocketKey, ZX_SOCKET_READABLE | ZX_SOCKET_PEER_CLOSED, + ZX_WAIT_ASYNC_ONCE); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); + } + } else { + GTEST_DEATH_TEST_CHECK_(packet.signal.observed & ZX_SOCKET_PEER_CLOSED); + socket_closed = true; + } + } + } while (!process_terminated && !socket_closed); + + ReadAndInterpretStatusByte(); + + zx_info_process_t buffer; + status_zx = child_process_.get_info( + ZX_INFO_PROCESS, &buffer, sizeof(buffer), nullptr, nullptr); + GTEST_DEATH_TEST_CHECK_(status_zx == ZX_OK); + + GTEST_DEATH_TEST_CHECK_(buffer.exited); + set_status(buffer.return_code); + return status(); +} + +// The AssumeRole process for a Fuchsia death test. It creates a child +// process with the same executable as the current process to run the +// death test. The child process is given the --gtest_filter and +// --gtest_internal_run_death_test flags such that it knows to run the +// current death test only. +DeathTest::TestRole FuchsiaDeathTest::AssumeRole() { + const UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const TestInfo* const info = impl->current_test_info(); + const int death_test_index = info->result()->death_test_count(); + + if (flag != nullptr) { + // ParseInternalRunDeathTestFlag() has performed all the necessary + // processing. + set_write_fd(kFuchsiaReadPipeFd); + return EXECUTE_TEST; + } + + // Flush the log buffers since the log streams are shared with the child. + FlushInfoLog(); + + // Build the child process command line. + const std::string filter_flag = std::string("--") + GTEST_FLAG_PREFIX_ + + kFilterFlag + "=" + info->test_suite_name() + + "." + info->name(); + const std::string internal_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + "=" + + file_ + "|" + + StreamableToString(line_) + "|" + + StreamableToString(death_test_index); + Arguments args; + args.AddArguments(GetInjectableArgvs()); + args.AddArgument(filter_flag.c_str()); + args.AddArgument(internal_flag.c_str()); + + // Build the pipe for communication with the child. + zx_status_t status; + zx_handle_t child_pipe_handle; + int child_pipe_fd; + status = fdio_pipe_half2(&child_pipe_fd, &child_pipe_handle); + GTEST_DEATH_TEST_CHECK_(status == ZX_OK); + set_read_fd(child_pipe_fd); + + // Set the pipe handle for the child. + fdio_spawn_action_t spawn_actions[2] = {}; + fdio_spawn_action_t* add_handle_action = &spawn_actions[0]; + add_handle_action->action = FDIO_SPAWN_ACTION_ADD_HANDLE; + add_handle_action->h.id = PA_HND(PA_FD, kFuchsiaReadPipeFd); + add_handle_action->h.handle = child_pipe_handle; + + // Create a socket pair will be used to receive the child process' stderr. + zx::socket stderr_producer_socket; + status = + zx::socket::create(0, &stderr_producer_socket, &stderr_socket_); + GTEST_DEATH_TEST_CHECK_(status >= 0); + int stderr_producer_fd = -1; + status = + fdio_fd_create(stderr_producer_socket.release(), &stderr_producer_fd); + GTEST_DEATH_TEST_CHECK_(status >= 0); + + // Make the stderr socket nonblocking. + GTEST_DEATH_TEST_CHECK_(fcntl(stderr_producer_fd, F_SETFL, 0) == 0); + + fdio_spawn_action_t* add_stderr_action = &spawn_actions[1]; + add_stderr_action->action = FDIO_SPAWN_ACTION_CLONE_FD; + add_stderr_action->fd.local_fd = stderr_producer_fd; + add_stderr_action->fd.target_fd = STDERR_FILENO; + + // Create a child job. + zx_handle_t child_job = ZX_HANDLE_INVALID; + status = zx_job_create(zx_job_default(), 0, & child_job); + GTEST_DEATH_TEST_CHECK_(status == ZX_OK); + zx_policy_basic_t policy; + policy.condition = ZX_POL_NEW_ANY; + policy.policy = ZX_POL_ACTION_ALLOW; + status = zx_job_set_policy( + child_job, ZX_JOB_POL_RELATIVE, ZX_JOB_POL_BASIC, &policy, 1); + GTEST_DEATH_TEST_CHECK_(status == ZX_OK); + + // Create an exception port and attach it to the |child_job|, to allow + // us to suppress the system default exception handler from firing. + status = zx::port::create(0, &port_); + GTEST_DEATH_TEST_CHECK_(status == ZX_OK); + status = zx_task_bind_exception_port( + child_job, port_.get(), 0 /* key */, 0 /*options */); + GTEST_DEATH_TEST_CHECK_(status == ZX_OK); + + // Spawn the child process. + status = fdio_spawn_etc( + child_job, FDIO_SPAWN_CLONE_ALL, args.Argv()[0], args.Argv(), nullptr, + 2, spawn_actions, child_process_.reset_and_get_address(), nullptr); + GTEST_DEATH_TEST_CHECK_(status == ZX_OK); + + set_spawned(true); + return OVERSEE_TEST; +} + +std::string FuchsiaDeathTest::GetErrorLogs() { + return captured_stderr_; +} + +#else // We are neither on Windows, nor on Fuchsia. + +// ForkingDeathTest provides implementations for most of the abstract +// methods of the DeathTest interface. Only the AssumeRole method is +// left undefined. +class ForkingDeathTest : public DeathTestImpl { + public: + ForkingDeathTest(const char* statement, Matcher matcher); + + // All of these virtual functions are inherited from DeathTest. + int Wait() override; + + protected: + void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } + + private: + // PID of child process during death test; 0 in the child process itself. + pid_t child_pid_; +}; + +// Constructs a ForkingDeathTest. +ForkingDeathTest::ForkingDeathTest(const char* a_statement, + Matcher matcher) + : DeathTestImpl(a_statement, std::move(matcher)), child_pid_(-1) {} + +// Waits for the child in a death test to exit, returning its exit +// status, or 0 if no child process exists. As a side effect, sets the +// outcome data member. +int ForkingDeathTest::Wait() { + if (!spawned()) + return 0; + + ReadAndInterpretStatusByte(); + + int status_value; + GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0)); + set_status(status_value); + return status_value; +} + +// A concrete death test class that forks, then immediately runs the test +// in the child process. +class NoExecDeathTest : public ForkingDeathTest { + public: + NoExecDeathTest(const char* a_statement, Matcher matcher) + : ForkingDeathTest(a_statement, std::move(matcher)) {} + TestRole AssumeRole() override; +}; + +// The AssumeRole process for a fork-and-run death test. It implements a +// straightforward fork, with a simple pipe to transmit the status byte. +DeathTest::TestRole NoExecDeathTest::AssumeRole() { + const size_t thread_count = GetThreadCount(); + if (thread_count != 1) { + GTEST_LOG_(WARNING) << DeathTestThreadWarning(thread_count); + } + + int pipe_fd[2]; + GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); + + DeathTest::set_last_death_test_message(""); + CaptureStderr(); + // When we fork the process below, the log file buffers are copied, but the + // file descriptors are shared. We flush all log files here so that closing + // the file descriptors in the child process doesn't throw off the + // synchronization between descriptors and buffers in the parent process. + // This is as close to the fork as possible to avoid a race condition in case + // there are multiple threads running before the death test, and another + // thread writes to the log file. + FlushInfoLog(); + + const pid_t child_pid = fork(); + GTEST_DEATH_TEST_CHECK_(child_pid != -1); + set_child_pid(child_pid); + if (child_pid == 0) { + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[0])); + set_write_fd(pipe_fd[1]); + // Redirects all logging to stderr in the child process to prevent + // concurrent writes to the log files. We capture stderr in the parent + // process and append the child process' output to a log. + LogToStderr(); + // Event forwarding to the listeners of event listener API mush be shut + // down in death test subprocesses. + GetUnitTestImpl()->listeners()->SuppressEventForwarding(); + g_in_fast_death_test_child = true; + return EXECUTE_TEST; + } else { + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); + set_read_fd(pipe_fd[0]); + set_spawned(true); + return OVERSEE_TEST; + } +} + +// A concrete death test class that forks and re-executes the main +// program from the beginning, with command-line flags set that cause +// only this specific death test to be run. +class ExecDeathTest : public ForkingDeathTest { + public: + ExecDeathTest(const char* a_statement, Matcher matcher, + const char* file, int line) + : ForkingDeathTest(a_statement, std::move(matcher)), + file_(file), + line_(line) {} + TestRole AssumeRole() override; + + private: + static ::std::vector GetArgvsForDeathTestChildProcess() { + ::std::vector args = GetInjectableArgvs(); +# if defined(GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_) + ::std::vector extra_args = + GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_(); + args.insert(args.end(), extra_args.begin(), extra_args.end()); +# endif // defined(GTEST_EXTRA_DEATH_TEST_COMMAND_LINE_ARGS_) + return args; + } + // The name of the file in which the death test is located. + const char* const file_; + // The line number on which the death test is located. + const int line_; +}; + +// Utility class for accumulating command-line arguments. +class Arguments { + public: + Arguments() { args_.push_back(nullptr); } + + ~Arguments() { + for (std::vector::iterator i = args_.begin(); i != args_.end(); + ++i) { + free(*i); + } + } + void AddArgument(const char* argument) { + args_.insert(args_.end() - 1, posix::StrDup(argument)); + } + + template + void AddArguments(const ::std::vector& arguments) { + for (typename ::std::vector::const_iterator i = arguments.begin(); + i != arguments.end(); + ++i) { + args_.insert(args_.end() - 1, posix::StrDup(i->c_str())); + } + } + char* const* Argv() { + return &args_[0]; + } + + private: + std::vector args_; +}; + +// A struct that encompasses the arguments to the child process of a +// threadsafe-style death test process. +struct ExecDeathTestArgs { + char* const* argv; // Command-line arguments for the child's call to exec + int close_fd; // File descriptor to close; the read end of a pipe +}; + +# if GTEST_OS_MAC +inline char** GetEnviron() { + // When Google Test is built as a framework on MacOS X, the environ variable + // is unavailable. Apple's documentation (man environ) recommends using + // _NSGetEnviron() instead. + return *_NSGetEnviron(); +} +# else +// Some POSIX platforms expect you to declare environ. extern "C" makes +// it reside in the global namespace. +extern "C" char** environ; +inline char** GetEnviron() { return environ; } +# endif // GTEST_OS_MAC + +# if !GTEST_OS_QNX +// The main function for a threadsafe-style death test child process. +// This function is called in a clone()-ed process and thus must avoid +// any potentially unsafe operations like malloc or libc functions. +static int ExecDeathTestChildMain(void* child_arg) { + ExecDeathTestArgs* const args = static_cast(child_arg); + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd)); + + // We need to execute the test program in the same environment where + // it was originally invoked. Therefore we change to the original + // working directory first. + const char* const original_dir = + UnitTest::GetInstance()->original_working_dir(); + // We can safely call chdir() as it's a direct system call. + if (chdir(original_dir) != 0) { + DeathTestAbort(std::string("chdir(\"") + original_dir + "\") failed: " + + GetLastErrnoDescription()); + return EXIT_FAILURE; + } + + // We can safely call execve() as it's a direct system call. We + // cannot use execvp() as it's a libc function and thus potentially + // unsafe. Since execve() doesn't search the PATH, the user must + // invoke the test program via a valid path that contains at least + // one path separator. + execve(args->argv[0], args->argv, GetEnviron()); + DeathTestAbort(std::string("execve(") + args->argv[0] + ", ...) in " + + original_dir + " failed: " + + GetLastErrnoDescription()); + return EXIT_FAILURE; +} +# endif // !GTEST_OS_QNX + +# if GTEST_HAS_CLONE +// Two utility routines that together determine the direction the stack +// grows. +// This could be accomplished more elegantly by a single recursive +// function, but we want to guard against the unlikely possibility of +// a smart compiler optimizing the recursion away. +// +// GTEST_NO_INLINE_ is required to prevent GCC 4.6 from inlining +// StackLowerThanAddress into StackGrowsDown, which then doesn't give +// correct answer. +static void StackLowerThanAddress(const void* ptr, + bool* result) GTEST_NO_INLINE_; +// HWAddressSanitizer add a random tag to the MSB of the local variable address, +// making comparison result unpredictable. +GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +static void StackLowerThanAddress(const void* ptr, bool* result) { + int dummy; + *result = (&dummy < ptr); +} + +// Make sure AddressSanitizer does not tamper with the stack here. +GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +static bool StackGrowsDown() { + int dummy; + bool result; + StackLowerThanAddress(&dummy, &result); + return result; +} +# endif // GTEST_HAS_CLONE + +// Spawns a child process with the same executable as the current process in +// a thread-safe manner and instructs it to run the death test. The +// implementation uses fork(2) + exec. On systems where clone(2) is +// available, it is used instead, being slightly more thread-safe. On QNX, +// fork supports only single-threaded environments, so this function uses +// spawn(2) there instead. The function dies with an error message if +// anything goes wrong. +static pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) { + ExecDeathTestArgs args = { argv, close_fd }; + pid_t child_pid = -1; + +# if GTEST_OS_QNX + // Obtains the current directory and sets it to be closed in the child + // process. + const int cwd_fd = open(".", O_RDONLY); + GTEST_DEATH_TEST_CHECK_(cwd_fd != -1); + GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(cwd_fd, F_SETFD, FD_CLOEXEC)); + // We need to execute the test program in the same environment where + // it was originally invoked. Therefore we change to the original + // working directory first. + const char* const original_dir = + UnitTest::GetInstance()->original_working_dir(); + // We can safely call chdir() as it's a direct system call. + if (chdir(original_dir) != 0) { + DeathTestAbort(std::string("chdir(\"") + original_dir + "\") failed: " + + GetLastErrnoDescription()); + return EXIT_FAILURE; + } + + int fd_flags; + // Set close_fd to be closed after spawn. + GTEST_DEATH_TEST_CHECK_SYSCALL_(fd_flags = fcntl(close_fd, F_GETFD)); + GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(close_fd, F_SETFD, + fd_flags | FD_CLOEXEC)); + struct inheritance inherit = {0}; + // spawn is a system call. + child_pid = + spawn(args.argv[0], 0, nullptr, &inherit, args.argv, GetEnviron()); + // Restores the current working directory. + GTEST_DEATH_TEST_CHECK_(fchdir(cwd_fd) != -1); + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(cwd_fd)); + +# else // GTEST_OS_QNX +# if GTEST_OS_LINUX + // When a SIGPROF signal is received while fork() or clone() are executing, + // the process may hang. To avoid this, we ignore SIGPROF here and re-enable + // it after the call to fork()/clone() is complete. + struct sigaction saved_sigprof_action; + struct sigaction ignore_sigprof_action; + memset(&ignore_sigprof_action, 0, sizeof(ignore_sigprof_action)); + sigemptyset(&ignore_sigprof_action.sa_mask); + ignore_sigprof_action.sa_handler = SIG_IGN; + GTEST_DEATH_TEST_CHECK_SYSCALL_(sigaction( + SIGPROF, &ignore_sigprof_action, &saved_sigprof_action)); +# endif // GTEST_OS_LINUX + +# if GTEST_HAS_CLONE + const bool use_fork = GTEST_FLAG(death_test_use_fork); + + if (!use_fork) { + static const bool stack_grows_down = StackGrowsDown(); + const auto stack_size = static_cast(getpagesize()); + // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. + void* const stack = mmap(nullptr, stack_size, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); + GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED); + + // Maximum stack alignment in bytes: For a downward-growing stack, this + // amount is subtracted from size of the stack space to get an address + // that is within the stack space and is aligned on all systems we care + // about. As far as I know there is no ABI with stack alignment greater + // than 64. We assume stack and stack_size already have alignment of + // kMaxStackAlignment. + const size_t kMaxStackAlignment = 64; + void* const stack_top = + static_cast(stack) + + (stack_grows_down ? stack_size - kMaxStackAlignment : 0); + GTEST_DEATH_TEST_CHECK_( + static_cast(stack_size) > kMaxStackAlignment && + reinterpret_cast(stack_top) % kMaxStackAlignment == 0); + + child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); + + GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1); + } +# else + const bool use_fork = true; +# endif // GTEST_HAS_CLONE + + if (use_fork && (child_pid = fork()) == 0) { + ExecDeathTestChildMain(&args); + _exit(0); + } +# endif // GTEST_OS_QNX +# if GTEST_OS_LINUX + GTEST_DEATH_TEST_CHECK_SYSCALL_( + sigaction(SIGPROF, &saved_sigprof_action, nullptr)); +# endif // GTEST_OS_LINUX + + GTEST_DEATH_TEST_CHECK_(child_pid != -1); + return child_pid; +} + +// The AssumeRole process for a fork-and-exec death test. It re-executes the +// main program from the beginning, setting the --gtest_filter +// and --gtest_internal_run_death_test flags to cause only the current +// death test to be re-run. +DeathTest::TestRole ExecDeathTest::AssumeRole() { + const UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const TestInfo* const info = impl->current_test_info(); + const int death_test_index = info->result()->death_test_count(); + + if (flag != nullptr) { + set_write_fd(flag->write_fd()); + return EXECUTE_TEST; + } + + int pipe_fd[2]; + GTEST_DEATH_TEST_CHECK_(pipe(pipe_fd) != -1); + // Clear the close-on-exec flag on the write end of the pipe, lest + // it be closed when the child process does an exec: + GTEST_DEATH_TEST_CHECK_(fcntl(pipe_fd[1], F_SETFD, 0) != -1); + + const std::string filter_flag = std::string("--") + GTEST_FLAG_PREFIX_ + + kFilterFlag + "=" + info->test_suite_name() + + "." + info->name(); + const std::string internal_flag = + std::string("--") + GTEST_FLAG_PREFIX_ + kInternalRunDeathTestFlag + "=" + + file_ + "|" + StreamableToString(line_) + "|" + + StreamableToString(death_test_index) + "|" + + StreamableToString(pipe_fd[1]); + Arguments args; + args.AddArguments(GetArgvsForDeathTestChildProcess()); + args.AddArgument(filter_flag.c_str()); + args.AddArgument(internal_flag.c_str()); + + DeathTest::set_last_death_test_message(""); + + CaptureStderr(); + // See the comment in NoExecDeathTest::AssumeRole for why the next line + // is necessary. + FlushInfoLog(); + + const pid_t child_pid = ExecDeathTestSpawnChild(args.Argv(), pipe_fd[0]); + GTEST_DEATH_TEST_CHECK_SYSCALL_(close(pipe_fd[1])); + set_child_pid(child_pid); + set_read_fd(pipe_fd[0]); + set_spawned(true); + return OVERSEE_TEST; +} + +# endif // !GTEST_OS_WINDOWS + +// Creates a concrete DeathTest-derived class that depends on the +// --gtest_death_test_style flag, and sets the pointer pointed to +// by the "test" argument to its address. If the test should be +// skipped, sets that pointer to NULL. Returns true, unless the +// flag is set to an invalid value. +bool DefaultDeathTestFactory::Create(const char* statement, + Matcher matcher, + const char* file, int line, + DeathTest** test) { + UnitTestImpl* const impl = GetUnitTestImpl(); + const InternalRunDeathTestFlag* const flag = + impl->internal_run_death_test_flag(); + const int death_test_index = impl->current_test_info() + ->increment_death_test_count(); + + if (flag != nullptr) { + if (death_test_index > flag->index()) { + DeathTest::set_last_death_test_message( + "Death test count (" + StreamableToString(death_test_index) + + ") somehow exceeded expected maximum (" + + StreamableToString(flag->index()) + ")"); + return false; + } + + if (!(flag->file() == file && flag->line() == line && + flag->index() == death_test_index)) { + *test = nullptr; + return true; + } + } + +# if GTEST_OS_WINDOWS + + if (GTEST_FLAG(death_test_style) == "threadsafe" || + GTEST_FLAG(death_test_style) == "fast") { + *test = new WindowsDeathTest(statement, std::move(matcher), file, line); + } + +# elif GTEST_OS_FUCHSIA + + if (GTEST_FLAG(death_test_style) == "threadsafe" || + GTEST_FLAG(death_test_style) == "fast") { + *test = new FuchsiaDeathTest(statement, std::move(matcher), file, line); + } + +# else + + if (GTEST_FLAG(death_test_style) == "threadsafe") { + *test = new ExecDeathTest(statement, std::move(matcher), file, line); + } else if (GTEST_FLAG(death_test_style) == "fast") { + *test = new NoExecDeathTest(statement, std::move(matcher)); + } + +# endif // GTEST_OS_WINDOWS + + else { // NOLINT - this is more readable than unbalanced brackets inside #if. + DeathTest::set_last_death_test_message( + "Unknown death test style \"" + GTEST_FLAG(death_test_style) + + "\" encountered"); + return false; + } + + return true; +} + +# if GTEST_OS_WINDOWS +// Recreates the pipe and event handles from the provided parameters, +// signals the event, and returns a file descriptor wrapped around the pipe +// handle. This function is called in the child process only. +static int GetStatusFileDescriptor(unsigned int parent_process_id, + size_t write_handle_as_size_t, + size_t event_handle_as_size_t) { + AutoHandle parent_process_handle(::OpenProcess(PROCESS_DUP_HANDLE, + FALSE, // Non-inheritable. + parent_process_id)); + if (parent_process_handle.Get() == INVALID_HANDLE_VALUE) { + DeathTestAbort("Unable to open parent process " + + StreamableToString(parent_process_id)); + } + + GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t)); + + const HANDLE write_handle = + reinterpret_cast(write_handle_as_size_t); + HANDLE dup_write_handle; + + // The newly initialized handle is accessible only in the parent + // process. To obtain one accessible within the child, we need to use + // DuplicateHandle. + if (!::DuplicateHandle(parent_process_handle.Get(), write_handle, + ::GetCurrentProcess(), &dup_write_handle, + 0x0, // Requested privileges ignored since + // DUPLICATE_SAME_ACCESS is used. + FALSE, // Request non-inheritable handler. + DUPLICATE_SAME_ACCESS)) { + DeathTestAbort("Unable to duplicate the pipe handle " + + StreamableToString(write_handle_as_size_t) + + " from the parent process " + + StreamableToString(parent_process_id)); + } + + const HANDLE event_handle = reinterpret_cast(event_handle_as_size_t); + HANDLE dup_event_handle; + + if (!::DuplicateHandle(parent_process_handle.Get(), event_handle, + ::GetCurrentProcess(), &dup_event_handle, + 0x0, + FALSE, + DUPLICATE_SAME_ACCESS)) { + DeathTestAbort("Unable to duplicate the event handle " + + StreamableToString(event_handle_as_size_t) + + " from the parent process " + + StreamableToString(parent_process_id)); + } + + const int write_fd = + ::_open_osfhandle(reinterpret_cast(dup_write_handle), O_APPEND); + if (write_fd == -1) { + DeathTestAbort("Unable to convert pipe handle " + + StreamableToString(write_handle_as_size_t) + + " to a file descriptor"); + } + + // Signals the parent that the write end of the pipe has been acquired + // so the parent can release its own write end. + ::SetEvent(dup_event_handle); + + return write_fd; +} +# endif // GTEST_OS_WINDOWS + +// Returns a newly created InternalRunDeathTestFlag object with fields +// initialized from the GTEST_FLAG(internal_run_death_test) flag if +// the flag is specified; otherwise returns NULL. +InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() { + if (GTEST_FLAG(internal_run_death_test) == "") return nullptr; + + // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we + // can use it here. + int line = -1; + int index = -1; + ::std::vector< ::std::string> fields; + SplitString(GTEST_FLAG(internal_run_death_test).c_str(), '|', &fields); + int write_fd = -1; + +# if GTEST_OS_WINDOWS + + unsigned int parent_process_id = 0; + size_t write_handle_as_size_t = 0; + size_t event_handle_as_size_t = 0; + + if (fields.size() != 6 + || !ParseNaturalNumber(fields[1], &line) + || !ParseNaturalNumber(fields[2], &index) + || !ParseNaturalNumber(fields[3], &parent_process_id) + || !ParseNaturalNumber(fields[4], &write_handle_as_size_t) + || !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) { + DeathTestAbort("Bad --gtest_internal_run_death_test flag: " + + GTEST_FLAG(internal_run_death_test)); + } + write_fd = GetStatusFileDescriptor(parent_process_id, + write_handle_as_size_t, + event_handle_as_size_t); + +# elif GTEST_OS_FUCHSIA + + if (fields.size() != 3 + || !ParseNaturalNumber(fields[1], &line) + || !ParseNaturalNumber(fields[2], &index)) { + DeathTestAbort("Bad --gtest_internal_run_death_test flag: " + + GTEST_FLAG(internal_run_death_test)); + } + +# else + + if (fields.size() != 4 + || !ParseNaturalNumber(fields[1], &line) + || !ParseNaturalNumber(fields[2], &index) + || !ParseNaturalNumber(fields[3], &write_fd)) { + DeathTestAbort("Bad --gtest_internal_run_death_test flag: " + + GTEST_FLAG(internal_run_death_test)); + } + +# endif // GTEST_OS_WINDOWS + + return new InternalRunDeathTestFlag(fields[0], line, index, write_fd); +} + +} // namespace internal + +#endif // GTEST_HAS_DEATH_TEST + +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#include + +#if GTEST_OS_WINDOWS_MOBILE +# include +#elif GTEST_OS_WINDOWS +# include +# include +#else +# include +# include // Some Linux distributions define PATH_MAX here. +#endif // GTEST_OS_WINDOWS_MOBILE + + +#if GTEST_OS_WINDOWS +# define GTEST_PATH_MAX_ _MAX_PATH +#elif defined(PATH_MAX) +# define GTEST_PATH_MAX_ PATH_MAX +#elif defined(_XOPEN_PATH_MAX) +# define GTEST_PATH_MAX_ _XOPEN_PATH_MAX +#else +# define GTEST_PATH_MAX_ _POSIX_PATH_MAX +#endif // GTEST_OS_WINDOWS + +namespace testing { +namespace internal { + +#if GTEST_OS_WINDOWS +// On Windows, '\\' is the standard path separator, but many tools and the +// Windows API also accept '/' as an alternate path separator. Unless otherwise +// noted, a file path can contain either kind of path separators, or a mixture +// of them. +const char kPathSeparator = '\\'; +const char kAlternatePathSeparator = '/'; +const char kAlternatePathSeparatorString[] = "/"; +# if GTEST_OS_WINDOWS_MOBILE +// Windows CE doesn't have a current directory. You should not use +// the current directory in tests on Windows CE, but this at least +// provides a reasonable fallback. +const char kCurrentDirectoryString[] = "\\"; +// Windows CE doesn't define INVALID_FILE_ATTRIBUTES +const DWORD kInvalidFileAttributes = 0xffffffff; +# else +const char kCurrentDirectoryString[] = ".\\"; +# endif // GTEST_OS_WINDOWS_MOBILE +#else +const char kPathSeparator = '/'; +const char kCurrentDirectoryString[] = "./"; +#endif // GTEST_OS_WINDOWS + +// Returns whether the given character is a valid path separator. +static bool IsPathSeparator(char c) { +#if GTEST_HAS_ALT_PATH_SEP_ + return (c == kPathSeparator) || (c == kAlternatePathSeparator); +#else + return c == kPathSeparator; +#endif +} + +// Returns the current working directory, or "" if unsuccessful. +FilePath FilePath::GetCurrentDir() { +#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \ + GTEST_OS_WINDOWS_RT || ARDUINO + // Windows CE and Arduino don't have a current directory, so we just return + // something reasonable. + return FilePath(kCurrentDirectoryString); +#elif GTEST_OS_WINDOWS + char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; + return FilePath(_getcwd(cwd, sizeof(cwd)) == nullptr ? "" : cwd); +#else + char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; + char* result = getcwd(cwd, sizeof(cwd)); +# if GTEST_OS_NACL + // getcwd will likely fail in NaCl due to the sandbox, so return something + // reasonable. The user may have provided a shim implementation for getcwd, + // however, so fallback only when failure is detected. + return FilePath(result == nullptr ? kCurrentDirectoryString : cwd); +# endif // GTEST_OS_NACL + return FilePath(result == nullptr ? "" : cwd); +#endif // GTEST_OS_WINDOWS_MOBILE +} + +// Returns a copy of the FilePath with the case-insensitive extension removed. +// Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns +// FilePath("dir/file"). If a case-insensitive extension is not +// found, returns a copy of the original FilePath. +FilePath FilePath::RemoveExtension(const char* extension) const { + const std::string dot_extension = std::string(".") + extension; + if (String::EndsWithCaseInsensitive(pathname_, dot_extension)) { + return FilePath(pathname_.substr( + 0, pathname_.length() - dot_extension.length())); + } + return *this; +} + +// Returns a pointer to the last occurrence of a valid path separator in +// the FilePath. On Windows, for example, both '/' and '\' are valid path +// separators. Returns NULL if no path separator was found. +const char* FilePath::FindLastPathSeparator() const { + const char* const last_sep = strrchr(c_str(), kPathSeparator); +#if GTEST_HAS_ALT_PATH_SEP_ + const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator); + // Comparing two pointers of which only one is NULL is undefined. + if (last_alt_sep != nullptr && + (last_sep == nullptr || last_alt_sep > last_sep)) { + return last_alt_sep; + } +#endif + return last_sep; +} + +// Returns a copy of the FilePath with the directory part removed. +// Example: FilePath("path/to/file").RemoveDirectoryName() returns +// FilePath("file"). If there is no directory part ("just_a_file"), it returns +// the FilePath unmodified. If there is no file part ("just_a_dir/") it +// returns an empty FilePath (""). +// On Windows platform, '\' is the path separator, otherwise it is '/'. +FilePath FilePath::RemoveDirectoryName() const { + const char* const last_sep = FindLastPathSeparator(); + return last_sep ? FilePath(last_sep + 1) : *this; +} + +// RemoveFileName returns the directory path with the filename removed. +// Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". +// If the FilePath is "a_file" or "/a_file", RemoveFileName returns +// FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does +// not have a file, like "just/a/dir/", it returns the FilePath unmodified. +// On Windows platform, '\' is the path separator, otherwise it is '/'. +FilePath FilePath::RemoveFileName() const { + const char* const last_sep = FindLastPathSeparator(); + std::string dir; + if (last_sep) { + dir = std::string(c_str(), static_cast(last_sep + 1 - c_str())); + } else { + dir = kCurrentDirectoryString; + } + return FilePath(dir); +} + +// Helper functions for naming files in a directory for xml output. + +// Given directory = "dir", base_name = "test", number = 0, +// extension = "xml", returns "dir/test.xml". If number is greater +// than zero (e.g., 12), returns "dir/test_12.xml". +// On Windows platform, uses \ as the separator rather than /. +FilePath FilePath::MakeFileName(const FilePath& directory, + const FilePath& base_name, + int number, + const char* extension) { + std::string file; + if (number == 0) { + file = base_name.string() + "." + extension; + } else { + file = base_name.string() + "_" + StreamableToString(number) + + "." + extension; + } + return ConcatPaths(directory, FilePath(file)); +} + +// Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml". +// On Windows, uses \ as the separator rather than /. +FilePath FilePath::ConcatPaths(const FilePath& directory, + const FilePath& relative_path) { + if (directory.IsEmpty()) + return relative_path; + const FilePath dir(directory.RemoveTrailingPathSeparator()); + return FilePath(dir.string() + kPathSeparator + relative_path.string()); +} + +// Returns true if pathname describes something findable in the file-system, +// either a file, directory, or whatever. +bool FilePath::FileOrDirectoryExists() const { +#if GTEST_OS_WINDOWS_MOBILE + LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str()); + const DWORD attributes = GetFileAttributes(unicode); + delete [] unicode; + return attributes != kInvalidFileAttributes; +#else + posix::StatStruct file_stat; + return posix::Stat(pathname_.c_str(), &file_stat) == 0; +#endif // GTEST_OS_WINDOWS_MOBILE +} + +// Returns true if pathname describes a directory in the file-system +// that exists. +bool FilePath::DirectoryExists() const { + bool result = false; +#if GTEST_OS_WINDOWS + // Don't strip off trailing separator if path is a root directory on + // Windows (like "C:\\"). + const FilePath& path(IsRootDirectory() ? *this : + RemoveTrailingPathSeparator()); +#else + const FilePath& path(*this); +#endif + +#if GTEST_OS_WINDOWS_MOBILE + LPCWSTR unicode = String::AnsiToUtf16(path.c_str()); + const DWORD attributes = GetFileAttributes(unicode); + delete [] unicode; + if ((attributes != kInvalidFileAttributes) && + (attributes & FILE_ATTRIBUTE_DIRECTORY)) { + result = true; + } +#else + posix::StatStruct file_stat; + result = posix::Stat(path.c_str(), &file_stat) == 0 && + posix::IsDir(file_stat); +#endif // GTEST_OS_WINDOWS_MOBILE + + return result; +} + +// Returns true if pathname describes a root directory. (Windows has one +// root directory per disk drive.) +bool FilePath::IsRootDirectory() const { +#if GTEST_OS_WINDOWS + return pathname_.length() == 3 && IsAbsolutePath(); +#else + return pathname_.length() == 1 && IsPathSeparator(pathname_.c_str()[0]); +#endif +} + +// Returns true if pathname describes an absolute path. +bool FilePath::IsAbsolutePath() const { + const char* const name = pathname_.c_str(); +#if GTEST_OS_WINDOWS + return pathname_.length() >= 3 && + ((name[0] >= 'a' && name[0] <= 'z') || + (name[0] >= 'A' && name[0] <= 'Z')) && + name[1] == ':' && + IsPathSeparator(name[2]); +#else + return IsPathSeparator(name[0]); +#endif +} + +// Returns a pathname for a file that does not currently exist. The pathname +// will be directory/base_name.extension or +// directory/base_name_.extension if directory/base_name.extension +// already exists. The number will be incremented until a pathname is found +// that does not already exist. +// Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. +// There could be a race condition if two or more processes are calling this +// function at the same time -- they could both pick the same filename. +FilePath FilePath::GenerateUniqueFileName(const FilePath& directory, + const FilePath& base_name, + const char* extension) { + FilePath full_pathname; + int number = 0; + do { + full_pathname.Set(MakeFileName(directory, base_name, number++, extension)); + } while (full_pathname.FileOrDirectoryExists()); + return full_pathname; +} + +// Returns true if FilePath ends with a path separator, which indicates that +// it is intended to represent a directory. Returns false otherwise. +// This does NOT check that a directory (or file) actually exists. +bool FilePath::IsDirectory() const { + return !pathname_.empty() && + IsPathSeparator(pathname_.c_str()[pathname_.length() - 1]); +} + +// Create directories so that path exists. Returns true if successful or if +// the directories already exist; returns false if unable to create directories +// for any reason. +bool FilePath::CreateDirectoriesRecursively() const { + if (!this->IsDirectory()) { + return false; + } + + if (pathname_.length() == 0 || this->DirectoryExists()) { + return true; + } + + const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); + return parent.CreateDirectoriesRecursively() && this->CreateFolder(); +} + +// Create the directory so that path exists. Returns true if successful or +// if the directory already exists; returns false if unable to create the +// directory for any reason, including if the parent directory does not +// exist. Not named "CreateDirectory" because that's a macro on Windows. +bool FilePath::CreateFolder() const { +#if GTEST_OS_WINDOWS_MOBILE + FilePath removed_sep(this->RemoveTrailingPathSeparator()); + LPCWSTR unicode = String::AnsiToUtf16(removed_sep.c_str()); + int result = CreateDirectory(unicode, nullptr) ? 0 : -1; + delete [] unicode; +#elif GTEST_OS_WINDOWS + int result = _mkdir(pathname_.c_str()); +#else + int result = mkdir(pathname_.c_str(), 0777); +#endif // GTEST_OS_WINDOWS_MOBILE + + if (result == -1) { + return this->DirectoryExists(); // An error is OK if the directory exists. + } + return true; // No error. +} + +// If input name has a trailing separator character, remove it and return the +// name, otherwise return the name string unmodified. +// On Windows platform, uses \ as the separator, other platforms use /. +FilePath FilePath::RemoveTrailingPathSeparator() const { + return IsDirectory() + ? FilePath(pathname_.substr(0, pathname_.length() - 1)) + : *this; +} + +// Removes any redundant separators that might be in the pathname. +// For example, "bar///foo" becomes "bar/foo". Does not eliminate other +// redundancies that might be in a pathname involving "." or "..". +void FilePath::Normalize() { + if (pathname_.c_str() == nullptr) { + pathname_ = ""; + return; + } + const char* src = pathname_.c_str(); + char* const dest = new char[pathname_.length() + 1]; + char* dest_ptr = dest; + memset(dest_ptr, 0, pathname_.length() + 1); + + while (*src != '\0') { + *dest_ptr = *src; + if (!IsPathSeparator(*src)) { + src++; + } else { +#if GTEST_HAS_ALT_PATH_SEP_ + if (*dest_ptr == kAlternatePathSeparator) { + *dest_ptr = kPathSeparator; + } +#endif + while (IsPathSeparator(*src)) + src++; + } + dest_ptr++; + } + *dest_ptr = '\0'; + pathname_ = dest; + delete[] dest; +} + +} // namespace internal +} // namespace testing +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This file implements just enough of the matcher interface to allow +// EXPECT_DEATH and friends to accept a matcher argument. + + +#include + +namespace testing { + +// Constructs a matcher that matches a const std::string& whose value is +// equal to s. +Matcher::Matcher(const std::string& s) { *this = Eq(s); } + +// Constructs a matcher that matches a const std::string& whose value is +// equal to s. +Matcher::Matcher(const char* s) { + *this = Eq(std::string(s)); +} + +// Constructs a matcher that matches a std::string whose value is equal to +// s. +Matcher::Matcher(const std::string& s) { *this = Eq(s); } + +// Constructs a matcher that matches a std::string whose value is equal to +// s. +Matcher::Matcher(const char* s) { *this = Eq(std::string(s)); } + +#if GTEST_HAS_ABSL +// Constructs a matcher that matches a const absl::string_view& whose value is +// equal to s. +Matcher::Matcher(const std::string& s) { + *this = Eq(s); +} + +// Constructs a matcher that matches a const absl::string_view& whose value is +// equal to s. +Matcher::Matcher(const char* s) { + *this = Eq(std::string(s)); +} + +// Constructs a matcher that matches a const absl::string_view& whose value is +// equal to s. +Matcher::Matcher(absl::string_view s) { + *this = Eq(std::string(s)); +} + +// Constructs a matcher that matches a absl::string_view whose value is equal to +// s. +Matcher::Matcher(const std::string& s) { *this = Eq(s); } + +// Constructs a matcher that matches a absl::string_view whose value is equal to +// s. +Matcher::Matcher(const char* s) { + *this = Eq(std::string(s)); +} + +// Constructs a matcher that matches a absl::string_view whose value is equal to +// s. +Matcher::Matcher(absl::string_view s) { + *this = Eq(std::string(s)); +} +#endif // GTEST_HAS_ABSL + +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +#include +#include +#include +#include +#include +#include + +#if GTEST_OS_WINDOWS +# include +# include +# include +# include // Used in ThreadLocal. +# ifdef _MSC_VER +# include +# endif // _MSC_VER +#else +# include +#endif // GTEST_OS_WINDOWS + +#if GTEST_OS_MAC +# include +# include +# include +#endif // GTEST_OS_MAC + +#if GTEST_OS_DRAGONFLY || GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD || \ + GTEST_OS_NETBSD || GTEST_OS_OPENBSD +# include +# if GTEST_OS_DRAGONFLY || GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD +# include +# endif +#endif + +#if GTEST_OS_QNX +# include +# include +# include +#endif // GTEST_OS_QNX + +#if GTEST_OS_AIX +# include +# include +#endif // GTEST_OS_AIX + +#if GTEST_OS_FUCHSIA +# include +# include +#endif // GTEST_OS_FUCHSIA + + +namespace testing { +namespace internal { + +#if defined(_MSC_VER) || defined(__BORLANDC__) +// MSVC and C++Builder do not provide a definition of STDERR_FILENO. +const int kStdOutFileno = 1; +const int kStdErrFileno = 2; +#else +const int kStdOutFileno = STDOUT_FILENO; +const int kStdErrFileno = STDERR_FILENO; +#endif // _MSC_VER + +#if GTEST_OS_LINUX + +namespace { +template +T ReadProcFileField(const std::string& filename, int field) { + std::string dummy; + std::ifstream file(filename.c_str()); + while (field-- > 0) { + file >> dummy; + } + T output = 0; + file >> output; + return output; +} +} // namespace + +// Returns the number of active threads, or 0 when there is an error. +size_t GetThreadCount() { + const std::string filename = + (Message() << "/proc/" << getpid() << "/stat").GetString(); + return ReadProcFileField(filename, 19); +} + +#elif GTEST_OS_MAC + +size_t GetThreadCount() { + const task_t task = mach_task_self(); + mach_msg_type_number_t thread_count; + thread_act_array_t thread_list; + const kern_return_t status = task_threads(task, &thread_list, &thread_count); + if (status == KERN_SUCCESS) { + // task_threads allocates resources in thread_list and we need to free them + // to avoid leaks. + vm_deallocate(task, + reinterpret_cast(thread_list), + sizeof(thread_t) * thread_count); + return static_cast(thread_count); + } else { + return 0; + } +} + +#elif GTEST_OS_DRAGONFLY || GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD || \ + GTEST_OS_NETBSD + +#if GTEST_OS_NETBSD +#undef KERN_PROC +#define KERN_PROC KERN_PROC2 +#define kinfo_proc kinfo_proc2 +#endif + +#if GTEST_OS_DRAGONFLY +#define KP_NLWP(kp) (kp.kp_nthreads) +#elif GTEST_OS_FREEBSD || GTEST_OS_GNU_KFREEBSD +#define KP_NLWP(kp) (kp.ki_numthreads) +#elif GTEST_OS_NETBSD +#define KP_NLWP(kp) (kp.p_nlwps) +#endif + +// Returns the number of threads running in the process, or 0 to indicate that +// we cannot detect it. +size_t GetThreadCount() { + int mib[] = { + CTL_KERN, + KERN_PROC, + KERN_PROC_PID, + getpid(), +#if GTEST_OS_NETBSD + sizeof(struct kinfo_proc), + 1, +#endif + }; + u_int miblen = sizeof(mib) / sizeof(mib[0]); + struct kinfo_proc info; + size_t size = sizeof(info); + if (sysctl(mib, miblen, &info, &size, NULL, 0)) { + return 0; + } + return static_cast(KP_NLWP(info)); +} +#elif GTEST_OS_OPENBSD + +// Returns the number of threads running in the process, or 0 to indicate that +// we cannot detect it. +size_t GetThreadCount() { + int mib[] = { + CTL_KERN, + KERN_PROC, + KERN_PROC_PID | KERN_PROC_SHOW_THREADS, + getpid(), + sizeof(struct kinfo_proc), + 0, + }; + u_int miblen = sizeof(mib) / sizeof(mib[0]); + + // get number of structs + size_t size; + if (sysctl(mib, miblen, NULL, &size, NULL, 0)) { + return 0; + } + mib[5] = size / mib[4]; + + // populate array of structs + struct kinfo_proc info[mib[5]]; + if (sysctl(mib, miblen, &info, &size, NULL, 0)) { + return 0; + } + + // exclude empty members + int nthreads = 0; + for (int i = 0; i < size / mib[4]; i++) { + if (info[i].p_tid != -1) + nthreads++; + } + return nthreads; +} + +#elif GTEST_OS_QNX + +// Returns the number of threads running in the process, or 0 to indicate that +// we cannot detect it. +size_t GetThreadCount() { + const int fd = open("/proc/self/as", O_RDONLY); + if (fd < 0) { + return 0; + } + procfs_info process_info; + const int status = + devctl(fd, DCMD_PROC_INFO, &process_info, sizeof(process_info), nullptr); + close(fd); + if (status == EOK) { + return static_cast(process_info.num_threads); + } else { + return 0; + } +} + +#elif GTEST_OS_AIX + +size_t GetThreadCount() { + struct procentry64 entry; + pid_t pid = getpid(); + int status = getprocs64(&entry, sizeof(entry), nullptr, 0, &pid, 1); + if (status == 1) { + return entry.pi_thcount; + } else { + return 0; + } +} + +#elif GTEST_OS_FUCHSIA + +size_t GetThreadCount() { + int dummy_buffer; + size_t avail; + zx_status_t status = zx_object_get_info( + zx_process_self(), + ZX_INFO_PROCESS_THREADS, + &dummy_buffer, + 0, + nullptr, + &avail); + if (status == ZX_OK) { + return avail; + } else { + return 0; + } +} + +#else + +size_t GetThreadCount() { + // There's no portable way to detect the number of threads, so we just + // return 0 to indicate that we cannot detect it. + return 0; +} + +#endif // GTEST_OS_LINUX + +#if GTEST_IS_THREADSAFE && GTEST_OS_WINDOWS + +void SleepMilliseconds(int n) { + ::Sleep(static_cast(n)); +} + +AutoHandle::AutoHandle() + : handle_(INVALID_HANDLE_VALUE) {} + +AutoHandle::AutoHandle(Handle handle) + : handle_(handle) {} + +AutoHandle::~AutoHandle() { + Reset(); +} + +AutoHandle::Handle AutoHandle::Get() const { + return handle_; +} + +void AutoHandle::Reset() { + Reset(INVALID_HANDLE_VALUE); +} + +void AutoHandle::Reset(HANDLE handle) { + // Resetting with the same handle we already own is invalid. + if (handle_ != handle) { + if (IsCloseable()) { + ::CloseHandle(handle_); + } + handle_ = handle; + } else { + GTEST_CHECK_(!IsCloseable()) + << "Resetting a valid handle to itself is likely a programmer error " + "and thus not allowed."; + } +} + +bool AutoHandle::IsCloseable() const { + // Different Windows APIs may use either of these values to represent an + // invalid handle. + return handle_ != nullptr && handle_ != INVALID_HANDLE_VALUE; +} + +Notification::Notification() + : event_(::CreateEvent(nullptr, // Default security attributes. + TRUE, // Do not reset automatically. + FALSE, // Initially unset. + nullptr)) { // Anonymous event. + GTEST_CHECK_(event_.Get() != nullptr); +} + +void Notification::Notify() { + GTEST_CHECK_(::SetEvent(event_.Get()) != FALSE); +} + +void Notification::WaitForNotification() { + GTEST_CHECK_( + ::WaitForSingleObject(event_.Get(), INFINITE) == WAIT_OBJECT_0); +} + +Mutex::Mutex() + : owner_thread_id_(0), + type_(kDynamic), + critical_section_init_phase_(0), + critical_section_(new CRITICAL_SECTION) { + ::InitializeCriticalSection(critical_section_); +} + +Mutex::~Mutex() { + // Static mutexes are leaked intentionally. It is not thread-safe to try + // to clean them up. + if (type_ == kDynamic) { + ::DeleteCriticalSection(critical_section_); + delete critical_section_; + critical_section_ = nullptr; + } +} + +void Mutex::Lock() { + ThreadSafeLazyInit(); + ::EnterCriticalSection(critical_section_); + owner_thread_id_ = ::GetCurrentThreadId(); +} + +void Mutex::Unlock() { + ThreadSafeLazyInit(); + // We don't protect writing to owner_thread_id_ here, as it's the + // caller's responsibility to ensure that the current thread holds the + // mutex when this is called. + owner_thread_id_ = 0; + ::LeaveCriticalSection(critical_section_); +} + +// Does nothing if the current thread holds the mutex. Otherwise, crashes +// with high probability. +void Mutex::AssertHeld() { + ThreadSafeLazyInit(); + GTEST_CHECK_(owner_thread_id_ == ::GetCurrentThreadId()) + << "The current thread is not holding the mutex @" << this; +} + +namespace { + +#ifdef _MSC_VER +// Use the RAII idiom to flag mem allocs that are intentionally never +// deallocated. The motivation is to silence the false positive mem leaks +// that are reported by the debug version of MS's CRT which can only detect +// if an alloc is missing a matching deallocation. +// Example: +// MemoryIsNotDeallocated memory_is_not_deallocated; +// critical_section_ = new CRITICAL_SECTION; +// +class MemoryIsNotDeallocated +{ + public: + MemoryIsNotDeallocated() : old_crtdbg_flag_(0) { + old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); + // Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT + // doesn't report mem leak if there's no matching deallocation. + _CrtSetDbgFlag(old_crtdbg_flag_ & ~_CRTDBG_ALLOC_MEM_DF); + } + + ~MemoryIsNotDeallocated() { + // Restore the original _CRTDBG_ALLOC_MEM_DF flag + _CrtSetDbgFlag(old_crtdbg_flag_); + } + + private: + int old_crtdbg_flag_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(MemoryIsNotDeallocated); +}; +#endif // _MSC_VER + +} // namespace + +// Initializes owner_thread_id_ and critical_section_ in static mutexes. +void Mutex::ThreadSafeLazyInit() { + // Dynamic mutexes are initialized in the constructor. + if (type_ == kStatic) { + switch ( + ::InterlockedCompareExchange(&critical_section_init_phase_, 1L, 0L)) { + case 0: + // If critical_section_init_phase_ was 0 before the exchange, we + // are the first to test it and need to perform the initialization. + owner_thread_id_ = 0; + { + // Use RAII to flag that following mem alloc is never deallocated. +#ifdef _MSC_VER + MemoryIsNotDeallocated memory_is_not_deallocated; +#endif // _MSC_VER + critical_section_ = new CRITICAL_SECTION; + } + ::InitializeCriticalSection(critical_section_); + // Updates the critical_section_init_phase_ to 2 to signal + // initialization complete. + GTEST_CHECK_(::InterlockedCompareExchange( + &critical_section_init_phase_, 2L, 1L) == + 1L); + break; + case 1: + // Somebody else is already initializing the mutex; spin until they + // are done. + while (::InterlockedCompareExchange(&critical_section_init_phase_, + 2L, + 2L) != 2L) { + // Possibly yields the rest of the thread's time slice to other + // threads. + ::Sleep(0); + } + break; + + case 2: + break; // The mutex is already initialized and ready for use. + + default: + GTEST_CHECK_(false) + << "Unexpected value of critical_section_init_phase_ " + << "while initializing a static mutex."; + } + } +} + +namespace { + +class ThreadWithParamSupport : public ThreadWithParamBase { + public: + static HANDLE CreateThread(Runnable* runnable, + Notification* thread_can_start) { + ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start); + DWORD thread_id; + HANDLE thread_handle = ::CreateThread( + nullptr, // Default security. + 0, // Default stack size. + &ThreadWithParamSupport::ThreadMain, + param, // Parameter to ThreadMainStatic + 0x0, // Default creation flags. + &thread_id); // Need a valid pointer for the call to work under Win98. + GTEST_CHECK_(thread_handle != nullptr) + << "CreateThread failed with error " << ::GetLastError() << "."; + if (thread_handle == nullptr) { + delete param; + } + return thread_handle; + } + + private: + struct ThreadMainParam { + ThreadMainParam(Runnable* runnable, Notification* thread_can_start) + : runnable_(runnable), + thread_can_start_(thread_can_start) { + } + std::unique_ptr runnable_; + // Does not own. + Notification* thread_can_start_; + }; + + static DWORD WINAPI ThreadMain(void* ptr) { + // Transfers ownership. + std::unique_ptr param(static_cast(ptr)); + if (param->thread_can_start_ != nullptr) + param->thread_can_start_->WaitForNotification(); + param->runnable_->Run(); + return 0; + } + + // Prohibit instantiation. + ThreadWithParamSupport(); + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParamSupport); +}; + +} // namespace + +ThreadWithParamBase::ThreadWithParamBase(Runnable *runnable, + Notification* thread_can_start) + : thread_(ThreadWithParamSupport::CreateThread(runnable, + thread_can_start)) { +} + +ThreadWithParamBase::~ThreadWithParamBase() { + Join(); +} + +void ThreadWithParamBase::Join() { + GTEST_CHECK_(::WaitForSingleObject(thread_.Get(), INFINITE) == WAIT_OBJECT_0) + << "Failed to join the thread with error " << ::GetLastError() << "."; +} + +// Maps a thread to a set of ThreadIdToThreadLocals that have values +// instantiated on that thread and notifies them when the thread exits. A +// ThreadLocal instance is expected to persist until all threads it has +// values on have terminated. +class ThreadLocalRegistryImpl { + public: + // Registers thread_local_instance as having value on the current thread. + // Returns a value that can be used to identify the thread from other threads. + static ThreadLocalValueHolderBase* GetValueOnCurrentThread( + const ThreadLocalBase* thread_local_instance) { + DWORD current_thread = ::GetCurrentThreadId(); + MutexLock lock(&mutex_); + ThreadIdToThreadLocals* const thread_to_thread_locals = + GetThreadLocalsMapLocked(); + ThreadIdToThreadLocals::iterator thread_local_pos = + thread_to_thread_locals->find(current_thread); + if (thread_local_pos == thread_to_thread_locals->end()) { + thread_local_pos = thread_to_thread_locals->insert( + std::make_pair(current_thread, ThreadLocalValues())).first; + StartWatcherThreadFor(current_thread); + } + ThreadLocalValues& thread_local_values = thread_local_pos->second; + ThreadLocalValues::iterator value_pos = + thread_local_values.find(thread_local_instance); + if (value_pos == thread_local_values.end()) { + value_pos = + thread_local_values + .insert(std::make_pair( + thread_local_instance, + std::shared_ptr( + thread_local_instance->NewValueForCurrentThread()))) + .first; + } + return value_pos->second.get(); + } + + static void OnThreadLocalDestroyed( + const ThreadLocalBase* thread_local_instance) { + std::vector > value_holders; + // Clean up the ThreadLocalValues data structure while holding the lock, but + // defer the destruction of the ThreadLocalValueHolderBases. + { + MutexLock lock(&mutex_); + ThreadIdToThreadLocals* const thread_to_thread_locals = + GetThreadLocalsMapLocked(); + for (ThreadIdToThreadLocals::iterator it = + thread_to_thread_locals->begin(); + it != thread_to_thread_locals->end(); + ++it) { + ThreadLocalValues& thread_local_values = it->second; + ThreadLocalValues::iterator value_pos = + thread_local_values.find(thread_local_instance); + if (value_pos != thread_local_values.end()) { + value_holders.push_back(value_pos->second); + thread_local_values.erase(value_pos); + // This 'if' can only be successful at most once, so theoretically we + // could break out of the loop here, but we don't bother doing so. + } + } + } + // Outside the lock, let the destructor for 'value_holders' deallocate the + // ThreadLocalValueHolderBases. + } + + static void OnThreadExit(DWORD thread_id) { + GTEST_CHECK_(thread_id != 0) << ::GetLastError(); + std::vector > value_holders; + // Clean up the ThreadIdToThreadLocals data structure while holding the + // lock, but defer the destruction of the ThreadLocalValueHolderBases. + { + MutexLock lock(&mutex_); + ThreadIdToThreadLocals* const thread_to_thread_locals = + GetThreadLocalsMapLocked(); + ThreadIdToThreadLocals::iterator thread_local_pos = + thread_to_thread_locals->find(thread_id); + if (thread_local_pos != thread_to_thread_locals->end()) { + ThreadLocalValues& thread_local_values = thread_local_pos->second; + for (ThreadLocalValues::iterator value_pos = + thread_local_values.begin(); + value_pos != thread_local_values.end(); + ++value_pos) { + value_holders.push_back(value_pos->second); + } + thread_to_thread_locals->erase(thread_local_pos); + } + } + // Outside the lock, let the destructor for 'value_holders' deallocate the + // ThreadLocalValueHolderBases. + } + + private: + // In a particular thread, maps a ThreadLocal object to its value. + typedef std::map > + ThreadLocalValues; + // Stores all ThreadIdToThreadLocals having values in a thread, indexed by + // thread's ID. + typedef std::map ThreadIdToThreadLocals; + + // Holds the thread id and thread handle that we pass from + // StartWatcherThreadFor to WatcherThreadFunc. + typedef std::pair ThreadIdAndHandle; + + static void StartWatcherThreadFor(DWORD thread_id) { + // The returned handle will be kept in thread_map and closed by + // watcher_thread in WatcherThreadFunc. + HANDLE thread = ::OpenThread(SYNCHRONIZE | THREAD_QUERY_INFORMATION, + FALSE, + thread_id); + GTEST_CHECK_(thread != nullptr); + // We need to pass a valid thread ID pointer into CreateThread for it + // to work correctly under Win98. + DWORD watcher_thread_id; + HANDLE watcher_thread = ::CreateThread( + nullptr, // Default security. + 0, // Default stack size + &ThreadLocalRegistryImpl::WatcherThreadFunc, + reinterpret_cast(new ThreadIdAndHandle(thread_id, thread)), + CREATE_SUSPENDED, &watcher_thread_id); + GTEST_CHECK_(watcher_thread != nullptr); + // Give the watcher thread the same priority as ours to avoid being + // blocked by it. + ::SetThreadPriority(watcher_thread, + ::GetThreadPriority(::GetCurrentThread())); + ::ResumeThread(watcher_thread); + ::CloseHandle(watcher_thread); + } + + // Monitors exit from a given thread and notifies those + // ThreadIdToThreadLocals about thread termination. + static DWORD WINAPI WatcherThreadFunc(LPVOID param) { + const ThreadIdAndHandle* tah = + reinterpret_cast(param); + GTEST_CHECK_( + ::WaitForSingleObject(tah->second, INFINITE) == WAIT_OBJECT_0); + OnThreadExit(tah->first); + ::CloseHandle(tah->second); + delete tah; + return 0; + } + + // Returns map of thread local instances. + static ThreadIdToThreadLocals* GetThreadLocalsMapLocked() { + mutex_.AssertHeld(); +#ifdef _MSC_VER + MemoryIsNotDeallocated memory_is_not_deallocated; +#endif // _MSC_VER + static ThreadIdToThreadLocals* map = new ThreadIdToThreadLocals(); + return map; + } + + // Protects access to GetThreadLocalsMapLocked() and its return value. + static Mutex mutex_; + // Protects access to GetThreadMapLocked() and its return value. + static Mutex thread_map_mutex_; +}; + +Mutex ThreadLocalRegistryImpl::mutex_(Mutex::kStaticMutex); +Mutex ThreadLocalRegistryImpl::thread_map_mutex_(Mutex::kStaticMutex); + +ThreadLocalValueHolderBase* ThreadLocalRegistry::GetValueOnCurrentThread( + const ThreadLocalBase* thread_local_instance) { + return ThreadLocalRegistryImpl::GetValueOnCurrentThread( + thread_local_instance); +} + +void ThreadLocalRegistry::OnThreadLocalDestroyed( + const ThreadLocalBase* thread_local_instance) { + ThreadLocalRegistryImpl::OnThreadLocalDestroyed(thread_local_instance); +} + +#endif // GTEST_IS_THREADSAFE && GTEST_OS_WINDOWS + +#if GTEST_USES_POSIX_RE + +// Implements RE. Currently only needed for death tests. + +RE::~RE() { + if (is_valid_) { + // regfree'ing an invalid regex might crash because the content + // of the regex is undefined. Since the regex's are essentially + // the same, one cannot be valid (or invalid) without the other + // being so too. + regfree(&partial_regex_); + regfree(&full_regex_); + } + free(const_cast(pattern_)); +} + +// Returns true iff regular expression re matches the entire str. +bool RE::FullMatch(const char* str, const RE& re) { + if (!re.is_valid_) return false; + + regmatch_t match; + return regexec(&re.full_regex_, str, 1, &match, 0) == 0; +} + +// Returns true iff regular expression re matches a substring of str +// (including str itself). +bool RE::PartialMatch(const char* str, const RE& re) { + if (!re.is_valid_) return false; + + regmatch_t match; + return regexec(&re.partial_regex_, str, 1, &match, 0) == 0; +} + +// Initializes an RE from its string representation. +void RE::Init(const char* regex) { + pattern_ = posix::StrDup(regex); + + // Reserves enough bytes to hold the regular expression used for a + // full match. + const size_t full_regex_len = strlen(regex) + 10; + char* const full_pattern = new char[full_regex_len]; + + snprintf(full_pattern, full_regex_len, "^(%s)$", regex); + is_valid_ = regcomp(&full_regex_, full_pattern, REG_EXTENDED) == 0; + // We want to call regcomp(&partial_regex_, ...) even if the + // previous expression returns false. Otherwise partial_regex_ may + // not be properly initialized can may cause trouble when it's + // freed. + // + // Some implementation of POSIX regex (e.g. on at least some + // versions of Cygwin) doesn't accept the empty string as a valid + // regex. We change it to an equivalent form "()" to be safe. + if (is_valid_) { + const char* const partial_regex = (*regex == '\0') ? "()" : regex; + is_valid_ = regcomp(&partial_regex_, partial_regex, REG_EXTENDED) == 0; + } + EXPECT_TRUE(is_valid_) + << "Regular expression \"" << regex + << "\" is not a valid POSIX Extended regular expression."; + + delete[] full_pattern; +} + +#elif GTEST_USES_SIMPLE_RE + +// Returns true iff ch appears anywhere in str (excluding the +// terminating '\0' character). +bool IsInSet(char ch, const char* str) { + return ch != '\0' && strchr(str, ch) != nullptr; +} + +// Returns true iff ch belongs to the given classification. Unlike +// similar functions in , these aren't affected by the +// current locale. +bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; } +bool IsAsciiPunct(char ch) { + return IsInSet(ch, "^-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"); +} +bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); } +bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); } +bool IsAsciiWordChar(char ch) { + return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || + ('0' <= ch && ch <= '9') || ch == '_'; +} + +// Returns true iff "\\c" is a supported escape sequence. +bool IsValidEscape(char c) { + return (IsAsciiPunct(c) || IsInSet(c, "dDfnrsStvwW")); +} + +// Returns true iff the given atom (specified by escaped and pattern) +// matches ch. The result is undefined if the atom is invalid. +bool AtomMatchesChar(bool escaped, char pattern_char, char ch) { + if (escaped) { // "\\p" where p is pattern_char. + switch (pattern_char) { + case 'd': return IsAsciiDigit(ch); + case 'D': return !IsAsciiDigit(ch); + case 'f': return ch == '\f'; + case 'n': return ch == '\n'; + case 'r': return ch == '\r'; + case 's': return IsAsciiWhiteSpace(ch); + case 'S': return !IsAsciiWhiteSpace(ch); + case 't': return ch == '\t'; + case 'v': return ch == '\v'; + case 'w': return IsAsciiWordChar(ch); + case 'W': return !IsAsciiWordChar(ch); + } + return IsAsciiPunct(pattern_char) && pattern_char == ch; + } + + return (pattern_char == '.' && ch != '\n') || pattern_char == ch; +} + +// Helper function used by ValidateRegex() to format error messages. +static std::string FormatRegexSyntaxError(const char* regex, int index) { + return (Message() << "Syntax error at index " << index + << " in simple regular expression \"" << regex << "\": ").GetString(); +} + +// Generates non-fatal failures and returns false if regex is invalid; +// otherwise returns true. +bool ValidateRegex(const char* regex) { + if (regex == nullptr) { + ADD_FAILURE() << "NULL is not a valid simple regular expression."; + return false; + } + + bool is_valid = true; + + // True iff ?, *, or + can follow the previous atom. + bool prev_repeatable = false; + for (int i = 0; regex[i]; i++) { + if (regex[i] == '\\') { // An escape sequence + i++; + if (regex[i] == '\0') { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) + << "'\\' cannot appear at the end."; + return false; + } + + if (!IsValidEscape(regex[i])) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i - 1) + << "invalid escape sequence \"\\" << regex[i] << "\"."; + is_valid = false; + } + prev_repeatable = true; + } else { // Not an escape sequence. + const char ch = regex[i]; + + if (ch == '^' && i > 0) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'^' can only appear at the beginning."; + is_valid = false; + } else if (ch == '$' && regex[i + 1] != '\0') { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'$' can only appear at the end."; + is_valid = false; + } else if (IsInSet(ch, "()[]{}|")) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'" << ch << "' is unsupported."; + is_valid = false; + } else if (IsRepeat(ch) && !prev_repeatable) { + ADD_FAILURE() << FormatRegexSyntaxError(regex, i) + << "'" << ch << "' can only follow a repeatable token."; + is_valid = false; + } + + prev_repeatable = !IsInSet(ch, "^$?*+"); + } + } + + return is_valid; +} + +// Matches a repeated regex atom followed by a valid simple regular +// expression. The regex atom is defined as c if escaped is false, +// or \c otherwise. repeat is the repetition meta character (?, *, +// or +). The behavior is undefined if str contains too many +// characters to be indexable by size_t, in which case the test will +// probably time out anyway. We are fine with this limitation as +// std::string has it too. +bool MatchRepetitionAndRegexAtHead( + bool escaped, char c, char repeat, const char* regex, + const char* str) { + const size_t min_count = (repeat == '+') ? 1 : 0; + const size_t max_count = (repeat == '?') ? 1 : + static_cast(-1) - 1; + // We cannot call numeric_limits::max() as it conflicts with the + // max() macro on Windows. + + for (size_t i = 0; i <= max_count; ++i) { + // We know that the atom matches each of the first i characters in str. + if (i >= min_count && MatchRegexAtHead(regex, str + i)) { + // We have enough matches at the head, and the tail matches too. + // Since we only care about *whether* the pattern matches str + // (as opposed to *how* it matches), there is no need to find a + // greedy match. + return true; + } + if (str[i] == '\0' || !AtomMatchesChar(escaped, c, str[i])) + return false; + } + return false; +} + +// Returns true iff regex matches a prefix of str. regex must be a +// valid simple regular expression and not start with "^", or the +// result is undefined. +bool MatchRegexAtHead(const char* regex, const char* str) { + if (*regex == '\0') // An empty regex matches a prefix of anything. + return true; + + // "$" only matches the end of a string. Note that regex being + // valid guarantees that there's nothing after "$" in it. + if (*regex == '$') + return *str == '\0'; + + // Is the first thing in regex an escape sequence? + const bool escaped = *regex == '\\'; + if (escaped) + ++regex; + if (IsRepeat(regex[1])) { + // MatchRepetitionAndRegexAtHead() calls MatchRegexAtHead(), so + // here's an indirect recursion. It terminates as the regex gets + // shorter in each recursion. + return MatchRepetitionAndRegexAtHead( + escaped, regex[0], regex[1], regex + 2, str); + } else { + // regex isn't empty, isn't "$", and doesn't start with a + // repetition. We match the first atom of regex with the first + // character of str and recurse. + return (*str != '\0') && AtomMatchesChar(escaped, *regex, *str) && + MatchRegexAtHead(regex + 1, str + 1); + } +} + +// Returns true iff regex matches any substring of str. regex must be +// a valid simple regular expression, or the result is undefined. +// +// The algorithm is recursive, but the recursion depth doesn't exceed +// the regex length, so we won't need to worry about running out of +// stack space normally. In rare cases the time complexity can be +// exponential with respect to the regex length + the string length, +// but usually it's must faster (often close to linear). +bool MatchRegexAnywhere(const char* regex, const char* str) { + if (regex == nullptr || str == nullptr) return false; + + if (*regex == '^') + return MatchRegexAtHead(regex + 1, str); + + // A successful match can be anywhere in str. + do { + if (MatchRegexAtHead(regex, str)) + return true; + } while (*str++ != '\0'); + return false; +} + +// Implements the RE class. + +RE::~RE() { + free(const_cast(pattern_)); + free(const_cast(full_pattern_)); +} + +// Returns true iff regular expression re matches the entire str. +bool RE::FullMatch(const char* str, const RE& re) { + return re.is_valid_ && MatchRegexAnywhere(re.full_pattern_, str); +} + +// Returns true iff regular expression re matches a substring of str +// (including str itself). +bool RE::PartialMatch(const char* str, const RE& re) { + return re.is_valid_ && MatchRegexAnywhere(re.pattern_, str); +} + +// Initializes an RE from its string representation. +void RE::Init(const char* regex) { + pattern_ = full_pattern_ = nullptr; + if (regex != nullptr) { + pattern_ = posix::StrDup(regex); + } + + is_valid_ = ValidateRegex(regex); + if (!is_valid_) { + // No need to calculate the full pattern when the regex is invalid. + return; + } + + const size_t len = strlen(regex); + // Reserves enough bytes to hold the regular expression used for a + // full match: we need space to prepend a '^', append a '$', and + // terminate the string with '\0'. + char* buffer = static_cast(malloc(len + 3)); + full_pattern_ = buffer; + + if (*regex != '^') + *buffer++ = '^'; // Makes sure full_pattern_ starts with '^'. + + // We don't use snprintf or strncpy, as they trigger a warning when + // compiled with VC++ 8.0. + memcpy(buffer, regex, len); + buffer += len; + + if (len == 0 || regex[len - 1] != '$') + *buffer++ = '$'; // Makes sure full_pattern_ ends with '$'. + + *buffer = '\0'; +} + +#endif // GTEST_USES_POSIX_RE + +const char kUnknownFile[] = "unknown file"; + +// Formats a source file path and a line number as they would appear +// in an error message from the compiler used to compile this code. +GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) { + const std::string file_name(file == nullptr ? kUnknownFile : file); + + if (line < 0) { + return file_name + ":"; + } +#ifdef _MSC_VER + return file_name + "(" + StreamableToString(line) + "):"; +#else + return file_name + ":" + StreamableToString(line) + ":"; +#endif // _MSC_VER +} + +// Formats a file location for compiler-independent XML output. +// Although this function is not platform dependent, we put it next to +// FormatFileLocation in order to contrast the two functions. +// Note that FormatCompilerIndependentFileLocation() does NOT append colon +// to the file location it produces, unlike FormatFileLocation(). +GTEST_API_ ::std::string FormatCompilerIndependentFileLocation( + const char* file, int line) { + const std::string file_name(file == nullptr ? kUnknownFile : file); + + if (line < 0) + return file_name; + else + return file_name + ":" + StreamableToString(line); +} + +GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line) + : severity_(severity) { + const char* const marker = + severity == GTEST_INFO ? "[ INFO ]" : + severity == GTEST_WARNING ? "[WARNING]" : + severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]"; + GetStream() << ::std::endl << marker << " " + << FormatFileLocation(file, line).c_str() << ": "; +} + +// Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. +GTestLog::~GTestLog() { + GetStream() << ::std::endl; + if (severity_ == GTEST_FATAL) { + fflush(stderr); + posix::Abort(); + } +} + +// Disable Microsoft deprecation warnings for POSIX functions called from +// this class (creat, dup, dup2, and close) +GTEST_DISABLE_MSC_DEPRECATED_PUSH_() + +#if GTEST_HAS_STREAM_REDIRECTION + +// Object that captures an output stream (stdout/stderr). +class CapturedStream { + public: + // The ctor redirects the stream to a temporary file. + explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) { +# if GTEST_OS_WINDOWS + char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT + char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT + + ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path); + const UINT success = ::GetTempFileNameA(temp_dir_path, + "gtest_redir", + 0, // Generate unique file name. + temp_file_path); + GTEST_CHECK_(success != 0) + << "Unable to create a temporary file in " << temp_dir_path; + const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE); + GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file " + << temp_file_path; + filename_ = temp_file_path; +# else + // There's no guarantee that a test has write access to the current + // directory, so we create the temporary file in the /tmp directory + // instead. We use /tmp on most systems, and /sdcard on Android. + // That's because Android doesn't have /tmp. +# if GTEST_OS_LINUX_ANDROID + // Note: Android applications are expected to call the framework's + // Context.getExternalStorageDirectory() method through JNI to get + // the location of the world-writable SD Card directory. However, + // this requires a Context handle, which cannot be retrieved + // globally from native code. Doing so also precludes running the + // code as part of a regular standalone executable, which doesn't + // run in a Dalvik process (e.g. when running it through 'adb shell'). + // + // The location /sdcard is directly accessible from native code + // and is the only location (unofficially) supported by the Android + // team. It's generally a symlink to the real SD Card mount point + // which can be /mnt/sdcard, /mnt/sdcard0, /system/media/sdcard, or + // other OEM-customized locations. Never rely on these, and always + // use /sdcard. + char name_template[] = "/sdcard/gtest_captured_stream.XXXXXX"; +# else + char name_template[] = "/tmp/captured_stream.XXXXXX"; +# endif // GTEST_OS_LINUX_ANDROID + const int captured_fd = mkstemp(name_template); + if (captured_fd == -1) { + GTEST_LOG_(WARNING) + << "Failed to create tmp file " << name_template + << " for test; does the test have access to the /tmp directory?"; + } + filename_ = name_template; +# endif // GTEST_OS_WINDOWS + fflush(nullptr); + dup2(captured_fd, fd_); + close(captured_fd); + } + + ~CapturedStream() { + remove(filename_.c_str()); + } + + std::string GetCapturedString() { + if (uncaptured_fd_ != -1) { + // Restores the original stream. + fflush(nullptr); + dup2(uncaptured_fd_, fd_); + close(uncaptured_fd_); + uncaptured_fd_ = -1; + } + + FILE* const file = posix::FOpen(filename_.c_str(), "r"); + if (file == nullptr) { + GTEST_LOG_(FATAL) << "Failed to open tmp file " << filename_ + << " for capturing stream."; + } + const std::string content = ReadEntireFile(file); + posix::FClose(file); + return content; + } + + private: + const int fd_; // A stream to capture. + int uncaptured_fd_; + // Name of the temporary file holding the stderr output. + ::std::string filename_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream); +}; + +GTEST_DISABLE_MSC_DEPRECATED_POP_() + +static CapturedStream* g_captured_stderr = nullptr; +static CapturedStream* g_captured_stdout = nullptr; + +// Starts capturing an output stream (stdout/stderr). +static void CaptureStream(int fd, const char* stream_name, + CapturedStream** stream) { + if (*stream != nullptr) { + GTEST_LOG_(FATAL) << "Only one " << stream_name + << " capturer can exist at a time."; + } + *stream = new CapturedStream(fd); +} + +// Stops capturing the output stream and returns the captured string. +static std::string GetCapturedStream(CapturedStream** captured_stream) { + const std::string content = (*captured_stream)->GetCapturedString(); + + delete *captured_stream; + *captured_stream = nullptr; + + return content; +} + +// Starts capturing stdout. +void CaptureStdout() { + CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout); +} + +// Starts capturing stderr. +void CaptureStderr() { + CaptureStream(kStdErrFileno, "stderr", &g_captured_stderr); +} + +// Stops capturing stdout and returns the captured string. +std::string GetCapturedStdout() { + return GetCapturedStream(&g_captured_stdout); +} + +// Stops capturing stderr and returns the captured string. +std::string GetCapturedStderr() { + return GetCapturedStream(&g_captured_stderr); +} + +#endif // GTEST_HAS_STREAM_REDIRECTION + + + + + +size_t GetFileSize(FILE* file) { + fseek(file, 0, SEEK_END); + return static_cast(ftell(file)); +} + +std::string ReadEntireFile(FILE* file) { + const size_t file_size = GetFileSize(file); + char* const buffer = new char[file_size]; + + size_t bytes_last_read = 0; // # of bytes read in the last fread() + size_t bytes_read = 0; // # of bytes read so far + + fseek(file, 0, SEEK_SET); + + // Keeps reading the file until we cannot read further or the + // pre-determined file size is reached. + do { + bytes_last_read = fread(buffer+bytes_read, 1, file_size-bytes_read, file); + bytes_read += bytes_last_read; + } while (bytes_last_read > 0 && bytes_read < file_size); + + const std::string content(buffer, bytes_read); + delete[] buffer; + + return content; +} + +#if GTEST_HAS_DEATH_TEST +static const std::vector* g_injected_test_argvs = + nullptr; // Owned. + +std::vector GetInjectableArgvs() { + if (g_injected_test_argvs != nullptr) { + return *g_injected_test_argvs; + } + return GetArgvs(); +} + +void SetInjectableArgvs(const std::vector* new_argvs) { + if (g_injected_test_argvs != new_argvs) delete g_injected_test_argvs; + g_injected_test_argvs = new_argvs; +} + +void SetInjectableArgvs(const std::vector& new_argvs) { + SetInjectableArgvs( + new std::vector(new_argvs.begin(), new_argvs.end())); +} + +void ClearInjectableArgvs() { + delete g_injected_test_argvs; + g_injected_test_argvs = nullptr; +} +#endif // GTEST_HAS_DEATH_TEST + +#if GTEST_OS_WINDOWS_MOBILE +namespace posix { +void Abort() { + DebugBreak(); + TerminateProcess(GetCurrentProcess(), 1); +} +} // namespace posix +#endif // GTEST_OS_WINDOWS_MOBILE + +// Returns the name of the environment variable corresponding to the +// given flag. For example, FlagToEnvVar("foo") will return +// "GTEST_FOO" in the open-source version. +static std::string FlagToEnvVar(const char* flag) { + const std::string full_flag = + (Message() << GTEST_FLAG_PREFIX_ << flag).GetString(); + + Message env_var; + for (size_t i = 0; i != full_flag.length(); i++) { + env_var << ToUpper(full_flag.c_str()[i]); + } + + return env_var.GetString(); +} + +// Parses 'str' for a 32-bit signed integer. If successful, writes +// the result to *value and returns true; otherwise leaves *value +// unchanged and returns false. +bool ParseInt32(const Message& src_text, const char* str, Int32* value) { + // Parses the environment variable as a decimal integer. + char* end = nullptr; + const long long_value = strtol(str, &end, 10); // NOLINT + + // Has strtol() consumed all characters in the string? + if (*end != '\0') { + // No - an invalid character was encountered. + Message msg; + msg << "WARNING: " << src_text + << " is expected to be a 32-bit integer, but actually" + << " has value \"" << str << "\".\n"; + printf("%s", msg.GetString().c_str()); + fflush(stdout); + return false; + } + + // Is the parsed value in the range of an Int32? + const Int32 result = static_cast(long_value); + if (long_value == LONG_MAX || long_value == LONG_MIN || + // The parsed value overflows as a long. (strtol() returns + // LONG_MAX or LONG_MIN when the input overflows.) + result != long_value + // The parsed value overflows as an Int32. + ) { + Message msg; + msg << "WARNING: " << src_text + << " is expected to be a 32-bit integer, but actually" + << " has value " << str << ", which overflows.\n"; + printf("%s", msg.GetString().c_str()); + fflush(stdout); + return false; + } + + *value = result; + return true; +} + +// Reads and returns the Boolean environment variable corresponding to +// the given flag; if it's not set, returns default_value. +// +// The value is considered true iff it's not "0". +bool BoolFromGTestEnv(const char* flag, bool default_value) { +#if defined(GTEST_GET_BOOL_FROM_ENV_) + return GTEST_GET_BOOL_FROM_ENV_(flag, default_value); +#else + const std::string env_var = FlagToEnvVar(flag); + const char* const string_value = posix::GetEnv(env_var.c_str()); + return string_value == nullptr ? default_value + : strcmp(string_value, "0") != 0; +#endif // defined(GTEST_GET_BOOL_FROM_ENV_) +} + +// Reads and returns a 32-bit integer stored in the environment +// variable corresponding to the given flag; if it isn't set or +// doesn't represent a valid 32-bit integer, returns default_value. +Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) { +#if defined(GTEST_GET_INT32_FROM_ENV_) + return GTEST_GET_INT32_FROM_ENV_(flag, default_value); +#else + const std::string env_var = FlagToEnvVar(flag); + const char* const string_value = posix::GetEnv(env_var.c_str()); + if (string_value == nullptr) { + // The environment variable is not set. + return default_value; + } + + Int32 result = default_value; + if (!ParseInt32(Message() << "Environment variable " << env_var, + string_value, &result)) { + printf("The default value %s is used.\n", + (Message() << default_value).GetString().c_str()); + fflush(stdout); + return default_value; + } + + return result; +#endif // defined(GTEST_GET_INT32_FROM_ENV_) +} + +// As a special case for the 'output' flag, if GTEST_OUTPUT is not +// set, we look for XML_OUTPUT_FILE, which is set by the Bazel build +// system. The value of XML_OUTPUT_FILE is a filename without the +// "xml:" prefix of GTEST_OUTPUT. +// Note that this is meant to be called at the call site so it does +// not check that the flag is 'output' +// In essence this checks an env variable called XML_OUTPUT_FILE +// and if it is set we prepend "xml:" to its value, if it not set we return "" +std::string OutputFlagAlsoCheckEnvVar(){ + std::string default_value_for_output_flag = ""; + const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE"); + if (nullptr != xml_output_file_env) { + default_value_for_output_flag = std::string("xml:") + xml_output_file_env; + } + return default_value_for_output_flag; +} + +// Reads and returns the string environment variable corresponding to +// the given flag; if it's not set, returns default_value. +const char* StringFromGTestEnv(const char* flag, const char* default_value) { +#if defined(GTEST_GET_STRING_FROM_ENV_) + return GTEST_GET_STRING_FROM_ENV_(flag, default_value); +#else + const std::string env_var = FlagToEnvVar(flag); + const char* const value = posix::GetEnv(env_var.c_str()); + return value == nullptr ? default_value : value; +#endif // defined(GTEST_GET_STRING_FROM_ENV_) +} + +} // namespace internal +} // namespace testing +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// Google Test - The Google C++ Testing and Mocking Framework +// +// This file implements a universal value printer that can print a +// value of any type T: +// +// void ::testing::internal::UniversalPrinter::Print(value, ostream_ptr); +// +// It uses the << operator when possible, and prints the bytes in the +// object otherwise. A user can override its behavior for a class +// type Foo by defining either operator<<(::std::ostream&, const Foo&) +// or void PrintTo(const Foo&, ::std::ostream*) in the namespace that +// defines Foo. + +#include +#include +#include +#include // NOLINT +#include + +namespace testing { + +namespace { + +using ::std::ostream; + +// Prints a segment of bytes in the given object. +GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start, + size_t count, ostream* os) { + char text[5] = ""; + for (size_t i = 0; i != count; i++) { + const size_t j = start + i; + if (i != 0) { + // Organizes the bytes into groups of 2 for easy parsing by + // human. + if ((j % 2) == 0) + *os << ' '; + else + *os << '-'; + } + GTEST_SNPRINTF_(text, sizeof(text), "%02X", obj_bytes[j]); + *os << text; + } +} + +// Prints the bytes in the given value to the given ostream. +void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, + ostream* os) { + // Tells the user how big the object is. + *os << count << "-byte object <"; + + const size_t kThreshold = 132; + const size_t kChunkSize = 64; + // If the object size is bigger than kThreshold, we'll have to omit + // some details by printing only the first and the last kChunkSize + // bytes. + if (count < kThreshold) { + PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); + } else { + PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os); + *os << " ... "; + // Rounds up to 2-byte boundary. + const size_t resume_pos = (count - kChunkSize + 1)/2*2; + PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os); + } + *os << ">"; +} + +} // namespace + +namespace internal2 { + +// Delegates to PrintBytesInObjectToImpl() to print the bytes in the +// given object. The delegation simplifies the implementation, which +// uses the << operator and thus is easier done outside of the +// ::testing::internal namespace, which contains a << operator that +// sometimes conflicts with the one in STL. +void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count, + ostream* os) { + PrintBytesInObjectToImpl(obj_bytes, count, os); +} + +} // namespace internal2 + +namespace internal { + +// Depending on the value of a char (or wchar_t), we print it in one +// of three formats: +// - as is if it's a printable ASCII (e.g. 'a', '2', ' '), +// - as a hexadecimal escape sequence (e.g. '\x7F'), or +// - as a special escape sequence (e.g. '\r', '\n'). +enum CharFormat { + kAsIs, + kHexEscape, + kSpecialEscape +}; + +// Returns true if c is a printable ASCII character. We test the +// value of c directly instead of calling isprint(), which is buggy on +// Windows Mobile. +inline bool IsPrintableAscii(wchar_t c) { + return 0x20 <= c && c <= 0x7E; +} + +// Prints a wide or narrow char c as a character literal without the +// quotes, escaping it when necessary; returns how c was formatted. +// The template argument UnsignedChar is the unsigned version of Char, +// which is the type of c. +template +static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) { + wchar_t w_c = static_cast(c); + switch (w_c) { + case L'\0': + *os << "\\0"; + break; + case L'\'': + *os << "\\'"; + break; + case L'\\': + *os << "\\\\"; + break; + case L'\a': + *os << "\\a"; + break; + case L'\b': + *os << "\\b"; + break; + case L'\f': + *os << "\\f"; + break; + case L'\n': + *os << "\\n"; + break; + case L'\r': + *os << "\\r"; + break; + case L'\t': + *os << "\\t"; + break; + case L'\v': + *os << "\\v"; + break; + default: + if (IsPrintableAscii(w_c)) { + *os << static_cast(c); + return kAsIs; + } else { + ostream::fmtflags flags = os->flags(); + *os << "\\x" << std::hex << std::uppercase + << static_cast(static_cast(c)); + os->flags(flags); + return kHexEscape; + } + } + return kSpecialEscape; +} + +// Prints a wchar_t c as if it's part of a string literal, escaping it when +// necessary; returns how c was formatted. +static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) { + switch (c) { + case L'\'': + *os << "'"; + return kAsIs; + case L'"': + *os << "\\\""; + return kSpecialEscape; + default: + return PrintAsCharLiteralTo(c, os); + } +} + +// Prints a char c as if it's part of a string literal, escaping it when +// necessary; returns how c was formatted. +static CharFormat PrintAsStringLiteralTo(char c, ostream* os) { + return PrintAsStringLiteralTo( + static_cast(static_cast(c)), os); +} + +// Prints a wide or narrow character c and its code. '\0' is printed +// as "'\\0'", other unprintable characters are also properly escaped +// using the standard C++ escape sequence. The template argument +// UnsignedChar is the unsigned version of Char, which is the type of c. +template +void PrintCharAndCodeTo(Char c, ostream* os) { + // First, print c as a literal in the most readable form we can find. + *os << ((sizeof(c) > 1) ? "L'" : "'"); + const CharFormat format = PrintAsCharLiteralTo(c, os); + *os << "'"; + + // To aid user debugging, we also print c's code in decimal, unless + // it's 0 (in which case c was printed as '\\0', making the code + // obvious). + if (c == 0) + return; + *os << " (" << static_cast(c); + + // For more convenience, we print c's code again in hexadecimal, + // unless c was already printed in the form '\x##' or the code is in + // [1, 9]. + if (format == kHexEscape || (1 <= c && c <= 9)) { + // Do nothing. + } else { + *os << ", 0x" << String::FormatHexInt(static_cast(c)); + } + *os << ")"; +} + +void PrintTo(unsigned char c, ::std::ostream* os) { + PrintCharAndCodeTo(c, os); +} +void PrintTo(signed char c, ::std::ostream* os) { + PrintCharAndCodeTo(c, os); +} + +// Prints a wchar_t as a symbol if it is printable or as its internal +// code otherwise and also as its code. L'\0' is printed as "L'\\0'". +void PrintTo(wchar_t wc, ostream* os) { + PrintCharAndCodeTo(wc, os); +} + +// Prints the given array of characters to the ostream. CharType must be either +// char or wchar_t. +// The array starts at begin, the length is len, it may include '\0' characters +// and may not be NUL-terminated. +template +GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +static CharFormat PrintCharsAsStringTo( + const CharType* begin, size_t len, ostream* os) { + const char* const kQuoteBegin = sizeof(CharType) == 1 ? "\"" : "L\""; + *os << kQuoteBegin; + bool is_previous_hex = false; + CharFormat print_format = kAsIs; + for (size_t index = 0; index < len; ++index) { + const CharType cur = begin[index]; + if (is_previous_hex && IsXDigit(cur)) { + // Previous character is of '\x..' form and this character can be + // interpreted as another hexadecimal digit in its number. Break string to + // disambiguate. + *os << "\" " << kQuoteBegin; + } + is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape; + // Remember if any characters required hex escaping. + if (is_previous_hex) { + print_format = kHexEscape; + } + } + *os << "\""; + return print_format; +} + +// Prints a (const) char/wchar_t array of 'len' elements, starting at address +// 'begin'. CharType must be either char or wchar_t. +template +GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +static void UniversalPrintCharArray( + const CharType* begin, size_t len, ostream* os) { + // The code + // const char kFoo[] = "foo"; + // generates an array of 4, not 3, elements, with the last one being '\0'. + // + // Therefore when printing a char array, we don't print the last element if + // it's '\0', such that the output matches the string literal as it's + // written in the source code. + if (len > 0 && begin[len - 1] == '\0') { + PrintCharsAsStringTo(begin, len - 1, os); + return; + } + + // If, however, the last element in the array is not '\0', e.g. + // const char kFoo[] = { 'f', 'o', 'o' }; + // we must print the entire array. We also print a message to indicate + // that the array is not NUL-terminated. + PrintCharsAsStringTo(begin, len, os); + *os << " (no terminating NUL)"; +} + +// Prints a (const) char array of 'len' elements, starting at address 'begin'. +void UniversalPrintArray(const char* begin, size_t len, ostream* os) { + UniversalPrintCharArray(begin, len, os); +} + +// Prints a (const) wchar_t array of 'len' elements, starting at address +// 'begin'. +void UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) { + UniversalPrintCharArray(begin, len, os); +} + +// Prints the given C string to the ostream. +void PrintTo(const char* s, ostream* os) { + if (s == nullptr) { + *os << "NULL"; + } else { + *os << ImplicitCast_(s) << " pointing to "; + PrintCharsAsStringTo(s, strlen(s), os); + } +} + +// MSVC compiler can be configured to define whar_t as a typedef +// of unsigned short. Defining an overload for const wchar_t* in that case +// would cause pointers to unsigned shorts be printed as wide strings, +// possibly accessing more memory than intended and causing invalid +// memory accesses. MSVC defines _NATIVE_WCHAR_T_DEFINED symbol when +// wchar_t is implemented as a native type. +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) +// Prints the given wide C string to the ostream. +void PrintTo(const wchar_t* s, ostream* os) { + if (s == nullptr) { + *os << "NULL"; + } else { + *os << ImplicitCast_(s) << " pointing to "; + PrintCharsAsStringTo(s, wcslen(s), os); + } +} +#endif // wchar_t is native + +namespace { + +bool ContainsUnprintableControlCodes(const char* str, size_t length) { + const unsigned char *s = reinterpret_cast(str); + + for (size_t i = 0; i < length; i++) { + unsigned char ch = *s++; + if (std::iscntrl(ch)) { + switch (ch) { + case '\t': + case '\n': + case '\r': + break; + default: + return true; + } + } + } + return false; +} + +bool IsUTF8TrailByte(unsigned char t) { return 0x80 <= t && t<= 0xbf; } + +bool IsValidUTF8(const char* str, size_t length) { + const unsigned char *s = reinterpret_cast(str); + + for (size_t i = 0; i < length;) { + unsigned char lead = s[i++]; + + if (lead <= 0x7f) { + continue; // single-byte character (ASCII) 0..7F + } + if (lead < 0xc2) { + return false; // trail byte or non-shortest form + } else if (lead <= 0xdf && (i + 1) <= length && IsUTF8TrailByte(s[i])) { + ++i; // 2-byte character + } else if (0xe0 <= lead && lead <= 0xef && (i + 2) <= length && + IsUTF8TrailByte(s[i]) && + IsUTF8TrailByte(s[i + 1]) && + // check for non-shortest form and surrogate + (lead != 0xe0 || s[i] >= 0xa0) && + (lead != 0xed || s[i] < 0xa0)) { + i += 2; // 3-byte character + } else if (0xf0 <= lead && lead <= 0xf4 && (i + 3) <= length && + IsUTF8TrailByte(s[i]) && + IsUTF8TrailByte(s[i + 1]) && + IsUTF8TrailByte(s[i + 2]) && + // check for non-shortest form + (lead != 0xf0 || s[i] >= 0x90) && + (lead != 0xf4 || s[i] < 0x90)) { + i += 3; // 4-byte character + } else { + return false; + } + } + return true; +} + +void ConditionalPrintAsText(const char* str, size_t length, ostream* os) { + if (!ContainsUnprintableControlCodes(str, length) && + IsValidUTF8(str, length)) { + *os << "\n As Text: \"" << str << "\""; + } +} + +} // anonymous namespace + +void PrintStringTo(const ::std::string& s, ostream* os) { + if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) { + if (GTEST_FLAG(print_utf8)) { + ConditionalPrintAsText(s.data(), s.size(), os); + } + } +} + +#if GTEST_HAS_STD_WSTRING +void PrintWideStringTo(const ::std::wstring& s, ostream* os) { + PrintCharsAsStringTo(s.data(), s.size(), os); +} +#endif // GTEST_HAS_STD_WSTRING + +} // namespace internal + +} // namespace testing +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// The Google C++ Testing and Mocking Framework (Google Test) + + +namespace testing { + +using internal::GetUnitTestImpl; + +// Gets the summary of the failure message by omitting the stack trace +// in it. +std::string TestPartResult::ExtractSummary(const char* message) { + const char* const stack_trace = strstr(message, internal::kStackTraceMarker); + return stack_trace == nullptr ? message : std::string(message, stack_trace); +} + +// Prints a TestPartResult object. +std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { + return os << result.file_name() << ":" << result.line_number() << ": " + << (result.type() == TestPartResult::kSuccess + ? "Success" + : result.type() == TestPartResult::kSkip + ? "Skipped" + : result.type() == TestPartResult::kFatalFailure + ? "Fatal failure" + : "Non-fatal failure") + << ":\n" + << result.message() << std::endl; +} + +// Appends a TestPartResult to the array. +void TestPartResultArray::Append(const TestPartResult& result) { + array_.push_back(result); +} + +// Returns the TestPartResult at the given index (0-based). +const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const { + if (index < 0 || index >= size()) { + printf("\nInvalid index (%d) into TestPartResultArray.\n", index); + internal::posix::Abort(); + } + + return array_[static_cast(index)]; +} + +// Returns the number of TestPartResult objects in the array. +int TestPartResultArray::size() const { + return static_cast(array_.size()); +} + +namespace internal { + +HasNewFatalFailureHelper::HasNewFatalFailureHelper() + : has_new_fatal_failure_(false), + original_reporter_(GetUnitTestImpl()-> + GetTestPartResultReporterForCurrentThread()) { + GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this); +} + +HasNewFatalFailureHelper::~HasNewFatalFailureHelper() { + GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread( + original_reporter_); +} + +void HasNewFatalFailureHelper::ReportTestPartResult( + const TestPartResult& result) { + if (result.fatally_failed()) + has_new_fatal_failure_ = true; + original_reporter_->ReportTestPartResult(result); +} + +} // namespace internal + +} // namespace testing +// Copyright 2008 Google Inc. +// All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + +namespace testing { +namespace internal { + +#if GTEST_HAS_TYPED_TEST_P + +// Skips to the first non-space char in str. Returns an empty string if str +// contains only whitespace characters. +static const char* SkipSpaces(const char* str) { + while (IsSpace(*str)) + str++; + return str; +} + +static std::vector SplitIntoTestNames(const char* src) { + std::vector name_vec; + src = SkipSpaces(src); + for (; src != nullptr; src = SkipComma(src)) { + name_vec.push_back(StripTrailingSpaces(GetPrefixUntilComma(src))); + } + return name_vec; +} + +// Verifies that registered_tests match the test names in +// registered_tests_; returns registered_tests if successful, or +// aborts the program otherwise. +const char* TypedTestSuitePState::VerifyRegisteredTestNames( + const char* file, int line, const char* registered_tests) { + typedef RegisteredTestsMap::const_iterator RegisteredTestIter; + registered_ = true; + + std::vector name_vec = SplitIntoTestNames(registered_tests); + + Message errors; + + std::set tests; + for (std::vector::const_iterator name_it = name_vec.begin(); + name_it != name_vec.end(); ++name_it) { + const std::string& name = *name_it; + if (tests.count(name) != 0) { + errors << "Test " << name << " is listed more than once.\n"; + continue; + } + + bool found = false; + for (RegisteredTestIter it = registered_tests_.begin(); + it != registered_tests_.end(); + ++it) { + if (name == it->first) { + found = true; + break; + } + } + + if (found) { + tests.insert(name); + } else { + errors << "No test named " << name + << " can be found in this test suite.\n"; + } + } + + for (RegisteredTestIter it = registered_tests_.begin(); + it != registered_tests_.end(); + ++it) { + if (tests.count(it->first) == 0) { + errors << "You forgot to list test " << it->first << ".\n"; + } + } + + const std::string& errors_str = errors.GetString(); + if (errors_str != "") { + fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), + errors_str.c_str()); + fflush(stderr); + posix::Abort(); + } + + return registered_tests; +} + +#endif // GTEST_HAS_TYPED_TEST_P + +} // namespace internal +} // namespace testing diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest.h b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest.h new file mode 100644 index 00000000..844c9b7c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/gtest/gtest.h @@ -0,0 +1,14916 @@ +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file defines the public API for Google Test. It should be +// included by any test program that uses Google Test. +// +// IMPORTANT NOTE: Due to limitation of the C++ language, we have to +// leave some internal implementation details in this header file. +// They are clearly marked by comments like this: +// +// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +// +// Such code is NOT meant to be used by a user directly, and is subject +// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user +// program! +// +// Acknowledgment: Google Test borrowed the idea of automatic test +// registration from Barthelemy Dagenais' (barthelemy@prologique.com) +// easyUnit framework. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_H_ +#define GTEST_INCLUDE_GTEST_GTEST_H_ + +#include +#include +#include +#include +#include +#include + +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file declares functions and macros used internally by +// Google Test. They are subject to change without notice. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ + +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Low-level types and utilities for porting Google Test to various +// platforms. All macros ending with _ and symbols defined in an +// internal namespace are subject to change without notice. Code +// outside Google Test MUST NOT USE THEM DIRECTLY. Macros that don't +// end with _ are part of Google Test's public API and can be used by +// code outside Google Test. +// +// This file is fundamental to Google Test. All other Google Test source +// files are expected to #include this. Therefore, it cannot #include +// any other Google Test header. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ + +// Environment-describing macros +// ----------------------------- +// +// Google Test can be used in many different environments. Macros in +// this section tell Google Test what kind of environment it is being +// used in, such that Google Test can provide environment-specific +// features and implementations. +// +// Google Test tries to automatically detect the properties of its +// environment, so users usually don't need to worry about these +// macros. However, the automatic detection is not perfect. +// Sometimes it's necessary for a user to define some of the following +// macros in the build script to override Google Test's decisions. +// +// If the user doesn't define a macro in the list, Google Test will +// provide a default definition. After this header is #included, all +// macros in this list will be defined to either 1 or 0. +// +// Notes to maintainers: +// - Each macro here is a user-tweakable knob; do not grow the list +// lightly. +// - Use #if to key off these macros. Don't use #ifdef or "#if +// defined(...)", which will not work as these macros are ALWAYS +// defined. +// +// GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2) +// is/isn't available. +// GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions +// are enabled. +// GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular +// expressions are/aren't available. +// GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that +// is/isn't available. +// GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't +// enabled. +// GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that +// std::wstring does/doesn't work (Google Test can +// be used where std::wstring is unavailable). +// GTEST_HAS_SEH - Define it to 1/0 to indicate whether the +// compiler supports Microsoft's "Structured +// Exception Handling". +// GTEST_HAS_STREAM_REDIRECTION +// - Define it to 1/0 to indicate whether the +// platform supports I/O stream redirection using +// dup() and dup2(). +// GTEST_LINKED_AS_SHARED_LIBRARY +// - Define to 1 when compiling tests that use +// Google Test as a shared library (known as +// DLL on Windows). +// GTEST_CREATE_SHARED_LIBRARY +// - Define to 1 when compiling Google Test itself +// as a shared library. +// GTEST_DEFAULT_DEATH_TEST_STYLE +// - The default value of --gtest_death_test_style. +// The legacy default has been "fast" in the open +// source version since 2008. The recommended value +// is "threadsafe", and can be set in +// custom/gtest-port.h. + +// Platform-indicating macros +// -------------------------- +// +// Macros indicating the platform on which Google Test is being used +// (a macro is defined to 1 if compiled on the given platform; +// otherwise UNDEFINED -- it's never defined to 0.). Google Test +// defines these macros automatically. Code outside Google Test MUST +// NOT define them. +// +// GTEST_OS_AIX - IBM AIX +// GTEST_OS_CYGWIN - Cygwin +// GTEST_OS_DRAGONFLY - DragonFlyBSD +// GTEST_OS_FREEBSD - FreeBSD +// GTEST_OS_FUCHSIA - Fuchsia +// GTEST_OS_GNU_KFREEBSD - GNU/kFreeBSD +// GTEST_OS_HAIKU - Haiku +// GTEST_OS_HPUX - HP-UX +// GTEST_OS_LINUX - Linux +// GTEST_OS_LINUX_ANDROID - Google Android +// GTEST_OS_MAC - Mac OS X +// GTEST_OS_IOS - iOS +// GTEST_OS_NACL - Google Native Client (NaCl) +// GTEST_OS_NETBSD - NetBSD +// GTEST_OS_OPENBSD - OpenBSD +// GTEST_OS_OS2 - OS/2 +// GTEST_OS_QNX - QNX +// GTEST_OS_SOLARIS - Sun Solaris +// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile) +// GTEST_OS_WINDOWS_DESKTOP - Windows Desktop +// GTEST_OS_WINDOWS_MINGW - MinGW +// GTEST_OS_WINDOWS_MOBILE - Windows Mobile +// GTEST_OS_WINDOWS_PHONE - Windows Phone +// GTEST_OS_WINDOWS_RT - Windows Store App/WinRT +// GTEST_OS_ZOS - z/OS +// +// Among the platforms, Cygwin, Linux, Mac OS X, and Windows have the +// most stable support. Since core members of the Google Test project +// don't have access to other platforms, support for them may be less +// stable. If you notice any problems on your platform, please notify +// googletestframework@googlegroups.com (patches for fixing them are +// even more welcome!). +// +// It is possible that none of the GTEST_OS_* macros are defined. + +// Feature-indicating macros +// ------------------------- +// +// Macros indicating which Google Test features are available (a macro +// is defined to 1 if the corresponding feature is supported; +// otherwise UNDEFINED -- it's never defined to 0.). Google Test +// defines these macros automatically. Code outside Google Test MUST +// NOT define them. +// +// These macros are public so that portable tests can be written. +// Such tests typically surround code using a feature with an #if +// which controls that code. For example: +// +// #if GTEST_HAS_DEATH_TEST +// EXPECT_DEATH(DoSomethingDeadly()); +// #endif +// +// GTEST_HAS_DEATH_TEST - death tests +// GTEST_HAS_TYPED_TEST - typed tests +// GTEST_HAS_TYPED_TEST_P - type-parameterized tests +// GTEST_IS_THREADSAFE - Google Test is thread-safe. +// GOOGLETEST_CM0007 DO NOT DELETE +// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with +// GTEST_HAS_POSIX_RE (see above) which users can +// define themselves. +// GTEST_USES_SIMPLE_RE - our own simple regex is used; +// the above RE\b(s) are mutually exclusive. + +// Misc public macros +// ------------------ +// +// GTEST_FLAG(flag_name) - references the variable corresponding to +// the given Google Test flag. + +// Internal utilities +// ------------------ +// +// The following macros and utilities are for Google Test's INTERNAL +// use only. Code outside Google Test MUST NOT USE THEM DIRECTLY. +// +// Macros for basic C++ coding: +// GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning. +// GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a +// variable don't have to be used. +// GTEST_DISALLOW_ASSIGN_ - disables operator=. +// GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=. +// GTEST_MUST_USE_RESULT_ - declares that a function's result must be used. +// GTEST_INTENTIONAL_CONST_COND_PUSH_ - start code section where MSVC C4127 is +// suppressed (constant conditional). +// GTEST_INTENTIONAL_CONST_COND_POP_ - finish code section where MSVC C4127 +// is suppressed. +// +// Synchronization: +// Mutex, MutexLock, ThreadLocal, GetThreadCount() +// - synchronization primitives. +// +// Template meta programming: +// IteratorTraits - partial implementation of std::iterator_traits, which +// is not available in libCstd when compiled with Sun C++. +// +// +// Regular expressions: +// RE - a simple regular expression class using the POSIX +// Extended Regular Expression syntax on UNIX-like platforms +// GOOGLETEST_CM0008 DO NOT DELETE +// or a reduced regular exception syntax on other +// platforms, including Windows. +// Logging: +// GTEST_LOG_() - logs messages at the specified severity level. +// LogToStderr() - directs all log messages to stderr. +// FlushInfoLog() - flushes informational log messages. +// +// Stdout and stderr capturing: +// CaptureStdout() - starts capturing stdout. +// GetCapturedStdout() - stops capturing stdout and returns the captured +// string. +// CaptureStderr() - starts capturing stderr. +// GetCapturedStderr() - stops capturing stderr and returns the captured +// string. +// +// Integer types: +// TypeWithSize - maps an integer to a int type. +// Int32, UInt32, Int64, UInt64, TimeInMillis +// - integers of known sizes. +// BiggestInt - the biggest signed integer type. +// +// Command-line utilities: +// GTEST_DECLARE_*() - declares a flag. +// GTEST_DEFINE_*() - defines a flag. +// GetInjectableArgvs() - returns the command line as a vector of strings. +// +// Environment variable utilities: +// GetEnv() - gets the value of an environment variable. +// BoolFromGTestEnv() - parses a bool environment variable. +// Int32FromGTestEnv() - parses an Int32 environment variable. +// StringFromGTestEnv() - parses a string environment variable. +// +// Deprecation warnings: +// GTEST_INTERNAL_DEPRECATED(message) - attribute marking a function as +// deprecated; calling a marked function +// should generate a compiler warning + +#include // for isspace, etc +#include // for ptrdiff_t +#include +#include +#include +#include +#include + +#ifndef _WIN32_WCE +# include +# include +#endif // !_WIN32_WCE + +#if defined __APPLE__ +# include +# include +#endif + +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include +#include +#include // NOLINT + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file defines the GTEST_OS_* macro. +// It is separate from gtest-port.h so that custom/gtest-port.h can include it. + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ + +// Determines the platform on which Google Test is compiled. +#ifdef __CYGWIN__ +# define GTEST_OS_CYGWIN 1 +# elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__) +# define GTEST_OS_WINDOWS_MINGW 1 +# define GTEST_OS_WINDOWS 1 +#elif defined _WIN32 +# define GTEST_OS_WINDOWS 1 +# ifdef _WIN32_WCE +# define GTEST_OS_WINDOWS_MOBILE 1 +# elif defined(WINAPI_FAMILY) +# include +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# define GTEST_OS_WINDOWS_DESKTOP 1 +# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP) +# define GTEST_OS_WINDOWS_PHONE 1 +# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) +# define GTEST_OS_WINDOWS_RT 1 +# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE) +# define GTEST_OS_WINDOWS_PHONE 1 +# define GTEST_OS_WINDOWS_TV_TITLE 1 +# else + // WINAPI_FAMILY defined but no known partition matched. + // Default to desktop. +# define GTEST_OS_WINDOWS_DESKTOP 1 +# endif +# else +# define GTEST_OS_WINDOWS_DESKTOP 1 +# endif // _WIN32_WCE +#elif defined __OS2__ +# define GTEST_OS_OS2 1 +#elif defined __APPLE__ +# define GTEST_OS_MAC 1 +# if TARGET_OS_IPHONE +# define GTEST_OS_IOS 1 +# endif +#elif defined __DragonFly__ +# define GTEST_OS_DRAGONFLY 1 +#elif defined __FreeBSD__ +# define GTEST_OS_FREEBSD 1 +#elif defined __Fuchsia__ +# define GTEST_OS_FUCHSIA 1 +#elif defined(__GLIBC__) && defined(__FreeBSD_kernel__) +# define GTEST_OS_GNU_KFREEBSD 1 +#elif defined __linux__ +# define GTEST_OS_LINUX 1 +# if defined __ANDROID__ +# define GTEST_OS_LINUX_ANDROID 1 +# endif +#elif defined __MVS__ +# define GTEST_OS_ZOS 1 +#elif defined(__sun) && defined(__SVR4) +# define GTEST_OS_SOLARIS 1 +#elif defined(_AIX) +# define GTEST_OS_AIX 1 +#elif defined(__hpux) +# define GTEST_OS_HPUX 1 +#elif defined __native_client__ +# define GTEST_OS_NACL 1 +#elif defined __NetBSD__ +# define GTEST_OS_NETBSD 1 +#elif defined __OpenBSD__ +# define GTEST_OS_OPENBSD 1 +#elif defined __QNX__ +# define GTEST_OS_QNX 1 +#elif defined(__HAIKU__) +#define GTEST_OS_HAIKU 1 +#endif // __CYGWIN__ + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Injection point for custom user configurations. See README for details +// +// ** Custom implementation starts here ** + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ + +#if !defined(GTEST_DEV_EMAIL_) +# define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com" +# define GTEST_FLAG_PREFIX_ "gtest_" +# define GTEST_FLAG_PREFIX_DASH_ "gtest-" +# define GTEST_FLAG_PREFIX_UPPER_ "GTEST_" +# define GTEST_NAME_ "Google Test" +# define GTEST_PROJECT_URL_ "https://github.com/google/googletest/" +#endif // !defined(GTEST_DEV_EMAIL_) + +#if !defined(GTEST_INIT_GOOGLE_TEST_NAME_) +# define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest" +#endif // !defined(GTEST_INIT_GOOGLE_TEST_NAME_) + +// Determines the version of gcc that is used to compile this. +#ifdef __GNUC__ +// 40302 means version 4.3.2. +# define GTEST_GCC_VER_ \ + (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) +#endif // __GNUC__ + +// Macros for disabling Microsoft Visual C++ warnings. +// +// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385) +// /* code that triggers warnings C4800 and C4385 */ +// GTEST_DISABLE_MSC_WARNINGS_POP_() +#if defined(_MSC_VER) +# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \ + __pragma(warning(push)) \ + __pragma(warning(disable: warnings)) +# define GTEST_DISABLE_MSC_WARNINGS_POP_() \ + __pragma(warning(pop)) +#else +// Not all compilers are MSVC +# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) +# define GTEST_DISABLE_MSC_WARNINGS_POP_() +#endif + +// Clang on Windows does not understand MSVC's pragma warning. +// We need clang-specific way to disable function deprecation warning. +#ifdef __clang__ +# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"") +#define GTEST_DISABLE_MSC_DEPRECATED_POP_() \ + _Pragma("clang diagnostic pop") +#else +# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \ + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996) +# define GTEST_DISABLE_MSC_DEPRECATED_POP_() \ + GTEST_DISABLE_MSC_WARNINGS_POP_() +#endif + +// Brings in definitions for functions used in the testing::internal::posix +// namespace (read, write, close, chdir, isatty, stat). We do not currently +// use them on Windows Mobile. +#if GTEST_OS_WINDOWS +# if !GTEST_OS_WINDOWS_MOBILE +# include +# include +# endif +// In order to avoid having to include , use forward declaration +#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR) +// MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two +// separate (equivalent) structs, instead of using typedef +typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION; +#else +// Assume CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION. +// This assumption is verified by +// WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION. +typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; +#endif +#else +// This assumes that non-Windows OSes provide unistd.h. For OSes where this +// is not the case, we need to include headers that provide the functions +// mentioned above. +# include +# include +#endif // GTEST_OS_WINDOWS + +#if GTEST_OS_LINUX_ANDROID +// Used to define __ANDROID_API__ matching the target NDK API level. +# include // NOLINT +#endif + +// Defines this to true iff Google Test can use POSIX regular expressions. +#ifndef GTEST_HAS_POSIX_RE +# if GTEST_OS_LINUX_ANDROID +// On Android, is only available starting with Gingerbread. +# define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9) +# else +# define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS) +# endif +#endif + +#if GTEST_USES_PCRE +// The appropriate headers have already been included. + +#elif GTEST_HAS_POSIX_RE + +// On some platforms, needs someone to define size_t, and +// won't compile otherwise. We can #include it here as we already +// included , which is guaranteed to define size_t through +// . +# include // NOLINT + +# define GTEST_USES_POSIX_RE 1 + +#elif GTEST_OS_WINDOWS + +// is not available on Windows. Use our own simple regex +// implementation instead. +# define GTEST_USES_SIMPLE_RE 1 + +#else + +// may not be available on this platform. Use our own +// simple regex implementation instead. +# define GTEST_USES_SIMPLE_RE 1 + +#endif // GTEST_USES_PCRE + +#ifndef GTEST_HAS_EXCEPTIONS +// The user didn't tell us whether exceptions are enabled, so we need +// to figure it out. +# if defined(_MSC_VER) && defined(_CPPUNWIND) +// MSVC defines _CPPUNWIND to 1 iff exceptions are enabled. +# define GTEST_HAS_EXCEPTIONS 1 +# elif defined(__BORLANDC__) +// C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS +// macro to enable exceptions, so we'll do the same. +// Assumes that exceptions are enabled by default. +# ifndef _HAS_EXCEPTIONS +# define _HAS_EXCEPTIONS 1 +# endif // _HAS_EXCEPTIONS +# define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS +# elif defined(__clang__) +// clang defines __EXCEPTIONS iff exceptions are enabled before clang 220714, +// but iff cleanups are enabled after that. In Obj-C++ files, there can be +// cleanups for ObjC exceptions which also need cleanups, even if C++ exceptions +// are disabled. clang has __has_feature(cxx_exceptions) which checks for C++ +// exceptions starting at clang r206352, but which checked for cleanups prior to +// that. To reliably check for C++ exception availability with clang, check for +// __EXCEPTIONS && __has_feature(cxx_exceptions). +# define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions)) +# elif defined(__GNUC__) && __EXCEPTIONS +// gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. +# define GTEST_HAS_EXCEPTIONS 1 +# elif defined(__SUNPRO_CC) +// Sun Pro CC supports exceptions. However, there is no compile-time way of +// detecting whether they are enabled or not. Therefore, we assume that +// they are enabled unless the user tells us otherwise. +# define GTEST_HAS_EXCEPTIONS 1 +# elif defined(__IBMCPP__) && __EXCEPTIONS +// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled. +# define GTEST_HAS_EXCEPTIONS 1 +# elif defined(__HP_aCC) +// Exception handling is in effect by default in HP aCC compiler. It has to +// be turned of by +noeh compiler option if desired. +# define GTEST_HAS_EXCEPTIONS 1 +# else +// For other compilers, we assume exceptions are disabled to be +// conservative. +# define GTEST_HAS_EXCEPTIONS 0 +# endif // defined(_MSC_VER) || defined(__BORLANDC__) +#endif // GTEST_HAS_EXCEPTIONS + +#if !defined(GTEST_HAS_STD_STRING) +// Even though we don't use this macro any longer, we keep it in case +// some clients still depend on it. +# define GTEST_HAS_STD_STRING 1 +#elif !GTEST_HAS_STD_STRING +// The user told us that ::std::string isn't available. +# error "::std::string isn't available." +#endif // !defined(GTEST_HAS_STD_STRING) + +#ifndef GTEST_HAS_STD_WSTRING +// The user didn't tell us whether ::std::wstring is available, so we need +// to figure it out. +// Cygwin 1.7 and below doesn't support ::std::wstring. +// Solaris' libc++ doesn't support it either. Android has +// no support for it at least as recent as Froyo (2.2). +#define GTEST_HAS_STD_WSTRING \ + (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ + GTEST_OS_HAIKU)) + +#endif // GTEST_HAS_STD_WSTRING + +// Determines whether RTTI is available. +#ifndef GTEST_HAS_RTTI +// The user didn't tell us whether RTTI is enabled, so we need to +// figure it out. + +# ifdef _MSC_VER + +# ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. +# define GTEST_HAS_RTTI 1 +# else +# define GTEST_HAS_RTTI 0 +# endif + +// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. +# elif defined(__GNUC__) + +# ifdef __GXX_RTTI +// When building against STLport with the Android NDK and with +// -frtti -fno-exceptions, the build fails at link time with undefined +// references to __cxa_bad_typeid. Note sure if STL or toolchain bug, +// so disable RTTI when detected. +# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \ + !defined(__EXCEPTIONS) +# define GTEST_HAS_RTTI 0 +# else +# define GTEST_HAS_RTTI 1 +# endif // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS +# else +# define GTEST_HAS_RTTI 0 +# endif // __GXX_RTTI + +// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends +// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the +// first version with C++ support. +# elif defined(__clang__) + +# define GTEST_HAS_RTTI __has_feature(cxx_rtti) + +// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if +// both the typeid and dynamic_cast features are present. +# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) + +# ifdef __RTTI_ALL__ +# define GTEST_HAS_RTTI 1 +# else +# define GTEST_HAS_RTTI 0 +# endif + +# else + +// For all other compilers, we assume RTTI is enabled. +# define GTEST_HAS_RTTI 1 + +# endif // _MSC_VER + +#endif // GTEST_HAS_RTTI + +// It's this header's responsibility to #include when RTTI +// is enabled. +#if GTEST_HAS_RTTI +# include +#endif + +// Determines whether Google Test can use the pthreads library. +#ifndef GTEST_HAS_PTHREAD +// The user didn't tell us explicitly, so we make reasonable assumptions about +// which platforms have pthreads support. +// +// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0 +// to your compiler flags. +#define GTEST_HAS_PTHREAD \ + (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX || \ + GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \ + GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_OPENBSD || \ + GTEST_OS_HAIKU) +#endif // GTEST_HAS_PTHREAD + +#if GTEST_HAS_PTHREAD +// gtest-port.h guarantees to #include when GTEST_HAS_PTHREAD is +// true. +# include // NOLINT + +// For timespec and nanosleep, used below. +# include // NOLINT +#endif + +// Determines whether clone(2) is supported. +// Usually it will only be available on Linux, excluding +// Linux on the Itanium architecture. +// Also see http://linux.die.net/man/2/clone. +#ifndef GTEST_HAS_CLONE +// The user didn't tell us, so we need to figure it out. + +# if GTEST_OS_LINUX && !defined(__ia64__) +# if GTEST_OS_LINUX_ANDROID +// On Android, clone() became available at different API levels for each 32-bit +// architecture. +# if defined(__LP64__) || \ + (defined(__arm__) && __ANDROID_API__ >= 9) || \ + (defined(__mips__) && __ANDROID_API__ >= 12) || \ + (defined(__i386__) && __ANDROID_API__ >= 17) +# define GTEST_HAS_CLONE 1 +# else +# define GTEST_HAS_CLONE 0 +# endif +# else +# define GTEST_HAS_CLONE 1 +# endif +# else +# define GTEST_HAS_CLONE 0 +# endif // GTEST_OS_LINUX && !defined(__ia64__) + +#endif // GTEST_HAS_CLONE + +// Determines whether to support stream redirection. This is used to test +// output correctness and to implement death tests. +#ifndef GTEST_HAS_STREAM_REDIRECTION +// By default, we assume that stream redirection is supported on all +// platforms except known mobile ones. +# if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT +# define GTEST_HAS_STREAM_REDIRECTION 0 +# else +# define GTEST_HAS_STREAM_REDIRECTION 1 +# endif // !GTEST_OS_WINDOWS_MOBILE +#endif // GTEST_HAS_STREAM_REDIRECTION + +// Determines whether to support death tests. +// pops up a dialog window that cannot be suppressed programmatically. +#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ + (GTEST_OS_MAC && !GTEST_OS_IOS) || \ + (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) || GTEST_OS_WINDOWS_MINGW || \ + GTEST_OS_AIX || GTEST_OS_HPUX || GTEST_OS_OPENBSD || GTEST_OS_QNX || \ + GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \ + GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_HAIKU) +# define GTEST_HAS_DEATH_TEST 1 +#endif + +// Determines whether to support type-driven tests. + +// Typed tests need and variadic macros, which GCC, VC++ 8.0, +// Sun Pro CC, IBM Visual Age, and HP aCC support. +#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \ + defined(__IBMCPP__) || defined(__HP_aCC) +# define GTEST_HAS_TYPED_TEST 1 +# define GTEST_HAS_TYPED_TEST_P 1 +#endif + +// Determines whether the system compiler uses UTF-16 for encoding wide strings. +#define GTEST_WIDE_STRING_USES_UTF16_ \ + (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2) + +// Determines whether test results can be streamed to a socket. +#if GTEST_OS_LINUX || GTEST_OS_GNU_KFREEBSD || GTEST_OS_DRAGONFLY || \ + GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_OPENBSD +# define GTEST_CAN_STREAM_RESULTS_ 1 +#endif + +// Defines some utility macros. + +// The GNU compiler emits a warning if nested "if" statements are followed by +// an "else" statement and braces are not used to explicitly disambiguate the +// "else" binding. This leads to problems with code like: +// +// if (gate) +// ASSERT_*(condition) << "Some message"; +// +// The "switch (0) case 0:" idiom is used to suppress this. +#ifdef __INTEL_COMPILER +# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ +#else +# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT +#endif + +// Use this annotation at the end of a struct/class definition to +// prevent the compiler from optimizing away instances that are never +// used. This is useful when all interesting logic happens inside the +// c'tor and / or d'tor. Example: +// +// struct Foo { +// Foo() { ... } +// } GTEST_ATTRIBUTE_UNUSED_; +// +// Also use it after a variable or parameter declaration to tell the +// compiler the variable/parameter does not have to be used. +#if defined(__GNUC__) && !defined(COMPILER_ICC) +# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) +#elif defined(__clang__) +# if __has_attribute(unused) +# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) +# endif +#endif +#ifndef GTEST_ATTRIBUTE_UNUSED_ +# define GTEST_ATTRIBUTE_UNUSED_ +#endif + +// Use this annotation before a function that takes a printf format string. +#if (defined(__GNUC__) || defined(__clang__)) && !defined(COMPILER_ICC) +# if defined(__MINGW_PRINTF_FORMAT) +// MinGW has two different printf implementations. Ensure the format macro +// matches the selected implementation. See +// https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/. +# define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \ + __attribute__((__format__(__MINGW_PRINTF_FORMAT, string_index, \ + first_to_check))) +# else +# define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \ + __attribute__((__format__(__printf__, string_index, first_to_check))) +# endif +#else +# define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) +#endif + + +// A macro to disallow operator= +// This should be used in the private: declarations for a class. +#define GTEST_DISALLOW_ASSIGN_(type) \ + void operator=(type const &) = delete + +// A macro to disallow copy constructor and operator= +// This should be used in the private: declarations for a class. +#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \ + type(type const &) = delete; \ + GTEST_DISALLOW_ASSIGN_(type) + +// Tell the compiler to warn about unused return values for functions declared +// with this macro. The macro should be used on function declarations +// following the argument list: +// +// Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_; +#if defined(__GNUC__) && !defined(COMPILER_ICC) +# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result)) +#else +# define GTEST_MUST_USE_RESULT_ +#endif // __GNUC__ && !COMPILER_ICC + +// MS C++ compiler emits warning when a conditional expression is compile time +// constant. In some contexts this warning is false positive and needs to be +// suppressed. Use the following two macros in such cases: +// +// GTEST_INTENTIONAL_CONST_COND_PUSH_() +// while (true) { +// GTEST_INTENTIONAL_CONST_COND_POP_() +// } +# define GTEST_INTENTIONAL_CONST_COND_PUSH_() \ + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127) +# define GTEST_INTENTIONAL_CONST_COND_POP_() \ + GTEST_DISABLE_MSC_WARNINGS_POP_() + +// Determine whether the compiler supports Microsoft's Structured Exception +// Handling. This is supported by several Windows compilers but generally +// does not exist on any other system. +#ifndef GTEST_HAS_SEH +// The user didn't tell us, so we need to figure it out. + +# if defined(_MSC_VER) || defined(__BORLANDC__) +// These two compilers are known to support SEH. +# define GTEST_HAS_SEH 1 +# else +// Assume no SEH. +# define GTEST_HAS_SEH 0 +# endif + +#endif // GTEST_HAS_SEH + +#ifndef GTEST_IS_THREADSAFE + +#define GTEST_IS_THREADSAFE \ + (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ || \ + (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \ + GTEST_HAS_PTHREAD) + +#endif // GTEST_IS_THREADSAFE + +// GTEST_API_ qualifies all symbols that must be exported. The definitions below +// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in +// gtest/internal/custom/gtest-port.h +#ifndef GTEST_API_ + +#ifdef _MSC_VER +# if GTEST_LINKED_AS_SHARED_LIBRARY +# define GTEST_API_ __declspec(dllimport) +# elif GTEST_CREATE_SHARED_LIBRARY +# define GTEST_API_ __declspec(dllexport) +# endif +#elif __GNUC__ >= 4 || defined(__clang__) +# define GTEST_API_ __attribute__((visibility ("default"))) +#endif // _MSC_VER + +#endif // GTEST_API_ + +#ifndef GTEST_API_ +# define GTEST_API_ +#endif // GTEST_API_ + +#ifndef GTEST_DEFAULT_DEATH_TEST_STYLE +# define GTEST_DEFAULT_DEATH_TEST_STYLE "fast" +#endif // GTEST_DEFAULT_DEATH_TEST_STYLE + +#ifdef __GNUC__ +// Ask the compiler to never inline a given function. +# define GTEST_NO_INLINE_ __attribute__((noinline)) +#else +# define GTEST_NO_INLINE_ +#endif + +// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project. +#if !defined(GTEST_HAS_CXXABI_H_) +# if defined(__GLIBCXX__) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER)) +# define GTEST_HAS_CXXABI_H_ 1 +# else +# define GTEST_HAS_CXXABI_H_ 0 +# endif +#endif + +// A function level attribute to disable checking for use of uninitialized +// memory when built with MemorySanitizer. +#if defined(__clang__) +# if __has_feature(memory_sanitizer) +# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ \ + __attribute__((no_sanitize_memory)) +# else +# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +# endif // __has_feature(memory_sanitizer) +#else +# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +#endif // __clang__ + +// A function level attribute to disable AddressSanitizer instrumentation. +#if defined(__clang__) +# if __has_feature(address_sanitizer) +# define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ \ + __attribute__((no_sanitize_address)) +# else +# define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ +# endif // __has_feature(address_sanitizer) +#else +# define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ +#endif // __clang__ + +// A function level attribute to disable HWAddressSanitizer instrumentation. +#if defined(__clang__) +# if __has_feature(hwaddress_sanitizer) +# define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ \ + __attribute__((no_sanitize("hwaddress"))) +# else +# define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +# endif // __has_feature(hwaddress_sanitizer) +#else +# define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ +#endif // __clang__ + +// A function level attribute to disable ThreadSanitizer instrumentation. +#if defined(__clang__) +# if __has_feature(thread_sanitizer) +# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ \ + __attribute__((no_sanitize_thread)) +# else +# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +# endif // __has_feature(thread_sanitizer) +#else +# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +#endif // __clang__ + +namespace testing { + +class Message; + +// Legacy imports for backwards compatibility. +// New code should use std:: names directly. +using std::get; +using std::make_tuple; +using std::tuple; +using std::tuple_element; +using std::tuple_size; + +namespace internal { + +// A secret type that Google Test users don't know about. It has no +// definition on purpose. Therefore it's impossible to create a +// Secret object, which is what we want. +class Secret; + +// The GTEST_COMPILE_ASSERT_ is a legacy macro used to verify that a compile +// time expression is true (in new code, use static_assert instead). For +// example, you could use it to verify the size of a static array: +// +// GTEST_COMPILE_ASSERT_(GTEST_ARRAY_SIZE_(names) == NUM_NAMES, +// names_incorrect_size); +// +// The second argument to the macro must be a valid C++ identifier. If the +// expression is false, compiler will issue an error containing this identifier. +#define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg) + +// StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h. +// +// This template is declared, but intentionally undefined. +template +struct StaticAssertTypeEqHelper; + +template +struct StaticAssertTypeEqHelper { + enum { value = true }; +}; + +// Same as std::is_same<>. +template +struct IsSame { + enum { value = false }; +}; +template +struct IsSame { + enum { value = true }; +}; + +// Evaluates to the number of elements in 'array'. +#define GTEST_ARRAY_SIZE_(array) (sizeof(array) / sizeof(array[0])) + +// A helper for suppressing warnings on constant condition. It just +// returns 'condition'. +GTEST_API_ bool IsTrue(bool condition); + +// Defines RE. + +#if GTEST_USES_PCRE +// if used, PCRE is injected by custom/gtest-port.h +#elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE + +// A simple C++ wrapper for . It uses the POSIX Extended +// Regular Expression syntax. +class GTEST_API_ RE { + public: + // A copy constructor is required by the Standard to initialize object + // references from r-values. + RE(const RE& other) { Init(other.pattern()); } + + // Constructs an RE from a string. + RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT + + RE(const char* regex) { Init(regex); } // NOLINT + ~RE(); + + // Returns the string representation of the regex. + const char* pattern() const { return pattern_; } + + // FullMatch(str, re) returns true iff regular expression re matches + // the entire str. + // PartialMatch(str, re) returns true iff regular expression re + // matches a substring of str (including str itself). + static bool FullMatch(const ::std::string& str, const RE& re) { + return FullMatch(str.c_str(), re); + } + static bool PartialMatch(const ::std::string& str, const RE& re) { + return PartialMatch(str.c_str(), re); + } + + static bool FullMatch(const char* str, const RE& re); + static bool PartialMatch(const char* str, const RE& re); + + private: + void Init(const char* regex); + const char* pattern_; + bool is_valid_; + +# if GTEST_USES_POSIX_RE + + regex_t full_regex_; // For FullMatch(). + regex_t partial_regex_; // For PartialMatch(). + +# else // GTEST_USES_SIMPLE_RE + + const char* full_pattern_; // For FullMatch(); + +# endif + + GTEST_DISALLOW_ASSIGN_(RE); +}; + +#endif // GTEST_USES_PCRE + +// Formats a source file path and a line number as they would appear +// in an error message from the compiler used to compile this code. +GTEST_API_ ::std::string FormatFileLocation(const char* file, int line); + +// Formats a file location for compiler-independent XML output. +// Although this function is not platform dependent, we put it next to +// FormatFileLocation in order to contrast the two functions. +GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file, + int line); + +// Defines logging utilities: +// GTEST_LOG_(severity) - logs messages at the specified severity level. The +// message itself is streamed into the macro. +// LogToStderr() - directs all log messages to stderr. +// FlushInfoLog() - flushes informational log messages. + +enum GTestLogSeverity { + GTEST_INFO, + GTEST_WARNING, + GTEST_ERROR, + GTEST_FATAL +}; + +// Formats log entry severity, provides a stream object for streaming the +// log message, and terminates the message with a newline when going out of +// scope. +class GTEST_API_ GTestLog { + public: + GTestLog(GTestLogSeverity severity, const char* file, int line); + + // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. + ~GTestLog(); + + ::std::ostream& GetStream() { return ::std::cerr; } + + private: + const GTestLogSeverity severity_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog); +}; + +#if !defined(GTEST_LOG_) + +# define GTEST_LOG_(severity) \ + ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \ + __FILE__, __LINE__).GetStream() + +inline void LogToStderr() {} +inline void FlushInfoLog() { fflush(nullptr); } + +#endif // !defined(GTEST_LOG_) + +#if !defined(GTEST_CHECK_) +// INTERNAL IMPLEMENTATION - DO NOT USE. +// +// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition +// is not satisfied. +// Synopsys: +// GTEST_CHECK_(boolean_condition); +// or +// GTEST_CHECK_(boolean_condition) << "Additional message"; +// +// This checks the condition and if the condition is not satisfied +// it prints message about the condition violation, including the +// condition itself, plus additional message streamed into it, if any, +// and then it aborts the program. It aborts the program irrespective of +// whether it is built in the debug mode or not. +# define GTEST_CHECK_(condition) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::IsTrue(condition)) \ + ; \ + else \ + GTEST_LOG_(FATAL) << "Condition " #condition " failed. " +#endif // !defined(GTEST_CHECK_) + +// An all-mode assert to verify that the given POSIX-style function +// call returns 0 (indicating success). Known limitation: this +// doesn't expand to a balanced 'if' statement, so enclose the macro +// in {} if you need to use it as the only statement in an 'if' +// branch. +#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \ + if (const int gtest_error = (posix_call)) \ + GTEST_LOG_(FATAL) << #posix_call << "failed with error " \ + << gtest_error + +// Adds reference to a type if it is not a reference type, +// otherwise leaves it unchanged. This is the same as +// tr1::add_reference, which is not widely available yet. +template +struct AddReference { typedef T& type; }; // NOLINT +template +struct AddReference { typedef T& type; }; // NOLINT + +// A handy wrapper around AddReference that works when the argument T +// depends on template parameters. +#define GTEST_ADD_REFERENCE_(T) \ + typename ::testing::internal::AddReference::type + +// Transforms "T" into "const T&" according to standard reference collapsing +// rules (this is only needed as a backport for C++98 compilers that do not +// support reference collapsing). Specifically, it transforms: +// +// char ==> const char& +// const char ==> const char& +// char& ==> char& +// const char& ==> const char& +// +// Note that the non-const reference will not have "const" added. This is +// standard, and necessary so that "T" can always bind to "const T&". +template +struct ConstRef { typedef const T& type; }; +template +struct ConstRef { typedef T& type; }; + +// The argument T must depend on some template parameters. +#define GTEST_REFERENCE_TO_CONST_(T) \ + typename ::testing::internal::ConstRef::type + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// Use ImplicitCast_ as a safe version of static_cast for upcasting in +// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a +// const Foo*). When you use ImplicitCast_, the compiler checks that +// the cast is safe. Such explicit ImplicitCast_s are necessary in +// surprisingly many situations where C++ demands an exact type match +// instead of an argument type convertable to a target type. +// +// The syntax for using ImplicitCast_ is the same as for static_cast: +// +// ImplicitCast_(expr) +// +// ImplicitCast_ would have been part of the C++ standard library, +// but the proposal was submitted too late. It will probably make +// its way into the language in the future. +// +// This relatively ugly name is intentional. It prevents clashes with +// similar functions users may have (e.g., implicit_cast). The internal +// namespace alone is not enough because the function can be found by ADL. +template +inline To ImplicitCast_(To x) { return x; } + +// When you upcast (that is, cast a pointer from type Foo to type +// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts +// always succeed. When you downcast (that is, cast a pointer from +// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because +// how do you know the pointer is really of type SubclassOfFoo? It +// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus, +// when you downcast, you should use this macro. In debug mode, we +// use dynamic_cast<> to double-check the downcast is legal (we die +// if it's not). In normal mode, we do the efficient static_cast<> +// instead. Thus, it's important to test in debug mode to make sure +// the cast is legal! +// This is the only place in the code we should use dynamic_cast<>. +// In particular, you SHOULDN'T be using dynamic_cast<> in order to +// do RTTI (eg code like this: +// if (dynamic_cast(foo)) HandleASubclass1Object(foo); +// if (dynamic_cast(foo)) HandleASubclass2Object(foo); +// You should design the code some other way not to need this. +// +// This relatively ugly name is intentional. It prevents clashes with +// similar functions users may have (e.g., down_cast). The internal +// namespace alone is not enough because the function can be found by ADL. +template // use like this: DownCast_(foo); +inline To DownCast_(From* f) { // so we only accept pointers + // Ensures that To is a sub-type of From *. This test is here only + // for compile-time type checking, and has no overhead in an + // optimized build at run-time, as it will be optimized away + // completely. + GTEST_INTENTIONAL_CONST_COND_PUSH_() + if (false) { + GTEST_INTENTIONAL_CONST_COND_POP_() + const To to = nullptr; + ::testing::internal::ImplicitCast_(to); + } + +#if GTEST_HAS_RTTI + // RTTI: debug mode only! + GTEST_CHECK_(f == nullptr || dynamic_cast(f) != nullptr); +#endif + return static_cast(f); +} + +// Downcasts the pointer of type Base to Derived. +// Derived must be a subclass of Base. The parameter MUST +// point to a class of type Derived, not any subclass of it. +// When RTTI is available, the function performs a runtime +// check to enforce this. +template +Derived* CheckedDowncastToActualType(Base* base) { +#if GTEST_HAS_RTTI + GTEST_CHECK_(typeid(*base) == typeid(Derived)); +#endif + +#if GTEST_HAS_DOWNCAST_ + return ::down_cast(base); +#elif GTEST_HAS_RTTI + return dynamic_cast(base); // NOLINT +#else + return static_cast(base); // Poor man's downcast. +#endif +} + +#if GTEST_HAS_STREAM_REDIRECTION + +// Defines the stderr capturer: +// CaptureStdout - starts capturing stdout. +// GetCapturedStdout - stops capturing stdout and returns the captured string. +// CaptureStderr - starts capturing stderr. +// GetCapturedStderr - stops capturing stderr and returns the captured string. +// +GTEST_API_ void CaptureStdout(); +GTEST_API_ std::string GetCapturedStdout(); +GTEST_API_ void CaptureStderr(); +GTEST_API_ std::string GetCapturedStderr(); + +#endif // GTEST_HAS_STREAM_REDIRECTION +// Returns the size (in bytes) of a file. +GTEST_API_ size_t GetFileSize(FILE* file); + +// Reads the entire content of a file as a string. +GTEST_API_ std::string ReadEntireFile(FILE* file); + +// All command line arguments. +GTEST_API_ std::vector GetArgvs(); + +#if GTEST_HAS_DEATH_TEST + +std::vector GetInjectableArgvs(); +// Deprecated: pass the args vector by value instead. +void SetInjectableArgvs(const std::vector* new_argvs); +void SetInjectableArgvs(const std::vector& new_argvs); +void ClearInjectableArgvs(); + +#endif // GTEST_HAS_DEATH_TEST + +// Defines synchronization primitives. +#if GTEST_IS_THREADSAFE +# if GTEST_HAS_PTHREAD +// Sleeps for (roughly) n milliseconds. This function is only for testing +// Google Test's own constructs. Don't use it in user tests, either +// directly or indirectly. +inline void SleepMilliseconds(int n) { + const timespec time = { + 0, // 0 seconds. + n * 1000L * 1000L, // And n ms. + }; + nanosleep(&time, nullptr); +} +# endif // GTEST_HAS_PTHREAD + +# if GTEST_HAS_NOTIFICATION_ +// Notification has already been imported into the namespace. +// Nothing to do here. + +# elif GTEST_HAS_PTHREAD +// Allows a controller thread to pause execution of newly created +// threads until notified. Instances of this class must be created +// and destroyed in the controller thread. +// +// This class is only for testing Google Test's own constructs. Do not +// use it in user tests, either directly or indirectly. +class Notification { + public: + Notification() : notified_(false) { + GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr)); + } + ~Notification() { + pthread_mutex_destroy(&mutex_); + } + + // Notifies all threads created with this notification to start. Must + // be called from the controller thread. + void Notify() { + pthread_mutex_lock(&mutex_); + notified_ = true; + pthread_mutex_unlock(&mutex_); + } + + // Blocks until the controller thread notifies. Must be called from a test + // thread. + void WaitForNotification() { + for (;;) { + pthread_mutex_lock(&mutex_); + const bool notified = notified_; + pthread_mutex_unlock(&mutex_); + if (notified) + break; + SleepMilliseconds(10); + } + } + + private: + pthread_mutex_t mutex_; + bool notified_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification); +}; + +# elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT + +GTEST_API_ void SleepMilliseconds(int n); + +// Provides leak-safe Windows kernel handle ownership. +// Used in death tests and in threading support. +class GTEST_API_ AutoHandle { + public: + // Assume that Win32 HANDLE type is equivalent to void*. Doing so allows us to + // avoid including in this header file. Including is + // undesirable because it defines a lot of symbols and macros that tend to + // conflict with client code. This assumption is verified by + // WindowsTypesTest.HANDLEIsVoidStar. + typedef void* Handle; + AutoHandle(); + explicit AutoHandle(Handle handle); + + ~AutoHandle(); + + Handle Get() const; + void Reset(); + void Reset(Handle handle); + + private: + // Returns true iff the handle is a valid handle object that can be closed. + bool IsCloseable() const; + + Handle handle_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle); +}; + +// Allows a controller thread to pause execution of newly created +// threads until notified. Instances of this class must be created +// and destroyed in the controller thread. +// +// This class is only for testing Google Test's own constructs. Do not +// use it in user tests, either directly or indirectly. +class GTEST_API_ Notification { + public: + Notification(); + void Notify(); + void WaitForNotification(); + + private: + AutoHandle event_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification); +}; +# endif // GTEST_HAS_NOTIFICATION_ + +// On MinGW, we can have both GTEST_OS_WINDOWS and GTEST_HAS_PTHREAD +// defined, but we don't want to use MinGW's pthreads implementation, which +// has conformance problems with some versions of the POSIX standard. +# if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW + +// As a C-function, ThreadFuncWithCLinkage cannot be templated itself. +// Consequently, it cannot select a correct instantiation of ThreadWithParam +// in order to call its Run(). Introducing ThreadWithParamBase as a +// non-templated base class for ThreadWithParam allows us to bypass this +// problem. +class ThreadWithParamBase { + public: + virtual ~ThreadWithParamBase() {} + virtual void Run() = 0; +}; + +// pthread_create() accepts a pointer to a function type with the C linkage. +// According to the Standard (7.5/1), function types with different linkages +// are different even if they are otherwise identical. Some compilers (for +// example, SunStudio) treat them as different types. Since class methods +// cannot be defined with C-linkage we need to define a free C-function to +// pass into pthread_create(). +extern "C" inline void* ThreadFuncWithCLinkage(void* thread) { + static_cast(thread)->Run(); + return nullptr; +} + +// Helper class for testing Google Test's multi-threading constructs. +// To use it, write: +// +// void ThreadFunc(int param) { /* Do things with param */ } +// Notification thread_can_start; +// ... +// // The thread_can_start parameter is optional; you can supply NULL. +// ThreadWithParam thread(&ThreadFunc, 5, &thread_can_start); +// thread_can_start.Notify(); +// +// These classes are only for testing Google Test's own constructs. Do +// not use them in user tests, either directly or indirectly. +template +class ThreadWithParam : public ThreadWithParamBase { + public: + typedef void UserThreadFunc(T); + + ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start) + : func_(func), + param_(param), + thread_can_start_(thread_can_start), + finished_(false) { + ThreadWithParamBase* const base = this; + // The thread can be created only after all fields except thread_ + // have been initialized. + GTEST_CHECK_POSIX_SUCCESS_( + pthread_create(&thread_, nullptr, &ThreadFuncWithCLinkage, base)); + } + ~ThreadWithParam() override { Join(); } + + void Join() { + if (!finished_) { + GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, nullptr)); + finished_ = true; + } + } + + void Run() override { + if (thread_can_start_ != nullptr) thread_can_start_->WaitForNotification(); + func_(param_); + } + + private: + UserThreadFunc* const func_; // User-supplied thread function. + const T param_; // User-supplied parameter to the thread function. + // When non-NULL, used to block execution until the controller thread + // notifies. + Notification* const thread_can_start_; + bool finished_; // true iff we know that the thread function has finished. + pthread_t thread_; // The native thread object. + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam); +}; +# endif // !GTEST_OS_WINDOWS && GTEST_HAS_PTHREAD || + // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ + +# if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ +// Mutex and ThreadLocal have already been imported into the namespace. +// Nothing to do here. + +# elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT + +// Mutex implements mutex on Windows platforms. It is used in conjunction +// with class MutexLock: +// +// Mutex mutex; +// ... +// MutexLock lock(&mutex); // Acquires the mutex and releases it at the +// // end of the current scope. +// +// A static Mutex *must* be defined or declared using one of the following +// macros: +// GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex); +// GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex); +// +// (A non-static Mutex is defined/declared in the usual way). +class GTEST_API_ Mutex { + public: + enum MutexType { kStatic = 0, kDynamic = 1 }; + // We rely on kStaticMutex being 0 as it is to what the linker initializes + // type_ in static mutexes. critical_section_ will be initialized lazily + // in ThreadSafeLazyInit(). + enum StaticConstructorSelector { kStaticMutex = 0 }; + + // This constructor intentionally does nothing. It relies on type_ being + // statically initialized to 0 (effectively setting it to kStatic) and on + // ThreadSafeLazyInit() to lazily initialize the rest of the members. + explicit Mutex(StaticConstructorSelector /*dummy*/) {} + + Mutex(); + ~Mutex(); + + void Lock(); + + void Unlock(); + + // Does nothing if the current thread holds the mutex. Otherwise, crashes + // with high probability. + void AssertHeld(); + + private: + // Initializes owner_thread_id_ and critical_section_ in static mutexes. + void ThreadSafeLazyInit(); + + // Per https://blogs.msdn.microsoft.com/oldnewthing/20040223-00/?p=40503, + // we assume that 0 is an invalid value for thread IDs. + unsigned int owner_thread_id_; + + // For static mutexes, we rely on these members being initialized to zeros + // by the linker. + MutexType type_; + long critical_section_init_phase_; // NOLINT + GTEST_CRITICAL_SECTION* critical_section_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex); +}; + +# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ + extern ::testing::internal::Mutex mutex + +# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ + ::testing::internal::Mutex mutex(::testing::internal::Mutex::kStaticMutex) + +// We cannot name this class MutexLock because the ctor declaration would +// conflict with a macro named MutexLock, which is defined on some +// platforms. That macro is used as a defensive measure to prevent against +// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than +// "MutexLock l(&mu)". Hence the typedef trick below. +class GTestMutexLock { + public: + explicit GTestMutexLock(Mutex* mutex) + : mutex_(mutex) { mutex_->Lock(); } + + ~GTestMutexLock() { mutex_->Unlock(); } + + private: + Mutex* const mutex_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock); +}; + +typedef GTestMutexLock MutexLock; + +// Base class for ValueHolder. Allows a caller to hold and delete a value +// without knowing its type. +class ThreadLocalValueHolderBase { + public: + virtual ~ThreadLocalValueHolderBase() {} +}; + +// Provides a way for a thread to send notifications to a ThreadLocal +// regardless of its parameter type. +class ThreadLocalBase { + public: + // Creates a new ValueHolder object holding a default value passed to + // this ThreadLocal's constructor and returns it. It is the caller's + // responsibility not to call this when the ThreadLocal instance already + // has a value on the current thread. + virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const = 0; + + protected: + ThreadLocalBase() {} + virtual ~ThreadLocalBase() {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocalBase); +}; + +// Maps a thread to a set of ThreadLocals that have values instantiated on that +// thread and notifies them when the thread exits. A ThreadLocal instance is +// expected to persist until all threads it has values on have terminated. +class GTEST_API_ ThreadLocalRegistry { + public: + // Registers thread_local_instance as having value on the current thread. + // Returns a value that can be used to identify the thread from other threads. + static ThreadLocalValueHolderBase* GetValueOnCurrentThread( + const ThreadLocalBase* thread_local_instance); + + // Invoked when a ThreadLocal instance is destroyed. + static void OnThreadLocalDestroyed( + const ThreadLocalBase* thread_local_instance); +}; + +class GTEST_API_ ThreadWithParamBase { + public: + void Join(); + + protected: + class Runnable { + public: + virtual ~Runnable() {} + virtual void Run() = 0; + }; + + ThreadWithParamBase(Runnable *runnable, Notification* thread_can_start); + virtual ~ThreadWithParamBase(); + + private: + AutoHandle thread_; +}; + +// Helper class for testing Google Test's multi-threading constructs. +template +class ThreadWithParam : public ThreadWithParamBase { + public: + typedef void UserThreadFunc(T); + + ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start) + : ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) { + } + virtual ~ThreadWithParam() {} + + private: + class RunnableImpl : public Runnable { + public: + RunnableImpl(UserThreadFunc* func, T param) + : func_(func), + param_(param) { + } + virtual ~RunnableImpl() {} + virtual void Run() { + func_(param_); + } + + private: + UserThreadFunc* const func_; + const T param_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(RunnableImpl); + }; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam); +}; + +// Implements thread-local storage on Windows systems. +// +// // Thread 1 +// ThreadLocal tl(100); // 100 is the default value for each thread. +// +// // Thread 2 +// tl.set(150); // Changes the value for thread 2 only. +// EXPECT_EQ(150, tl.get()); +// +// // Thread 1 +// EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value. +// tl.set(200); +// EXPECT_EQ(200, tl.get()); +// +// The template type argument T must have a public copy constructor. +// In addition, the default ThreadLocal constructor requires T to have +// a public default constructor. +// +// The users of a TheadLocal instance have to make sure that all but one +// threads (including the main one) using that instance have exited before +// destroying it. Otherwise, the per-thread objects managed for them by the +// ThreadLocal instance are not guaranteed to be destroyed on all platforms. +// +// Google Test only uses global ThreadLocal objects. That means they +// will die after main() has returned. Therefore, no per-thread +// object managed by Google Test will be leaked as long as all threads +// using Google Test have exited when main() returns. +template +class ThreadLocal : public ThreadLocalBase { + public: + ThreadLocal() : default_factory_(new DefaultValueHolderFactory()) {} + explicit ThreadLocal(const T& value) + : default_factory_(new InstanceValueHolderFactory(value)) {} + + ~ThreadLocal() { ThreadLocalRegistry::OnThreadLocalDestroyed(this); } + + T* pointer() { return GetOrCreateValue(); } + const T* pointer() const { return GetOrCreateValue(); } + const T& get() const { return *pointer(); } + void set(const T& value) { *pointer() = value; } + + private: + // Holds a value of T. Can be deleted via its base class without the caller + // knowing the type of T. + class ValueHolder : public ThreadLocalValueHolderBase { + public: + ValueHolder() : value_() {} + explicit ValueHolder(const T& value) : value_(value) {} + + T* pointer() { return &value_; } + + private: + T value_; + GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder); + }; + + + T* GetOrCreateValue() const { + return static_cast( + ThreadLocalRegistry::GetValueOnCurrentThread(this))->pointer(); + } + + virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const { + return default_factory_->MakeNewHolder(); + } + + class ValueHolderFactory { + public: + ValueHolderFactory() {} + virtual ~ValueHolderFactory() {} + virtual ValueHolder* MakeNewHolder() const = 0; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolderFactory); + }; + + class DefaultValueHolderFactory : public ValueHolderFactory { + public: + DefaultValueHolderFactory() {} + virtual ValueHolder* MakeNewHolder() const { return new ValueHolder(); } + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory); + }; + + class InstanceValueHolderFactory : public ValueHolderFactory { + public: + explicit InstanceValueHolderFactory(const T& value) : value_(value) {} + virtual ValueHolder* MakeNewHolder() const { + return new ValueHolder(value_); + } + + private: + const T value_; // The value for each thread. + + GTEST_DISALLOW_COPY_AND_ASSIGN_(InstanceValueHolderFactory); + }; + + std::unique_ptr default_factory_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal); +}; + +# elif GTEST_HAS_PTHREAD + +// MutexBase and Mutex implement mutex on pthreads-based platforms. +class MutexBase { + public: + // Acquires this mutex. + void Lock() { + GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_)); + owner_ = pthread_self(); + has_owner_ = true; + } + + // Releases this mutex. + void Unlock() { + // Since the lock is being released the owner_ field should no longer be + // considered valid. We don't protect writing to has_owner_ here, as it's + // the caller's responsibility to ensure that the current thread holds the + // mutex when this is called. + has_owner_ = false; + GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_)); + } + + // Does nothing if the current thread holds the mutex. Otherwise, crashes + // with high probability. + void AssertHeld() const { + GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self())) + << "The current thread is not holding the mutex @" << this; + } + + // A static mutex may be used before main() is entered. It may even + // be used before the dynamic initialization stage. Therefore we + // must be able to initialize a static mutex object at link time. + // This means MutexBase has to be a POD and its member variables + // have to be public. + public: + pthread_mutex_t mutex_; // The underlying pthread mutex. + // has_owner_ indicates whether the owner_ field below contains a valid thread + // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All + // accesses to the owner_ field should be protected by a check of this field. + // An alternative might be to memset() owner_ to all zeros, but there's no + // guarantee that a zero'd pthread_t is necessarily invalid or even different + // from pthread_self(). + bool has_owner_; + pthread_t owner_; // The thread holding the mutex. +}; + +// Forward-declares a static mutex. +# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ + extern ::testing::internal::MutexBase mutex + +// Defines and statically (i.e. at link time) initializes a static mutex. +// The initialization list here does not explicitly initialize each field, +// instead relying on default initialization for the unspecified fields. In +// particular, the owner_ field (a pthread_t) is not explicitly initialized. +// This allows initialization to work whether pthread_t is a scalar or struct. +// The flag -Wmissing-field-initializers must not be specified for this to work. +#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ + ::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0} + +// The Mutex class can only be used for mutexes created at runtime. It +// shares its API with MutexBase otherwise. +class Mutex : public MutexBase { + public: + Mutex() { + GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr)); + has_owner_ = false; + } + ~Mutex() { + GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_)); + } + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex); +}; + +// We cannot name this class MutexLock because the ctor declaration would +// conflict with a macro named MutexLock, which is defined on some +// platforms. That macro is used as a defensive measure to prevent against +// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than +// "MutexLock l(&mu)". Hence the typedef trick below. +class GTestMutexLock { + public: + explicit GTestMutexLock(MutexBase* mutex) + : mutex_(mutex) { mutex_->Lock(); } + + ~GTestMutexLock() { mutex_->Unlock(); } + + private: + MutexBase* const mutex_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock); +}; + +typedef GTestMutexLock MutexLock; + +// Helpers for ThreadLocal. + +// pthread_key_create() requires DeleteThreadLocalValue() to have +// C-linkage. Therefore it cannot be templatized to access +// ThreadLocal. Hence the need for class +// ThreadLocalValueHolderBase. +class ThreadLocalValueHolderBase { + public: + virtual ~ThreadLocalValueHolderBase() {} +}; + +// Called by pthread to delete thread-local data stored by +// pthread_setspecific(). +extern "C" inline void DeleteThreadLocalValue(void* value_holder) { + delete static_cast(value_holder); +} + +// Implements thread-local storage on pthreads-based systems. +template +class GTEST_API_ ThreadLocal { + public: + ThreadLocal() + : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {} + explicit ThreadLocal(const T& value) + : key_(CreateKey()), + default_factory_(new InstanceValueHolderFactory(value)) {} + + ~ThreadLocal() { + // Destroys the managed object for the current thread, if any. + DeleteThreadLocalValue(pthread_getspecific(key_)); + + // Releases resources associated with the key. This will *not* + // delete managed objects for other threads. + GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_)); + } + + T* pointer() { return GetOrCreateValue(); } + const T* pointer() const { return GetOrCreateValue(); } + const T& get() const { return *pointer(); } + void set(const T& value) { *pointer() = value; } + + private: + // Holds a value of type T. + class ValueHolder : public ThreadLocalValueHolderBase { + public: + ValueHolder() : value_() {} + explicit ValueHolder(const T& value) : value_(value) {} + + T* pointer() { return &value_; } + + private: + T value_; + GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder); + }; + + static pthread_key_t CreateKey() { + pthread_key_t key; + // When a thread exits, DeleteThreadLocalValue() will be called on + // the object managed for that thread. + GTEST_CHECK_POSIX_SUCCESS_( + pthread_key_create(&key, &DeleteThreadLocalValue)); + return key; + } + + T* GetOrCreateValue() const { + ThreadLocalValueHolderBase* const holder = + static_cast(pthread_getspecific(key_)); + if (holder != nullptr) { + return CheckedDowncastToActualType(holder)->pointer(); + } + + ValueHolder* const new_holder = default_factory_->MakeNewHolder(); + ThreadLocalValueHolderBase* const holder_base = new_holder; + GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base)); + return new_holder->pointer(); + } + + class ValueHolderFactory { + public: + ValueHolderFactory() {} + virtual ~ValueHolderFactory() {} + virtual ValueHolder* MakeNewHolder() const = 0; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolderFactory); + }; + + class DefaultValueHolderFactory : public ValueHolderFactory { + public: + DefaultValueHolderFactory() {} + virtual ValueHolder* MakeNewHolder() const { return new ValueHolder(); } + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory); + }; + + class InstanceValueHolderFactory : public ValueHolderFactory { + public: + explicit InstanceValueHolderFactory(const T& value) : value_(value) {} + virtual ValueHolder* MakeNewHolder() const { + return new ValueHolder(value_); + } + + private: + const T value_; // The value for each thread. + + GTEST_DISALLOW_COPY_AND_ASSIGN_(InstanceValueHolderFactory); + }; + + // A key pthreads uses for looking up per-thread values. + const pthread_key_t key_; + std::unique_ptr default_factory_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal); +}; + +# endif // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ + +#else // GTEST_IS_THREADSAFE + +// A dummy implementation of synchronization primitives (mutex, lock, +// and thread-local variable). Necessary for compiling Google Test where +// mutex is not supported - using Google Test in multiple threads is not +// supported on such platforms. + +class Mutex { + public: + Mutex() {} + void Lock() {} + void Unlock() {} + void AssertHeld() const {} +}; + +# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ + extern ::testing::internal::Mutex mutex + +# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex + +// We cannot name this class MutexLock because the ctor declaration would +// conflict with a macro named MutexLock, which is defined on some +// platforms. That macro is used as a defensive measure to prevent against +// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than +// "MutexLock l(&mu)". Hence the typedef trick below. +class GTestMutexLock { + public: + explicit GTestMutexLock(Mutex*) {} // NOLINT +}; + +typedef GTestMutexLock MutexLock; + +template +class GTEST_API_ ThreadLocal { + public: + ThreadLocal() : value_() {} + explicit ThreadLocal(const T& value) : value_(value) {} + T* pointer() { return &value_; } + const T* pointer() const { return &value_; } + const T& get() const { return value_; } + void set(const T& value) { value_ = value; } + private: + T value_; +}; + +#endif // GTEST_IS_THREADSAFE + +// Returns the number of threads running in the process, or 0 to indicate that +// we cannot detect it. +GTEST_API_ size_t GetThreadCount(); + +template +struct bool_constant { + typedef bool_constant type; + static const bool value = bool_value; +}; +template const bool bool_constant::value; + +typedef bool_constant false_type; +typedef bool_constant true_type; + +template +struct is_same : public false_type {}; + +template +struct is_same : public true_type {}; + +template +struct IteratorTraits { + typedef typename Iterator::value_type value_type; +}; + + +template +struct IteratorTraits { + typedef T value_type; +}; + +template +struct IteratorTraits { + typedef T value_type; +}; + +#if GTEST_OS_WINDOWS +# define GTEST_PATH_SEP_ "\\" +# define GTEST_HAS_ALT_PATH_SEP_ 1 +// The biggest signed integer type the compiler supports. +typedef __int64 BiggestInt; +#else +# define GTEST_PATH_SEP_ "/" +# define GTEST_HAS_ALT_PATH_SEP_ 0 +typedef long long BiggestInt; // NOLINT +#endif // GTEST_OS_WINDOWS + +// Utilities for char. + +// isspace(int ch) and friends accept an unsigned char or EOF. char +// may be signed, depending on the compiler (or compiler flags). +// Therefore we need to cast a char to unsigned char before calling +// isspace(), etc. + +inline bool IsAlpha(char ch) { + return isalpha(static_cast(ch)) != 0; +} +inline bool IsAlNum(char ch) { + return isalnum(static_cast(ch)) != 0; +} +inline bool IsDigit(char ch) { + return isdigit(static_cast(ch)) != 0; +} +inline bool IsLower(char ch) { + return islower(static_cast(ch)) != 0; +} +inline bool IsSpace(char ch) { + return isspace(static_cast(ch)) != 0; +} +inline bool IsUpper(char ch) { + return isupper(static_cast(ch)) != 0; +} +inline bool IsXDigit(char ch) { + return isxdigit(static_cast(ch)) != 0; +} +inline bool IsXDigit(wchar_t ch) { + const unsigned char low_byte = static_cast(ch); + return ch == low_byte && isxdigit(low_byte) != 0; +} + +inline char ToLower(char ch) { + return static_cast(tolower(static_cast(ch))); +} +inline char ToUpper(char ch) { + return static_cast(toupper(static_cast(ch))); +} + +inline std::string StripTrailingSpaces(std::string str) { + std::string::iterator it = str.end(); + while (it != str.begin() && IsSpace(*--it)) + it = str.erase(it); + return str; +} + +// The testing::internal::posix namespace holds wrappers for common +// POSIX functions. These wrappers hide the differences between +// Windows/MSVC and POSIX systems. Since some compilers define these +// standard functions as macros, the wrapper cannot have the same name +// as the wrapped function. + +namespace posix { + +// Functions with a different name on Windows. + +#if GTEST_OS_WINDOWS + +typedef struct _stat StatStruct; + +# ifdef __BORLANDC__ +inline int IsATTY(int fd) { return isatty(fd); } +inline int StrCaseCmp(const char* s1, const char* s2) { + return stricmp(s1, s2); +} +inline char* StrDup(const char* src) { return strdup(src); } +# else // !__BORLANDC__ +# if GTEST_OS_WINDOWS_MOBILE +inline int IsATTY(int /* fd */) { return 0; } +# else +inline int IsATTY(int fd) { return _isatty(fd); } +# endif // GTEST_OS_WINDOWS_MOBILE +inline int StrCaseCmp(const char* s1, const char* s2) { + return _stricmp(s1, s2); +} +inline char* StrDup(const char* src) { return _strdup(src); } +# endif // __BORLANDC__ + +# if GTEST_OS_WINDOWS_MOBILE +inline int FileNo(FILE* file) { return reinterpret_cast(_fileno(file)); } +// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this +// time and thus not defined there. +# else +inline int FileNo(FILE* file) { return _fileno(file); } +inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); } +inline int RmDir(const char* dir) { return _rmdir(dir); } +inline bool IsDir(const StatStruct& st) { + return (_S_IFDIR & st.st_mode) != 0; +} +# endif // GTEST_OS_WINDOWS_MOBILE + +#else + +typedef struct stat StatStruct; + +inline int FileNo(FILE* file) { return fileno(file); } +inline int IsATTY(int fd) { return isatty(fd); } +inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); } +inline int StrCaseCmp(const char* s1, const char* s2) { + return strcasecmp(s1, s2); +} +inline char* StrDup(const char* src) { return strdup(src); } +inline int RmDir(const char* dir) { return rmdir(dir); } +inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); } + +#endif // GTEST_OS_WINDOWS + +// Functions deprecated by MSVC 8.0. + +GTEST_DISABLE_MSC_DEPRECATED_PUSH_() + +inline const char* StrNCpy(char* dest, const char* src, size_t n) { + return strncpy(dest, src, n); +} + +// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and +// StrError() aren't needed on Windows CE at this time and thus not +// defined there. + +#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT +inline int ChDir(const char* dir) { return chdir(dir); } +#endif +inline FILE* FOpen(const char* path, const char* mode) { + return fopen(path, mode); +} +#if !GTEST_OS_WINDOWS_MOBILE +inline FILE *FReopen(const char* path, const char* mode, FILE* stream) { + return freopen(path, mode, stream); +} +inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); } +#endif +inline int FClose(FILE* fp) { return fclose(fp); } +#if !GTEST_OS_WINDOWS_MOBILE +inline int Read(int fd, void* buf, unsigned int count) { + return static_cast(read(fd, buf, count)); +} +inline int Write(int fd, const void* buf, unsigned int count) { + return static_cast(write(fd, buf, count)); +} +inline int Close(int fd) { return close(fd); } +inline const char* StrError(int errnum) { return strerror(errnum); } +#endif +inline const char* GetEnv(const char* name) { +#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT + // We are on Windows CE, which has no environment variables. + static_cast(name); // To prevent 'unused argument' warning. + return nullptr; +#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) + // Environment variables which we programmatically clear will be set to the + // empty string rather than unset (NULL). Handle that case. + const char* const env = getenv(name); + return (env != nullptr && env[0] != '\0') ? env : nullptr; +#else + return getenv(name); +#endif +} + +GTEST_DISABLE_MSC_DEPRECATED_POP_() + +#if GTEST_OS_WINDOWS_MOBILE +// Windows CE has no C library. The abort() function is used in +// several places in Google Test. This implementation provides a reasonable +// imitation of standard behaviour. +[[noreturn]] void Abort(); +#else +[[noreturn]] inline void Abort() { abort(); } +#endif // GTEST_OS_WINDOWS_MOBILE + +} // namespace posix + +// MSVC "deprecates" snprintf and issues warnings wherever it is used. In +// order to avoid these warnings, we need to use _snprintf or _snprintf_s on +// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate +// function in order to achieve that. We use macro definition here because +// snprintf is a variadic function. +#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE +// MSVC 2005 and above support variadic macros. +# define GTEST_SNPRINTF_(buffer, size, format, ...) \ + _snprintf_s(buffer, size, size, format, __VA_ARGS__) +#elif defined(_MSC_VER) +// Windows CE does not define _snprintf_s +# define GTEST_SNPRINTF_ _snprintf +#else +# define GTEST_SNPRINTF_ snprintf +#endif + +// The maximum number a BiggestInt can represent. This definition +// works no matter BiggestInt is represented in one's complement or +// two's complement. +// +// We cannot rely on numeric_limits in STL, as __int64 and long long +// are not part of standard C++ and numeric_limits doesn't need to be +// defined for them. +const BiggestInt kMaxBiggestInt = + ~(static_cast(1) << (8*sizeof(BiggestInt) - 1)); + +// This template class serves as a compile-time function from size to +// type. It maps a size in bytes to a primitive type with that +// size. e.g. +// +// TypeWithSize<4>::UInt +// +// is typedef-ed to be unsigned int (unsigned integer made up of 4 +// bytes). +// +// Such functionality should belong to STL, but I cannot find it +// there. +// +// Google Test uses this class in the implementation of floating-point +// comparison. +// +// For now it only handles UInt (unsigned int) as that's all Google Test +// needs. Other types can be easily added in the future if need +// arises. +template +class TypeWithSize { + public: + // This prevents the user from using TypeWithSize with incorrect + // values of N. + typedef void UInt; +}; + +// The specialization for size 4. +template <> +class TypeWithSize<4> { + public: + // unsigned int has size 4 in both gcc and MSVC. + // + // As base/basictypes.h doesn't compile on Windows, we cannot use + // uint32, uint64, and etc here. + typedef int Int; + typedef unsigned int UInt; +}; + +// The specialization for size 8. +template <> +class TypeWithSize<8> { + public: +#if GTEST_OS_WINDOWS + typedef __int64 Int; + typedef unsigned __int64 UInt; +#else + typedef long long Int; // NOLINT + typedef unsigned long long UInt; // NOLINT +#endif // GTEST_OS_WINDOWS +}; + +// Integer types of known sizes. +typedef TypeWithSize<4>::Int Int32; +typedef TypeWithSize<4>::UInt UInt32; +typedef TypeWithSize<8>::Int Int64; +typedef TypeWithSize<8>::UInt UInt64; +typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds. + +// Utilities for command line flags and environment variables. + +// Macro for referencing flags. +#if !defined(GTEST_FLAG) +# define GTEST_FLAG(name) FLAGS_gtest_##name +#endif // !defined(GTEST_FLAG) + +#if !defined(GTEST_USE_OWN_FLAGFILE_FLAG_) +# define GTEST_USE_OWN_FLAGFILE_FLAG_ 1 +#endif // !defined(GTEST_USE_OWN_FLAGFILE_FLAG_) + +#if !defined(GTEST_DECLARE_bool_) +# define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver + +// Macros for declaring flags. +# define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name) +# define GTEST_DECLARE_int32_(name) \ + GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name) +# define GTEST_DECLARE_string_(name) \ + GTEST_API_ extern ::std::string GTEST_FLAG(name) + +// Macros for defining flags. +# define GTEST_DEFINE_bool_(name, default_val, doc) \ + GTEST_API_ bool GTEST_FLAG(name) = (default_val) +# define GTEST_DEFINE_int32_(name, default_val, doc) \ + GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val) +# define GTEST_DEFINE_string_(name, default_val, doc) \ + GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val) + +#endif // !defined(GTEST_DECLARE_bool_) + +// Thread annotations +#if !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_) +# define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) +# define GTEST_LOCK_EXCLUDED_(locks) +#endif // !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_) + +// Parses 'str' for a 32-bit signed integer. If successful, writes the result +// to *value and returns true; otherwise leaves *value unchanged and returns +// false. +bool ParseInt32(const Message& src_text, const char* str, Int32* value); + +// Parses a bool/Int32/string from the environment variable +// corresponding to the given Google Test flag. +bool BoolFromGTestEnv(const char* flag, bool default_val); +GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); +std::string OutputFlagAlsoCheckEnvVar(); +const char* StringFromGTestEnv(const char* flag, const char* default_val); + +} // namespace internal +} // namespace testing + +#if !defined(GTEST_INTERNAL_DEPRECATED) + +// Internal Macro to mark an API deprecated, for googletest usage only +// Usage: class GTEST_INTERNAL_DEPRECATED(message) MyClass or +// GTEST_INTERNAL_DEPRECATED(message) myFunction(); Every usage of +// a deprecated entity will trigger a warning when compiled with +// `-Wdeprecated-declarations` option (clang, gcc, any __GNUC__ compiler). +// For msvc /W3 option will need to be used +// Note that for 'other' compilers this macro evaluates to nothing to prevent +// compilations errors. +#if defined(_MSC_VER) +#define GTEST_INTERNAL_DEPRECATED(message) __declspec(deprecated(message)) +#elif defined(__GNUC__) +#define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message))) +#else +#define GTEST_INTERNAL_DEPRECATED(message) +#endif + +#endif // !defined(GTEST_INTERNAL_DEPRECATED) + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ + +#if GTEST_OS_LINUX +# include +# include +# include +# include +#endif // GTEST_OS_LINUX + +#if GTEST_HAS_EXCEPTIONS +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file defines the Message class. +// +// IMPORTANT NOTE: Due to limitation of the C++ language, we have to +// leave some internal implementation details in this header file. +// They are clearly marked by comments like this: +// +// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +// +// Such code is NOT meant to be used by a user directly, and is subject +// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user +// program! + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ +#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ + +#include +#include + + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +// Ensures that there is at least one operator<< in the global namespace. +// See Message& operator<<(...) below for why. +void operator<<(const testing::internal::Secret&, int); + +namespace testing { + +// The Message class works like an ostream repeater. +// +// Typical usage: +// +// 1. You stream a bunch of values to a Message object. +// It will remember the text in a stringstream. +// 2. Then you stream the Message object to an ostream. +// This causes the text in the Message to be streamed +// to the ostream. +// +// For example; +// +// testing::Message foo; +// foo << 1 << " != " << 2; +// std::cout << foo; +// +// will print "1 != 2". +// +// Message is not intended to be inherited from. In particular, its +// destructor is not virtual. +// +// Note that stringstream behaves differently in gcc and in MSVC. You +// can stream a NULL char pointer to it in the former, but not in the +// latter (it causes an access violation if you do). The Message +// class hides this difference by treating a NULL char pointer as +// "(null)". +class GTEST_API_ Message { + private: + // The type of basic IO manipulators (endl, ends, and flush) for + // narrow streams. + typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&); + + public: + // Constructs an empty Message. + Message(); + + // Copy constructor. + Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT + *ss_ << msg.GetString(); + } + + // Constructs a Message from a C-string. + explicit Message(const char* str) : ss_(new ::std::stringstream) { + *ss_ << str; + } + + // Streams a non-pointer value to this object. + template + inline Message& operator <<(const T& val) { + // Some libraries overload << for STL containers. These + // overloads are defined in the global namespace instead of ::std. + // + // C++'s symbol lookup rule (i.e. Koenig lookup) says that these + // overloads are visible in either the std namespace or the global + // namespace, but not other namespaces, including the testing + // namespace which Google Test's Message class is in. + // + // To allow STL containers (and other types that has a << operator + // defined in the global namespace) to be used in Google Test + // assertions, testing::Message must access the custom << operator + // from the global namespace. With this using declaration, + // overloads of << defined in the global namespace and those + // visible via Koenig lookup are both exposed in this function. + using ::operator <<; + *ss_ << val; + return *this; + } + + // Streams a pointer value to this object. + // + // This function is an overload of the previous one. When you + // stream a pointer to a Message, this definition will be used as it + // is more specialized. (The C++ Standard, section + // [temp.func.order].) If you stream a non-pointer, then the + // previous definition will be used. + // + // The reason for this overload is that streaming a NULL pointer to + // ostream is undefined behavior. Depending on the compiler, you + // may get "0", "(nil)", "(null)", or an access violation. To + // ensure consistent result across compilers, we always treat NULL + // as "(null)". + template + inline Message& operator <<(T* const& pointer) { // NOLINT + if (pointer == nullptr) { + *ss_ << "(null)"; + } else { + *ss_ << pointer; + } + return *this; + } + + // Since the basic IO manipulators are overloaded for both narrow + // and wide streams, we have to provide this specialized definition + // of operator <<, even though its body is the same as the + // templatized version above. Without this definition, streaming + // endl or other basic IO manipulators to Message will confuse the + // compiler. + Message& operator <<(BasicNarrowIoManip val) { + *ss_ << val; + return *this; + } + + // Instead of 1/0, we want to see true/false for bool values. + Message& operator <<(bool b) { + return *this << (b ? "true" : "false"); + } + + // These two overloads allow streaming a wide C string to a Message + // using the UTF-8 encoding. + Message& operator <<(const wchar_t* wide_c_str); + Message& operator <<(wchar_t* wide_c_str); + +#if GTEST_HAS_STD_WSTRING + // Converts the given wide string to a narrow string using the UTF-8 + // encoding, and streams the result to this Message object. + Message& operator <<(const ::std::wstring& wstr); +#endif // GTEST_HAS_STD_WSTRING + + // Gets the text streamed to this object so far as an std::string. + // Each '\0' character in the buffer is replaced with "\\0". + // + // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. + std::string GetString() const; + + private: + // We'll hold the text streamed to this object here. + const std::unique_ptr< ::std::stringstream> ss_; + + // We declare (but don't implement) this to prevent the compiler + // from implementing the assignment operator. + void operator=(const Message&); +}; + +// Streams a Message to an ostream. +inline std::ostream& operator <<(std::ostream& os, const Message& sb) { + return os << sb.GetString(); +} + +namespace internal { + +// Converts a streamable value to an std::string. A NULL pointer is +// converted to "(null)". When the input value is a ::string, +// ::std::string, ::wstring, or ::std::wstring object, each NUL +// character in it is replaced with "\\0". +template +std::string StreamableToString(const T& streamable) { + return (Message() << streamable).GetString(); +} + +} // namespace internal +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Google Test filepath utilities +// +// This header file declares classes and functions used internally by +// Google Test. They are subject to change without notice. +// +// This file is #included in gtest/internal/gtest-internal.h. +// Do not include this header file separately! + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ + +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file declares the String class and functions used internally by +// Google Test. They are subject to change without notice. They should not used +// by code external to Google Test. +// +// This header file is #included by gtest-internal.h. +// It should not be #included by other files. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ + +#ifdef __BORLANDC__ +// string.h is not guaranteed to provide strcpy on C++ Builder. +# include +#endif + +#include +#include + + +namespace testing { +namespace internal { + +// String - an abstract class holding static string utilities. +class GTEST_API_ String { + public: + // Static utility methods + + // Clones a 0-terminated C string, allocating memory using new. The + // caller is responsible for deleting the return value using + // delete[]. Returns the cloned string, or NULL if the input is + // NULL. + // + // This is different from strdup() in string.h, which allocates + // memory using malloc(). + static const char* CloneCString(const char* c_str); + +#if GTEST_OS_WINDOWS_MOBILE + // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be + // able to pass strings to Win32 APIs on CE we need to convert them + // to 'Unicode', UTF-16. + + // Creates a UTF-16 wide string from the given ANSI string, allocating + // memory using new. The caller is responsible for deleting the return + // value using delete[]. Returns the wide string, or NULL if the + // input is NULL. + // + // The wide string is created using the ANSI codepage (CP_ACP) to + // match the behaviour of the ANSI versions of Win32 calls and the + // C runtime. + static LPCWSTR AnsiToUtf16(const char* c_str); + + // Creates an ANSI string from the given wide string, allocating + // memory using new. The caller is responsible for deleting the return + // value using delete[]. Returns the ANSI string, or NULL if the + // input is NULL. + // + // The returned string is created using the ANSI codepage (CP_ACP) to + // match the behaviour of the ANSI versions of Win32 calls and the + // C runtime. + static const char* Utf16ToAnsi(LPCWSTR utf16_str); +#endif + + // Compares two C strings. Returns true iff they have the same content. + // + // Unlike strcmp(), this function can handle NULL argument(s). A + // NULL C string is considered different to any non-NULL C string, + // including the empty string. + static bool CStringEquals(const char* lhs, const char* rhs); + + // Converts a wide C string to a String using the UTF-8 encoding. + // NULL will be converted to "(null)". If an error occurred during + // the conversion, "(failed to convert from wide string)" is + // returned. + static std::string ShowWideCString(const wchar_t* wide_c_str); + + // Compares two wide C strings. Returns true iff they have the same + // content. + // + // Unlike wcscmp(), this function can handle NULL argument(s). A + // NULL C string is considered different to any non-NULL C string, + // including the empty string. + static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); + + // Compares two C strings, ignoring case. Returns true iff they + // have the same content. + // + // Unlike strcasecmp(), this function can handle NULL argument(s). + // A NULL C string is considered different to any non-NULL C string, + // including the empty string. + static bool CaseInsensitiveCStringEquals(const char* lhs, + const char* rhs); + + // Compares two wide C strings, ignoring case. Returns true iff they + // have the same content. + // + // Unlike wcscasecmp(), this function can handle NULL argument(s). + // A NULL C string is considered different to any non-NULL wide C string, + // including the empty string. + // NB: The implementations on different platforms slightly differ. + // On windows, this method uses _wcsicmp which compares according to LC_CTYPE + // environment variable. On GNU platform this method uses wcscasecmp + // which compares according to LC_CTYPE category of the current locale. + // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the + // current locale. + static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs, + const wchar_t* rhs); + + // Returns true iff the given string ends with the given suffix, ignoring + // case. Any string is considered to end with an empty suffix. + static bool EndsWithCaseInsensitive( + const std::string& str, const std::string& suffix); + + // Formats an int value as "%02d". + static std::string FormatIntWidth2(int value); // "%02d" for width == 2 + + // Formats an int value as "%X". + static std::string FormatHexInt(int value); + + // Formats an int value as "%X". + static std::string FormatHexUInt32(UInt32 value); + + // Formats a byte as "%02X". + static std::string FormatByte(unsigned char value); + + private: + String(); // Not meant to be instantiated. +}; // class String + +// Gets the content of the stringstream's buffer as an std::string. Each '\0' +// character in the buffer is replaced with "\\0". +GTEST_API_ std::string StringStreamToString(::std::stringstream* stream); + +} // namespace internal +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +namespace testing { +namespace internal { + +// FilePath - a class for file and directory pathname manipulation which +// handles platform-specific conventions (like the pathname separator). +// Used for helper functions for naming files in a directory for xml output. +// Except for Set methods, all methods are const or static, which provides an +// "immutable value object" -- useful for peace of mind. +// A FilePath with a value ending in a path separator ("like/this/") represents +// a directory, otherwise it is assumed to represent a file. In either case, +// it may or may not represent an actual file or directory in the file system. +// Names are NOT checked for syntax correctness -- no checking for illegal +// characters, malformed paths, etc. + +class GTEST_API_ FilePath { + public: + FilePath() : pathname_("") { } + FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { } + + explicit FilePath(const std::string& pathname) : pathname_(pathname) { + Normalize(); + } + + FilePath& operator=(const FilePath& rhs) { + Set(rhs); + return *this; + } + + void Set(const FilePath& rhs) { + pathname_ = rhs.pathname_; + } + + const std::string& string() const { return pathname_; } + const char* c_str() const { return pathname_.c_str(); } + + // Returns the current working directory, or "" if unsuccessful. + static FilePath GetCurrentDir(); + + // Given directory = "dir", base_name = "test", number = 0, + // extension = "xml", returns "dir/test.xml". If number is greater + // than zero (e.g., 12), returns "dir/test_12.xml". + // On Windows platform, uses \ as the separator rather than /. + static FilePath MakeFileName(const FilePath& directory, + const FilePath& base_name, + int number, + const char* extension); + + // Given directory = "dir", relative_path = "test.xml", + // returns "dir/test.xml". + // On Windows, uses \ as the separator rather than /. + static FilePath ConcatPaths(const FilePath& directory, + const FilePath& relative_path); + + // Returns a pathname for a file that does not currently exist. The pathname + // will be directory/base_name.extension or + // directory/base_name_.extension if directory/base_name.extension + // already exists. The number will be incremented until a pathname is found + // that does not already exist. + // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. + // There could be a race condition if two or more processes are calling this + // function at the same time -- they could both pick the same filename. + static FilePath GenerateUniqueFileName(const FilePath& directory, + const FilePath& base_name, + const char* extension); + + // Returns true iff the path is "". + bool IsEmpty() const { return pathname_.empty(); } + + // If input name has a trailing separator character, removes it and returns + // the name, otherwise return the name string unmodified. + // On Windows platform, uses \ as the separator, other platforms use /. + FilePath RemoveTrailingPathSeparator() const; + + // Returns a copy of the FilePath with the directory part removed. + // Example: FilePath("path/to/file").RemoveDirectoryName() returns + // FilePath("file"). If there is no directory part ("just_a_file"), it returns + // the FilePath unmodified. If there is no file part ("just_a_dir/") it + // returns an empty FilePath (""). + // On Windows platform, '\' is the path separator, otherwise it is '/'. + FilePath RemoveDirectoryName() const; + + // RemoveFileName returns the directory path with the filename removed. + // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". + // If the FilePath is "a_file" or "/a_file", RemoveFileName returns + // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does + // not have a file, like "just/a/dir/", it returns the FilePath unmodified. + // On Windows platform, '\' is the path separator, otherwise it is '/'. + FilePath RemoveFileName() const; + + // Returns a copy of the FilePath with the case-insensitive extension removed. + // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns + // FilePath("dir/file"). If a case-insensitive extension is not + // found, returns a copy of the original FilePath. + FilePath RemoveExtension(const char* extension) const; + + // Creates directories so that path exists. Returns true if successful or if + // the directories already exist; returns false if unable to create + // directories for any reason. Will also return false if the FilePath does + // not represent a directory (that is, it doesn't end with a path separator). + bool CreateDirectoriesRecursively() const; + + // Create the directory so that path exists. Returns true if successful or + // if the directory already exists; returns false if unable to create the + // directory for any reason, including if the parent directory does not + // exist. Not named "CreateDirectory" because that's a macro on Windows. + bool CreateFolder() const; + + // Returns true if FilePath describes something in the file-system, + // either a file, directory, or whatever, and that something exists. + bool FileOrDirectoryExists() const; + + // Returns true if pathname describes a directory in the file-system + // that exists. + bool DirectoryExists() const; + + // Returns true if FilePath ends with a path separator, which indicates that + // it is intended to represent a directory. Returns false otherwise. + // This does NOT check that a directory (or file) actually exists. + bool IsDirectory() const; + + // Returns true if pathname describes a root directory. (Windows has one + // root directory per disk drive.) + bool IsRootDirectory() const; + + // Returns true if pathname describes an absolute path. + bool IsAbsolutePath() const; + + private: + // Replaces multiple consecutive separators with a single separator. + // For example, "bar///foo" becomes "bar/foo". Does not eliminate other + // redundancies that might be in a pathname involving "." or "..". + // + // A pathname with multiple consecutive separators may occur either through + // user error or as a result of some scripts or APIs that generate a pathname + // with a trailing separator. On other platforms the same API or script + // may NOT generate a pathname with a trailing "/". Then elsewhere that + // pathname may have another "/" and pathname components added to it, + // without checking for the separator already being there. + // The script language and operating system may allow paths like "foo//bar" + // but some of the functions in FilePath will not handle that correctly. In + // particular, RemoveTrailingPathSeparator() only removes one separator, and + // it is called in CreateDirectoriesRecursively() assuming that it will change + // a pathname from directory syntax (trailing separator) to filename syntax. + // + // On Windows this method also replaces the alternate path separator '/' with + // the primary path separator '\\', so that for example "bar\\/\\foo" becomes + // "bar\\foo". + + void Normalize(); + + // Returns a pointer to the last occurence of a valid path separator in + // the FilePath. On Windows, for example, both '/' and '\' are valid path + // separators. Returns NULL if no path separator was found. + const char* FindLastPathSeparator() const; + + std::string pathname_; +}; // class FilePath + +} // namespace internal +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ +// This file was GENERATED by command: +// pump.py gtest-type-util.h.pump +// DO NOT EDIT BY HAND!!! + +// Copyright 2008 Google Inc. +// All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Type utilities needed for implementing typed and type-parameterized +// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! +// +// Currently we support at most 50 types in a list, and at most 50 +// type-parameterized tests in one type-parameterized test suite. +// Please contact googletestframework@googlegroups.com if you need +// more. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ + + +// #ifdef __GNUC__ is too general here. It is possible to use gcc without using +// libstdc++ (which is where cxxabi.h comes from). +# if GTEST_HAS_CXXABI_H_ +# include +# elif defined(__HP_aCC) +# include +# endif // GTEST_HASH_CXXABI_H_ + +namespace testing { +namespace internal { + +// Canonicalizes a given name with respect to the Standard C++ Library. +// This handles removing the inline namespace within `std` that is +// used by various standard libraries (e.g., `std::__1`). Names outside +// of namespace std are returned unmodified. +inline std::string CanonicalizeForStdLibVersioning(std::string s) { + static const char prefix[] = "std::__"; + if (s.compare(0, strlen(prefix), prefix) == 0) { + std::string::size_type end = s.find("::", strlen(prefix)); + if (end != s.npos) { + // Erase everything between the initial `std` and the second `::`. + s.erase(strlen("std"), end - strlen("std")); + } + } + return s; +} + +// GetTypeName() returns a human-readable name of type T. +// NB: This function is also used in Google Mock, so don't move it inside of +// the typed-test-only section below. +template +std::string GetTypeName() { +# if GTEST_HAS_RTTI + + const char* const name = typeid(T).name(); +# if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC) + int status = 0; + // gcc's implementation of typeid(T).name() mangles the type name, + // so we have to demangle it. +# if GTEST_HAS_CXXABI_H_ + using abi::__cxa_demangle; +# endif // GTEST_HAS_CXXABI_H_ + char* const readable_name = __cxa_demangle(name, nullptr, nullptr, &status); + const std::string name_str(status == 0 ? readable_name : name); + free(readable_name); + return CanonicalizeForStdLibVersioning(name_str); +# else + return name; +# endif // GTEST_HAS_CXXABI_H_ || __HP_aCC + +# else + + return ""; + +# endif // GTEST_HAS_RTTI +} + +#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P + +// AssertyTypeEq::type is defined iff T1 and T2 are the same +// type. This can be used as a compile-time assertion to ensure that +// two types are equal. + +template +struct AssertTypeEq; + +template +struct AssertTypeEq { + typedef bool type; +}; + +// A unique type used as the default value for the arguments of class +// template Types. This allows us to simulate variadic templates +// (e.g. Types, Type, and etc), which C++ doesn't +// support directly. +struct None {}; + +// The following family of struct and struct templates are used to +// represent type lists. In particular, TypesN +// represents a type list with N types (T1, T2, ..., and TN) in it. +// Except for Types0, every struct in the family has two member types: +// Head for the first type in the list, and Tail for the rest of the +// list. + +// The empty type list. +struct Types0 {}; + +// Type lists of length 1, 2, 3, and so on. + +template +struct Types1 { + typedef T1 Head; + typedef Types0 Tail; +}; +template +struct Types2 { + typedef T1 Head; + typedef Types1 Tail; +}; + +template +struct Types3 { + typedef T1 Head; + typedef Types2 Tail; +}; + +template +struct Types4 { + typedef T1 Head; + typedef Types3 Tail; +}; + +template +struct Types5 { + typedef T1 Head; + typedef Types4 Tail; +}; + +template +struct Types6 { + typedef T1 Head; + typedef Types5 Tail; +}; + +template +struct Types7 { + typedef T1 Head; + typedef Types6 Tail; +}; + +template +struct Types8 { + typedef T1 Head; + typedef Types7 Tail; +}; + +template +struct Types9 { + typedef T1 Head; + typedef Types8 Tail; +}; + +template +struct Types10 { + typedef T1 Head; + typedef Types9 Tail; +}; + +template +struct Types11 { + typedef T1 Head; + typedef Types10 Tail; +}; + +template +struct Types12 { + typedef T1 Head; + typedef Types11 Tail; +}; + +template +struct Types13 { + typedef T1 Head; + typedef Types12 Tail; +}; + +template +struct Types14 { + typedef T1 Head; + typedef Types13 Tail; +}; + +template +struct Types15 { + typedef T1 Head; + typedef Types14 Tail; +}; + +template +struct Types16 { + typedef T1 Head; + typedef Types15 Tail; +}; + +template +struct Types17 { + typedef T1 Head; + typedef Types16 Tail; +}; + +template +struct Types18 { + typedef T1 Head; + typedef Types17 Tail; +}; + +template +struct Types19 { + typedef T1 Head; + typedef Types18 Tail; +}; + +template +struct Types20 { + typedef T1 Head; + typedef Types19 Tail; +}; + +template +struct Types21 { + typedef T1 Head; + typedef Types20 Tail; +}; + +template +struct Types22 { + typedef T1 Head; + typedef Types21 Tail; +}; + +template +struct Types23 { + typedef T1 Head; + typedef Types22 Tail; +}; + +template +struct Types24 { + typedef T1 Head; + typedef Types23 Tail; +}; + +template +struct Types25 { + typedef T1 Head; + typedef Types24 Tail; +}; + +template +struct Types26 { + typedef T1 Head; + typedef Types25 Tail; +}; + +template +struct Types27 { + typedef T1 Head; + typedef Types26 Tail; +}; + +template +struct Types28 { + typedef T1 Head; + typedef Types27 Tail; +}; + +template +struct Types29 { + typedef T1 Head; + typedef Types28 Tail; +}; + +template +struct Types30 { + typedef T1 Head; + typedef Types29 Tail; +}; + +template +struct Types31 { + typedef T1 Head; + typedef Types30 Tail; +}; + +template +struct Types32 { + typedef T1 Head; + typedef Types31 Tail; +}; + +template +struct Types33 { + typedef T1 Head; + typedef Types32 Tail; +}; + +template +struct Types34 { + typedef T1 Head; + typedef Types33 Tail; +}; + +template +struct Types35 { + typedef T1 Head; + typedef Types34 Tail; +}; + +template +struct Types36 { + typedef T1 Head; + typedef Types35 Tail; +}; + +template +struct Types37 { + typedef T1 Head; + typedef Types36 Tail; +}; + +template +struct Types38 { + typedef T1 Head; + typedef Types37 Tail; +}; + +template +struct Types39 { + typedef T1 Head; + typedef Types38 Tail; +}; + +template +struct Types40 { + typedef T1 Head; + typedef Types39 Tail; +}; + +template +struct Types41 { + typedef T1 Head; + typedef Types40 Tail; +}; + +template +struct Types42 { + typedef T1 Head; + typedef Types41 Tail; +}; + +template +struct Types43 { + typedef T1 Head; + typedef Types42 Tail; +}; + +template +struct Types44 { + typedef T1 Head; + typedef Types43 Tail; +}; + +template +struct Types45 { + typedef T1 Head; + typedef Types44 Tail; +}; + +template +struct Types46 { + typedef T1 Head; + typedef Types45 Tail; +}; + +template +struct Types47 { + typedef T1 Head; + typedef Types46 Tail; +}; + +template +struct Types48 { + typedef T1 Head; + typedef Types47 Tail; +}; + +template +struct Types49 { + typedef T1 Head; + typedef Types48 Tail; +}; + +template +struct Types50 { + typedef T1 Head; + typedef Types49 Tail; +}; + + +} // namespace internal + +// We don't want to require the users to write TypesN<...> directly, +// as that would require them to count the length. Types<...> is much +// easier to write, but generates horrible messages when there is a +// compiler error, as gcc insists on printing out each template +// argument, even if it has the default value (this means Types +// will appear as Types in the compiler +// errors). +// +// Our solution is to combine the best part of the two approaches: a +// user would write Types, and Google Test will translate +// that to TypesN internally to make error messages +// readable. The translation is done by the 'type' member of the +// Types template. +template +struct Types { + typedef internal::Types50 type; +}; + +template <> +struct Types { + typedef internal::Types0 type; +}; +template +struct Types { + typedef internal::Types1 type; +}; +template +struct Types { + typedef internal::Types2 type; +}; +template +struct Types { + typedef internal::Types3 type; +}; +template +struct Types { + typedef internal::Types4 type; +}; +template +struct Types { + typedef internal::Types5 type; +}; +template +struct Types { + typedef internal::Types6 type; +}; +template +struct Types { + typedef internal::Types7 type; +}; +template +struct Types { + typedef internal::Types8 type; +}; +template +struct Types { + typedef internal::Types9 type; +}; +template +struct Types { + typedef internal::Types10 type; +}; +template +struct Types { + typedef internal::Types11 type; +}; +template +struct Types { + typedef internal::Types12 type; +}; +template +struct Types { + typedef internal::Types13 type; +}; +template +struct Types { + typedef internal::Types14 type; +}; +template +struct Types { + typedef internal::Types15 type; +}; +template +struct Types { + typedef internal::Types16 type; +}; +template +struct Types { + typedef internal::Types17 type; +}; +template +struct Types { + typedef internal::Types18 type; +}; +template +struct Types { + typedef internal::Types19 type; +}; +template +struct Types { + typedef internal::Types20 type; +}; +template +struct Types { + typedef internal::Types21 type; +}; +template +struct Types { + typedef internal::Types22 type; +}; +template +struct Types { + typedef internal::Types23 type; +}; +template +struct Types { + typedef internal::Types24 type; +}; +template +struct Types { + typedef internal::Types25 type; +}; +template +struct Types { + typedef internal::Types26 type; +}; +template +struct Types { + typedef internal::Types27 type; +}; +template +struct Types { + typedef internal::Types28 type; +}; +template +struct Types { + typedef internal::Types29 type; +}; +template +struct Types { + typedef internal::Types30 type; +}; +template +struct Types { + typedef internal::Types31 type; +}; +template +struct Types { + typedef internal::Types32 type; +}; +template +struct Types { + typedef internal::Types33 type; +}; +template +struct Types { + typedef internal::Types34 type; +}; +template +struct Types { + typedef internal::Types35 type; +}; +template +struct Types { + typedef internal::Types36 type; +}; +template +struct Types { + typedef internal::Types37 type; +}; +template +struct Types { + typedef internal::Types38 type; +}; +template +struct Types { + typedef internal::Types39 type; +}; +template +struct Types { + typedef internal::Types40 type; +}; +template +struct Types { + typedef internal::Types41 type; +}; +template +struct Types { + typedef internal::Types42 type; +}; +template +struct Types { + typedef internal::Types43 type; +}; +template +struct Types { + typedef internal::Types44 type; +}; +template +struct Types { + typedef internal::Types45 type; +}; +template +struct Types { + typedef internal::Types46 type; +}; +template +struct Types { + typedef internal::Types47 type; +}; +template +struct Types { + typedef internal::Types48 type; +}; +template +struct Types { + typedef internal::Types49 type; +}; + +namespace internal { + +# define GTEST_TEMPLATE_ template class + +// The template "selector" struct TemplateSel is used to +// represent Tmpl, which must be a class template with one type +// parameter, as a type. TemplateSel::Bind::type is defined +// as the type Tmpl. This allows us to actually instantiate the +// template "selected" by TemplateSel. +// +// This trick is necessary for simulating typedef for class templates, +// which C++ doesn't support directly. +template +struct TemplateSel { + template + struct Bind { + typedef Tmpl type; + }; +}; + +# define GTEST_BIND_(TmplSel, T) \ + TmplSel::template Bind::type + +// A unique struct template used as the default value for the +// arguments of class template Templates. This allows us to simulate +// variadic templates (e.g. Templates, Templates, +// and etc), which C++ doesn't support directly. +template +struct NoneT {}; + +// The following family of struct and struct templates are used to +// represent template lists. In particular, TemplatesN represents a list of N templates (T1, T2, ..., and TN). Except +// for Templates0, every struct in the family has two member types: +// Head for the selector of the first template in the list, and Tail +// for the rest of the list. + +// The empty template list. +struct Templates0 {}; + +// Template lists of length 1, 2, 3, and so on. + +template +struct Templates1 { + typedef TemplateSel Head; + typedef Templates0 Tail; +}; +template +struct Templates2 { + typedef TemplateSel Head; + typedef Templates1 Tail; +}; + +template +struct Templates3 { + typedef TemplateSel Head; + typedef Templates2 Tail; +}; + +template +struct Templates4 { + typedef TemplateSel Head; + typedef Templates3 Tail; +}; + +template +struct Templates5 { + typedef TemplateSel Head; + typedef Templates4 Tail; +}; + +template +struct Templates6 { + typedef TemplateSel Head; + typedef Templates5 Tail; +}; + +template +struct Templates7 { + typedef TemplateSel Head; + typedef Templates6 Tail; +}; + +template +struct Templates8 { + typedef TemplateSel Head; + typedef Templates7 Tail; +}; + +template +struct Templates9 { + typedef TemplateSel Head; + typedef Templates8 Tail; +}; + +template +struct Templates10 { + typedef TemplateSel Head; + typedef Templates9 Tail; +}; + +template +struct Templates11 { + typedef TemplateSel Head; + typedef Templates10 Tail; +}; + +template +struct Templates12 { + typedef TemplateSel Head; + typedef Templates11 Tail; +}; + +template +struct Templates13 { + typedef TemplateSel Head; + typedef Templates12 Tail; +}; + +template +struct Templates14 { + typedef TemplateSel Head; + typedef Templates13 Tail; +}; + +template +struct Templates15 { + typedef TemplateSel Head; + typedef Templates14 Tail; +}; + +template +struct Templates16 { + typedef TemplateSel Head; + typedef Templates15 Tail; +}; + +template +struct Templates17 { + typedef TemplateSel Head; + typedef Templates16 Tail; +}; + +template +struct Templates18 { + typedef TemplateSel Head; + typedef Templates17 Tail; +}; + +template +struct Templates19 { + typedef TemplateSel Head; + typedef Templates18 Tail; +}; + +template +struct Templates20 { + typedef TemplateSel Head; + typedef Templates19 Tail; +}; + +template +struct Templates21 { + typedef TemplateSel Head; + typedef Templates20 Tail; +}; + +template +struct Templates22 { + typedef TemplateSel Head; + typedef Templates21 Tail; +}; + +template +struct Templates23 { + typedef TemplateSel Head; + typedef Templates22 Tail; +}; + +template +struct Templates24 { + typedef TemplateSel Head; + typedef Templates23 Tail; +}; + +template +struct Templates25 { + typedef TemplateSel Head; + typedef Templates24 Tail; +}; + +template +struct Templates26 { + typedef TemplateSel Head; + typedef Templates25 Tail; +}; + +template +struct Templates27 { + typedef TemplateSel Head; + typedef Templates26 Tail; +}; + +template +struct Templates28 { + typedef TemplateSel Head; + typedef Templates27 Tail; +}; + +template +struct Templates29 { + typedef TemplateSel Head; + typedef Templates28 Tail; +}; + +template +struct Templates30 { + typedef TemplateSel Head; + typedef Templates29 Tail; +}; + +template +struct Templates31 { + typedef TemplateSel Head; + typedef Templates30 Tail; +}; + +template +struct Templates32 { + typedef TemplateSel Head; + typedef Templates31 Tail; +}; + +template +struct Templates33 { + typedef TemplateSel Head; + typedef Templates32 Tail; +}; + +template +struct Templates34 { + typedef TemplateSel Head; + typedef Templates33 Tail; +}; + +template +struct Templates35 { + typedef TemplateSel Head; + typedef Templates34 Tail; +}; + +template +struct Templates36 { + typedef TemplateSel Head; + typedef Templates35 Tail; +}; + +template +struct Templates37 { + typedef TemplateSel Head; + typedef Templates36 Tail; +}; + +template +struct Templates38 { + typedef TemplateSel Head; + typedef Templates37 Tail; +}; + +template +struct Templates39 { + typedef TemplateSel Head; + typedef Templates38 Tail; +}; + +template +struct Templates40 { + typedef TemplateSel Head; + typedef Templates39 Tail; +}; + +template +struct Templates41 { + typedef TemplateSel Head; + typedef Templates40 Tail; +}; + +template +struct Templates42 { + typedef TemplateSel Head; + typedef Templates41 Tail; +}; + +template +struct Templates43 { + typedef TemplateSel Head; + typedef Templates42 Tail; +}; + +template +struct Templates44 { + typedef TemplateSel Head; + typedef Templates43 Tail; +}; + +template +struct Templates45 { + typedef TemplateSel Head; + typedef Templates44 Tail; +}; + +template +struct Templates46 { + typedef TemplateSel Head; + typedef Templates45 Tail; +}; + +template +struct Templates47 { + typedef TemplateSel Head; + typedef Templates46 Tail; +}; + +template +struct Templates48 { + typedef TemplateSel Head; + typedef Templates47 Tail; +}; + +template +struct Templates49 { + typedef TemplateSel Head; + typedef Templates48 Tail; +}; + +template +struct Templates50 { + typedef TemplateSel Head; + typedef Templates49 Tail; +}; + + +// We don't want to require the users to write TemplatesN<...> directly, +// as that would require them to count the length. Templates<...> is much +// easier to write, but generates horrible messages when there is a +// compiler error, as gcc insists on printing out each template +// argument, even if it has the default value (this means Templates +// will appear as Templates in the compiler +// errors). +// +// Our solution is to combine the best part of the two approaches: a +// user would write Templates, and Google Test will translate +// that to TemplatesN internally to make error messages +// readable. The translation is done by the 'type' member of the +// Templates template. +template +struct Templates { + typedef Templates50 type; +}; + +template <> +struct Templates { + typedef Templates0 type; +}; +template +struct Templates { + typedef Templates1 type; +}; +template +struct Templates { + typedef Templates2 type; +}; +template +struct Templates { + typedef Templates3 type; +}; +template +struct Templates { + typedef Templates4 type; +}; +template +struct Templates { + typedef Templates5 type; +}; +template +struct Templates { + typedef Templates6 type; +}; +template +struct Templates { + typedef Templates7 type; +}; +template +struct Templates { + typedef Templates8 type; +}; +template +struct Templates { + typedef Templates9 type; +}; +template +struct Templates { + typedef Templates10 type; +}; +template +struct Templates { + typedef Templates11 type; +}; +template +struct Templates { + typedef Templates12 type; +}; +template +struct Templates { + typedef Templates13 type; +}; +template +struct Templates { + typedef Templates14 type; +}; +template +struct Templates { + typedef Templates15 type; +}; +template +struct Templates { + typedef Templates16 type; +}; +template +struct Templates { + typedef Templates17 type; +}; +template +struct Templates { + typedef Templates18 type; +}; +template +struct Templates { + typedef Templates19 type; +}; +template +struct Templates { + typedef Templates20 type; +}; +template +struct Templates { + typedef Templates21 type; +}; +template +struct Templates { + typedef Templates22 type; +}; +template +struct Templates { + typedef Templates23 type; +}; +template +struct Templates { + typedef Templates24 type; +}; +template +struct Templates { + typedef Templates25 type; +}; +template +struct Templates { + typedef Templates26 type; +}; +template +struct Templates { + typedef Templates27 type; +}; +template +struct Templates { + typedef Templates28 type; +}; +template +struct Templates { + typedef Templates29 type; +}; +template +struct Templates { + typedef Templates30 type; +}; +template +struct Templates { + typedef Templates31 type; +}; +template +struct Templates { + typedef Templates32 type; +}; +template +struct Templates { + typedef Templates33 type; +}; +template +struct Templates { + typedef Templates34 type; +}; +template +struct Templates { + typedef Templates35 type; +}; +template +struct Templates { + typedef Templates36 type; +}; +template +struct Templates { + typedef Templates37 type; +}; +template +struct Templates { + typedef Templates38 type; +}; +template +struct Templates { + typedef Templates39 type; +}; +template +struct Templates { + typedef Templates40 type; +}; +template +struct Templates { + typedef Templates41 type; +}; +template +struct Templates { + typedef Templates42 type; +}; +template +struct Templates { + typedef Templates43 type; +}; +template +struct Templates { + typedef Templates44 type; +}; +template +struct Templates { + typedef Templates45 type; +}; +template +struct Templates { + typedef Templates46 type; +}; +template +struct Templates { + typedef Templates47 type; +}; +template +struct Templates { + typedef Templates48 type; +}; +template +struct Templates { + typedef Templates49 type; +}; + +// The TypeList template makes it possible to use either a single type +// or a Types<...> list in TYPED_TEST_SUITE() and +// INSTANTIATE_TYPED_TEST_SUITE_P(). + +template +struct TypeList { + typedef Types1 type; +}; + +template +struct TypeList > { + typedef typename Types::type type; +}; + +#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P + +} // namespace internal +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ + +// Due to C++ preprocessor weirdness, we need double indirection to +// concatenate two tokens when one of them is __LINE__. Writing +// +// foo ## __LINE__ +// +// will result in the token foo__LINE__, instead of foo followed by +// the current line number. For more details, see +// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 +#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar) +#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar + +// Stringifies its argument. +#define GTEST_STRINGIFY_(name) #name + +namespace proto2 { class Message; } + +namespace testing { + +// Forward declarations. + +class AssertionResult; // Result of an assertion. +class Message; // Represents a failure message. +class Test; // Represents a test. +class TestInfo; // Information about a test. +class TestPartResult; // Result of a test part. +class UnitTest; // A collection of test suites. + +template +::std::string PrintToString(const T& value); + +namespace internal { + +struct TraceInfo; // Information about a trace point. +class TestInfoImpl; // Opaque implementation of TestInfo +class UnitTestImpl; // Opaque implementation of UnitTest + +// The text used in failure messages to indicate the start of the +// stack trace. +GTEST_API_ extern const char kStackTraceMarker[]; + +// An IgnoredValue object can be implicitly constructed from ANY value. +class IgnoredValue { + struct Sink {}; + public: + // This constructor template allows any value to be implicitly + // converted to IgnoredValue. The object has no data member and + // doesn't try to remember anything about the argument. We + // deliberately omit the 'explicit' keyword in order to allow the + // conversion to be implicit. + // Disable the conversion if T already has a magical conversion operator. + // Otherwise we get ambiguity. + template ::value, + int>::type = 0> + IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit) +}; + +// Appends the user-supplied message to the Google-Test-generated message. +GTEST_API_ std::string AppendUserMessage( + const std::string& gtest_msg, const Message& user_msg); + +#if GTEST_HAS_EXCEPTIONS + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4275 \ +/* an exported class was derived from a class that was not exported */) + +// This exception is thrown by (and only by) a failed Google Test +// assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions +// are enabled). We derive it from std::runtime_error, which is for +// errors presumably detectable only at run time. Since +// std::runtime_error inherits from std::exception, many testing +// frameworks know how to extract and print the message inside it. +class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error { + public: + explicit GoogleTestFailureException(const TestPartResult& failure); +}; + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4275 + +#endif // GTEST_HAS_EXCEPTIONS + +namespace edit_distance { +// Returns the optimal edits to go from 'left' to 'right'. +// All edits cost the same, with replace having lower priority than +// add/remove. +// Simple implementation of the Wagner-Fischer algorithm. +// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm +enum EditType { kMatch, kAdd, kRemove, kReplace }; +GTEST_API_ std::vector CalculateOptimalEdits( + const std::vector& left, const std::vector& right); + +// Same as above, but the input is represented as strings. +GTEST_API_ std::vector CalculateOptimalEdits( + const std::vector& left, + const std::vector& right); + +// Create a diff of the input strings in Unified diff format. +GTEST_API_ std::string CreateUnifiedDiff(const std::vector& left, + const std::vector& right, + size_t context = 2); + +} // namespace edit_distance + +// Calculate the diff between 'left' and 'right' and return it in unified diff +// format. +// If not null, stores in 'total_line_count' the total number of lines found +// in left + right. +GTEST_API_ std::string DiffStrings(const std::string& left, + const std::string& right, + size_t* total_line_count); + +// Constructs and returns the message for an equality assertion +// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. +// +// The first four parameters are the expressions used in the assertion +// and their values, as strings. For example, for ASSERT_EQ(foo, bar) +// where foo is 5 and bar is 6, we have: +// +// expected_expression: "foo" +// actual_expression: "bar" +// expected_value: "5" +// actual_value: "6" +// +// The ignoring_case parameter is true iff the assertion is a +// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will +// be inserted into the message. +GTEST_API_ AssertionResult EqFailure(const char* expected_expression, + const char* actual_expression, + const std::string& expected_value, + const std::string& actual_value, + bool ignoring_case); + +// Constructs a failure message for Boolean assertions such as EXPECT_TRUE. +GTEST_API_ std::string GetBoolAssertionFailureMessage( + const AssertionResult& assertion_result, + const char* expression_text, + const char* actual_predicate_value, + const char* expected_predicate_value); + +// This template class represents an IEEE floating-point number +// (either single-precision or double-precision, depending on the +// template parameters). +// +// The purpose of this class is to do more sophisticated number +// comparison. (Due to round-off error, etc, it's very unlikely that +// two floating-points will be equal exactly. Hence a naive +// comparison by the == operation often doesn't work.) +// +// Format of IEEE floating-point: +// +// The most-significant bit being the leftmost, an IEEE +// floating-point looks like +// +// sign_bit exponent_bits fraction_bits +// +// Here, sign_bit is a single bit that designates the sign of the +// number. +// +// For float, there are 8 exponent bits and 23 fraction bits. +// +// For double, there are 11 exponent bits and 52 fraction bits. +// +// More details can be found at +// http://en.wikipedia.org/wiki/IEEE_floating-point_standard. +// +// Template parameter: +// +// RawType: the raw floating-point type (either float or double) +template +class FloatingPoint { + public: + // Defines the unsigned integer type that has the same size as the + // floating point number. + typedef typename TypeWithSize::UInt Bits; + + // Constants. + + // # of bits in a number. + static const size_t kBitCount = 8*sizeof(RawType); + + // # of fraction bits in a number. + static const size_t kFractionBitCount = + std::numeric_limits::digits - 1; + + // # of exponent bits in a number. + static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount; + + // The mask for the sign bit. + static const Bits kSignBitMask = static_cast(1) << (kBitCount - 1); + + // The mask for the fraction bits. + static const Bits kFractionBitMask = + ~static_cast(0) >> (kExponentBitCount + 1); + + // The mask for the exponent bits. + static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask); + + // How many ULP's (Units in the Last Place) we want to tolerate when + // comparing two numbers. The larger the value, the more error we + // allow. A 0 value means that two numbers must be exactly the same + // to be considered equal. + // + // The maximum error of a single floating-point operation is 0.5 + // units in the last place. On Intel CPU's, all floating-point + // calculations are done with 80-bit precision, while double has 64 + // bits. Therefore, 4 should be enough for ordinary use. + // + // See the following article for more details on ULP: + // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ + static const size_t kMaxUlps = 4; + + // Constructs a FloatingPoint from a raw floating-point number. + // + // On an Intel CPU, passing a non-normalized NAN (Not a Number) + // around may change its bits, although the new value is guaranteed + // to be also a NAN. Therefore, don't expect this constructor to + // preserve the bits in x when x is a NAN. + explicit FloatingPoint(const RawType& x) { u_.value_ = x; } + + // Static methods + + // Reinterprets a bit pattern as a floating-point number. + // + // This function is needed to test the AlmostEquals() method. + static RawType ReinterpretBits(const Bits bits) { + FloatingPoint fp(0); + fp.u_.bits_ = bits; + return fp.u_.value_; + } + + // Returns the floating-point number that represent positive infinity. + static RawType Infinity() { + return ReinterpretBits(kExponentBitMask); + } + + // Returns the maximum representable finite floating-point number. + static RawType Max(); + + // Non-static methods + + // Returns the bits that represents this number. + const Bits &bits() const { return u_.bits_; } + + // Returns the exponent bits of this number. + Bits exponent_bits() const { return kExponentBitMask & u_.bits_; } + + // Returns the fraction bits of this number. + Bits fraction_bits() const { return kFractionBitMask & u_.bits_; } + + // Returns the sign bit of this number. + Bits sign_bit() const { return kSignBitMask & u_.bits_; } + + // Returns true iff this is NAN (not a number). + bool is_nan() const { + // It's a NAN if the exponent bits are all ones and the fraction + // bits are not entirely zeros. + return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); + } + + // Returns true iff this number is at most kMaxUlps ULP's away from + // rhs. In particular, this function: + // + // - returns false if either number is (or both are) NAN. + // - treats really large numbers as almost equal to infinity. + // - thinks +0.0 and -0.0 are 0 DLP's apart. + bool AlmostEquals(const FloatingPoint& rhs) const { + // The IEEE standard says that any comparison operation involving + // a NAN must return false. + if (is_nan() || rhs.is_nan()) return false; + + return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) + <= kMaxUlps; + } + + private: + // The data type used to store the actual floating-point number. + union FloatingPointUnion { + RawType value_; // The raw floating-point number. + Bits bits_; // The bits that represent the number. + }; + + // Converts an integer from the sign-and-magnitude representation to + // the biased representation. More precisely, let N be 2 to the + // power of (kBitCount - 1), an integer x is represented by the + // unsigned number x + N. + // + // For instance, + // + // -N + 1 (the most negative number representable using + // sign-and-magnitude) is represented by 1; + // 0 is represented by N; and + // N - 1 (the biggest number representable using + // sign-and-magnitude) is represented by 2N - 1. + // + // Read http://en.wikipedia.org/wiki/Signed_number_representations + // for more details on signed number representations. + static Bits SignAndMagnitudeToBiased(const Bits &sam) { + if (kSignBitMask & sam) { + // sam represents a negative number. + return ~sam + 1; + } else { + // sam represents a positive number. + return kSignBitMask | sam; + } + } + + // Given two numbers in the sign-and-magnitude representation, + // returns the distance between them as an unsigned number. + static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, + const Bits &sam2) { + const Bits biased1 = SignAndMagnitudeToBiased(sam1); + const Bits biased2 = SignAndMagnitudeToBiased(sam2); + return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1); + } + + FloatingPointUnion u_; +}; + +// We cannot use std::numeric_limits::max() as it clashes with the max() +// macro defined by . +template <> +inline float FloatingPoint::Max() { return FLT_MAX; } +template <> +inline double FloatingPoint::Max() { return DBL_MAX; } + +// Typedefs the instances of the FloatingPoint template class that we +// care to use. +typedef FloatingPoint Float; +typedef FloatingPoint Double; + +// In order to catch the mistake of putting tests that use different +// test fixture classes in the same test suite, we need to assign +// unique IDs to fixture classes and compare them. The TypeId type is +// used to hold such IDs. The user should treat TypeId as an opaque +// type: the only operation allowed on TypeId values is to compare +// them for equality using the == operator. +typedef const void* TypeId; + +template +class TypeIdHelper { + public: + // dummy_ must not have a const type. Otherwise an overly eager + // compiler (e.g. MSVC 7.1 & 8.0) may try to merge + // TypeIdHelper::dummy_ for different Ts as an "optimization". + static bool dummy_; +}; + +template +bool TypeIdHelper::dummy_ = false; + +// GetTypeId() returns the ID of type T. Different values will be +// returned for different types. Calling the function twice with the +// same type argument is guaranteed to return the same ID. +template +TypeId GetTypeId() { + // The compiler is required to allocate a different + // TypeIdHelper::dummy_ variable for each T used to instantiate + // the template. Therefore, the address of dummy_ is guaranteed to + // be unique. + return &(TypeIdHelper::dummy_); +} + +// Returns the type ID of ::testing::Test. Always call this instead +// of GetTypeId< ::testing::Test>() to get the type ID of +// ::testing::Test, as the latter may give the wrong result due to a +// suspected linker bug when compiling Google Test as a Mac OS X +// framework. +GTEST_API_ TypeId GetTestTypeId(); + +// Defines the abstract factory interface that creates instances +// of a Test object. +class TestFactoryBase { + public: + virtual ~TestFactoryBase() {} + + // Creates a test instance to run. The instance is both created and destroyed + // within TestInfoImpl::Run() + virtual Test* CreateTest() = 0; + + protected: + TestFactoryBase() {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); +}; + +// This class provides implementation of TeastFactoryBase interface. +// It is used in TEST and TEST_F macros. +template +class TestFactoryImpl : public TestFactoryBase { + public: + Test* CreateTest() override { return new TestClass; } +}; + +#if GTEST_OS_WINDOWS + +// Predicate-formatters for implementing the HRESULT checking macros +// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED} +// We pass a long instead of HRESULT to avoid causing an +// include dependency for the HRESULT type. +GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr, + long hr); // NOLINT +GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr, + long hr); // NOLINT + +#endif // GTEST_OS_WINDOWS + +// Types of SetUpTestSuite() and TearDownTestSuite() functions. +using SetUpTestSuiteFunc = void (*)(); +using TearDownTestSuiteFunc = void (*)(); + +struct CodeLocation { + CodeLocation(const std::string& a_file, int a_line) + : file(a_file), line(a_line) {} + + std::string file; + int line; +}; + +// Helper to identify which setup function for TestCase / TestSuite to call. +// Only one function is allowed, either TestCase or TestSute but not both. + +// Utility functions to help SuiteApiResolver +using SetUpTearDownSuiteFuncType = void (*)(); + +inline SetUpTearDownSuiteFuncType GetNotDefaultOrNull( + SetUpTearDownSuiteFuncType a, SetUpTearDownSuiteFuncType def) { + return a == def ? nullptr : a; +} + +template +// Note that SuiteApiResolver inherits from T because +// SetUpTestSuite()/TearDownTestSuite() could be protected. Ths way +// SuiteApiResolver can access them. +struct SuiteApiResolver : T { + // testing::Test is only forward declared at this point. So we make it a + // dependend class for the compiler to be OK with it. + using Test = + typename std::conditional::type; + + static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename, + int line_num) { + SetUpTearDownSuiteFuncType test_case_fp = + GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase); + SetUpTearDownSuiteFuncType test_suite_fp = + GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite); + + GTEST_CHECK_(!test_case_fp || !test_suite_fp) + << "Test can not provide both SetUpTestSuite and SetUpTestCase, please " + "make sure there is only one present at " + << filename << ":" << line_num; + + return test_case_fp != nullptr ? test_case_fp : test_suite_fp; + } + + static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename, + int line_num) { + SetUpTearDownSuiteFuncType test_case_fp = + GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase); + SetUpTearDownSuiteFuncType test_suite_fp = + GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite); + + GTEST_CHECK_(!test_case_fp || !test_suite_fp) + << "Test can not provide both TearDownTestSuite and TearDownTestCase," + " please make sure there is only one present at" + << filename << ":" << line_num; + + return test_case_fp != nullptr ? test_case_fp : test_suite_fp; + } +}; + +// Creates a new TestInfo object and registers it with Google Test; +// returns the created object. +// +// Arguments: +// +// test_suite_name: name of the test suite +// name: name of the test +// type_param the name of the test's type parameter, or NULL if +// this is not a typed or a type-parameterized test. +// value_param text representation of the test's value parameter, +// or NULL if this is not a type-parameterized test. +// code_location: code location where the test is defined +// fixture_class_id: ID of the test fixture class +// set_up_tc: pointer to the function that sets up the test suite +// tear_down_tc: pointer to the function that tears down the test suite +// factory: pointer to the factory that creates a test object. +// The newly created TestInfo instance will assume +// ownership of the factory object. +GTEST_API_ TestInfo* MakeAndRegisterTestInfo( + const char* test_suite_name, const char* name, const char* type_param, + const char* value_param, CodeLocation code_location, + TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc, + TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory); + +// If *pstr starts with the given prefix, modifies *pstr to be right +// past the prefix and returns true; otherwise leaves *pstr unchanged +// and returns false. None of pstr, *pstr, and prefix can be NULL. +GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr); + +#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +// State of the definition of a type-parameterized test suite. +class GTEST_API_ TypedTestSuitePState { + public: + TypedTestSuitePState() : registered_(false) {} + + // Adds the given test name to defined_test_names_ and return true + // if the test suite hasn't been registered; otherwise aborts the + // program. + bool AddTestName(const char* file, int line, const char* case_name, + const char* test_name) { + if (registered_) { + fprintf(stderr, + "%s Test %s must be defined before " + "REGISTER_TYPED_TEST_SUITE_P(%s, ...).\n", + FormatFileLocation(file, line).c_str(), test_name, case_name); + fflush(stderr); + posix::Abort(); + } + registered_tests_.insert( + ::std::make_pair(test_name, CodeLocation(file, line))); + return true; + } + + bool TestExists(const std::string& test_name) const { + return registered_tests_.count(test_name) > 0; + } + + const CodeLocation& GetCodeLocation(const std::string& test_name) const { + RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name); + GTEST_CHECK_(it != registered_tests_.end()); + return it->second; + } + + // Verifies that registered_tests match the test names in + // defined_test_names_; returns registered_tests if successful, or + // aborts the program otherwise. + const char* VerifyRegisteredTestNames( + const char* file, int line, const char* registered_tests); + + private: + typedef ::std::map RegisteredTestsMap; + + bool registered_; + RegisteredTestsMap registered_tests_; +}; + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +using TypedTestCasePState = TypedTestSuitePState; +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +// Skips to the first non-space char after the first comma in 'str'; +// returns NULL if no comma is found in 'str'. +inline const char* SkipComma(const char* str) { + const char* comma = strchr(str, ','); + if (comma == nullptr) { + return nullptr; + } + while (IsSpace(*(++comma))) {} + return comma; +} + +// Returns the prefix of 'str' before the first comma in it; returns +// the entire string if it contains no comma. +inline std::string GetPrefixUntilComma(const char* str) { + const char* comma = strchr(str, ','); + return comma == nullptr ? str : std::string(str, comma); +} + +// Splits a given string on a given delimiter, populating a given +// vector with the fields. +void SplitString(const ::std::string& str, char delimiter, + ::std::vector< ::std::string>* dest); + +// The default argument to the template below for the case when the user does +// not provide a name generator. +struct DefaultNameGenerator { + template + static std::string GetName(int i) { + return StreamableToString(i); + } +}; + +template +struct NameGeneratorSelector { + typedef Provided type; +}; + +template +void GenerateNamesRecursively(Types0, std::vector*, int) {} + +template +void GenerateNamesRecursively(Types, std::vector* result, int i) { + result->push_back(NameGenerator::template GetName(i)); + GenerateNamesRecursively(typename Types::Tail(), result, + i + 1); +} + +template +std::vector GenerateNames() { + std::vector result; + GenerateNamesRecursively(Types(), &result, 0); + return result; +} + +// TypeParameterizedTest::Register() +// registers a list of type-parameterized tests with Google Test. The +// return value is insignificant - we just need to return something +// such that we can call this function in a namespace scope. +// +// Implementation note: The GTEST_TEMPLATE_ macro declares a template +// template parameter. It's defined in gtest-type-util.h. +template +class TypeParameterizedTest { + public: + // 'index' is the index of the test in the type list 'Types' + // specified in INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, TestSuite, + // Types). Valid values for 'index' are [0, N - 1] where N is the + // length of Types. + static bool Register(const char* prefix, const CodeLocation& code_location, + const char* case_name, const char* test_names, int index, + const std::vector& type_names = + GenerateNames()) { + typedef typename Types::Head Type; + typedef Fixture FixtureClass; + typedef typename GTEST_BIND_(TestSel, Type) TestClass; + + // First, registers the first type-parameterized test in the type + // list. + MakeAndRegisterTestInfo( + (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name + + "/" + type_names[static_cast(index)]) + .c_str(), + StripTrailingSpaces(GetPrefixUntilComma(test_names)).c_str(), + GetTypeName().c_str(), + nullptr, // No value parameter. + code_location, GetTypeId(), + SuiteApiResolver::GetSetUpCaseOrSuite( + code_location.file.c_str(), code_location.line), + SuiteApiResolver::GetTearDownCaseOrSuite( + code_location.file.c_str(), code_location.line), + new TestFactoryImpl); + + // Next, recurses (at compile time) with the tail of the type list. + return TypeParameterizedTest::Register(prefix, + code_location, + case_name, + test_names, + index + 1, + type_names); + } +}; + +// The base case for the compile time recursion. +template +class TypeParameterizedTest { + public: + static bool Register(const char* /*prefix*/, const CodeLocation&, + const char* /*case_name*/, const char* /*test_names*/, + int /*index*/, + const std::vector& = + std::vector() /*type_names*/) { + return true; + } +}; + +// TypeParameterizedTestSuite::Register() +// registers *all combinations* of 'Tests' and 'Types' with Google +// Test. The return value is insignificant - we just need to return +// something such that we can call this function in a namespace scope. +template +class TypeParameterizedTestSuite { + public: + static bool Register(const char* prefix, CodeLocation code_location, + const TypedTestSuitePState* state, const char* case_name, + const char* test_names, + const std::vector& type_names = + GenerateNames()) { + std::string test_name = StripTrailingSpaces( + GetPrefixUntilComma(test_names)); + if (!state->TestExists(test_name)) { + fprintf(stderr, "Failed to get code location for test %s.%s at %s.", + case_name, test_name.c_str(), + FormatFileLocation(code_location.file.c_str(), + code_location.line).c_str()); + fflush(stderr); + posix::Abort(); + } + const CodeLocation& test_location = state->GetCodeLocation(test_name); + + typedef typename Tests::Head Head; + + // First, register the first test in 'Test' for each type in 'Types'. + TypeParameterizedTest::Register( + prefix, test_location, case_name, test_names, 0, type_names); + + // Next, recurses (at compile time) with the tail of the test list. + return TypeParameterizedTestSuite::Register(prefix, code_location, + state, case_name, + SkipComma(test_names), + type_names); + } +}; + +// The base case for the compile time recursion. +template +class TypeParameterizedTestSuite { + public: + static bool Register(const char* /*prefix*/, const CodeLocation&, + const TypedTestSuitePState* /*state*/, + const char* /*case_name*/, const char* /*test_names*/, + const std::vector& = + std::vector() /*type_names*/) { + return true; + } +}; + +#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P + +// Returns the current OS stack trace as an std::string. +// +// The maximum number of stack frames to be included is specified by +// the gtest_stack_trace_depth flag. The skip_count parameter +// specifies the number of top frames to be skipped, which doesn't +// count against the number of frames to be included. +// +// For example, if Foo() calls Bar(), which in turn calls +// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in +// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. +GTEST_API_ std::string GetCurrentOsStackTraceExceptTop( + UnitTest* unit_test, int skip_count); + +// Helpers for suppressing warnings on unreachable code or constant +// condition. + +// Always returns true. +GTEST_API_ bool AlwaysTrue(); + +// Always returns false. +inline bool AlwaysFalse() { return !AlwaysTrue(); } + +// Helper for suppressing false warning from Clang on a const char* +// variable declared in a conditional expression always being NULL in +// the else branch. +struct GTEST_API_ ConstCharPtr { + ConstCharPtr(const char* str) : value(str) {} + operator bool() const { return true; } + const char* value; +}; + +// A simple Linear Congruential Generator for generating random +// numbers with a uniform distribution. Unlike rand() and srand(), it +// doesn't use global state (and therefore can't interfere with user +// code). Unlike rand_r(), it's portable. An LCG isn't very random, +// but it's good enough for our purposes. +class GTEST_API_ Random { + public: + static const UInt32 kMaxRange = 1u << 31; + + explicit Random(UInt32 seed) : state_(seed) {} + + void Reseed(UInt32 seed) { state_ = seed; } + + // Generates a random number from [0, range). Crashes if 'range' is + // 0 or greater than kMaxRange. + UInt32 Generate(UInt32 range); + + private: + UInt32 state_; + GTEST_DISALLOW_COPY_AND_ASSIGN_(Random); +}; + +// Defining a variable of type CompileAssertTypesEqual will cause a +// compiler error iff T1 and T2 are different types. +template +struct CompileAssertTypesEqual; + +template +struct CompileAssertTypesEqual { +}; + +// Removes the reference from a type if it is a reference type, +// otherwise leaves it unchanged. This is the same as +// tr1::remove_reference, which is not widely available yet. +template +struct RemoveReference { typedef T type; }; // NOLINT +template +struct RemoveReference { typedef T type; }; // NOLINT + +// A handy wrapper around RemoveReference that works when the argument +// T depends on template parameters. +#define GTEST_REMOVE_REFERENCE_(T) \ + typename ::testing::internal::RemoveReference::type + +// Removes const from a type if it is a const type, otherwise leaves +// it unchanged. This is the same as tr1::remove_const, which is not +// widely available yet. +template +struct RemoveConst { typedef T type; }; // NOLINT +template +struct RemoveConst { typedef T type; }; // NOLINT + +// MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above +// definition to fail to remove the const in 'const int[3]' and 'const +// char[3][4]'. The following specialization works around the bug. +template +struct RemoveConst { + typedef typename RemoveConst::type type[N]; +}; + +// A handy wrapper around RemoveConst that works when the argument +// T depends on template parameters. +#define GTEST_REMOVE_CONST_(T) \ + typename ::testing::internal::RemoveConst::type + +// Turns const U&, U&, const U, and U all into U. +#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \ + GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T)) + +// IsAProtocolMessage::value is a compile-time bool constant that's +// true iff T is type proto2::Message or a subclass of it. +template +struct IsAProtocolMessage + : public bool_constant< + std::is_convertible::value> { +}; + +// When the compiler sees expression IsContainerTest(0), if C is an +// STL-style container class, the first overload of IsContainerTest +// will be viable (since both C::iterator* and C::const_iterator* are +// valid types and NULL can be implicitly converted to them). It will +// be picked over the second overload as 'int' is a perfect match for +// the type of argument 0. If C::iterator or C::const_iterator is not +// a valid type, the first overload is not viable, and the second +// overload will be picked. Therefore, we can determine whether C is +// a container class by checking the type of IsContainerTest(0). +// The value of the expression is insignificant. +// +// In C++11 mode we check the existence of a const_iterator and that an +// iterator is properly implemented for the container. +// +// For pre-C++11 that we look for both C::iterator and C::const_iterator. +// The reason is that C++ injects the name of a class as a member of the +// class itself (e.g. you can refer to class iterator as either +// 'iterator' or 'iterator::iterator'). If we look for C::iterator +// only, for example, we would mistakenly think that a class named +// iterator is an STL container. +// +// Also note that the simpler approach of overloading +// IsContainerTest(typename C::const_iterator*) and +// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++. +typedef int IsContainer; +template ().begin()), + class = decltype(::std::declval().end()), + class = decltype(++::std::declval()), + class = decltype(*::std::declval()), + class = typename C::const_iterator> +IsContainer IsContainerTest(int /* dummy */) { + return 0; +} + +typedef char IsNotContainer; +template +IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; } + +// Trait to detect whether a type T is a hash table. +// The heuristic used is that the type contains an inner type `hasher` and does +// not contain an inner type `reverse_iterator`. +// If the container is iterable in reverse, then order might actually matter. +template +struct IsHashTable { + private: + template + static char test(typename U::hasher*, typename U::reverse_iterator*); + template + static int test(typename U::hasher*, ...); + template + static char test(...); + + public: + static const bool value = sizeof(test(nullptr, nullptr)) == sizeof(int); +}; + +template +const bool IsHashTable::value; + +template (0)) == sizeof(IsContainer)> +struct IsRecursiveContainerImpl; + +template +struct IsRecursiveContainerImpl : public false_type {}; + +// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to +// obey the same inconsistencies as the IsContainerTest, namely check if +// something is a container is relying on only const_iterator in C++11 and +// is relying on both const_iterator and iterator otherwise +template +struct IsRecursiveContainerImpl { + using value_type = decltype(*std::declval()); + using type = + is_same::type>::type, + C>; +}; + +// IsRecursiveContainer is a unary compile-time predicate that +// evaluates whether C is a recursive container type. A recursive container +// type is a container type whose value_type is equal to the container type +// itself. An example for a recursive container type is +// boost::filesystem::path, whose iterator has a value_type that is equal to +// boost::filesystem::path. +template +struct IsRecursiveContainer : public IsRecursiveContainerImpl::type {}; + +// EnableIf::type is void when 'Cond' is true, and +// undefined when 'Cond' is false. To use SFINAE to make a function +// overload only apply when a particular expression is true, add +// "typename EnableIf::type* = 0" as the last parameter. +template struct EnableIf; +template<> struct EnableIf { typedef void type; }; // NOLINT + +// Utilities for native arrays. + +// ArrayEq() compares two k-dimensional native arrays using the +// elements' operator==, where k can be any integer >= 0. When k is +// 0, ArrayEq() degenerates into comparing a single pair of values. + +template +bool ArrayEq(const T* lhs, size_t size, const U* rhs); + +// This generic version is used when k is 0. +template +inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; } + +// This overload is used when k >= 1. +template +inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) { + return internal::ArrayEq(lhs, N, rhs); +} + +// This helper reduces code bloat. If we instead put its logic inside +// the previous ArrayEq() function, arrays with different sizes would +// lead to different copies of the template code. +template +bool ArrayEq(const T* lhs, size_t size, const U* rhs) { + for (size_t i = 0; i != size; i++) { + if (!internal::ArrayEq(lhs[i], rhs[i])) + return false; + } + return true; +} + +// Finds the first element in the iterator range [begin, end) that +// equals elem. Element may be a native array type itself. +template +Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) { + for (Iter it = begin; it != end; ++it) { + if (internal::ArrayEq(*it, elem)) + return it; + } + return end; +} + +// CopyArray() copies a k-dimensional native array using the elements' +// operator=, where k can be any integer >= 0. When k is 0, +// CopyArray() degenerates into copying a single value. + +template +void CopyArray(const T* from, size_t size, U* to); + +// This generic version is used when k is 0. +template +inline void CopyArray(const T& from, U* to) { *to = from; } + +// This overload is used when k >= 1. +template +inline void CopyArray(const T(&from)[N], U(*to)[N]) { + internal::CopyArray(from, N, *to); +} + +// This helper reduces code bloat. If we instead put its logic inside +// the previous CopyArray() function, arrays with different sizes +// would lead to different copies of the template code. +template +void CopyArray(const T* from, size_t size, U* to) { + for (size_t i = 0; i != size; i++) { + internal::CopyArray(from[i], to + i); + } +} + +// The relation between an NativeArray object (see below) and the +// native array it represents. +// We use 2 different structs to allow non-copyable types to be used, as long +// as RelationToSourceReference() is passed. +struct RelationToSourceReference {}; +struct RelationToSourceCopy {}; + +// Adapts a native array to a read-only STL-style container. Instead +// of the complete STL container concept, this adaptor only implements +// members useful for Google Mock's container matchers. New members +// should be added as needed. To simplify the implementation, we only +// support Element being a raw type (i.e. having no top-level const or +// reference modifier). It's the client's responsibility to satisfy +// this requirement. Element can be an array type itself (hence +// multi-dimensional arrays are supported). +template +class NativeArray { + public: + // STL-style container typedefs. + typedef Element value_type; + typedef Element* iterator; + typedef const Element* const_iterator; + + // Constructs from a native array. References the source. + NativeArray(const Element* array, size_t count, RelationToSourceReference) { + InitRef(array, count); + } + + // Constructs from a native array. Copies the source. + NativeArray(const Element* array, size_t count, RelationToSourceCopy) { + InitCopy(array, count); + } + + // Copy constructor. + NativeArray(const NativeArray& rhs) { + (this->*rhs.clone_)(rhs.array_, rhs.size_); + } + + ~NativeArray() { + if (clone_ != &NativeArray::InitRef) + delete[] array_; + } + + // STL-style container methods. + size_t size() const { return size_; } + const_iterator begin() const { return array_; } + const_iterator end() const { return array_ + size_; } + bool operator==(const NativeArray& rhs) const { + return size() == rhs.size() && + ArrayEq(begin(), size(), rhs.begin()); + } + + private: + enum { + kCheckTypeIsNotConstOrAReference = StaticAssertTypeEqHelper< + Element, GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>::value + }; + + // Initializes this object with a copy of the input. + void InitCopy(const Element* array, size_t a_size) { + Element* const copy = new Element[a_size]; + CopyArray(array, a_size, copy); + array_ = copy; + size_ = a_size; + clone_ = &NativeArray::InitCopy; + } + + // Initializes this object with a reference of the input. + void InitRef(const Element* array, size_t a_size) { + array_ = array; + size_ = a_size; + clone_ = &NativeArray::InitRef; + } + + const Element* array_; + size_t size_; + void (NativeArray::*clone_)(const Element*, size_t); + + GTEST_DISALLOW_ASSIGN_(NativeArray); +}; + +// Backport of std::index_sequence. +template +struct IndexSequence { + using type = IndexSequence; +}; + +// Double the IndexSequence, and one if plus_one is true. +template +struct DoubleSequence; +template +struct DoubleSequence, sizeofT> { + using type = IndexSequence; +}; +template +struct DoubleSequence, sizeofT> { + using type = IndexSequence; +}; + +// Backport of std::make_index_sequence. +// It uses O(ln(N)) instantiation depth. +template +struct MakeIndexSequence + : DoubleSequence::type, + N / 2>::type {}; + +template <> +struct MakeIndexSequence<0> : IndexSequence<> {}; + +// FIXME: This implementation of ElemFromList is O(1) in instantiation depth, +// but it is O(N^2) in total instantiations. Not sure if this is the best +// tradeoff, as it will make it somewhat slow to compile. +template +struct ElemFromListImpl {}; + +template +struct ElemFromListImpl { + using type = T; +}; + +// Get the Nth element from T... +// It uses O(1) instantiation depth. +template +struct ElemFromList; + +template +struct ElemFromList, T...> + : ElemFromListImpl... {}; + +template +class FlatTuple; + +template +struct FlatTupleElemBase; + +template +struct FlatTupleElemBase, I> { + using value_type = + typename ElemFromList::type, + T...>::type; + FlatTupleElemBase() = default; + explicit FlatTupleElemBase(value_type t) : value(std::move(t)) {} + value_type value; +}; + +template +struct FlatTupleBase; + +template +struct FlatTupleBase, IndexSequence> + : FlatTupleElemBase, Idx>... { + using Indices = IndexSequence; + FlatTupleBase() = default; + explicit FlatTupleBase(T... t) + : FlatTupleElemBase, Idx>(std::move(t))... {} +}; + +// Analog to std::tuple but with different tradeoffs. +// This class minimizes the template instantiation depth, thus allowing more +// elements that std::tuple would. std::tuple has been seen to require an +// instantiation depth of more than 10x the number of elements in some +// implementations. +// FlatTuple and ElemFromList are not recursive and have a fixed depth +// regardless of T... +// MakeIndexSequence, on the other hand, it is recursive but with an +// instantiation depth of O(ln(N)). +template +class FlatTuple + : private FlatTupleBase, + typename MakeIndexSequence::type> { + using Indices = typename FlatTuple::FlatTupleBase::Indices; + + public: + FlatTuple() = default; + explicit FlatTuple(T... t) : FlatTuple::FlatTupleBase(std::move(t)...) {} + + template + const typename ElemFromList::type& Get() const { + return static_cast*>(this)->value; + } + + template + typename ElemFromList::type& Get() { + return static_cast*>(this)->value; + } +}; + +// Utility functions to be called with static_assert to induce deprecation +// warnings. +GTEST_INTERNAL_DEPRECATED( + "INSTANTIATE_TEST_CASE_P is deprecated, please use " + "INSTANTIATE_TEST_SUITE_P") +constexpr bool InstantiateTestCase_P_IsDeprecated() { return true; } + +GTEST_INTERNAL_DEPRECATED( + "TYPED_TEST_CASE_P is deprecated, please use " + "TYPED_TEST_SUITE_P") +constexpr bool TypedTestCase_P_IsDeprecated() { return true; } + +GTEST_INTERNAL_DEPRECATED( + "TYPED_TEST_CASE is deprecated, please use " + "TYPED_TEST_SUITE") +constexpr bool TypedTestCaseIsDeprecated() { return true; } + +GTEST_INTERNAL_DEPRECATED( + "REGISTER_TYPED_TEST_CASE_P is deprecated, please use " + "REGISTER_TYPED_TEST_SUITE_P") +constexpr bool RegisterTypedTestCase_P_IsDeprecated() { return true; } + +GTEST_INTERNAL_DEPRECATED( + "INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use " + "INSTANTIATE_TYPED_TEST_SUITE_P") +constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; } + +} // namespace internal +} // namespace testing + +#define GTEST_MESSAGE_AT_(file, line, message, result_type) \ + ::testing::internal::AssertHelper(result_type, file, line, message) \ + = ::testing::Message() + +#define GTEST_MESSAGE_(message, result_type) \ + GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type) + +#define GTEST_FATAL_FAILURE_(message) \ + return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure) + +#define GTEST_NONFATAL_FAILURE_(message) \ + GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure) + +#define GTEST_SUCCESS_(message) \ + GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess) + +#define GTEST_SKIP_(message) \ + return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip) + +// Suppress MSVC warning 4072 (unreachable code) for the code following +// statement if it returns or throws (or doesn't return or throw in some +// situations). +#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \ + if (::testing::internal::AlwaysTrue()) { statement; } + +#define GTEST_TEST_THROW_(statement, expected_exception, fail) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::ConstCharPtr gtest_msg = "") { \ + bool gtest_caught_expected = false; \ + try { \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + } \ + catch (expected_exception const&) { \ + gtest_caught_expected = true; \ + } \ + catch (...) { \ + gtest_msg.value = \ + "Expected: " #statement " throws an exception of type " \ + #expected_exception ".\n Actual: it throws a different type."; \ + goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ + } \ + if (!gtest_caught_expected) { \ + gtest_msg.value = \ + "Expected: " #statement " throws an exception of type " \ + #expected_exception ".\n Actual: it throws nothing."; \ + goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ + } \ + } else \ + GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \ + fail(gtest_msg.value) + +#define GTEST_TEST_NO_THROW_(statement, fail) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::AlwaysTrue()) { \ + try { \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + } \ + catch (...) { \ + goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \ + } \ + } else \ + GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \ + fail("Expected: " #statement " doesn't throw an exception.\n" \ + " Actual: it throws.") + +#define GTEST_TEST_ANY_THROW_(statement, fail) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::AlwaysTrue()) { \ + bool gtest_caught_any = false; \ + try { \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + } \ + catch (...) { \ + gtest_caught_any = true; \ + } \ + if (!gtest_caught_any) { \ + goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \ + } \ + } else \ + GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \ + fail("Expected: " #statement " throws an exception.\n" \ + " Actual: it doesn't.") + + +// Implements Boolean test assertions such as EXPECT_TRUE. expression can be +// either a boolean expression or an AssertionResult. text is a textual +// represenation of expression as it was passed into the EXPECT_TRUE. +#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (const ::testing::AssertionResult gtest_ar_ = \ + ::testing::AssertionResult(expression)) \ + ; \ + else \ + fail(::testing::internal::GetBoolAssertionFailureMessage(\ + gtest_ar_, text, #actual, #expected).c_str()) + +#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::AlwaysTrue()) { \ + ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ + goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ + } \ + } else \ + GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \ + fail("Expected: " #statement " doesn't generate new fatal " \ + "failures in the current thread.\n" \ + " Actual: it does.") + +// Expands to the name of the class that implements the given test. +#define GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \ + test_suite_name##_##test_name##_Test + +// Helper macro for defining tests. +#define GTEST_TEST_(test_suite_name, test_name, parent_class, parent_id) \ + class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \ + : public parent_class { \ + public: \ + GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \ + \ + private: \ + virtual void TestBody(); \ + static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \ + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \ + test_name)); \ + }; \ + \ + ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name, \ + test_name)::test_info_ = \ + ::testing::internal::MakeAndRegisterTestInfo( \ + #test_suite_name, #test_name, nullptr, nullptr, \ + ::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \ + ::testing::internal::SuiteApiResolver< \ + parent_class>::GetSetUpCaseOrSuite(__FILE__, __LINE__), \ + ::testing::internal::SuiteApiResolver< \ + parent_class>::GetTearDownCaseOrSuite(__FILE__, __LINE__), \ + new ::testing::internal::TestFactoryImpl); \ + void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file defines the public API for death tests. It is +// #included by gtest.h so a user doesn't need to include this +// directly. +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ +#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ + +// Copyright 2005, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This header file defines internal utilities needed for implementing +// death tests. They are subject to change without notice. +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ + +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// The Google C++ Testing and Mocking Framework (Google Test) +// +// This file implements just enough of the matcher interface to allow +// EXPECT_DEATH and friends to accept a matcher argument. + +// IWYU pragma: private, include "testing/base/public/gunit.h" +// IWYU pragma: friend third_party/googletest/googlemock/.* +// IWYU pragma: friend third_party/googletest/googletest/.* + +#ifndef GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_ +#define GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_ + +#include +#include +#include + +// Copyright 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// Google Test - The Google C++ Testing and Mocking Framework +// +// This file implements a universal value printer that can print a +// value of any type T: +// +// void ::testing::internal::UniversalPrinter::Print(value, ostream_ptr); +// +// A user can teach this function how to print a class type T by +// defining either operator<<() or PrintTo() in the namespace that +// defines T. More specifically, the FIRST defined function in the +// following list will be used (assuming T is defined in namespace +// foo): +// +// 1. foo::PrintTo(const T&, ostream*) +// 2. operator<<(ostream&, const T&) defined in either foo or the +// global namespace. +// +// However if T is an STL-style container then it is printed element-wise +// unless foo::PrintTo(const T&, ostream*) is defined. Note that +// operator<<() is ignored for container types. +// +// If none of the above is defined, it will print the debug string of +// the value if it is a protocol buffer, or print the raw bytes in the +// value otherwise. +// +// To aid debugging: when T is a reference type, the address of the +// value is also printed; when T is a (const) char pointer, both the +// pointer value and the NUL-terminated string it points to are +// printed. +// +// We also provide some convenient wrappers: +// +// // Prints a value to a string. For a (const or not) char +// // pointer, the NUL-terminated string (but not the pointer) is +// // printed. +// std::string ::testing::PrintToString(const T& value); +// +// // Prints a value tersely: for a reference type, the referenced +// // value (but not the address) is printed; for a (const or not) char +// // pointer, the NUL-terminated string (but not the pointer) is +// // printed. +// void ::testing::internal::UniversalTersePrint(const T& value, ostream*); +// +// // Prints value using the type inferred by the compiler. The difference +// // from UniversalTersePrint() is that this function prints both the +// // pointer and the NUL-terminated string for a (const or not) char pointer. +// void ::testing::internal::UniversalPrint(const T& value, ostream*); +// +// // Prints the fields of a tuple tersely to a string vector, one +// // element for each field. Tuple support must be enabled in +// // gtest-port.h. +// std::vector UniversalTersePrintTupleFieldsToStrings( +// const Tuple& value); +// +// Known limitation: +// +// The print primitives print the elements of an STL-style container +// using the compiler-inferred type of *iter where iter is a +// const_iterator of the container. When const_iterator is an input +// iterator but not a forward iterator, this inferred type may not +// match value_type, and the print output may be incorrect. In +// practice, this is rarely a problem as for most containers +// const_iterator is a forward iterator. We'll fix this if there's an +// actual need for it. Note that this fix cannot rely on value_type +// being defined as many user-defined container types don't have +// value_type. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ +#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ + +#include +#include // NOLINT +#include +#include +#include +#include +#include +#include + +#if GTEST_HAS_ABSL +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" +#include "absl/types/variant.h" +#endif // GTEST_HAS_ABSL + +namespace testing { + +// Definitions in the 'internal' and 'internal2' name spaces are +// subject to change without notice. DO NOT USE THEM IN USER CODE! +namespace internal2 { + +// Prints the given number of bytes in the given object to the given +// ostream. +GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes, + size_t count, + ::std::ostream* os); + +// For selecting which printer to use when a given type has neither << +// nor PrintTo(). +enum TypeKind { + kProtobuf, // a protobuf type + kConvertibleToInteger, // a type implicitly convertible to BiggestInt + // (e.g. a named or unnamed enum type) +#if GTEST_HAS_ABSL + kConvertibleToStringView, // a type implicitly convertible to + // absl::string_view +#endif + kOtherType // anything else +}; + +// TypeWithoutFormatter::PrintValue(value, os) is called +// by the universal printer to print a value of type T when neither +// operator<< nor PrintTo() is defined for T, where kTypeKind is the +// "kind" of T as defined by enum TypeKind. +template +class TypeWithoutFormatter { + public: + // This default version is called when kTypeKind is kOtherType. + static void PrintValue(const T& value, ::std::ostream* os) { + PrintBytesInObjectTo( + static_cast( + reinterpret_cast(std::addressof(value))), + sizeof(value), os); + } +}; + +// We print a protobuf using its ShortDebugString() when the string +// doesn't exceed this many characters; otherwise we print it using +// DebugString() for better readability. +const size_t kProtobufOneLinerMaxLength = 50; + +template +class TypeWithoutFormatter { + public: + static void PrintValue(const T& value, ::std::ostream* os) { + std::string pretty_str = value.ShortDebugString(); + if (pretty_str.length() > kProtobufOneLinerMaxLength) { + pretty_str = "\n" + value.DebugString(); + } + *os << ("<" + pretty_str + ">"); + } +}; + +template +class TypeWithoutFormatter { + public: + // Since T has no << operator or PrintTo() but can be implicitly + // converted to BiggestInt, we print it as a BiggestInt. + // + // Most likely T is an enum type (either named or unnamed), in which + // case printing it as an integer is the desired behavior. In case + // T is not an enum, printing it as an integer is the best we can do + // given that it has no user-defined printer. + static void PrintValue(const T& value, ::std::ostream* os) { + const internal::BiggestInt kBigInt = value; + *os << kBigInt; + } +}; + +#if GTEST_HAS_ABSL +template +class TypeWithoutFormatter { + public: + // Since T has neither operator<< nor PrintTo() but can be implicitly + // converted to absl::string_view, we print it as a absl::string_view. + // + // Note: the implementation is further below, as it depends on + // internal::PrintTo symbol which is defined later in the file. + static void PrintValue(const T& value, ::std::ostream* os); +}; +#endif + +// Prints the given value to the given ostream. If the value is a +// protocol message, its debug string is printed; if it's an enum or +// of a type implicitly convertible to BiggestInt, it's printed as an +// integer; otherwise the bytes in the value are printed. This is +// what UniversalPrinter::Print() does when it knows nothing about +// type T and T has neither << operator nor PrintTo(). +// +// A user can override this behavior for a class type Foo by defining +// a << operator in the namespace where Foo is defined. +// +// We put this operator in namespace 'internal2' instead of 'internal' +// to simplify the implementation, as much code in 'internal' needs to +// use << in STL, which would conflict with our own << were it defined +// in 'internal'. +// +// Note that this operator<< takes a generic std::basic_ostream type instead of the more restricted std::ostream. If +// we define it to take an std::ostream instead, we'll get an +// "ambiguous overloads" compiler error when trying to print a type +// Foo that supports streaming to std::basic_ostream, as the compiler cannot tell whether +// operator<<(std::ostream&, const T&) or +// operator<<(std::basic_stream, const Foo&) is more +// specific. +template +::std::basic_ostream& operator<<( + ::std::basic_ostream& os, const T& x) { + TypeWithoutFormatter::value + ? kProtobuf + : std::is_convertible< + const T&, internal::BiggestInt>::value + ? kConvertibleToInteger + : +#if GTEST_HAS_ABSL + std::is_convertible< + const T&, absl::string_view>::value + ? kConvertibleToStringView + : +#endif + kOtherType)>::PrintValue(x, &os); + return os; +} + +} // namespace internal2 +} // namespace testing + +// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up +// magic needed for implementing UniversalPrinter won't work. +namespace testing_internal { + +// Used to print a value that is not an STL-style container when the +// user doesn't define PrintTo() for it. +template +void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) { + // With the following statement, during unqualified name lookup, + // testing::internal2::operator<< appears as if it was declared in + // the nearest enclosing namespace that contains both + // ::testing_internal and ::testing::internal2, i.e. the global + // namespace. For more details, refer to the C++ Standard section + // 7.3.4-1 [namespace.udir]. This allows us to fall back onto + // testing::internal2::operator<< in case T doesn't come with a << + // operator. + // + // We cannot write 'using ::testing::internal2::operator<<;', which + // gcc 3.3 fails to compile due to a compiler bug. + using namespace ::testing::internal2; // NOLINT + + // Assuming T is defined in namespace foo, in the next statement, + // the compiler will consider all of: + // + // 1. foo::operator<< (thanks to Koenig look-up), + // 2. ::operator<< (as the current namespace is enclosed in ::), + // 3. testing::internal2::operator<< (thanks to the using statement above). + // + // The operator<< whose type matches T best will be picked. + // + // We deliberately allow #2 to be a candidate, as sometimes it's + // impossible to define #1 (e.g. when foo is ::std, defining + // anything in it is undefined behavior unless you are a compiler + // vendor.). + *os << value; +} + +} // namespace testing_internal + +namespace testing { +namespace internal { + +// FormatForComparison::Format(value) formats a +// value of type ToPrint that is an operand of a comparison assertion +// (e.g. ASSERT_EQ). OtherOperand is the type of the other operand in +// the comparison, and is used to help determine the best way to +// format the value. In particular, when the value is a C string +// (char pointer) and the other operand is an STL string object, we +// want to format the C string as a string, since we know it is +// compared by value with the string object. If the value is a char +// pointer but the other operand is not an STL string object, we don't +// know whether the pointer is supposed to point to a NUL-terminated +// string, and thus want to print it as a pointer to be safe. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. + +// The default case. +template +class FormatForComparison { + public: + static ::std::string Format(const ToPrint& value) { + return ::testing::PrintToString(value); + } +}; + +// Array. +template +class FormatForComparison { + public: + static ::std::string Format(const ToPrint* value) { + return FormatForComparison::Format(value); + } +}; + +// By default, print C string as pointers to be safe, as we don't know +// whether they actually point to a NUL-terminated string. + +#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType) \ + template \ + class FormatForComparison { \ + public: \ + static ::std::string Format(CharType* value) { \ + return ::testing::PrintToString(static_cast(value)); \ + } \ + } + +GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char); +GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char); +GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t); +GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t); + +#undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ + +// If a C string is compared with an STL string object, we know it's meant +// to point to a NUL-terminated string, and thus can print it as a string. + +#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \ + template <> \ + class FormatForComparison { \ + public: \ + static ::std::string Format(CharType* value) { \ + return ::testing::PrintToString(value); \ + } \ + } + +GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string); +GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string); + +#if GTEST_HAS_STD_WSTRING +GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring); +GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring); +#endif + +#undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_ + +// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc) +// operand to be used in a failure message. The type (but not value) +// of the other operand may affect the format. This allows us to +// print a char* as a raw pointer when it is compared against another +// char* or void*, and print it as a C string when it is compared +// against an std::string object, for example. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +template +std::string FormatForComparisonFailureMessage( + const T1& value, const T2& /* other_operand */) { + return FormatForComparison::Format(value); +} + +// UniversalPrinter::Print(value, ostream_ptr) prints the given +// value to the given ostream. The caller must ensure that +// 'ostream_ptr' is not NULL, or the behavior is undefined. +// +// We define UniversalPrinter as a class template (as opposed to a +// function template), as we need to partially specialize it for +// reference types, which cannot be done with function templates. +template +class UniversalPrinter; + +template +void UniversalPrint(const T& value, ::std::ostream* os); + +enum DefaultPrinterType { + kPrintContainer, + kPrintPointer, + kPrintFunctionPointer, + kPrintOther, +}; +template struct WrapPrinterType {}; + +// Used to print an STL-style container when the user doesn't define +// a PrintTo() for it. +template +void DefaultPrintTo(WrapPrinterType /* dummy */, + const C& container, ::std::ostream* os) { + const size_t kMaxCount = 32; // The maximum number of elements to print. + *os << '{'; + size_t count = 0; + for (typename C::const_iterator it = container.begin(); + it != container.end(); ++it, ++count) { + if (count > 0) { + *os << ','; + if (count == kMaxCount) { // Enough has been printed. + *os << " ..."; + break; + } + } + *os << ' '; + // We cannot call PrintTo(*it, os) here as PrintTo() doesn't + // handle *it being a native array. + internal::UniversalPrint(*it, os); + } + + if (count > 0) { + *os << ' '; + } + *os << '}'; +} + +// Used to print a pointer that is neither a char pointer nor a member +// pointer, when the user doesn't define PrintTo() for it. (A member +// variable pointer or member function pointer doesn't really point to +// a location in the address space. Their representation is +// implementation-defined. Therefore they will be printed as raw +// bytes.) +template +void DefaultPrintTo(WrapPrinterType /* dummy */, + T* p, ::std::ostream* os) { + if (p == nullptr) { + *os << "NULL"; + } else { + // T is not a function type. We just call << to print p, + // relying on ADL to pick up user-defined << for their pointer + // types, if any. + *os << p; + } +} +template +void DefaultPrintTo(WrapPrinterType /* dummy */, + T* p, ::std::ostream* os) { + if (p == nullptr) { + *os << "NULL"; + } else { + // T is a function type, so '*os << p' doesn't do what we want + // (it just prints p as bool). We want to print p as a const + // void*. + *os << reinterpret_cast(p); + } +} + +// Used to print a non-container, non-pointer value when the user +// doesn't define PrintTo() for it. +template +void DefaultPrintTo(WrapPrinterType /* dummy */, + const T& value, ::std::ostream* os) { + ::testing_internal::DefaultPrintNonContainerTo(value, os); +} + +// Prints the given value using the << operator if it has one; +// otherwise prints the bytes in it. This is what +// UniversalPrinter::Print() does when PrintTo() is not specialized +// or overloaded for type T. +// +// A user can override this behavior for a class type Foo by defining +// an overload of PrintTo() in the namespace where Foo is defined. We +// give the user this option as sometimes defining a << operator for +// Foo is not desirable (e.g. the coding style may prevent doing it, +// or there is already a << operator but it doesn't do what the user +// wants). +template +void PrintTo(const T& value, ::std::ostream* os) { + // DefaultPrintTo() is overloaded. The type of its first argument + // determines which version will be picked. + // + // Note that we check for container types here, prior to we check + // for protocol message types in our operator<<. The rationale is: + // + // For protocol messages, we want to give people a chance to + // override Google Mock's format by defining a PrintTo() or + // operator<<. For STL containers, other formats can be + // incompatible with Google Mock's format for the container + // elements; therefore we check for container types here to ensure + // that our format is used. + // + // Note that MSVC and clang-cl do allow an implicit conversion from + // pointer-to-function to pointer-to-object, but clang-cl warns on it. + // So don't use ImplicitlyConvertible if it can be helped since it will + // cause this warning, and use a separate overload of DefaultPrintTo for + // function pointers so that the `*os << p` in the object pointer overload + // doesn't cause that warning either. + DefaultPrintTo( + WrapPrinterType < + (sizeof(IsContainerTest(0)) == sizeof(IsContainer)) && + !IsRecursiveContainer::value + ? kPrintContainer + : !std::is_pointer::value + ? kPrintOther + : std::is_function::type>::value + ? kPrintFunctionPointer + : kPrintPointer > (), + value, os); +} + +// The following list of PrintTo() overloads tells +// UniversalPrinter::Print() how to print standard types (built-in +// types, strings, plain arrays, and pointers). + +// Overloads for various char types. +GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os); +GTEST_API_ void PrintTo(signed char c, ::std::ostream* os); +inline void PrintTo(char c, ::std::ostream* os) { + // When printing a plain char, we always treat it as unsigned. This + // way, the output won't be affected by whether the compiler thinks + // char is signed or not. + PrintTo(static_cast(c), os); +} + +// Overloads for other simple built-in types. +inline void PrintTo(bool x, ::std::ostream* os) { + *os << (x ? "true" : "false"); +} + +// Overload for wchar_t type. +// Prints a wchar_t as a symbol if it is printable or as its internal +// code otherwise and also as its decimal code (except for L'\0'). +// The L'\0' char is printed as "L'\\0'". The decimal code is printed +// as signed integer when wchar_t is implemented by the compiler +// as a signed type and is printed as an unsigned integer when wchar_t +// is implemented as an unsigned type. +GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os); + +// Overloads for C strings. +GTEST_API_ void PrintTo(const char* s, ::std::ostream* os); +inline void PrintTo(char* s, ::std::ostream* os) { + PrintTo(ImplicitCast_(s), os); +} + +// signed/unsigned char is often used for representing binary data, so +// we print pointers to it as void* to be safe. +inline void PrintTo(const signed char* s, ::std::ostream* os) { + PrintTo(ImplicitCast_(s), os); +} +inline void PrintTo(signed char* s, ::std::ostream* os) { + PrintTo(ImplicitCast_(s), os); +} +inline void PrintTo(const unsigned char* s, ::std::ostream* os) { + PrintTo(ImplicitCast_(s), os); +} +inline void PrintTo(unsigned char* s, ::std::ostream* os) { + PrintTo(ImplicitCast_(s), os); +} + +// MSVC can be configured to define wchar_t as a typedef of unsigned +// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native +// type. When wchar_t is a typedef, defining an overload for const +// wchar_t* would cause unsigned short* be printed as a wide string, +// possibly causing invalid memory accesses. +#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) +// Overloads for wide C strings +GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os); +inline void PrintTo(wchar_t* s, ::std::ostream* os) { + PrintTo(ImplicitCast_(s), os); +} +#endif + +// Overload for C arrays. Multi-dimensional arrays are printed +// properly. + +// Prints the given number of elements in an array, without printing +// the curly braces. +template +void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) { + UniversalPrint(a[0], os); + for (size_t i = 1; i != count; i++) { + *os << ", "; + UniversalPrint(a[i], os); + } +} + +// Overloads for ::std::string. +GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os); +inline void PrintTo(const ::std::string& s, ::std::ostream* os) { + PrintStringTo(s, os); +} + +// Overloads for ::std::wstring. +#if GTEST_HAS_STD_WSTRING +GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os); +inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { + PrintWideStringTo(s, os); +} +#endif // GTEST_HAS_STD_WSTRING + +#if GTEST_HAS_ABSL +// Overload for absl::string_view. +inline void PrintTo(absl::string_view sp, ::std::ostream* os) { + PrintTo(::std::string(sp), os); +} +#endif // GTEST_HAS_ABSL + +inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; } + +template +void PrintTo(std::reference_wrapper ref, ::std::ostream* os) { + UniversalPrinter::Print(ref.get(), os); +} + +// Helper function for printing a tuple. T must be instantiated with +// a tuple type. +template +void PrintTupleTo(const T&, std::integral_constant, + ::std::ostream*) {} + +template +void PrintTupleTo(const T& t, std::integral_constant, + ::std::ostream* os) { + PrintTupleTo(t, std::integral_constant(), os); + GTEST_INTENTIONAL_CONST_COND_PUSH_() + if (I > 1) { + GTEST_INTENTIONAL_CONST_COND_POP_() + *os << ", "; + } + UniversalPrinter::type>::Print( + std::get(t), os); +} + +template +void PrintTo(const ::std::tuple& t, ::std::ostream* os) { + *os << "("; + PrintTupleTo(t, std::integral_constant(), os); + *os << ")"; +} + +// Overload for std::pair. +template +void PrintTo(const ::std::pair& value, ::std::ostream* os) { + *os << '('; + // We cannot use UniversalPrint(value.first, os) here, as T1 may be + // a reference type. The same for printing value.second. + UniversalPrinter::Print(value.first, os); + *os << ", "; + UniversalPrinter::Print(value.second, os); + *os << ')'; +} + +// Implements printing a non-reference type T by letting the compiler +// pick the right overload of PrintTo() for T. +template +class UniversalPrinter { + public: + // MSVC warns about adding const to a function type, so we want to + // disable the warning. + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180) + + // Note: we deliberately don't call this PrintTo(), as that name + // conflicts with ::testing::internal::PrintTo in the body of the + // function. + static void Print(const T& value, ::std::ostream* os) { + // By default, ::testing::internal::PrintTo() is used for printing + // the value. + // + // Thanks to Koenig look-up, if T is a class and has its own + // PrintTo() function defined in its namespace, that function will + // be visible here. Since it is more specific than the generic ones + // in ::testing::internal, it will be picked by the compiler in the + // following statement - exactly what we want. + PrintTo(value, os); + } + + GTEST_DISABLE_MSC_WARNINGS_POP_() +}; + +#if GTEST_HAS_ABSL + +// Printer for absl::optional + +template +class UniversalPrinter<::absl::optional> { + public: + static void Print(const ::absl::optional& value, ::std::ostream* os) { + *os << '('; + if (!value) { + *os << "nullopt"; + } else { + UniversalPrint(*value, os); + } + *os << ')'; + } +}; + +// Printer for absl::variant + +template +class UniversalPrinter<::absl::variant> { + public: + static void Print(const ::absl::variant& value, ::std::ostream* os) { + *os << '('; + absl::visit(Visitor{os}, value); + *os << ')'; + } + + private: + struct Visitor { + template + void operator()(const U& u) const { + *os << "'" << GetTypeName() << "' with value "; + UniversalPrint(u, os); + } + ::std::ostream* os; + }; +}; + +#endif // GTEST_HAS_ABSL + +// UniversalPrintArray(begin, len, os) prints an array of 'len' +// elements, starting at address 'begin'. +template +void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) { + if (len == 0) { + *os << "{}"; + } else { + *os << "{ "; + const size_t kThreshold = 18; + const size_t kChunkSize = 8; + // If the array has more than kThreshold elements, we'll have to + // omit some details by printing only the first and the last + // kChunkSize elements. + if (len <= kThreshold) { + PrintRawArrayTo(begin, len, os); + } else { + PrintRawArrayTo(begin, kChunkSize, os); + *os << ", ..., "; + PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os); + } + *os << " }"; + } +} +// This overload prints a (const) char array compactly. +GTEST_API_ void UniversalPrintArray( + const char* begin, size_t len, ::std::ostream* os); + +// This overload prints a (const) wchar_t array compactly. +GTEST_API_ void UniversalPrintArray( + const wchar_t* begin, size_t len, ::std::ostream* os); + +// Implements printing an array type T[N]. +template +class UniversalPrinter { + public: + // Prints the given array, omitting some elements when there are too + // many. + static void Print(const T (&a)[N], ::std::ostream* os) { + UniversalPrintArray(a, N, os); + } +}; + +// Implements printing a reference type T&. +template +class UniversalPrinter { + public: + // MSVC warns about adding const to a function type, so we want to + // disable the warning. + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180) + + static void Print(const T& value, ::std::ostream* os) { + // Prints the address of the value. We use reinterpret_cast here + // as static_cast doesn't compile when T is a function type. + *os << "@" << reinterpret_cast(&value) << " "; + + // Then prints the value itself. + UniversalPrint(value, os); + } + + GTEST_DISABLE_MSC_WARNINGS_POP_() +}; + +// Prints a value tersely: for a reference type, the referenced value +// (but not the address) is printed; for a (const) char pointer, the +// NUL-terminated string (but not the pointer) is printed. + +template +class UniversalTersePrinter { + public: + static void Print(const T& value, ::std::ostream* os) { + UniversalPrint(value, os); + } +}; +template +class UniversalTersePrinter { + public: + static void Print(const T& value, ::std::ostream* os) { + UniversalPrint(value, os); + } +}; +template +class UniversalTersePrinter { + public: + static void Print(const T (&value)[N], ::std::ostream* os) { + UniversalPrinter::Print(value, os); + } +}; +template <> +class UniversalTersePrinter { + public: + static void Print(const char* str, ::std::ostream* os) { + if (str == nullptr) { + *os << "NULL"; + } else { + UniversalPrint(std::string(str), os); + } + } +}; +template <> +class UniversalTersePrinter { + public: + static void Print(char* str, ::std::ostream* os) { + UniversalTersePrinter::Print(str, os); + } +}; + +#if GTEST_HAS_STD_WSTRING +template <> +class UniversalTersePrinter { + public: + static void Print(const wchar_t* str, ::std::ostream* os) { + if (str == nullptr) { + *os << "NULL"; + } else { + UniversalPrint(::std::wstring(str), os); + } + } +}; +#endif + +template <> +class UniversalTersePrinter { + public: + static void Print(wchar_t* str, ::std::ostream* os) { + UniversalTersePrinter::Print(str, os); + } +}; + +template +void UniversalTersePrint(const T& value, ::std::ostream* os) { + UniversalTersePrinter::Print(value, os); +} + +// Prints a value using the type inferred by the compiler. The +// difference between this and UniversalTersePrint() is that for a +// (const) char pointer, this prints both the pointer and the +// NUL-terminated string. +template +void UniversalPrint(const T& value, ::std::ostream* os) { + // A workarond for the bug in VC++ 7.1 that prevents us from instantiating + // UniversalPrinter with T directly. + typedef T T1; + UniversalPrinter::Print(value, os); +} + +typedef ::std::vector< ::std::string> Strings; + + // Tersely prints the first N fields of a tuple to a string vector, + // one element for each field. +template +void TersePrintPrefixToStrings(const Tuple&, std::integral_constant, + Strings*) {} +template +void TersePrintPrefixToStrings(const Tuple& t, + std::integral_constant, + Strings* strings) { + TersePrintPrefixToStrings(t, std::integral_constant(), + strings); + ::std::stringstream ss; + UniversalTersePrint(std::get(t), &ss); + strings->push_back(ss.str()); +} + +// Prints the fields of a tuple tersely to a string vector, one +// element for each field. See the comment before +// UniversalTersePrint() for how we define "tersely". +template +Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { + Strings result; + TersePrintPrefixToStrings( + value, std::integral_constant::value>(), + &result); + return result; +} + +} // namespace internal + +#if GTEST_HAS_ABSL +namespace internal2 { +template +void TypeWithoutFormatter::PrintValue( + const T& value, ::std::ostream* os) { + internal::PrintTo(absl::string_view(value), os); +} +} // namespace internal2 +#endif + +template +::std::string PrintToString(const T& value) { + ::std::stringstream ss; + internal::UniversalTersePrinter::Print(value, &ss); + return ss.str(); +} + +} // namespace testing + +// Include any custom printer added by the local installation. +// We must include this header at the end to make sure it can use the +// declarations from this file. +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// This file provides an injection point for custom printers in a local +// installation of gTest. +// It will be included from gtest-printers.h and the overrides in this file +// will be visible to everyone. +// +// Injection point for custom user configurations. See README for details +// +// ** Custom implementation starts here ** + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ + +#endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ + +// MSVC warning C5046 is new as of VS2017 version 15.8. +#if defined(_MSC_VER) && _MSC_VER >= 1915 +#define GTEST_MAYBE_5046_ 5046 +#else +#define GTEST_MAYBE_5046_ +#endif + +GTEST_DISABLE_MSC_WARNINGS_PUSH_( + 4251 GTEST_MAYBE_5046_ /* class A needs to have dll-interface to be used by + clients of class B */ + /* Symbol involving type with internal linkage not defined */) + +namespace testing { + +// To implement a matcher Foo for type T, define: +// 1. a class FooMatcherImpl that implements the +// MatcherInterface interface, and +// 2. a factory function that creates a Matcher object from a +// FooMatcherImpl*. +// +// The two-level delegation design makes it possible to allow a user +// to write "v" instead of "Eq(v)" where a Matcher is expected, which +// is impossible if we pass matchers by pointers. It also eases +// ownership management as Matcher objects can now be copied like +// plain values. + +// MatchResultListener is an abstract class. Its << operator can be +// used by a matcher to explain why a value matches or doesn't match. +// +class MatchResultListener { + public: + // Creates a listener object with the given underlying ostream. The + // listener does not own the ostream, and does not dereference it + // in the constructor or destructor. + explicit MatchResultListener(::std::ostream* os) : stream_(os) {} + virtual ~MatchResultListener() = 0; // Makes this class abstract. + + // Streams x to the underlying ostream; does nothing if the ostream + // is NULL. + template + MatchResultListener& operator<<(const T& x) { + if (stream_ != nullptr) *stream_ << x; + return *this; + } + + // Returns the underlying ostream. + ::std::ostream* stream() { return stream_; } + + // Returns true iff the listener is interested in an explanation of + // the match result. A matcher's MatchAndExplain() method can use + // this information to avoid generating the explanation when no one + // intends to hear it. + bool IsInterested() const { return stream_ != nullptr; } + + private: + ::std::ostream* const stream_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener); +}; + +inline MatchResultListener::~MatchResultListener() { +} + +// An instance of a subclass of this knows how to describe itself as a +// matcher. +class MatcherDescriberInterface { + public: + virtual ~MatcherDescriberInterface() {} + + // Describes this matcher to an ostream. The function should print + // a verb phrase that describes the property a value matching this + // matcher should have. The subject of the verb phrase is the value + // being matched. For example, the DescribeTo() method of the Gt(7) + // matcher prints "is greater than 7". + virtual void DescribeTo(::std::ostream* os) const = 0; + + // Describes the negation of this matcher to an ostream. For + // example, if the description of this matcher is "is greater than + // 7", the negated description could be "is not greater than 7". + // You are not required to override this when implementing + // MatcherInterface, but it is highly advised so that your matcher + // can produce good error messages. + virtual void DescribeNegationTo(::std::ostream* os) const { + *os << "not ("; + DescribeTo(os); + *os << ")"; + } +}; + +// The implementation of a matcher. +template +class MatcherInterface : public MatcherDescriberInterface { + public: + // Returns true iff the matcher matches x; also explains the match + // result to 'listener' if necessary (see the next paragraph), in + // the form of a non-restrictive relative clause ("which ...", + // "whose ...", etc) that describes x. For example, the + // MatchAndExplain() method of the Pointee(...) matcher should + // generate an explanation like "which points to ...". + // + // Implementations of MatchAndExplain() should add an explanation of + // the match result *if and only if* they can provide additional + // information that's not already present (or not obvious) in the + // print-out of x and the matcher's description. Whether the match + // succeeds is not a factor in deciding whether an explanation is + // needed, as sometimes the caller needs to print a failure message + // when the match succeeds (e.g. when the matcher is used inside + // Not()). + // + // For example, a "has at least 10 elements" matcher should explain + // what the actual element count is, regardless of the match result, + // as it is useful information to the reader; on the other hand, an + // "is empty" matcher probably only needs to explain what the actual + // size is when the match fails, as it's redundant to say that the + // size is 0 when the value is already known to be empty. + // + // You should override this method when defining a new matcher. + // + // It's the responsibility of the caller (Google Test) to guarantee + // that 'listener' is not NULL. This helps to simplify a matcher's + // implementation when it doesn't care about the performance, as it + // can talk to 'listener' without checking its validity first. + // However, in order to implement dummy listeners efficiently, + // listener->stream() may be NULL. + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; + + // Inherits these methods from MatcherDescriberInterface: + // virtual void DescribeTo(::std::ostream* os) const = 0; + // virtual void DescribeNegationTo(::std::ostream* os) const; +}; + +namespace internal { + +// Converts a MatcherInterface to a MatcherInterface. +template +class MatcherInterfaceAdapter : public MatcherInterface { + public: + explicit MatcherInterfaceAdapter(const MatcherInterface* impl) + : impl_(impl) {} + ~MatcherInterfaceAdapter() override { delete impl_; } + + void DescribeTo(::std::ostream* os) const override { impl_->DescribeTo(os); } + + void DescribeNegationTo(::std::ostream* os) const override { + impl_->DescribeNegationTo(os); + } + + bool MatchAndExplain(const T& x, + MatchResultListener* listener) const override { + return impl_->MatchAndExplain(x, listener); + } + + private: + const MatcherInterface* const impl_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(MatcherInterfaceAdapter); +}; + +struct AnyEq { + template + bool operator()(const A& a, const B& b) const { return a == b; } +}; +struct AnyNe { + template + bool operator()(const A& a, const B& b) const { return a != b; } +}; +struct AnyLt { + template + bool operator()(const A& a, const B& b) const { return a < b; } +}; +struct AnyGt { + template + bool operator()(const A& a, const B& b) const { return a > b; } +}; +struct AnyLe { + template + bool operator()(const A& a, const B& b) const { return a <= b; } +}; +struct AnyGe { + template + bool operator()(const A& a, const B& b) const { return a >= b; } +}; + +// A match result listener that ignores the explanation. +class DummyMatchResultListener : public MatchResultListener { + public: + DummyMatchResultListener() : MatchResultListener(nullptr) {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener); +}; + +// A match result listener that forwards the explanation to a given +// ostream. The difference between this and MatchResultListener is +// that the former is concrete. +class StreamMatchResultListener : public MatchResultListener { + public: + explicit StreamMatchResultListener(::std::ostream* os) + : MatchResultListener(os) {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener); +}; + +// An internal class for implementing Matcher, which will derive +// from it. We put functionalities common to all Matcher +// specializations here to avoid code duplication. +template +class MatcherBase { + public: + // Returns true iff the matcher matches x; also explains the match + // result to 'listener'. + bool MatchAndExplain(const T& x, MatchResultListener* listener) const { + return impl_->MatchAndExplain(x, listener); + } + + // Returns true iff this matcher matches x. + bool Matches(const T& x) const { + DummyMatchResultListener dummy; + return MatchAndExplain(x, &dummy); + } + + // Describes this matcher to an ostream. + void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } + + // Describes the negation of this matcher to an ostream. + void DescribeNegationTo(::std::ostream* os) const { + impl_->DescribeNegationTo(os); + } + + // Explains why x matches, or doesn't match, the matcher. + void ExplainMatchResultTo(const T& x, ::std::ostream* os) const { + StreamMatchResultListener listener(os); + MatchAndExplain(x, &listener); + } + + // Returns the describer for this matcher object; retains ownership + // of the describer, which is only guaranteed to be alive when + // this matcher object is alive. + const MatcherDescriberInterface* GetDescriber() const { + return impl_.get(); + } + + protected: + MatcherBase() {} + + // Constructs a matcher from its implementation. + explicit MatcherBase(const MatcherInterface* impl) : impl_(impl) {} + + template + explicit MatcherBase( + const MatcherInterface* impl, + typename internal::EnableIf< + !internal::IsSame::value>::type* = nullptr) + : impl_(new internal::MatcherInterfaceAdapter(impl)) {} + + MatcherBase(const MatcherBase&) = default; + MatcherBase& operator=(const MatcherBase&) = default; + MatcherBase(MatcherBase&&) = default; + MatcherBase& operator=(MatcherBase&&) = default; + + virtual ~MatcherBase() {} + + private: + std::shared_ptr> impl_; +}; + +} // namespace internal + +// A Matcher is a copyable and IMMUTABLE (except by assignment) +// object that can check whether a value of type T matches. The +// implementation of Matcher is just a std::shared_ptr to const +// MatcherInterface. Don't inherit from Matcher! +template +class Matcher : public internal::MatcherBase { + public: + // Constructs a null matcher. Needed for storing Matcher objects in STL + // containers. A default-constructed matcher is not yet initialized. You + // cannot use it until a valid value has been assigned to it. + explicit Matcher() {} // NOLINT + + // Constructs a matcher from its implementation. + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + template + explicit Matcher(const MatcherInterface* impl, + typename internal::EnableIf< + !internal::IsSame::value>::type* = nullptr) + : internal::MatcherBase(impl) {} + + // Implicit constructor here allows people to write + // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes + Matcher(T value); // NOLINT +}; + +// The following two specializations allow the user to write str +// instead of Eq(str) and "foo" instead of Eq("foo") when a std::string +// matcher is expected. +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a std::string object. + Matcher(const std::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT +}; + +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a string object. + Matcher(const std::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT +}; + +#if GTEST_HAS_ABSL +// The following two specializations allow the user to write str +// instead of Eq(str) and "foo" instead of Eq("foo") when a absl::string_view +// matcher is expected. +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a std::string object. + Matcher(const std::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT + + // Allows the user to pass absl::string_views directly. + Matcher(absl::string_view s); // NOLINT +}; + +template <> +class GTEST_API_ Matcher + : public internal::MatcherBase { + public: + Matcher() {} + + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + explicit Matcher(const MatcherInterface* impl) + : internal::MatcherBase(impl) {} + + // Allows the user to write str instead of Eq(str) sometimes, where + // str is a std::string object. + Matcher(const std::string& s); // NOLINT + + // Allows the user to write "foo" instead of Eq("foo") sometimes. + Matcher(const char* s); // NOLINT + + // Allows the user to pass absl::string_views directly. + Matcher(absl::string_view s); // NOLINT +}; +#endif // GTEST_HAS_ABSL + +// Prints a matcher in a human-readable format. +template +std::ostream& operator<<(std::ostream& os, const Matcher& matcher) { + matcher.DescribeTo(&os); + return os; +} + +// The PolymorphicMatcher class template makes it easy to implement a +// polymorphic matcher (i.e. a matcher that can match values of more +// than one type, e.g. Eq(n) and NotNull()). +// +// To define a polymorphic matcher, a user should provide an Impl +// class that has a DescribeTo() method and a DescribeNegationTo() +// method, and define a member function (or member function template) +// +// bool MatchAndExplain(const Value& value, +// MatchResultListener* listener) const; +// +// See the definition of NotNull() for a complete example. +template +class PolymorphicMatcher { + public: + explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {} + + // Returns a mutable reference to the underlying matcher + // implementation object. + Impl& mutable_impl() { return impl_; } + + // Returns an immutable reference to the underlying matcher + // implementation object. + const Impl& impl() const { return impl_; } + + template + operator Matcher() const { + return Matcher(new MonomorphicImpl(impl_)); + } + + private: + template + class MonomorphicImpl : public MatcherInterface { + public: + explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} + + virtual void DescribeTo(::std::ostream* os) const { impl_.DescribeTo(os); } + + virtual void DescribeNegationTo(::std::ostream* os) const { + impl_.DescribeNegationTo(os); + } + + virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { + return impl_.MatchAndExplain(x, listener); + } + + private: + const Impl impl_; + }; + + Impl impl_; +}; + +// Creates a matcher from its implementation. +// DEPRECATED: Especially in the generic code, prefer: +// Matcher(new MyMatcherImpl(...)); +// +// MakeMatcher may create a Matcher that accepts its argument by value, which +// leads to unnecessary copies & lack of support for non-copyable types. +template +inline Matcher MakeMatcher(const MatcherInterface* impl) { + return Matcher(impl); +} + +// Creates a polymorphic matcher from its implementation. This is +// easier to use than the PolymorphicMatcher constructor as it +// doesn't require you to explicitly write the template argument, e.g. +// +// MakePolymorphicMatcher(foo); +// vs +// PolymorphicMatcher(foo); +template +inline PolymorphicMatcher MakePolymorphicMatcher(const Impl& impl) { + return PolymorphicMatcher(impl); +} + +namespace internal { +// Implements a matcher that compares a given value with a +// pre-supplied value using one of the ==, <=, <, etc, operators. The +// two values being compared don't have to have the same type. +// +// The matcher defined here is polymorphic (for example, Eq(5) can be +// used to match an int, a short, a double, etc). Therefore we use +// a template type conversion operator in the implementation. +// +// The following template definition assumes that the Rhs parameter is +// a "bare" type (i.e. neither 'const T' nor 'T&'). +template +class ComparisonBase { + public: + explicit ComparisonBase(const Rhs& rhs) : rhs_(rhs) {} + template + operator Matcher() const { + return Matcher(new Impl(rhs_)); + } + + private: + template + static const T& Unwrap(const T& v) { return v; } + template + static const T& Unwrap(std::reference_wrapper v) { return v; } + + template + class Impl : public MatcherInterface { + public: + explicit Impl(const Rhs& rhs) : rhs_(rhs) {} + bool MatchAndExplain(Lhs lhs, + MatchResultListener* /* listener */) const override { + return Op()(lhs, Unwrap(rhs_)); + } + void DescribeTo(::std::ostream* os) const override { + *os << D::Desc() << " "; + UniversalPrint(Unwrap(rhs_), os); + } + void DescribeNegationTo(::std::ostream* os) const override { + *os << D::NegatedDesc() << " "; + UniversalPrint(Unwrap(rhs_), os); + } + + private: + Rhs rhs_; + }; + Rhs rhs_; +}; + +template +class EqMatcher : public ComparisonBase, Rhs, AnyEq> { + public: + explicit EqMatcher(const Rhs& rhs) + : ComparisonBase, Rhs, AnyEq>(rhs) { } + static const char* Desc() { return "is equal to"; } + static const char* NegatedDesc() { return "isn't equal to"; } +}; +template +class NeMatcher : public ComparisonBase, Rhs, AnyNe> { + public: + explicit NeMatcher(const Rhs& rhs) + : ComparisonBase, Rhs, AnyNe>(rhs) { } + static const char* Desc() { return "isn't equal to"; } + static const char* NegatedDesc() { return "is equal to"; } +}; +template +class LtMatcher : public ComparisonBase, Rhs, AnyLt> { + public: + explicit LtMatcher(const Rhs& rhs) + : ComparisonBase, Rhs, AnyLt>(rhs) { } + static const char* Desc() { return "is <"; } + static const char* NegatedDesc() { return "isn't <"; } +}; +template +class GtMatcher : public ComparisonBase, Rhs, AnyGt> { + public: + explicit GtMatcher(const Rhs& rhs) + : ComparisonBase, Rhs, AnyGt>(rhs) { } + static const char* Desc() { return "is >"; } + static const char* NegatedDesc() { return "isn't >"; } +}; +template +class LeMatcher : public ComparisonBase, Rhs, AnyLe> { + public: + explicit LeMatcher(const Rhs& rhs) + : ComparisonBase, Rhs, AnyLe>(rhs) { } + static const char* Desc() { return "is <="; } + static const char* NegatedDesc() { return "isn't <="; } +}; +template +class GeMatcher : public ComparisonBase, Rhs, AnyGe> { + public: + explicit GeMatcher(const Rhs& rhs) + : ComparisonBase, Rhs, AnyGe>(rhs) { } + static const char* Desc() { return "is >="; } + static const char* NegatedDesc() { return "isn't >="; } +}; + +// Implements polymorphic matchers MatchesRegex(regex) and +// ContainsRegex(regex), which can be used as a Matcher as long as +// T can be converted to a string. +class MatchesRegexMatcher { + public: + MatchesRegexMatcher(const RE* regex, bool full_match) + : regex_(regex), full_match_(full_match) {} + +#if GTEST_HAS_ABSL + bool MatchAndExplain(const absl::string_view& s, + MatchResultListener* listener) const { + return MatchAndExplain(std::string(s), listener); + } +#endif // GTEST_HAS_ABSL + + // Accepts pointer types, particularly: + // const char* + // char* + // const wchar_t* + // wchar_t* + template + bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { + return s != nullptr && MatchAndExplain(std::string(s), listener); + } + + // Matches anything that can convert to std::string. + // + // This is a template, not just a plain function with const std::string&, + // because absl::string_view has some interfering non-explicit constructors. + template + bool MatchAndExplain(const MatcheeStringType& s, + MatchResultListener* /* listener */) const { + const std::string& s2(s); + return full_match_ ? RE::FullMatch(s2, *regex_) + : RE::PartialMatch(s2, *regex_); + } + + void DescribeTo(::std::ostream* os) const { + *os << (full_match_ ? "matches" : "contains") << " regular expression "; + UniversalPrinter::Print(regex_->pattern(), os); + } + + void DescribeNegationTo(::std::ostream* os) const { + *os << "doesn't " << (full_match_ ? "match" : "contain") + << " regular expression "; + UniversalPrinter::Print(regex_->pattern(), os); + } + + private: + const std::shared_ptr regex_; + const bool full_match_; +}; +} // namespace internal + +// Matches a string that fully matches regular expression 'regex'. +// The matcher takes ownership of 'regex'. +inline PolymorphicMatcher MatchesRegex( + const internal::RE* regex) { + return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true)); +} +inline PolymorphicMatcher MatchesRegex( + const std::string& regex) { + return MatchesRegex(new internal::RE(regex)); +} + +// Matches a string that contains regular expression 'regex'. +// The matcher takes ownership of 'regex'. +inline PolymorphicMatcher ContainsRegex( + const internal::RE* regex) { + return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false)); +} +inline PolymorphicMatcher ContainsRegex( + const std::string& regex) { + return ContainsRegex(new internal::RE(regex)); +} + +// Creates a polymorphic matcher that matches anything equal to x. +// Note: if the parameter of Eq() were declared as const T&, Eq("foo") +// wouldn't compile. +template +inline internal::EqMatcher Eq(T x) { return internal::EqMatcher(x); } + +// Constructs a Matcher from a 'value' of type T. The constructed +// matcher matches any value that's equal to 'value'. +template +Matcher::Matcher(T value) { *this = Eq(value); } + +// Creates a monomorphic matcher that matches anything with type Lhs +// and equal to rhs. A user may need to use this instead of Eq(...) +// in order to resolve an overloading ambiguity. +// +// TypedEq(x) is just a convenient short-hand for Matcher(Eq(x)) +// or Matcher(x), but more readable than the latter. +// +// We could define similar monomorphic matchers for other comparison +// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do +// it yet as those are used much less than Eq() in practice. A user +// can always write Matcher(Lt(5)) to be explicit about the type, +// for example. +template +inline Matcher TypedEq(const Rhs& rhs) { return Eq(rhs); } + +// Creates a polymorphic matcher that matches anything >= x. +template +inline internal::GeMatcher Ge(Rhs x) { + return internal::GeMatcher(x); +} + +// Creates a polymorphic matcher that matches anything > x. +template +inline internal::GtMatcher Gt(Rhs x) { + return internal::GtMatcher(x); +} + +// Creates a polymorphic matcher that matches anything <= x. +template +inline internal::LeMatcher Le(Rhs x) { + return internal::LeMatcher(x); +} + +// Creates a polymorphic matcher that matches anything < x. +template +inline internal::LtMatcher Lt(Rhs x) { + return internal::LtMatcher(x); +} + +// Creates a polymorphic matcher that matches anything != x. +template +inline internal::NeMatcher Ne(Rhs x) { + return internal::NeMatcher(x); +} +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 5046 + +#endif // GTEST_INCLUDE_GTEST_GTEST_MATCHERS_H_ + +#include +#include + +namespace testing { +namespace internal { + +GTEST_DECLARE_string_(internal_run_death_test); + +// Names of the flags (needed for parsing Google Test flags). +const char kDeathTestStyleFlag[] = "death_test_style"; +const char kDeathTestUseFork[] = "death_test_use_fork"; +const char kInternalRunDeathTestFlag[] = "internal_run_death_test"; + +#if GTEST_HAS_DEATH_TEST + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +// DeathTest is a class that hides much of the complexity of the +// GTEST_DEATH_TEST_ macro. It is abstract; its static Create method +// returns a concrete class that depends on the prevailing death test +// style, as defined by the --gtest_death_test_style and/or +// --gtest_internal_run_death_test flags. + +// In describing the results of death tests, these terms are used with +// the corresponding definitions: +// +// exit status: The integer exit information in the format specified +// by wait(2) +// exit code: The integer code passed to exit(3), _exit(2), or +// returned from main() +class GTEST_API_ DeathTest { + public: + // Create returns false if there was an error determining the + // appropriate action to take for the current death test; for example, + // if the gtest_death_test_style flag is set to an invalid value. + // The LastMessage method will return a more detailed message in that + // case. Otherwise, the DeathTest pointer pointed to by the "test" + // argument is set. If the death test should be skipped, the pointer + // is set to NULL; otherwise, it is set to the address of a new concrete + // DeathTest object that controls the execution of the current test. + static bool Create(const char* statement, Matcher matcher, + const char* file, int line, DeathTest** test); + DeathTest(); + virtual ~DeathTest() { } + + // A helper class that aborts a death test when it's deleted. + class ReturnSentinel { + public: + explicit ReturnSentinel(DeathTest* test) : test_(test) { } + ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); } + private: + DeathTest* const test_; + GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel); + } GTEST_ATTRIBUTE_UNUSED_; + + // An enumeration of possible roles that may be taken when a death + // test is encountered. EXECUTE means that the death test logic should + // be executed immediately. OVERSEE means that the program should prepare + // the appropriate environment for a child process to execute the death + // test, then wait for it to complete. + enum TestRole { OVERSEE_TEST, EXECUTE_TEST }; + + // An enumeration of the three reasons that a test might be aborted. + enum AbortReason { + TEST_ENCOUNTERED_RETURN_STATEMENT, + TEST_THREW_EXCEPTION, + TEST_DID_NOT_DIE + }; + + // Assumes one of the above roles. + virtual TestRole AssumeRole() = 0; + + // Waits for the death test to finish and returns its status. + virtual int Wait() = 0; + + // Returns true if the death test passed; that is, the test process + // exited during the test, its exit status matches a user-supplied + // predicate, and its stderr output matches a user-supplied regular + // expression. + // The user-supplied predicate may be a macro expression rather + // than a function pointer or functor, or else Wait and Passed could + // be combined. + virtual bool Passed(bool exit_status_ok) = 0; + + // Signals that the death test did not die as expected. + virtual void Abort(AbortReason reason) = 0; + + // Returns a human-readable outcome message regarding the outcome of + // the last death test. + static const char* LastMessage(); + + static void set_last_death_test_message(const std::string& message); + + private: + // A string containing a description of the outcome of the last death test. + static std::string last_death_test_message_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); +}; + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +// Factory interface for death tests. May be mocked out for testing. +class DeathTestFactory { + public: + virtual ~DeathTestFactory() { } + virtual bool Create(const char* statement, + Matcher matcher, const char* file, + int line, DeathTest** test) = 0; +}; + +// A concrete DeathTestFactory implementation for normal use. +class DefaultDeathTestFactory : public DeathTestFactory { + public: + bool Create(const char* statement, Matcher matcher, + const char* file, int line, DeathTest** test) override; +}; + +// Returns true if exit_status describes a process that was terminated +// by a signal, or exited normally with a nonzero exit code. +GTEST_API_ bool ExitedUnsuccessfully(int exit_status); + +// A string passed to EXPECT_DEATH (etc.) is caught by one of these overloads +// and interpreted as a regex (rather than an Eq matcher) for legacy +// compatibility. +inline Matcher MakeDeathTestMatcher( + ::testing::internal::RE regex) { + return ContainsRegex(regex.pattern()); +} +inline Matcher MakeDeathTestMatcher(const char* regex) { + return ContainsRegex(regex); +} +inline Matcher MakeDeathTestMatcher( + const ::std::string& regex) { + return ContainsRegex(regex); +} + +// If a Matcher is passed to EXPECT_DEATH (etc.), it's +// used directly. +inline Matcher MakeDeathTestMatcher( + Matcher matcher) { + return matcher; +} + +// Traps C++ exceptions escaping statement and reports them as test +// failures. Note that trapping SEH exceptions is not implemented here. +# if GTEST_HAS_EXCEPTIONS +# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \ + try { \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + } catch (const ::std::exception& gtest_exception) { \ + fprintf(\ + stderr, \ + "\n%s: Caught std::exception-derived exception escaping the " \ + "death test statement. Exception message: %s\n", \ + ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \ + gtest_exception.what()); \ + fflush(stderr); \ + death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \ + } catch (...) { \ + death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \ + } + +# else +# define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) + +# endif + +// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*, +// ASSERT_EXIT*, and EXPECT_EXIT*. +#define GTEST_DEATH_TEST_(statement, predicate, regex_or_matcher, fail) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::AlwaysTrue()) { \ + ::testing::internal::DeathTest* gtest_dt; \ + if (!::testing::internal::DeathTest::Create( \ + #statement, \ + ::testing::internal::MakeDeathTestMatcher(regex_or_matcher), \ + __FILE__, __LINE__, >est_dt)) { \ + goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ + } \ + if (gtest_dt != nullptr) { \ + std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr(gtest_dt); \ + switch (gtest_dt->AssumeRole()) { \ + case ::testing::internal::DeathTest::OVERSEE_TEST: \ + if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \ + goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ + } \ + break; \ + case ::testing::internal::DeathTest::EXECUTE_TEST: { \ + ::testing::internal::DeathTest::ReturnSentinel gtest_sentinel( \ + gtest_dt); \ + GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \ + gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ + break; \ + } \ + default: \ + break; \ + } \ + } \ + } else \ + GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__) \ + : fail(::testing::internal::DeathTest::LastMessage()) +// The symbol "fail" here expands to something into which a message +// can be streamed. + +// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in +// NDEBUG mode. In this case we need the statements to be executed and the macro +// must accept a streamed message even though the message is never printed. +// The regex object is not evaluated, but it is used to prevent "unused" +// warnings and to avoid an expression that doesn't compile in debug mode. +#define GTEST_EXECUTE_STATEMENT_(statement, regex_or_matcher) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::AlwaysTrue()) { \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + } else if (!::testing::internal::AlwaysTrue()) { \ + ::testing::internal::MakeDeathTestMatcher(regex_or_matcher); \ + } else \ + ::testing::Message() + +// A class representing the parsed contents of the +// --gtest_internal_run_death_test flag, as it existed when +// RUN_ALL_TESTS was called. +class InternalRunDeathTestFlag { + public: + InternalRunDeathTestFlag(const std::string& a_file, + int a_line, + int an_index, + int a_write_fd) + : file_(a_file), line_(a_line), index_(an_index), + write_fd_(a_write_fd) {} + + ~InternalRunDeathTestFlag() { + if (write_fd_ >= 0) + posix::Close(write_fd_); + } + + const std::string& file() const { return file_; } + int line() const { return line_; } + int index() const { return index_; } + int write_fd() const { return write_fd_; } + + private: + std::string file_; + int line_; + int index_; + int write_fd_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag); +}; + +// Returns a newly created InternalRunDeathTestFlag object with fields +// initialized from the GTEST_FLAG(internal_run_death_test) flag if +// the flag is specified; otherwise returns NULL. +InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); + +#endif // GTEST_HAS_DEATH_TEST + +} // namespace internal +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ + +namespace testing { + +// This flag controls the style of death tests. Valid values are "threadsafe", +// meaning that the death test child process will re-execute the test binary +// from the start, running only a single death test, or "fast", +// meaning that the child process will execute the test logic immediately +// after forking. +GTEST_DECLARE_string_(death_test_style); + +#if GTEST_HAS_DEATH_TEST + +namespace internal { + +// Returns a Boolean value indicating whether the caller is currently +// executing in the context of the death test child process. Tools such as +// Valgrind heap checkers may need this to modify their behavior in death +// tests. IMPORTANT: This is an internal utility. Using it may break the +// implementation of death tests. User code MUST NOT use it. +GTEST_API_ bool InDeathTestChild(); + +} // namespace internal + +// The following macros are useful for writing death tests. + +// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is +// executed: +// +// 1. It generates a warning if there is more than one active +// thread. This is because it's safe to fork() or clone() only +// when there is a single thread. +// +// 2. The parent process clone()s a sub-process and runs the death +// test in it; the sub-process exits with code 0 at the end of the +// death test, if it hasn't exited already. +// +// 3. The parent process waits for the sub-process to terminate. +// +// 4. The parent process checks the exit code and error message of +// the sub-process. +// +// Examples: +// +// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number"); +// for (int i = 0; i < 5; i++) { +// EXPECT_DEATH(server.ProcessRequest(i), +// "Invalid request .* in ProcessRequest()") +// << "Failed to die on request " << i; +// } +// +// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting"); +// +// bool KilledBySIGHUP(int exit_code) { +// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP; +// } +// +// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!"); +// +// On the regular expressions used in death tests: +// +// GOOGLETEST_CM0005 DO NOT DELETE +// On POSIX-compliant systems (*nix), we use the library, +// which uses the POSIX extended regex syntax. +// +// On other platforms (e.g. Windows or Mac), we only support a simple regex +// syntax implemented as part of Google Test. This limited +// implementation should be enough most of the time when writing +// death tests; though it lacks many features you can find in PCRE +// or POSIX extended regex syntax. For example, we don't support +// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and +// repetition count ("x{5,7}"), among others. +// +// Below is the syntax that we do support. We chose it to be a +// subset of both PCRE and POSIX extended regex, so it's easy to +// learn wherever you come from. In the following: 'A' denotes a +// literal character, period (.), or a single \\ escape sequence; +// 'x' and 'y' denote regular expressions; 'm' and 'n' are for +// natural numbers. +// +// c matches any literal character c +// \\d matches any decimal digit +// \\D matches any character that's not a decimal digit +// \\f matches \f +// \\n matches \n +// \\r matches \r +// \\s matches any ASCII whitespace, including \n +// \\S matches any character that's not a whitespace +// \\t matches \t +// \\v matches \v +// \\w matches any letter, _, or decimal digit +// \\W matches any character that \\w doesn't match +// \\c matches any literal character c, which must be a punctuation +// . matches any single character except \n +// A? matches 0 or 1 occurrences of A +// A* matches 0 or many occurrences of A +// A+ matches 1 or many occurrences of A +// ^ matches the beginning of a string (not that of each line) +// $ matches the end of a string (not that of each line) +// xy matches x followed by y +// +// If you accidentally use PCRE or POSIX extended regex features +// not implemented by us, you will get a run-time failure. In that +// case, please try to rewrite your regular expression within the +// above syntax. +// +// This implementation is *not* meant to be as highly tuned or robust +// as a compiled regex library, but should perform well enough for a +// death test, which already incurs significant overhead by launching +// a child process. +// +// Known caveats: +// +// A "threadsafe" style death test obtains the path to the test +// program from argv[0] and re-executes it in the sub-process. For +// simplicity, the current implementation doesn't search the PATH +// when launching the sub-process. This means that the user must +// invoke the test program via a path that contains at least one +// path separator (e.g. path/to/foo_test and +// /absolute/path/to/bar_test are fine, but foo_test is not). This +// is rarely a problem as people usually don't put the test binary +// directory in PATH. +// + +// Asserts that a given statement causes the program to exit, with an +// integer exit status that satisfies predicate, and emitting error output +// that matches regex. +# define ASSERT_EXIT(statement, predicate, regex) \ + GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) + +// Like ASSERT_EXIT, but continues on to successive tests in the +// test suite, if any: +# define EXPECT_EXIT(statement, predicate, regex) \ + GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) + +// Asserts that a given statement causes the program to exit, either by +// explicitly exiting with a nonzero exit code or being killed by a +// signal, and emitting error output that matches regex. +# define ASSERT_DEATH(statement, regex) \ + ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) + +// Like ASSERT_DEATH, but continues on to successive tests in the +// test suite, if any: +# define EXPECT_DEATH(statement, regex) \ + EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) + +// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*: + +// Tests that an exit code describes a normal exit with a given exit code. +class GTEST_API_ ExitedWithCode { + public: + explicit ExitedWithCode(int exit_code); + bool operator()(int exit_status) const; + private: + // No implementation - assignment is unsupported. + void operator=(const ExitedWithCode& other); + + const int exit_code_; +}; + +# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA +// Tests that an exit code describes an exit due to termination by a +// given signal. +// GOOGLETEST_CM0006 DO NOT DELETE +class GTEST_API_ KilledBySignal { + public: + explicit KilledBySignal(int signum); + bool operator()(int exit_status) const; + private: + const int signum_; +}; +# endif // !GTEST_OS_WINDOWS + +// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode. +// The death testing framework causes this to have interesting semantics, +// since the sideeffects of the call are only visible in opt mode, and not +// in debug mode. +// +// In practice, this can be used to test functions that utilize the +// LOG(DFATAL) macro using the following style: +// +// int DieInDebugOr12(int* sideeffect) { +// if (sideeffect) { +// *sideeffect = 12; +// } +// LOG(DFATAL) << "death"; +// return 12; +// } +// +// TEST(TestSuite, TestDieOr12WorksInDgbAndOpt) { +// int sideeffect = 0; +// // Only asserts in dbg. +// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death"); +// +// #ifdef NDEBUG +// // opt-mode has sideeffect visible. +// EXPECT_EQ(12, sideeffect); +// #else +// // dbg-mode no visible sideeffect. +// EXPECT_EQ(0, sideeffect); +// #endif +// } +// +// This will assert that DieInDebugReturn12InOpt() crashes in debug +// mode, usually due to a DCHECK or LOG(DFATAL), but returns the +// appropriate fallback value (12 in this case) in opt mode. If you +// need to test that a function has appropriate side-effects in opt +// mode, include assertions against the side-effects. A general +// pattern for this is: +// +// EXPECT_DEBUG_DEATH({ +// // Side-effects here will have an effect after this statement in +// // opt mode, but none in debug mode. +// EXPECT_EQ(12, DieInDebugOr12(&sideeffect)); +// }, "death"); +// +# ifdef NDEBUG + +# define EXPECT_DEBUG_DEATH(statement, regex) \ + GTEST_EXECUTE_STATEMENT_(statement, regex) + +# define ASSERT_DEBUG_DEATH(statement, regex) \ + GTEST_EXECUTE_STATEMENT_(statement, regex) + +# else + +# define EXPECT_DEBUG_DEATH(statement, regex) \ + EXPECT_DEATH(statement, regex) + +# define ASSERT_DEBUG_DEATH(statement, regex) \ + ASSERT_DEATH(statement, regex) + +# endif // NDEBUG for EXPECT_DEBUG_DEATH +#endif // GTEST_HAS_DEATH_TEST + +// This macro is used for implementing macros such as +// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where +// death tests are not supported. Those macros must compile on such systems +// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on +// systems that support death tests. This allows one to write such a macro +// on a system that does not support death tests and be sure that it will +// compile on a death-test supporting system. It is exposed publicly so that +// systems that have death-tests with stricter requirements than +// GTEST_HAS_DEATH_TEST can write their own equivalent of +// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED. +// +// Parameters: +// statement - A statement that a macro such as EXPECT_DEATH would test +// for program termination. This macro has to make sure this +// statement is compiled but not executed, to ensure that +// EXPECT_DEATH_IF_SUPPORTED compiles with a certain +// parameter iff EXPECT_DEATH compiles with it. +// regex - A regex that a macro such as EXPECT_DEATH would use to test +// the output of statement. This parameter has to be +// compiled but not evaluated by this macro, to ensure that +// this macro only accepts expressions that a macro such as +// EXPECT_DEATH would accept. +// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED +// and a return statement for ASSERT_DEATH_IF_SUPPORTED. +// This ensures that ASSERT_DEATH_IF_SUPPORTED will not +// compile inside functions where ASSERT_DEATH doesn't +// compile. +// +// The branch that has an always false condition is used to ensure that +// statement and regex are compiled (and thus syntactically correct) but +// never executed. The unreachable code macro protects the terminator +// statement from generating an 'unreachable code' warning in case +// statement unconditionally returns or throws. The Message constructor at +// the end allows the syntax of streaming additional messages into the +// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH. +# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (::testing::internal::AlwaysTrue()) { \ + GTEST_LOG_(WARNING) \ + << "Death tests are not supported on this platform.\n" \ + << "Statement '" #statement "' cannot be verified."; \ + } else if (::testing::internal::AlwaysFalse()) { \ + ::testing::internal::RE::PartialMatch(".*", (regex)); \ + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ + terminator; \ + } else \ + ::testing::Message() + +// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and +// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if +// death tests are supported; otherwise they just issue a warning. This is +// useful when you are combining death test assertions with normal test +// assertions in one test. +#if GTEST_HAS_DEATH_TEST +# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ + EXPECT_DEATH(statement, regex) +# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ + ASSERT_DEATH(statement, regex) +#else +# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ + GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, ) +# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ + GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return) +#endif + +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Macros and functions for implementing parameterized tests +// in Google C++ Testing and Mocking Framework (Google Test) +// +// This file is generated by a SCRIPT. DO NOT EDIT BY HAND! +// +// GOOGLETEST_CM0001 DO NOT DELETE +#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ +#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ + + +// Value-parameterized tests allow you to test your code with different +// parameters without writing multiple copies of the same test. +// +// Here is how you use value-parameterized tests: + +#if 0 + +// To write value-parameterized tests, first you should define a fixture +// class. It is usually derived from testing::TestWithParam (see below for +// another inheritance scheme that's sometimes useful in more complicated +// class hierarchies), where the type of your parameter values. +// TestWithParam is itself derived from testing::Test. T can be any +// copyable type. If it's a raw pointer, you are responsible for managing the +// lifespan of the pointed values. + +class FooTest : public ::testing::TestWithParam { + // You can implement all the usual class fixture members here. +}; + +// Then, use the TEST_P macro to define as many parameterized tests +// for this fixture as you want. The _P suffix is for "parameterized" +// or "pattern", whichever you prefer to think. + +TEST_P(FooTest, DoesBlah) { + // Inside a test, access the test parameter with the GetParam() method + // of the TestWithParam class: + EXPECT_TRUE(foo.Blah(GetParam())); + ... +} + +TEST_P(FooTest, HasBlahBlah) { + ... +} + +// Finally, you can use INSTANTIATE_TEST_SUITE_P to instantiate the test +// case with any set of parameters you want. Google Test defines a number +// of functions for generating test parameters. They return what we call +// (surprise!) parameter generators. Here is a summary of them, which +// are all in the testing namespace: +// +// +// Range(begin, end [, step]) - Yields values {begin, begin+step, +// begin+step+step, ...}. The values do not +// include end. step defaults to 1. +// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. +// ValuesIn(container) - Yields values from a C-style array, an STL +// ValuesIn(begin,end) container, or an iterator range [begin, end). +// Bool() - Yields sequence {false, true}. +// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product +// for the math savvy) of the values generated +// by the N generators. +// +// For more details, see comments at the definitions of these functions below +// in this file. +// +// The following statement will instantiate tests from the FooTest test suite +// each with parameter values "meeny", "miny", and "moe". + +INSTANTIATE_TEST_SUITE_P(InstantiationName, + FooTest, + Values("meeny", "miny", "moe")); + +// To distinguish different instances of the pattern, (yes, you +// can instantiate it more than once) the first argument to the +// INSTANTIATE_TEST_SUITE_P macro is a prefix that will be added to the +// actual test suite name. Remember to pick unique prefixes for different +// instantiations. The tests from the instantiation above will have +// these names: +// +// * InstantiationName/FooTest.DoesBlah/0 for "meeny" +// * InstantiationName/FooTest.DoesBlah/1 for "miny" +// * InstantiationName/FooTest.DoesBlah/2 for "moe" +// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" +// * InstantiationName/FooTest.HasBlahBlah/1 for "miny" +// * InstantiationName/FooTest.HasBlahBlah/2 for "moe" +// +// You can use these names in --gtest_filter. +// +// This statement will instantiate all tests from FooTest again, each +// with parameter values "cat" and "dog": + +const char* pets[] = {"cat", "dog"}; +INSTANTIATE_TEST_SUITE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); + +// The tests from the instantiation above will have these names: +// +// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" +// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" +// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" +// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" +// +// Please note that INSTANTIATE_TEST_SUITE_P will instantiate all tests +// in the given test suite, whether their definitions come before or +// AFTER the INSTANTIATE_TEST_SUITE_P statement. +// +// Please also note that generator expressions (including parameters to the +// generators) are evaluated in InitGoogleTest(), after main() has started. +// This allows the user on one hand, to adjust generator parameters in order +// to dynamically determine a set of tests to run and on the other hand, +// give the user a chance to inspect the generated tests with Google Test +// reflection API before RUN_ALL_TESTS() is executed. +// +// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc +// for more examples. +// +// In the future, we plan to publish the API for defining new parameter +// generators. But for now this interface remains part of the internal +// implementation and is subject to change. +// +// +// A parameterized test fixture must be derived from testing::Test and from +// testing::WithParamInterface, where T is the type of the parameter +// values. Inheriting from TestWithParam satisfies that requirement because +// TestWithParam inherits from both Test and WithParamInterface. In more +// complicated hierarchies, however, it is occasionally useful to inherit +// separately from Test and WithParamInterface. For example: + +class BaseTest : public ::testing::Test { + // You can inherit all the usual members for a non-parameterized test + // fixture here. +}; + +class DerivedTest : public BaseTest, public ::testing::WithParamInterface { + // The usual test fixture members go here too. +}; + +TEST_F(BaseTest, HasFoo) { + // This is an ordinary non-parameterized test. +} + +TEST_P(DerivedTest, DoesBlah) { + // GetParam works just the same here as if you inherit from TestWithParam. + EXPECT_TRUE(foo.Blah(GetParam())); +} + +#endif // 0 + +#include + +// Copyright 2008 Google Inc. +// All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// Type and function utilities for implementing parameterized tests. + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ +#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include + + +namespace testing { +// Input to a parameterized test name generator, describing a test parameter. +// Consists of the parameter value and the integer parameter index. +template +struct TestParamInfo { + TestParamInfo(const ParamType& a_param, size_t an_index) : + param(a_param), + index(an_index) {} + ParamType param; + size_t index; +}; + +// A builtin parameterized test name generator which returns the result of +// testing::PrintToString. +struct PrintToStringParamName { + template + std::string operator()(const TestParamInfo& info) const { + return PrintToString(info.param); + } +}; + +namespace internal { + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// Utility Functions + +// Outputs a message explaining invalid registration of different +// fixture class for the same test suite. This may happen when +// TEST_P macro is used to define two tests with the same name +// but in different namespaces. +GTEST_API_ void ReportInvalidTestSuiteType(const char* test_suite_name, + CodeLocation code_location); + +template class ParamGeneratorInterface; +template class ParamGenerator; + +// Interface for iterating over elements provided by an implementation +// of ParamGeneratorInterface. +template +class ParamIteratorInterface { + public: + virtual ~ParamIteratorInterface() {} + // A pointer to the base generator instance. + // Used only for the purposes of iterator comparison + // to make sure that two iterators belong to the same generator. + virtual const ParamGeneratorInterface* BaseGenerator() const = 0; + // Advances iterator to point to the next element + // provided by the generator. The caller is responsible + // for not calling Advance() on an iterator equal to + // BaseGenerator()->End(). + virtual void Advance() = 0; + // Clones the iterator object. Used for implementing copy semantics + // of ParamIterator. + virtual ParamIteratorInterface* Clone() const = 0; + // Dereferences the current iterator and provides (read-only) access + // to the pointed value. It is the caller's responsibility not to call + // Current() on an iterator equal to BaseGenerator()->End(). + // Used for implementing ParamGenerator::operator*(). + virtual const T* Current() const = 0; + // Determines whether the given iterator and other point to the same + // element in the sequence generated by the generator. + // Used for implementing ParamGenerator::operator==(). + virtual bool Equals(const ParamIteratorInterface& other) const = 0; +}; + +// Class iterating over elements provided by an implementation of +// ParamGeneratorInterface. It wraps ParamIteratorInterface +// and implements the const forward iterator concept. +template +class ParamIterator { + public: + typedef T value_type; + typedef const T& reference; + typedef ptrdiff_t difference_type; + + // ParamIterator assumes ownership of the impl_ pointer. + ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {} + ParamIterator& operator=(const ParamIterator& other) { + if (this != &other) + impl_.reset(other.impl_->Clone()); + return *this; + } + + const T& operator*() const { return *impl_->Current(); } + const T* operator->() const { return impl_->Current(); } + // Prefix version of operator++. + ParamIterator& operator++() { + impl_->Advance(); + return *this; + } + // Postfix version of operator++. + ParamIterator operator++(int /*unused*/) { + ParamIteratorInterface* clone = impl_->Clone(); + impl_->Advance(); + return ParamIterator(clone); + } + bool operator==(const ParamIterator& other) const { + return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_); + } + bool operator!=(const ParamIterator& other) const { + return !(*this == other); + } + + private: + friend class ParamGenerator; + explicit ParamIterator(ParamIteratorInterface* impl) : impl_(impl) {} + std::unique_ptr > impl_; +}; + +// ParamGeneratorInterface is the binary interface to access generators +// defined in other translation units. +template +class ParamGeneratorInterface { + public: + typedef T ParamType; + + virtual ~ParamGeneratorInterface() {} + + // Generator interface definition + virtual ParamIteratorInterface* Begin() const = 0; + virtual ParamIteratorInterface* End() const = 0; +}; + +// Wraps ParamGeneratorInterface and provides general generator syntax +// compatible with the STL Container concept. +// This class implements copy initialization semantics and the contained +// ParamGeneratorInterface instance is shared among all copies +// of the original object. This is possible because that instance is immutable. +template +class ParamGenerator { + public: + typedef ParamIterator iterator; + + explicit ParamGenerator(ParamGeneratorInterface* impl) : impl_(impl) {} + ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {} + + ParamGenerator& operator=(const ParamGenerator& other) { + impl_ = other.impl_; + return *this; + } + + iterator begin() const { return iterator(impl_->Begin()); } + iterator end() const { return iterator(impl_->End()); } + + private: + std::shared_ptr > impl_; +}; + +// Generates values from a range of two comparable values. Can be used to +// generate sequences of user-defined types that implement operator+() and +// operator<(). +// This class is used in the Range() function. +template +class RangeGenerator : public ParamGeneratorInterface { + public: + RangeGenerator(T begin, T end, IncrementT step) + : begin_(begin), end_(end), + step_(step), end_index_(CalculateEndIndex(begin, end, step)) {} + ~RangeGenerator() override {} + + ParamIteratorInterface* Begin() const override { + return new Iterator(this, begin_, 0, step_); + } + ParamIteratorInterface* End() const override { + return new Iterator(this, end_, end_index_, step_); + } + + private: + class Iterator : public ParamIteratorInterface { + public: + Iterator(const ParamGeneratorInterface* base, T value, int index, + IncrementT step) + : base_(base), value_(value), index_(index), step_(step) {} + ~Iterator() override {} + + const ParamGeneratorInterface* BaseGenerator() const override { + return base_; + } + void Advance() override { + value_ = static_cast(value_ + step_); + index_++; + } + ParamIteratorInterface* Clone() const override { + return new Iterator(*this); + } + const T* Current() const override { return &value_; } + bool Equals(const ParamIteratorInterface& other) const override { + // Having the same base generator guarantees that the other + // iterator is of the same type and we can downcast. + GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) + << "The program attempted to compare iterators " + << "from different generators." << std::endl; + const int other_index = + CheckedDowncastToActualType(&other)->index_; + return index_ == other_index; + } + + private: + Iterator(const Iterator& other) + : ParamIteratorInterface(), + base_(other.base_), value_(other.value_), index_(other.index_), + step_(other.step_) {} + + // No implementation - assignment is unsupported. + void operator=(const Iterator& other); + + const ParamGeneratorInterface* const base_; + T value_; + int index_; + const IncrementT step_; + }; // class RangeGenerator::Iterator + + static int CalculateEndIndex(const T& begin, + const T& end, + const IncrementT& step) { + int end_index = 0; + for (T i = begin; i < end; i = static_cast(i + step)) + end_index++; + return end_index; + } + + // No implementation - assignment is unsupported. + void operator=(const RangeGenerator& other); + + const T begin_; + const T end_; + const IncrementT step_; + // The index for the end() iterator. All the elements in the generated + // sequence are indexed (0-based) to aid iterator comparison. + const int end_index_; +}; // class RangeGenerator + + +// Generates values from a pair of STL-style iterators. Used in the +// ValuesIn() function. The elements are copied from the source range +// since the source can be located on the stack, and the generator +// is likely to persist beyond that stack frame. +template +class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface { + public: + template + ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) + : container_(begin, end) {} + ~ValuesInIteratorRangeGenerator() override {} + + ParamIteratorInterface* Begin() const override { + return new Iterator(this, container_.begin()); + } + ParamIteratorInterface* End() const override { + return new Iterator(this, container_.end()); + } + + private: + typedef typename ::std::vector ContainerType; + + class Iterator : public ParamIteratorInterface { + public: + Iterator(const ParamGeneratorInterface* base, + typename ContainerType::const_iterator iterator) + : base_(base), iterator_(iterator) {} + ~Iterator() override {} + + const ParamGeneratorInterface* BaseGenerator() const override { + return base_; + } + void Advance() override { + ++iterator_; + value_.reset(); + } + ParamIteratorInterface* Clone() const override { + return new Iterator(*this); + } + // We need to use cached value referenced by iterator_ because *iterator_ + // can return a temporary object (and of type other then T), so just + // having "return &*iterator_;" doesn't work. + // value_ is updated here and not in Advance() because Advance() + // can advance iterator_ beyond the end of the range, and we cannot + // detect that fact. The client code, on the other hand, is + // responsible for not calling Current() on an out-of-range iterator. + const T* Current() const override { + if (value_.get() == nullptr) value_.reset(new T(*iterator_)); + return value_.get(); + } + bool Equals(const ParamIteratorInterface& other) const override { + // Having the same base generator guarantees that the other + // iterator is of the same type and we can downcast. + GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) + << "The program attempted to compare iterators " + << "from different generators." << std::endl; + return iterator_ == + CheckedDowncastToActualType(&other)->iterator_; + } + + private: + Iterator(const Iterator& other) + // The explicit constructor call suppresses a false warning + // emitted by gcc when supplied with the -Wextra option. + : ParamIteratorInterface(), + base_(other.base_), + iterator_(other.iterator_) {} + + const ParamGeneratorInterface* const base_; + typename ContainerType::const_iterator iterator_; + // A cached value of *iterator_. We keep it here to allow access by + // pointer in the wrapping iterator's operator->(). + // value_ needs to be mutable to be accessed in Current(). + // Use of std::unique_ptr helps manage cached value's lifetime, + // which is bound by the lifespan of the iterator itself. + mutable std::unique_ptr value_; + }; // class ValuesInIteratorRangeGenerator::Iterator + + // No implementation - assignment is unsupported. + void operator=(const ValuesInIteratorRangeGenerator& other); + + const ContainerType container_; +}; // class ValuesInIteratorRangeGenerator + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// Default parameterized test name generator, returns a string containing the +// integer test parameter index. +template +std::string DefaultParamName(const TestParamInfo& info) { + Message name_stream; + name_stream << info.index; + return name_stream.GetString(); +} + +template +void TestNotEmpty() { + static_assert(sizeof(T) == 0, "Empty arguments are not allowed."); +} +template +void TestNotEmpty(const T&) {} + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// Stores a parameter value and later creates tests parameterized with that +// value. +template +class ParameterizedTestFactory : public TestFactoryBase { + public: + typedef typename TestClass::ParamType ParamType; + explicit ParameterizedTestFactory(ParamType parameter) : + parameter_(parameter) {} + Test* CreateTest() override { + TestClass::SetParam(¶meter_); + return new TestClass(); + } + + private: + const ParamType parameter_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory); +}; + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// TestMetaFactoryBase is a base class for meta-factories that create +// test factories for passing into MakeAndRegisterTestInfo function. +template +class TestMetaFactoryBase { + public: + virtual ~TestMetaFactoryBase() {} + + virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0; +}; + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// TestMetaFactory creates test factories for passing into +// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives +// ownership of test factory pointer, same factory object cannot be passed +// into that method twice. But ParameterizedTestSuiteInfo is going to call +// it for each Test/Parameter value combination. Thus it needs meta factory +// creator class. +template +class TestMetaFactory + : public TestMetaFactoryBase { + public: + using ParamType = typename TestSuite::ParamType; + + TestMetaFactory() {} + + TestFactoryBase* CreateTestFactory(ParamType parameter) override { + return new ParameterizedTestFactory(parameter); + } + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory); +}; + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// ParameterizedTestSuiteInfoBase is a generic interface +// to ParameterizedTestSuiteInfo classes. ParameterizedTestSuiteInfoBase +// accumulates test information provided by TEST_P macro invocations +// and generators provided by INSTANTIATE_TEST_SUITE_P macro invocations +// and uses that information to register all resulting test instances +// in RegisterTests method. The ParameterizeTestSuiteRegistry class holds +// a collection of pointers to the ParameterizedTestSuiteInfo objects +// and calls RegisterTests() on each of them when asked. +class ParameterizedTestSuiteInfoBase { + public: + virtual ~ParameterizedTestSuiteInfoBase() {} + + // Base part of test suite name for display purposes. + virtual const std::string& GetTestSuiteName() const = 0; + // Test case id to verify identity. + virtual TypeId GetTestSuiteTypeId() const = 0; + // UnitTest class invokes this method to register tests in this + // test suite right before running them in RUN_ALL_TESTS macro. + // This method should not be called more than once on any single + // instance of a ParameterizedTestSuiteInfoBase derived class. + virtual void RegisterTests() = 0; + + protected: + ParameterizedTestSuiteInfoBase() {} + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteInfoBase); +}; + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// ParameterizedTestSuiteInfo accumulates tests obtained from TEST_P +// macro invocations for a particular test suite and generators +// obtained from INSTANTIATE_TEST_SUITE_P macro invocations for that +// test suite. It registers tests with all values generated by all +// generators when asked. +template +class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase { + public: + // ParamType and GeneratorCreationFunc are private types but are required + // for declarations of public methods AddTestPattern() and + // AddTestSuiteInstantiation(). + using ParamType = typename TestSuite::ParamType; + // A function that returns an instance of appropriate generator type. + typedef ParamGenerator(GeneratorCreationFunc)(); + using ParamNameGeneratorFunc = std::string(const TestParamInfo&); + + explicit ParameterizedTestSuiteInfo(const char* name, + CodeLocation code_location) + : test_suite_name_(name), code_location_(code_location) {} + + // Test case base name for display purposes. + const std::string& GetTestSuiteName() const override { + return test_suite_name_; + } + // Test case id to verify identity. + TypeId GetTestSuiteTypeId() const override { return GetTypeId(); } + // TEST_P macro uses AddTestPattern() to record information + // about a single test in a LocalTestInfo structure. + // test_suite_name is the base name of the test suite (without invocation + // prefix). test_base_name is the name of an individual test without + // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is + // test suite base name and DoBar is test base name. + void AddTestPattern(const char* test_suite_name, const char* test_base_name, + TestMetaFactoryBase* meta_factory) { + tests_.push_back(std::shared_ptr( + new TestInfo(test_suite_name, test_base_name, meta_factory))); + } + // INSTANTIATE_TEST_SUITE_P macro uses AddGenerator() to record information + // about a generator. + int AddTestSuiteInstantiation(const std::string& instantiation_name, + GeneratorCreationFunc* func, + ParamNameGeneratorFunc* name_func, + const char* file, int line) { + instantiations_.push_back( + InstantiationInfo(instantiation_name, func, name_func, file, line)); + return 0; // Return value used only to run this method in namespace scope. + } + // UnitTest class invokes this method to register tests in this test suite + // test suites right before running tests in RUN_ALL_TESTS macro. + // This method should not be called more than once on any single + // instance of a ParameterizedTestSuiteInfoBase derived class. + // UnitTest has a guard to prevent from calling this method more than once. + void RegisterTests() override { + for (typename TestInfoContainer::iterator test_it = tests_.begin(); + test_it != tests_.end(); ++test_it) { + std::shared_ptr test_info = *test_it; + for (typename InstantiationContainer::iterator gen_it = + instantiations_.begin(); gen_it != instantiations_.end(); + ++gen_it) { + const std::string& instantiation_name = gen_it->name; + ParamGenerator generator((*gen_it->generator)()); + ParamNameGeneratorFunc* name_func = gen_it->name_func; + const char* file = gen_it->file; + int line = gen_it->line; + + std::string test_suite_name; + if ( !instantiation_name.empty() ) + test_suite_name = instantiation_name + "/"; + test_suite_name += test_info->test_suite_base_name; + + size_t i = 0; + std::set test_param_names; + for (typename ParamGenerator::iterator param_it = + generator.begin(); + param_it != generator.end(); ++param_it, ++i) { + Message test_name_stream; + + std::string param_name = name_func( + TestParamInfo(*param_it, i)); + + GTEST_CHECK_(IsValidParamName(param_name)) + << "Parameterized test name '" << param_name + << "' is invalid, in " << file + << " line " << line << std::endl; + + GTEST_CHECK_(test_param_names.count(param_name) == 0) + << "Duplicate parameterized test name '" << param_name + << "', in " << file << " line " << line << std::endl; + + test_param_names.insert(param_name); + + test_name_stream << test_info->test_base_name << "/" << param_name; + MakeAndRegisterTestInfo( + test_suite_name.c_str(), test_name_stream.GetString().c_str(), + nullptr, // No type parameter. + PrintToString(*param_it).c_str(), code_location_, + GetTestSuiteTypeId(), + SuiteApiResolver::GetSetUpCaseOrSuite(file, line), + SuiteApiResolver::GetTearDownCaseOrSuite(file, line), + test_info->test_meta_factory->CreateTestFactory(*param_it)); + } // for param_it + } // for gen_it + } // for test_it + } // RegisterTests + + private: + // LocalTestInfo structure keeps information about a single test registered + // with TEST_P macro. + struct TestInfo { + TestInfo(const char* a_test_suite_base_name, const char* a_test_base_name, + TestMetaFactoryBase* a_test_meta_factory) + : test_suite_base_name(a_test_suite_base_name), + test_base_name(a_test_base_name), + test_meta_factory(a_test_meta_factory) {} + + const std::string test_suite_base_name; + const std::string test_base_name; + const std::unique_ptr > test_meta_factory; + }; + using TestInfoContainer = ::std::vector >; + // Records data received from INSTANTIATE_TEST_SUITE_P macros: + // + struct InstantiationInfo { + InstantiationInfo(const std::string &name_in, + GeneratorCreationFunc* generator_in, + ParamNameGeneratorFunc* name_func_in, + const char* file_in, + int line_in) + : name(name_in), + generator(generator_in), + name_func(name_func_in), + file(file_in), + line(line_in) {} + + std::string name; + GeneratorCreationFunc* generator; + ParamNameGeneratorFunc* name_func; + const char* file; + int line; + }; + typedef ::std::vector InstantiationContainer; + + static bool IsValidParamName(const std::string& name) { + // Check for empty string + if (name.empty()) + return false; + + // Check for invalid characters + for (std::string::size_type index = 0; index < name.size(); ++index) { + if (!isalnum(name[index]) && name[index] != '_') + return false; + } + + return true; + } + + const std::string test_suite_name_; + CodeLocation code_location_; + TestInfoContainer tests_; + InstantiationContainer instantiations_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteInfo); +}; // class ParameterizedTestSuiteInfo + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +template +using ParameterizedTestCaseInfo = ParameterizedTestSuiteInfo; +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// ParameterizedTestSuiteRegistry contains a map of +// ParameterizedTestSuiteInfoBase classes accessed by test suite names. TEST_P +// and INSTANTIATE_TEST_SUITE_P macros use it to locate their corresponding +// ParameterizedTestSuiteInfo descriptors. +class ParameterizedTestSuiteRegistry { + public: + ParameterizedTestSuiteRegistry() {} + ~ParameterizedTestSuiteRegistry() { + for (auto& test_suite_info : test_suite_infos_) { + delete test_suite_info; + } + } + + // Looks up or creates and returns a structure containing information about + // tests and instantiations of a particular test suite. + template + ParameterizedTestSuiteInfo* GetTestSuitePatternHolder( + const char* test_suite_name, CodeLocation code_location) { + ParameterizedTestSuiteInfo* typed_test_info = nullptr; + for (auto& test_suite_info : test_suite_infos_) { + if (test_suite_info->GetTestSuiteName() == test_suite_name) { + if (test_suite_info->GetTestSuiteTypeId() != GetTypeId()) { + // Complain about incorrect usage of Google Test facilities + // and terminate the program since we cannot guaranty correct + // test suite setup and tear-down in this case. + ReportInvalidTestSuiteType(test_suite_name, code_location); + posix::Abort(); + } else { + // At this point we are sure that the object we found is of the same + // type we are looking for, so we downcast it to that type + // without further checks. + typed_test_info = CheckedDowncastToActualType< + ParameterizedTestSuiteInfo >(test_suite_info); + } + break; + } + } + if (typed_test_info == nullptr) { + typed_test_info = new ParameterizedTestSuiteInfo( + test_suite_name, code_location); + test_suite_infos_.push_back(typed_test_info); + } + return typed_test_info; + } + void RegisterTests() { + for (auto& test_suite_info : test_suite_infos_) { + test_suite_info->RegisterTests(); + } + } +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + template + ParameterizedTestCaseInfo* GetTestCasePatternHolder( + const char* test_case_name, CodeLocation code_location) { + return GetTestSuitePatternHolder(test_case_name, code_location); + } + +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + private: + using TestSuiteInfoContainer = ::std::vector; + + TestSuiteInfoContainer test_suite_infos_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteRegistry); +}; + +} // namespace internal + +// Forward declarations of ValuesIn(), which is implemented in +// include/gtest/gtest-param-test.h. +template +internal::ParamGenerator ValuesIn( + const Container& container); + +namespace internal { +// Used in the Values() function to provide polymorphic capabilities. + +template +class ValueArray { + public: + ValueArray(Ts... v) : v_{std::move(v)...} {} + + template + operator ParamGenerator() const { // NOLINT + return ValuesIn(MakeVector(MakeIndexSequence())); + } + + private: + template + std::vector MakeVector(IndexSequence) const { + return std::vector{static_cast(v_.template Get())...}; + } + + FlatTuple v_; +}; + +template +class CartesianProductGenerator + : public ParamGeneratorInterface<::std::tuple> { + public: + typedef ::std::tuple ParamType; + + CartesianProductGenerator(const std::tuple...>& g) + : generators_(g) {} + ~CartesianProductGenerator() override {} + + ParamIteratorInterface* Begin() const override { + return new Iterator(this, generators_, false); + } + ParamIteratorInterface* End() const override { + return new Iterator(this, generators_, true); + } + + private: + template + class IteratorImpl; + template + class IteratorImpl> + : public ParamIteratorInterface { + public: + IteratorImpl(const ParamGeneratorInterface* base, + const std::tuple...>& generators, bool is_end) + : base_(base), + begin_(std::get(generators).begin()...), + end_(std::get(generators).end()...), + current_(is_end ? end_ : begin_) { + ComputeCurrentValue(); + } + ~IteratorImpl() override {} + + const ParamGeneratorInterface* BaseGenerator() const override { + return base_; + } + // Advance should not be called on beyond-of-range iterators + // so no component iterators must be beyond end of range, either. + void Advance() override { + assert(!AtEnd()); + // Advance the last iterator. + ++std::get(current_); + // if that reaches end, propagate that up. + AdvanceIfEnd(); + ComputeCurrentValue(); + } + ParamIteratorInterface* Clone() const override { + return new IteratorImpl(*this); + } + + const ParamType* Current() const override { return current_value_.get(); } + + bool Equals(const ParamIteratorInterface& other) const override { + // Having the same base generator guarantees that the other + // iterator is of the same type and we can downcast. + GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) + << "The program attempted to compare iterators " + << "from different generators." << std::endl; + const IteratorImpl* typed_other = + CheckedDowncastToActualType(&other); + + // We must report iterators equal if they both point beyond their + // respective ranges. That can happen in a variety of fashions, + // so we have to consult AtEnd(). + if (AtEnd() && typed_other->AtEnd()) return true; + + bool same = true; + bool dummy[] = { + (same = same && std::get(current_) == + std::get(typed_other->current_))...}; + (void)dummy; + return same; + } + + private: + template + void AdvanceIfEnd() { + if (std::get(current_) != std::get(end_)) return; + + bool last = ThisI == 0; + if (last) { + // We are done. Nothing else to propagate. + return; + } + + constexpr size_t NextI = ThisI - (ThisI != 0); + std::get(current_) = std::get(begin_); + ++std::get(current_); + AdvanceIfEnd(); + } + + void ComputeCurrentValue() { + if (!AtEnd()) + current_value_ = std::make_shared(*std::get(current_)...); + } + bool AtEnd() const { + bool at_end = false; + bool dummy[] = { + (at_end = at_end || std::get(current_) == std::get(end_))...}; + (void)dummy; + return at_end; + } + + const ParamGeneratorInterface* const base_; + std::tuple::iterator...> begin_; + std::tuple::iterator...> end_; + std::tuple::iterator...> current_; + std::shared_ptr current_value_; + }; + + using Iterator = IteratorImpl::type>; + + std::tuple...> generators_; +}; + +template +class CartesianProductHolder { + public: + CartesianProductHolder(const Gen&... g) : generators_(g...) {} + template + operator ParamGenerator<::std::tuple>() const { + return ParamGenerator<::std::tuple>( + new CartesianProductGenerator(generators_)); + } + + private: + std::tuple generators_; +}; + +} // namespace internal +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ + +namespace testing { + +// Functions producing parameter generators. +// +// Google Test uses these generators to produce parameters for value- +// parameterized tests. When a parameterized test suite is instantiated +// with a particular generator, Google Test creates and runs tests +// for each element in the sequence produced by the generator. +// +// In the following sample, tests from test suite FooTest are instantiated +// each three times with parameter values 3, 5, and 8: +// +// class FooTest : public TestWithParam { ... }; +// +// TEST_P(FooTest, TestThis) { +// } +// TEST_P(FooTest, TestThat) { +// } +// INSTANTIATE_TEST_SUITE_P(TestSequence, FooTest, Values(3, 5, 8)); +// + +// Range() returns generators providing sequences of values in a range. +// +// Synopsis: +// Range(start, end) +// - returns a generator producing a sequence of values {start, start+1, +// start+2, ..., }. +// Range(start, end, step) +// - returns a generator producing a sequence of values {start, start+step, +// start+step+step, ..., }. +// Notes: +// * The generated sequences never include end. For example, Range(1, 5) +// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) +// returns a generator producing {1, 3, 5, 7}. +// * start and end must have the same type. That type may be any integral or +// floating-point type or a user defined type satisfying these conditions: +// * It must be assignable (have operator=() defined). +// * It must have operator+() (operator+(int-compatible type) for +// two-operand version). +// * It must have operator<() defined. +// Elements in the resulting sequences will also have that type. +// * Condition start < end must be satisfied in order for resulting sequences +// to contain any elements. +// +template +internal::ParamGenerator Range(T start, T end, IncrementT step) { + return internal::ParamGenerator( + new internal::RangeGenerator(start, end, step)); +} + +template +internal::ParamGenerator Range(T start, T end) { + return Range(start, end, 1); +} + +// ValuesIn() function allows generation of tests with parameters coming from +// a container. +// +// Synopsis: +// ValuesIn(const T (&array)[N]) +// - returns a generator producing sequences with elements from +// a C-style array. +// ValuesIn(const Container& container) +// - returns a generator producing sequences with elements from +// an STL-style container. +// ValuesIn(Iterator begin, Iterator end) +// - returns a generator producing sequences with elements from +// a range [begin, end) defined by a pair of STL-style iterators. These +// iterators can also be plain C pointers. +// +// Please note that ValuesIn copies the values from the containers +// passed in and keeps them to generate tests in RUN_ALL_TESTS(). +// +// Examples: +// +// This instantiates tests from test suite StringTest +// each with C-string values of "foo", "bar", and "baz": +// +// const char* strings[] = {"foo", "bar", "baz"}; +// INSTANTIATE_TEST_SUITE_P(StringSequence, StringTest, ValuesIn(strings)); +// +// This instantiates tests from test suite StlStringTest +// each with STL strings with values "a" and "b": +// +// ::std::vector< ::std::string> GetParameterStrings() { +// ::std::vector< ::std::string> v; +// v.push_back("a"); +// v.push_back("b"); +// return v; +// } +// +// INSTANTIATE_TEST_SUITE_P(CharSequence, +// StlStringTest, +// ValuesIn(GetParameterStrings())); +// +// +// This will also instantiate tests from CharTest +// each with parameter values 'a' and 'b': +// +// ::std::list GetParameterChars() { +// ::std::list list; +// list.push_back('a'); +// list.push_back('b'); +// return list; +// } +// ::std::list l = GetParameterChars(); +// INSTANTIATE_TEST_SUITE_P(CharSequence2, +// CharTest, +// ValuesIn(l.begin(), l.end())); +// +template +internal::ParamGenerator< + typename ::testing::internal::IteratorTraits::value_type> +ValuesIn(ForwardIterator begin, ForwardIterator end) { + typedef typename ::testing::internal::IteratorTraits + ::value_type ParamType; + return internal::ParamGenerator( + new internal::ValuesInIteratorRangeGenerator(begin, end)); +} + +template +internal::ParamGenerator ValuesIn(const T (&array)[N]) { + return ValuesIn(array, array + N); +} + +template +internal::ParamGenerator ValuesIn( + const Container& container) { + return ValuesIn(container.begin(), container.end()); +} + +// Values() allows generating tests from explicitly specified list of +// parameters. +// +// Synopsis: +// Values(T v1, T v2, ..., T vN) +// - returns a generator producing sequences with elements v1, v2, ..., vN. +// +// For example, this instantiates tests from test suite BarTest each +// with values "one", "two", and "three": +// +// INSTANTIATE_TEST_SUITE_P(NumSequence, +// BarTest, +// Values("one", "two", "three")); +// +// This instantiates tests from test suite BazTest each with values 1, 2, 3.5. +// The exact type of values will depend on the type of parameter in BazTest. +// +// INSTANTIATE_TEST_SUITE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); +// +// +template +internal::ValueArray Values(T... v) { + return internal::ValueArray(std::move(v)...); +} + +// Bool() allows generating tests with parameters in a set of (false, true). +// +// Synopsis: +// Bool() +// - returns a generator producing sequences with elements {false, true}. +// +// It is useful when testing code that depends on Boolean flags. Combinations +// of multiple flags can be tested when several Bool()'s are combined using +// Combine() function. +// +// In the following example all tests in the test suite FlagDependentTest +// will be instantiated twice with parameters false and true. +// +// class FlagDependentTest : public testing::TestWithParam { +// virtual void SetUp() { +// external_flag = GetParam(); +// } +// } +// INSTANTIATE_TEST_SUITE_P(BoolSequence, FlagDependentTest, Bool()); +// +inline internal::ParamGenerator Bool() { + return Values(false, true); +} + +// Combine() allows the user to combine two or more sequences to produce +// values of a Cartesian product of those sequences' elements. +// +// Synopsis: +// Combine(gen1, gen2, ..., genN) +// - returns a generator producing sequences with elements coming from +// the Cartesian product of elements from the sequences generated by +// gen1, gen2, ..., genN. The sequence elements will have a type of +// std::tuple where T1, T2, ..., TN are the types +// of elements from sequences produces by gen1, gen2, ..., genN. +// +// Combine can have up to 10 arguments. +// +// Example: +// +// This will instantiate tests in test suite AnimalTest each one with +// the parameter values tuple("cat", BLACK), tuple("cat", WHITE), +// tuple("dog", BLACK), and tuple("dog", WHITE): +// +// enum Color { BLACK, GRAY, WHITE }; +// class AnimalTest +// : public testing::TestWithParam > {...}; +// +// TEST_P(AnimalTest, AnimalLooksNice) {...} +// +// INSTANTIATE_TEST_SUITE_P(AnimalVariations, AnimalTest, +// Combine(Values("cat", "dog"), +// Values(BLACK, WHITE))); +// +// This will instantiate tests in FlagDependentTest with all variations of two +// Boolean flags: +// +// class FlagDependentTest +// : public testing::TestWithParam > { +// virtual void SetUp() { +// // Assigns external_flag_1 and external_flag_2 values from the tuple. +// std::tie(external_flag_1, external_flag_2) = GetParam(); +// } +// }; +// +// TEST_P(FlagDependentTest, TestFeature1) { +// // Test your code using external_flag_1 and external_flag_2 here. +// } +// INSTANTIATE_TEST_SUITE_P(TwoBoolSequence, FlagDependentTest, +// Combine(Bool(), Bool())); +// +template +internal::CartesianProductHolder Combine(const Generator&... g) { + return internal::CartesianProductHolder(g...); +} + +#define TEST_P(test_suite_name, test_name) \ + class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \ + : public test_suite_name { \ + public: \ + GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {} \ + virtual void TestBody(); \ + \ + private: \ + static int AddToRegistry() { \ + ::testing::UnitTest::GetInstance() \ + ->parameterized_test_registry() \ + .GetTestSuitePatternHolder( \ + #test_suite_name, \ + ::testing::internal::CodeLocation(__FILE__, __LINE__)) \ + ->AddTestPattern( \ + GTEST_STRINGIFY_(test_suite_name), GTEST_STRINGIFY_(test_name), \ + new ::testing::internal::TestMetaFactory()); \ + return 0; \ + } \ + static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_; \ + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name, \ + test_name)); \ + }; \ + int GTEST_TEST_CLASS_NAME_(test_suite_name, \ + test_name)::gtest_registering_dummy_ = \ + GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry(); \ + void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody() + +// The last argument to INSTANTIATE_TEST_SUITE_P allows the user to specify +// generator and an optional function or functor that generates custom test name +// suffixes based on the test parameters. Such a function or functor should +// accept one argument of type testing::TestParamInfo, and +// return std::string. +// +// testing::PrintToStringParamName is a builtin test suffix generator that +// returns the value of testing::PrintToString(GetParam()). +// +// Note: test names must be non-empty, unique, and may only contain ASCII +// alphanumeric characters or underscore. Because PrintToString adds quotes +// to std::string and C strings, it won't work for these types. + +#define GTEST_EXPAND_(arg) arg +#define GTEST_GET_FIRST_(first, ...) first +#define GTEST_GET_SECOND_(first, second, ...) second + +#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...) \ + static ::testing::internal::ParamGenerator \ + gtest_##prefix##test_suite_name##_EvalGenerator_() { \ + return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_)); \ + } \ + static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_( \ + const ::testing::TestParamInfo& info) { \ + if (::testing::internal::AlwaysFalse()) { \ + ::testing::internal::TestNotEmpty(GTEST_EXPAND_(GTEST_GET_SECOND_( \ + __VA_ARGS__, \ + ::testing::internal::DefaultParamName, \ + DUMMY_PARAM_))); \ + auto t = std::make_tuple(__VA_ARGS__); \ + static_assert(std::tuple_size::value <= 2, \ + "Too Many Args!"); \ + } \ + return ((GTEST_EXPAND_(GTEST_GET_SECOND_( \ + __VA_ARGS__, \ + ::testing::internal::DefaultParamName, \ + DUMMY_PARAM_))))(info); \ + } \ + static int gtest_##prefix##test_suite_name##_dummy_ \ + GTEST_ATTRIBUTE_UNUSED_ = \ + ::testing::UnitTest::GetInstance() \ + ->parameterized_test_registry() \ + .GetTestSuitePatternHolder( \ + #test_suite_name, \ + ::testing::internal::CodeLocation(__FILE__, __LINE__)) \ + ->AddTestSuiteInstantiation( \ + #prefix, >est_##prefix##test_suite_name##_EvalGenerator_, \ + >est_##prefix##test_suite_name##_EvalGenerateName_, \ + __FILE__, __LINE__) + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +#define INSTANTIATE_TEST_CASE_P \ + static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \ + ""); \ + INSTANTIATE_TEST_SUITE_P +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ +// Copyright 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +// Google C++ Testing and Mocking Framework definitions useful in production code. +// GOOGLETEST_CM0003 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ +#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ + +// When you need to test the private or protected members of a class, +// use the FRIEND_TEST macro to declare your tests as friends of the +// class. For example: +// +// class MyClass { +// private: +// void PrivateMethod(); +// FRIEND_TEST(MyClassTest, PrivateMethodWorks); +// }; +// +// class MyClassTest : public testing::Test { +// // ... +// }; +// +// TEST_F(MyClassTest, PrivateMethodWorks) { +// // Can call MyClass::PrivateMethod() here. +// } +// +// Note: The test class must be in the same namespace as the class being tested. +// For example, putting MyClassTest in an anonymous namespace will not work. + +#define FRIEND_TEST(test_case_name, test_name)\ +friend class test_case_name##_##test_name##_Test + +#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ +#define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ + +#include +#include + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +namespace testing { + +// A copyable object representing the result of a test part (i.e. an +// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()). +// +// Don't inherit from TestPartResult as its destructor is not virtual. +class GTEST_API_ TestPartResult { + public: + // The possible outcomes of a test part (i.e. an assertion or an + // explicit SUCCEED(), FAIL(), or ADD_FAILURE()). + enum Type { + kSuccess, // Succeeded. + kNonFatalFailure, // Failed but the test can continue. + kFatalFailure, // Failed and the test should be terminated. + kSkip // Skipped. + }; + + // C'tor. TestPartResult does NOT have a default constructor. + // Always use this constructor (with parameters) to create a + // TestPartResult object. + TestPartResult(Type a_type, const char* a_file_name, int a_line_number, + const char* a_message) + : type_(a_type), + file_name_(a_file_name == nullptr ? "" : a_file_name), + line_number_(a_line_number), + summary_(ExtractSummary(a_message)), + message_(a_message) {} + + // Gets the outcome of the test part. + Type type() const { return type_; } + + // Gets the name of the source file where the test part took place, or + // NULL if it's unknown. + const char* file_name() const { + return file_name_.empty() ? nullptr : file_name_.c_str(); + } + + // Gets the line in the source file where the test part took place, + // or -1 if it's unknown. + int line_number() const { return line_number_; } + + // Gets the summary of the failure message. + const char* summary() const { return summary_.c_str(); } + + // Gets the message associated with the test part. + const char* message() const { return message_.c_str(); } + + // Returns true iff the test part was skipped. + bool skipped() const { return type_ == kSkip; } + + // Returns true iff the test part passed. + bool passed() const { return type_ == kSuccess; } + + // Returns true iff the test part non-fatally failed. + bool nonfatally_failed() const { return type_ == kNonFatalFailure; } + + // Returns true iff the test part fatally failed. + bool fatally_failed() const { return type_ == kFatalFailure; } + + // Returns true iff the test part failed. + bool failed() const { return fatally_failed() || nonfatally_failed(); } + + private: + Type type_; + + // Gets the summary of the failure message by omitting the stack + // trace in it. + static std::string ExtractSummary(const char* message); + + // The name of the source file where the test part took place, or + // "" if the source file is unknown. + std::string file_name_; + // The line in the source file where the test part took place, or -1 + // if the line number is unknown. + int line_number_; + std::string summary_; // The test failure summary. + std::string message_; // The test failure message. +}; + +// Prints a TestPartResult object. +std::ostream& operator<<(std::ostream& os, const TestPartResult& result); + +// An array of TestPartResult objects. +// +// Don't inherit from TestPartResultArray as its destructor is not +// virtual. +class GTEST_API_ TestPartResultArray { + public: + TestPartResultArray() {} + + // Appends the given TestPartResult to the array. + void Append(const TestPartResult& result); + + // Returns the TestPartResult at the given index (0-based). + const TestPartResult& GetTestPartResult(int index) const; + + // Returns the number of TestPartResult objects in the array. + int size() const; + + private: + std::vector array_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray); +}; + +// This interface knows how to report a test part result. +class GTEST_API_ TestPartResultReporterInterface { + public: + virtual ~TestPartResultReporterInterface() {} + + virtual void ReportTestPartResult(const TestPartResult& result) = 0; +}; + +namespace internal { + +// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a +// statement generates new fatal failures. To do so it registers itself as the +// current test part result reporter. Besides checking if fatal failures were +// reported, it only delegates the reporting to the former result reporter. +// The original result reporter is restored in the destructor. +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +class GTEST_API_ HasNewFatalFailureHelper + : public TestPartResultReporterInterface { + public: + HasNewFatalFailureHelper(); + ~HasNewFatalFailureHelper() override; + void ReportTestPartResult(const TestPartResult& result) override; + bool has_new_fatal_failure() const { return has_new_fatal_failure_; } + private: + bool has_new_fatal_failure_; + TestPartResultReporterInterface* original_reporter_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper); +}; + +} // namespace internal + +} // namespace testing + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +#endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ +// Copyright 2008 Google Inc. +// All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ +#define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ + +// This header implements typed tests and type-parameterized tests. + +// Typed (aka type-driven) tests repeat the same test for types in a +// list. You must know which types you want to test with when writing +// typed tests. Here's how you do it: + +#if 0 + +// First, define a fixture class template. It should be parameterized +// by a type. Remember to derive it from testing::Test. +template +class FooTest : public testing::Test { + public: + ... + typedef std::list List; + static T shared_; + T value_; +}; + +// Next, associate a list of types with the test suite, which will be +// repeated for each type in the list. The typedef is necessary for +// the macro to parse correctly. +typedef testing::Types MyTypes; +TYPED_TEST_SUITE(FooTest, MyTypes); + +// If the type list contains only one type, you can write that type +// directly without Types<...>: +// TYPED_TEST_SUITE(FooTest, int); + +// Then, use TYPED_TEST() instead of TEST_F() to define as many typed +// tests for this test suite as you want. +TYPED_TEST(FooTest, DoesBlah) { + // Inside a test, refer to TypeParam to get the type parameter. + // Since we are inside a derived class template, C++ requires use to + // visit the members of FooTest via 'this'. + TypeParam n = this->value_; + + // To visit static members of the fixture, add the TestFixture:: + // prefix. + n += TestFixture::shared_; + + // To refer to typedefs in the fixture, add the "typename + // TestFixture::" prefix. + typename TestFixture::List values; + values.push_back(n); + ... +} + +TYPED_TEST(FooTest, HasPropertyA) { ... } + +// TYPED_TEST_SUITE takes an optional third argument which allows to specify a +// class that generates custom test name suffixes based on the type. This should +// be a class which has a static template function GetName(int index) returning +// a string for each type. The provided integer index equals the index of the +// type in the provided type list. In many cases the index can be ignored. +// +// For example: +// class MyTypeNames { +// public: +// template +// static std::string GetName(int) { +// if (std::is_same()) return "char"; +// if (std::is_same()) return "int"; +// if (std::is_same()) return "unsignedInt"; +// } +// }; +// TYPED_TEST_SUITE(FooTest, MyTypes, MyTypeNames); + +#endif // 0 + +// Type-parameterized tests are abstract test patterns parameterized +// by a type. Compared with typed tests, type-parameterized tests +// allow you to define the test pattern without knowing what the type +// parameters are. The defined pattern can be instantiated with +// different types any number of times, in any number of translation +// units. +// +// If you are designing an interface or concept, you can define a +// suite of type-parameterized tests to verify properties that any +// valid implementation of the interface/concept should have. Then, +// each implementation can easily instantiate the test suite to verify +// that it conforms to the requirements, without having to write +// similar tests repeatedly. Here's an example: + +#if 0 + +// First, define a fixture class template. It should be parameterized +// by a type. Remember to derive it from testing::Test. +template +class FooTest : public testing::Test { + ... +}; + +// Next, declare that you will define a type-parameterized test suite +// (the _P suffix is for "parameterized" or "pattern", whichever you +// prefer): +TYPED_TEST_SUITE_P(FooTest); + +// Then, use TYPED_TEST_P() to define as many type-parameterized tests +// for this type-parameterized test suite as you want. +TYPED_TEST_P(FooTest, DoesBlah) { + // Inside a test, refer to TypeParam to get the type parameter. + TypeParam n = 0; + ... +} + +TYPED_TEST_P(FooTest, HasPropertyA) { ... } + +// Now the tricky part: you need to register all test patterns before +// you can instantiate them. The first argument of the macro is the +// test suite name; the rest are the names of the tests in this test +// case. +REGISTER_TYPED_TEST_SUITE_P(FooTest, + DoesBlah, HasPropertyA); + +// Finally, you are free to instantiate the pattern with the types you +// want. If you put the above code in a header file, you can #include +// it in multiple C++ source files and instantiate it multiple times. +// +// To distinguish different instances of the pattern, the first +// argument to the INSTANTIATE_* macro is a prefix that will be added +// to the actual test suite name. Remember to pick unique prefixes for +// different instances. +typedef testing::Types MyTypes; +INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); + +// If the type list contains only one type, you can write that type +// directly without Types<...>: +// INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int); +// +// Similar to the optional argument of TYPED_TEST_SUITE above, +// INSTANTIATE_TEST_SUITE_P takes an optional fourth argument which allows to +// generate custom names. +// INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes, MyTypeNames); + +#endif // 0 + + +// Implements typed tests. + +#if GTEST_HAS_TYPED_TEST + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// Expands to the name of the typedef for the type parameters of the +// given test suite. +#define GTEST_TYPE_PARAMS_(TestSuiteName) gtest_type_params_##TestSuiteName##_ + +// Expands to the name of the typedef for the NameGenerator, responsible for +// creating the suffixes of the name. +#define GTEST_NAME_GENERATOR_(TestSuiteName) \ + gtest_type_params_##TestSuiteName##_NameGenerator + +// The 'Types' template argument below must have spaces around it +// since some compilers may choke on '>>' when passing a template +// instance (e.g. Types) +#define TYPED_TEST_SUITE(CaseName, Types, ...) \ + typedef ::testing::internal::TypeList::type GTEST_TYPE_PARAMS_( \ + CaseName); \ + typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type \ + GTEST_NAME_GENERATOR_(CaseName) + +# define TYPED_TEST(CaseName, TestName) \ + template \ + class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \ + : public CaseName { \ + private: \ + typedef CaseName TestFixture; \ + typedef gtest_TypeParam_ TypeParam; \ + virtual void TestBody(); \ + }; \ + static bool gtest_##CaseName##_##TestName##_registered_ \ + GTEST_ATTRIBUTE_UNUSED_ = \ + ::testing::internal::TypeParameterizedTest< \ + CaseName, \ + ::testing::internal::TemplateSel, \ + GTEST_TYPE_PARAMS_( \ + CaseName)>::Register("", \ + ::testing::internal::CodeLocation( \ + __FILE__, __LINE__), \ + #CaseName, #TestName, 0, \ + ::testing::internal::GenerateNames< \ + GTEST_NAME_GENERATOR_(CaseName), \ + GTEST_TYPE_PARAMS_(CaseName)>()); \ + template \ + void GTEST_TEST_CLASS_NAME_(CaseName, \ + TestName)::TestBody() + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +#define TYPED_TEST_CASE \ + static_assert(::testing::internal::TypedTestCaseIsDeprecated(), ""); \ + TYPED_TEST_SUITE +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +#endif // GTEST_HAS_TYPED_TEST + +// Implements type-parameterized tests. + +#if GTEST_HAS_TYPED_TEST_P + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// Expands to the namespace name that the type-parameterized tests for +// the given type-parameterized test suite are defined in. The exact +// name of the namespace is subject to change without notice. +#define GTEST_SUITE_NAMESPACE_(TestSuiteName) gtest_suite_##TestSuiteName##_ + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// +// Expands to the name of the variable used to remember the names of +// the defined tests in the given test suite. +#define GTEST_TYPED_TEST_SUITE_P_STATE_(TestSuiteName) \ + gtest_typed_test_suite_p_state_##TestSuiteName##_ + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY. +// +// Expands to the name of the variable used to remember the names of +// the registered tests in the given test suite. +#define GTEST_REGISTERED_TEST_NAMES_(TestSuiteName) \ + gtest_registered_test_names_##TestSuiteName##_ + +// The variables defined in the type-parameterized test macros are +// static as typically these macros are used in a .h file that can be +// #included in multiple translation units linked together. +#define TYPED_TEST_SUITE_P(SuiteName) \ + static ::testing::internal::TypedTestSuitePState \ + GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName) + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +#define TYPED_TEST_CASE_P \ + static_assert(::testing::internal::TypedTestCase_P_IsDeprecated(), ""); \ + TYPED_TEST_SUITE_P +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +#define TYPED_TEST_P(SuiteName, TestName) \ + namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \ + template \ + class TestName : public SuiteName { \ + private: \ + typedef SuiteName TestFixture; \ + typedef gtest_TypeParam_ TypeParam; \ + virtual void TestBody(); \ + }; \ + static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \ + GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName( \ + __FILE__, __LINE__, #SuiteName, #TestName); \ + } \ + template \ + void GTEST_SUITE_NAMESPACE_( \ + SuiteName)::TestName::TestBody() + +#define REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...) \ + namespace GTEST_SUITE_NAMESPACE_(SuiteName) { \ + typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \ + } \ + static const char* const GTEST_REGISTERED_TEST_NAMES_( \ + SuiteName) GTEST_ATTRIBUTE_UNUSED_ = \ + GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).VerifyRegisteredTestNames( \ + __FILE__, __LINE__, #__VA_ARGS__) + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +#define REGISTER_TYPED_TEST_CASE_P \ + static_assert(::testing::internal::RegisterTypedTestCase_P_IsDeprecated(), \ + ""); \ + REGISTER_TYPED_TEST_SUITE_P +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +// The 'Types' template argument below must have spaces around it +// since some compilers may choke on '>>' when passing a template +// instance (e.g. Types) +#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...) \ + static bool gtest_##Prefix##_##SuiteName GTEST_ATTRIBUTE_UNUSED_ = \ + ::testing::internal::TypeParameterizedTestSuite< \ + SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_, \ + ::testing::internal::TypeList::type>:: \ + Register(#Prefix, \ + ::testing::internal::CodeLocation(__FILE__, __LINE__), \ + >EST_TYPED_TEST_SUITE_P_STATE_(SuiteName), #SuiteName, \ + GTEST_REGISTERED_TEST_NAMES_(SuiteName), \ + ::testing::internal::GenerateNames< \ + ::testing::internal::NameGeneratorSelector< \ + __VA_ARGS__>::type, \ + ::testing::internal::TypeList::type>()) + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +#define INSTANTIATE_TYPED_TEST_CASE_P \ + static_assert( \ + ::testing::internal::InstantiateTypedTestCase_P_IsDeprecated(), ""); \ + INSTANTIATE_TYPED_TEST_SUITE_P +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + +#endif // GTEST_HAS_TYPED_TEST_P + +#endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ + +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + +namespace testing { + +// Silence C4100 (unreferenced formal parameter) and 4805 +// unsafe mix of type 'const int' and type 'const bool' +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4805) +# pragma warning(disable:4100) +#endif + + +// Declares the flags. + +// This flag temporary enables the disabled tests. +GTEST_DECLARE_bool_(also_run_disabled_tests); + +// This flag brings the debugger on an assertion failure. +GTEST_DECLARE_bool_(break_on_failure); + +// This flag controls whether Google Test catches all test-thrown exceptions +// and logs them as failures. +GTEST_DECLARE_bool_(catch_exceptions); + +// This flag enables using colors in terminal output. Available values are +// "yes" to enable colors, "no" (disable colors), or "auto" (the default) +// to let Google Test decide. +GTEST_DECLARE_string_(color); + +// This flag sets up the filter to select by name using a glob pattern +// the tests to run. If the filter is not given all tests are executed. +GTEST_DECLARE_string_(filter); + +// This flag controls whether Google Test installs a signal handler that dumps +// debugging information when fatal signals are raised. +GTEST_DECLARE_bool_(install_failure_signal_handler); + +// This flag causes the Google Test to list tests. None of the tests listed +// are actually run if the flag is provided. +GTEST_DECLARE_bool_(list_tests); + +// This flag controls whether Google Test emits a detailed XML report to a file +// in addition to its normal textual output. +GTEST_DECLARE_string_(output); + +// This flags control whether Google Test prints the elapsed time for each +// test. +GTEST_DECLARE_bool_(print_time); + +// This flags control whether Google Test prints UTF8 characters as text. +GTEST_DECLARE_bool_(print_utf8); + +// This flag specifies the random number seed. +GTEST_DECLARE_int32_(random_seed); + +// This flag sets how many times the tests are repeated. The default value +// is 1. If the value is -1 the tests are repeating forever. +GTEST_DECLARE_int32_(repeat); + +// This flag controls whether Google Test includes Google Test internal +// stack frames in failure stack traces. +GTEST_DECLARE_bool_(show_internal_stack_frames); + +// When this flag is specified, tests' order is randomized on every iteration. +GTEST_DECLARE_bool_(shuffle); + +// This flag specifies the maximum number of stack frames to be +// printed in a failure message. +GTEST_DECLARE_int32_(stack_trace_depth); + +// When this flag is specified, a failed assertion will throw an +// exception if exceptions are enabled, or exit the program with a +// non-zero code otherwise. For use with an external test framework. +GTEST_DECLARE_bool_(throw_on_failure); + +// When this flag is set with a "host:port" string, on supported +// platforms test results are streamed to the specified port on +// the specified host machine. +GTEST_DECLARE_string_(stream_result_to); + +#if GTEST_USE_OWN_FLAGFILE_FLAG_ +GTEST_DECLARE_string_(flagfile); +#endif // GTEST_USE_OWN_FLAGFILE_FLAG_ + +// The upper limit for valid stack trace depths. +const int kMaxStackTraceDepth = 100; + +namespace internal { + +class AssertHelper; +class DefaultGlobalTestPartResultReporter; +class ExecDeathTest; +class NoExecDeathTest; +class FinalSuccessChecker; +class GTestFlagSaver; +class StreamingListenerTest; +class TestResultAccessor; +class TestEventListenersAccessor; +class TestEventRepeater; +class UnitTestRecordPropertyTestHelper; +class WindowsDeathTest; +class FuchsiaDeathTest; +class UnitTestImpl* GetUnitTestImpl(); +void ReportFailureInUnknownLocation(TestPartResult::Type result_type, + const std::string& message); + +} // namespace internal + +// The friend relationship of some of these classes is cyclic. +// If we don't forward declare them the compiler might confuse the classes +// in friendship clauses with same named classes on the scope. +class Test; +class TestSuite; + +// Old API is still available but deprecated +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ +using TestCase = TestSuite; +#endif +class TestInfo; +class UnitTest; + +// A class for indicating whether an assertion was successful. When +// the assertion wasn't successful, the AssertionResult object +// remembers a non-empty message that describes how it failed. +// +// To create an instance of this class, use one of the factory functions +// (AssertionSuccess() and AssertionFailure()). +// +// This class is useful for two purposes: +// 1. Defining predicate functions to be used with Boolean test assertions +// EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts +// 2. Defining predicate-format functions to be +// used with predicate assertions (ASSERT_PRED_FORMAT*, etc). +// +// For example, if you define IsEven predicate: +// +// testing::AssertionResult IsEven(int n) { +// if ((n % 2) == 0) +// return testing::AssertionSuccess(); +// else +// return testing::AssertionFailure() << n << " is odd"; +// } +// +// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5))) +// will print the message +// +// Value of: IsEven(Fib(5)) +// Actual: false (5 is odd) +// Expected: true +// +// instead of a more opaque +// +// Value of: IsEven(Fib(5)) +// Actual: false +// Expected: true +// +// in case IsEven is a simple Boolean predicate. +// +// If you expect your predicate to be reused and want to support informative +// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up +// about half as often as positive ones in our tests), supply messages for +// both success and failure cases: +// +// testing::AssertionResult IsEven(int n) { +// if ((n % 2) == 0) +// return testing::AssertionSuccess() << n << " is even"; +// else +// return testing::AssertionFailure() << n << " is odd"; +// } +// +// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print +// +// Value of: IsEven(Fib(6)) +// Actual: true (8 is even) +// Expected: false +// +// NB: Predicates that support negative Boolean assertions have reduced +// performance in positive ones so be careful not to use them in tests +// that have lots (tens of thousands) of positive Boolean assertions. +// +// To use this class with EXPECT_PRED_FORMAT assertions such as: +// +// // Verifies that Foo() returns an even number. +// EXPECT_PRED_FORMAT1(IsEven, Foo()); +// +// you need to define: +// +// testing::AssertionResult IsEven(const char* expr, int n) { +// if ((n % 2) == 0) +// return testing::AssertionSuccess(); +// else +// return testing::AssertionFailure() +// << "Expected: " << expr << " is even\n Actual: it's " << n; +// } +// +// If Foo() returns 5, you will see the following message: +// +// Expected: Foo() is even +// Actual: it's 5 +// +class GTEST_API_ AssertionResult { + public: + // Copy constructor. + // Used in EXPECT_TRUE/FALSE(assertion_result). + AssertionResult(const AssertionResult& other); + +#if defined(_MSC_VER) && _MSC_VER < 1910 + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */) +#endif + + // Used in the EXPECT_TRUE/FALSE(bool_expression). + // + // T must be contextually convertible to bool. + // + // The second parameter prevents this overload from being considered if + // the argument is implicitly convertible to AssertionResult. In that case + // we want AssertionResult's copy constructor to be used. + template + explicit AssertionResult( + const T& success, + typename internal::EnableIf< + !std::is_convertible::value>::type* + /*enabler*/ + = nullptr) + : success_(success) {} + +#if defined(_MSC_VER) && _MSC_VER < 1910 + GTEST_DISABLE_MSC_WARNINGS_POP_() +#endif + + // Assignment operator. + AssertionResult& operator=(AssertionResult other) { + swap(other); + return *this; + } + + // Returns true iff the assertion succeeded. + operator bool() const { return success_; } // NOLINT + + // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. + AssertionResult operator!() const; + + // Returns the text streamed into this AssertionResult. Test assertions + // use it when they fail (i.e., the predicate's outcome doesn't match the + // assertion's expectation). When nothing has been streamed into the + // object, returns an empty string. + const char* message() const { + return message_.get() != nullptr ? message_->c_str() : ""; + } + // Deprecated; please use message() instead. + const char* failure_message() const { return message(); } + + // Streams a custom failure message into this object. + template AssertionResult& operator<<(const T& value) { + AppendMessage(Message() << value); + return *this; + } + + // Allows streaming basic output manipulators such as endl or flush into + // this object. + AssertionResult& operator<<( + ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) { + AppendMessage(Message() << basic_manipulator); + return *this; + } + + private: + // Appends the contents of message to message_. + void AppendMessage(const Message& a_message) { + if (message_.get() == nullptr) message_.reset(new ::std::string); + message_->append(a_message.GetString().c_str()); + } + + // Swap the contents of this AssertionResult with other. + void swap(AssertionResult& other); + + // Stores result of the assertion predicate. + bool success_; + // Stores the message describing the condition in case the expectation + // construct is not satisfied with the predicate's outcome. + // Referenced via a pointer to avoid taking too much stack frame space + // with test assertions. + std::unique_ptr< ::std::string> message_; +}; + +// Makes a successful assertion result. +GTEST_API_ AssertionResult AssertionSuccess(); + +// Makes a failed assertion result. +GTEST_API_ AssertionResult AssertionFailure(); + +// Makes a failed assertion result with the given failure message. +// Deprecated; use AssertionFailure() << msg. +GTEST_API_ AssertionResult AssertionFailure(const Message& msg); + +} // namespace testing + +// Includes the auto-generated header that implements a family of generic +// predicate assertion macros. This include comes late because it relies on +// APIs declared above. +// Copyright 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// This file is AUTOMATICALLY GENERATED on 01/02/2019 by command +// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! +// +// Implements a family of generic predicate assertion macros. +// GOOGLETEST_CM0001 DO NOT DELETE + +#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ +#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ + + +namespace testing { + +// This header implements a family of generic predicate assertion +// macros: +// +// ASSERT_PRED_FORMAT1(pred_format, v1) +// ASSERT_PRED_FORMAT2(pred_format, v1, v2) +// ... +// +// where pred_format is a function or functor that takes n (in the +// case of ASSERT_PRED_FORMATn) values and their source expression +// text, and returns a testing::AssertionResult. See the definition +// of ASSERT_EQ in gtest.h for an example. +// +// If you don't care about formatting, you can use the more +// restrictive version: +// +// ASSERT_PRED1(pred, v1) +// ASSERT_PRED2(pred, v1, v2) +// ... +// +// where pred is an n-ary function or functor that returns bool, +// and the values v1, v2, ..., must support the << operator for +// streaming to std::ostream. +// +// We also define the EXPECT_* variations. +// +// For now we only support predicates whose arity is at most 5. +// Please email googletestframework@googlegroups.com if you need +// support for higher arities. + +// GTEST_ASSERT_ is the basic statement to which all of the assertions +// in this file reduce. Don't use this in your code. + +#define GTEST_ASSERT_(expression, on_failure) \ + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ + if (const ::testing::AssertionResult gtest_ar = (expression)) \ + ; \ + else \ + on_failure(gtest_ar.failure_message()) + + +// Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use +// this in your code. +template +AssertionResult AssertPred1Helper(const char* pred_text, + const char* e1, + Pred pred, + const T1& v1) { + if (pred(v1)) return AssertionSuccess(); + + return AssertionFailure() + << pred_text << "(" << e1 << ") evaluates to false, where" + << "\n" + << e1 << " evaluates to " << ::testing::PrintToString(v1); +} + +// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1. +// Don't use this in your code. +#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\ + GTEST_ASSERT_(pred_format(#v1, v1), \ + on_failure) + +// Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use +// this in your code. +#define GTEST_PRED1_(pred, v1, on_failure)\ + GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \ + #v1, \ + pred, \ + v1), on_failure) + +// Unary predicate assertion macros. +#define EXPECT_PRED_FORMAT1(pred_format, v1) \ + GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_) +#define EXPECT_PRED1(pred, v1) \ + GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_) +#define ASSERT_PRED_FORMAT1(pred_format, v1) \ + GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_) +#define ASSERT_PRED1(pred, v1) \ + GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_) + + + +// Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use +// this in your code. +template +AssertionResult AssertPred2Helper(const char* pred_text, + const char* e1, + const char* e2, + Pred pred, + const T1& v1, + const T2& v2) { + if (pred(v1, v2)) return AssertionSuccess(); + + return AssertionFailure() + << pred_text << "(" << e1 << ", " << e2 + << ") evaluates to false, where" + << "\n" + << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n" + << e2 << " evaluates to " << ::testing::PrintToString(v2); +} + +// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2. +// Don't use this in your code. +#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\ + GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \ + on_failure) + +// Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use +// this in your code. +#define GTEST_PRED2_(pred, v1, v2, on_failure)\ + GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \ + #v1, \ + #v2, \ + pred, \ + v1, \ + v2), on_failure) + +// Binary predicate assertion macros. +#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \ + GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) +#define EXPECT_PRED2(pred, v1, v2) \ + GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_) +#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \ + GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_) +#define ASSERT_PRED2(pred, v1, v2) \ + GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_) + + + +// Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use +// this in your code. +template +AssertionResult AssertPred3Helper(const char* pred_text, + const char* e1, + const char* e2, + const char* e3, + Pred pred, + const T1& v1, + const T2& v2, + const T3& v3) { + if (pred(v1, v2, v3)) return AssertionSuccess(); + + return AssertionFailure() + << pred_text << "(" << e1 << ", " << e2 << ", " << e3 + << ") evaluates to false, where" + << "\n" + << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n" + << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n" + << e3 << " evaluates to " << ::testing::PrintToString(v3); +} + +// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3. +// Don't use this in your code. +#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\ + GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \ + on_failure) + +// Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use +// this in your code. +#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\ + GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \ + #v1, \ + #v2, \ + #v3, \ + pred, \ + v1, \ + v2, \ + v3), on_failure) + +// Ternary predicate assertion macros. +#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \ + GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_) +#define EXPECT_PRED3(pred, v1, v2, v3) \ + GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_) +#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \ + GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_) +#define ASSERT_PRED3(pred, v1, v2, v3) \ + GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_) + + + +// Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use +// this in your code. +template +AssertionResult AssertPred4Helper(const char* pred_text, + const char* e1, + const char* e2, + const char* e3, + const char* e4, + Pred pred, + const T1& v1, + const T2& v2, + const T3& v3, + const T4& v4) { + if (pred(v1, v2, v3, v4)) return AssertionSuccess(); + + return AssertionFailure() + << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4 + << ") evaluates to false, where" + << "\n" + << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n" + << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n" + << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n" + << e4 << " evaluates to " << ::testing::PrintToString(v4); +} + +// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4. +// Don't use this in your code. +#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\ + GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \ + on_failure) + +// Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use +// this in your code. +#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\ + GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \ + #v1, \ + #v2, \ + #v3, \ + #v4, \ + pred, \ + v1, \ + v2, \ + v3, \ + v4), on_failure) + +// 4-ary predicate assertion macros. +#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ + GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) +#define EXPECT_PRED4(pred, v1, v2, v3, v4) \ + GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) +#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ + GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) +#define ASSERT_PRED4(pred, v1, v2, v3, v4) \ + GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) + + + +// Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use +// this in your code. +template +AssertionResult AssertPred5Helper(const char* pred_text, + const char* e1, + const char* e2, + const char* e3, + const char* e4, + const char* e5, + Pred pred, + const T1& v1, + const T2& v2, + const T3& v3, + const T4& v4, + const T5& v5) { + if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess(); + + return AssertionFailure() + << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4 + << ", " << e5 << ") evaluates to false, where" + << "\n" + << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n" + << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n" + << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n" + << e4 << " evaluates to " << ::testing::PrintToString(v4) << "\n" + << e5 << " evaluates to " << ::testing::PrintToString(v5); +} + +// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5. +// Don't use this in your code. +#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\ + GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \ + on_failure) + +// Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use +// this in your code. +#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\ + GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \ + #v1, \ + #v2, \ + #v3, \ + #v4, \ + #v5, \ + pred, \ + v1, \ + v2, \ + v3, \ + v4, \ + v5), on_failure) + +// 5-ary predicate assertion macros. +#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ + GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) +#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \ + GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) +#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ + GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) +#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \ + GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) + + + +} // namespace testing + +#endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ + +namespace testing { + +// The abstract class that all tests inherit from. +// +// In Google Test, a unit test program contains one or many TestSuites, and +// each TestSuite contains one or many Tests. +// +// When you define a test using the TEST macro, you don't need to +// explicitly derive from Test - the TEST macro automatically does +// this for you. +// +// The only time you derive from Test is when defining a test fixture +// to be used in a TEST_F. For example: +// +// class FooTest : public testing::Test { +// protected: +// void SetUp() override { ... } +// void TearDown() override { ... } +// ... +// }; +// +// TEST_F(FooTest, Bar) { ... } +// TEST_F(FooTest, Baz) { ... } +// +// Test is not copyable. +class GTEST_API_ Test { + public: + friend class TestInfo; + + // The d'tor is virtual as we intend to inherit from Test. + virtual ~Test(); + + // Sets up the stuff shared by all tests in this test case. + // + // Google Test will call Foo::SetUpTestSuite() before running the first + // test in test case Foo. Hence a sub-class can define its own + // SetUpTestSuite() method to shadow the one defined in the super + // class. + static void SetUpTestSuite() {} + + // Tears down the stuff shared by all tests in this test case. + // + // Google Test will call Foo::TearDownTestSuite() after running the last + // test in test case Foo. Hence a sub-class can define its own + // TearDownTestSuite() method to shadow the one defined in the super + // class. + static void TearDownTestSuite() {} + + // Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + static void TearDownTestCase() {} + static void SetUpTestCase() {} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Returns true iff the current test has a fatal failure. + static bool HasFatalFailure(); + + // Returns true iff the current test has a non-fatal failure. + static bool HasNonfatalFailure(); + + // Returns true iff the current test was skipped. + static bool IsSkipped(); + + // Returns true iff the current test has a (either fatal or + // non-fatal) failure. + static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); } + + // Logs a property for the current test, test suite, or for the entire + // invocation of the test program when used outside of the context of a + // test suite. Only the last value for a given key is remembered. These + // are public static so they can be called from utility functions that are + // not members of the test fixture. Calls to RecordProperty made during + // lifespan of the test (from the moment its constructor starts to the + // moment its destructor finishes) will be output in XML as attributes of + // the element. Properties recorded from fixture's + // SetUpTestSuite or TearDownTestSuite are logged as attributes of the + // corresponding element. Calls to RecordProperty made in the + // global context (before or after invocation of RUN_ALL_TESTS and from + // SetUp/TearDown method of Environment objects registered with Google + // Test) will be output as attributes of the element. + static void RecordProperty(const std::string& key, const std::string& value); + static void RecordProperty(const std::string& key, int value); + + protected: + // Creates a Test object. + Test(); + + // Sets up the test fixture. + virtual void SetUp(); + + // Tears down the test fixture. + virtual void TearDown(); + + private: + // Returns true iff the current test has the same fixture class as + // the first test in the current test suite. + static bool HasSameFixtureClass(); + + // Runs the test after the test fixture has been set up. + // + // A sub-class must implement this to define the test logic. + // + // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM. + // Instead, use the TEST or TEST_F macro. + virtual void TestBody() = 0; + + // Sets up, executes, and tears down the test. + void Run(); + + // Deletes self. We deliberately pick an unusual name for this + // internal method to avoid clashing with names used in user TESTs. + void DeleteSelf_() { delete this; } + + const std::unique_ptr gtest_flag_saver_; + + // Often a user misspells SetUp() as Setup() and spends a long time + // wondering why it is never called by Google Test. The declaration of + // the following method is solely for catching such an error at + // compile time: + // + // - The return type is deliberately chosen to be not void, so it + // will be a conflict if void Setup() is declared in the user's + // test fixture. + // + // - This method is private, so it will be another compiler error + // if the method is called from the user's test fixture. + // + // DO NOT OVERRIDE THIS FUNCTION. + // + // If you see an error about overriding the following function or + // about it being private, you have mis-spelled SetUp() as Setup(). + struct Setup_should_be_spelled_SetUp {}; + virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; } + + // We disallow copying Tests. + GTEST_DISALLOW_COPY_AND_ASSIGN_(Test); +}; + +typedef internal::TimeInMillis TimeInMillis; + +// A copyable object representing a user specified test property which can be +// output as a key/value string pair. +// +// Don't inherit from TestProperty as its destructor is not virtual. +class TestProperty { + public: + // C'tor. TestProperty does NOT have a default constructor. + // Always use this constructor (with parameters) to create a + // TestProperty object. + TestProperty(const std::string& a_key, const std::string& a_value) : + key_(a_key), value_(a_value) { + } + + // Gets the user supplied key. + const char* key() const { + return key_.c_str(); + } + + // Gets the user supplied value. + const char* value() const { + return value_.c_str(); + } + + // Sets a new value, overriding the one supplied in the constructor. + void SetValue(const std::string& new_value) { + value_ = new_value; + } + + private: + // The key supplied by the user. + std::string key_; + // The value supplied by the user. + std::string value_; +}; + +// The result of a single Test. This includes a list of +// TestPartResults, a list of TestProperties, a count of how many +// death tests there are in the Test, and how much time it took to run +// the Test. +// +// TestResult is not copyable. +class GTEST_API_ TestResult { + public: + // Creates an empty TestResult. + TestResult(); + + // D'tor. Do not inherit from TestResult. + ~TestResult(); + + // Gets the number of all test parts. This is the sum of the number + // of successful test parts and the number of failed test parts. + int total_part_count() const; + + // Returns the number of the test properties. + int test_property_count() const; + + // Returns true iff the test passed (i.e. no test part failed). + bool Passed() const { return !Skipped() && !Failed(); } + + // Returns true iff the test was skipped. + bool Skipped() const; + + // Returns true iff the test failed. + bool Failed() const; + + // Returns true iff the test fatally failed. + bool HasFatalFailure() const; + + // Returns true iff the test has a non-fatal failure. + bool HasNonfatalFailure() const; + + // Returns the elapsed time, in milliseconds. + TimeInMillis elapsed_time() const { return elapsed_time_; } + + // Returns the i-th test part result among all the results. i can range from 0 + // to total_part_count() - 1. If i is not in that range, aborts the program. + const TestPartResult& GetTestPartResult(int i) const; + + // Returns the i-th test property. i can range from 0 to + // test_property_count() - 1. If i is not in that range, aborts the + // program. + const TestProperty& GetTestProperty(int i) const; + + private: + friend class TestInfo; + friend class TestSuite; + friend class UnitTest; + friend class internal::DefaultGlobalTestPartResultReporter; + friend class internal::ExecDeathTest; + friend class internal::TestResultAccessor; + friend class internal::UnitTestImpl; + friend class internal::WindowsDeathTest; + friend class internal::FuchsiaDeathTest; + + // Gets the vector of TestPartResults. + const std::vector& test_part_results() const { + return test_part_results_; + } + + // Gets the vector of TestProperties. + const std::vector& test_properties() const { + return test_properties_; + } + + // Sets the elapsed time. + void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; } + + // Adds a test property to the list. The property is validated and may add + // a non-fatal failure if invalid (e.g., if it conflicts with reserved + // key names). If a property is already recorded for the same key, the + // value will be updated, rather than storing multiple values for the same + // key. xml_element specifies the element for which the property is being + // recorded and is used for validation. + void RecordProperty(const std::string& xml_element, + const TestProperty& test_property); + + // Adds a failure if the key is a reserved attribute of Google Test + // testsuite tags. Returns true if the property is valid. + // FIXME: Validate attribute names are legal and human readable. + static bool ValidateTestProperty(const std::string& xml_element, + const TestProperty& test_property); + + // Adds a test part result to the list. + void AddTestPartResult(const TestPartResult& test_part_result); + + // Returns the death test count. + int death_test_count() const { return death_test_count_; } + + // Increments the death test count, returning the new count. + int increment_death_test_count() { return ++death_test_count_; } + + // Clears the test part results. + void ClearTestPartResults(); + + // Clears the object. + void Clear(); + + // Protects mutable state of the property vector and of owned + // properties, whose values may be updated. + internal::Mutex test_properites_mutex_; + + // The vector of TestPartResults + std::vector test_part_results_; + // The vector of TestProperties + std::vector test_properties_; + // Running count of death tests. + int death_test_count_; + // The elapsed time, in milliseconds. + TimeInMillis elapsed_time_; + + // We disallow copying TestResult. + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult); +}; // class TestResult + +// A TestInfo object stores the following information about a test: +// +// Test suite name +// Test name +// Whether the test should be run +// A function pointer that creates the test object when invoked +// Test result +// +// The constructor of TestInfo registers itself with the UnitTest +// singleton such that the RUN_ALL_TESTS() macro knows which tests to +// run. +class GTEST_API_ TestInfo { + public: + // Destructs a TestInfo object. This function is not virtual, so + // don't inherit from TestInfo. + ~TestInfo(); + + // Returns the test suite name. + const char* test_suite_name() const { return test_suite_name_.c_str(); } + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + const char* test_case_name() const { return test_suite_name(); } +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Returns the test name. + const char* name() const { return name_.c_str(); } + + // Returns the name of the parameter type, or NULL if this is not a typed + // or a type-parameterized test. + const char* type_param() const { + if (type_param_.get() != nullptr) return type_param_->c_str(); + return nullptr; + } + + // Returns the text representation of the value parameter, or NULL if this + // is not a value-parameterized test. + const char* value_param() const { + if (value_param_.get() != nullptr) return value_param_->c_str(); + return nullptr; + } + + // Returns the file name where this test is defined. + const char* file() const { return location_.file.c_str(); } + + // Returns the line where this test is defined. + int line() const { return location_.line; } + + // Return true if this test should not be run because it's in another shard. + bool is_in_another_shard() const { return is_in_another_shard_; } + + // Returns true if this test should run, that is if the test is not + // disabled (or it is disabled but the also_run_disabled_tests flag has + // been specified) and its full name matches the user-specified filter. + // + // Google Test allows the user to filter the tests by their full names. + // The full name of a test Bar in test suite Foo is defined as + // "Foo.Bar". Only the tests that match the filter will run. + // + // A filter is a colon-separated list of glob (not regex) patterns, + // optionally followed by a '-' and a colon-separated list of + // negative patterns (tests to exclude). A test is run if it + // matches one of the positive patterns and does not match any of + // the negative patterns. + // + // For example, *A*:Foo.* is a filter that matches any string that + // contains the character 'A' or starts with "Foo.". + bool should_run() const { return should_run_; } + + // Returns true iff this test will appear in the XML report. + bool is_reportable() const { + // The XML report includes tests matching the filter, excluding those + // run in other shards. + return matches_filter_ && !is_in_another_shard_; + } + + // Returns the result of the test. + const TestResult* result() const { return &result_; } + + private: +#if GTEST_HAS_DEATH_TEST + friend class internal::DefaultDeathTestFactory; +#endif // GTEST_HAS_DEATH_TEST + friend class Test; + friend class TestSuite; + friend class internal::UnitTestImpl; + friend class internal::StreamingListenerTest; + friend TestInfo* internal::MakeAndRegisterTestInfo( + const char* test_suite_name, const char* name, const char* type_param, + const char* value_param, internal::CodeLocation code_location, + internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc, + internal::TestFactoryBase* factory); + + // Constructs a TestInfo object. The newly constructed instance assumes + // ownership of the factory object. + TestInfo(const std::string& test_suite_name, const std::string& name, + const char* a_type_param, // NULL if not a type-parameterized test + const char* a_value_param, // NULL if not a value-parameterized test + internal::CodeLocation a_code_location, + internal::TypeId fixture_class_id, + internal::TestFactoryBase* factory); + + // Increments the number of death tests encountered in this test so + // far. + int increment_death_test_count() { + return result_.increment_death_test_count(); + } + + // Creates the test object, runs it, records its result, and then + // deletes it. + void Run(); + + static void ClearTestResult(TestInfo* test_info) { + test_info->result_.Clear(); + } + + // These fields are immutable properties of the test. + const std::string test_suite_name_; // test suite name + const std::string name_; // Test name + // Name of the parameter type, or NULL if this is not a typed or a + // type-parameterized test. + const std::unique_ptr type_param_; + // Text representation of the value parameter, or NULL if this is not a + // value-parameterized test. + const std::unique_ptr value_param_; + internal::CodeLocation location_; + const internal::TypeId fixture_class_id_; // ID of the test fixture class + bool should_run_; // True iff this test should run + bool is_disabled_; // True iff this test is disabled + bool matches_filter_; // True if this test matches the + // user-specified filter. + bool is_in_another_shard_; // Will be run in another shard. + internal::TestFactoryBase* const factory_; // The factory that creates + // the test object + + // This field is mutable and needs to be reset before running the + // test for the second time. + TestResult result_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo); +}; + +// A test suite, which consists of a vector of TestInfos. +// +// TestSuite is not copyable. +class GTEST_API_ TestSuite { + public: + // Creates a TestSuite with the given name. + // + // TestSuite does NOT have a default constructor. Always use this + // constructor to create a TestSuite object. + // + // Arguments: + // + // name: name of the test suite + // a_type_param: the name of the test's type parameter, or NULL if + // this is not a type-parameterized test. + // set_up_tc: pointer to the function that sets up the test suite + // tear_down_tc: pointer to the function that tears down the test suite + TestSuite(const char* name, const char* a_type_param, + internal::SetUpTestSuiteFunc set_up_tc, + internal::TearDownTestSuiteFunc tear_down_tc); + + // Destructor of TestSuite. + virtual ~TestSuite(); + + // Gets the name of the TestSuite. + const char* name() const { return name_.c_str(); } + + // Returns the name of the parameter type, or NULL if this is not a + // type-parameterized test suite. + const char* type_param() const { + if (type_param_.get() != nullptr) return type_param_->c_str(); + return nullptr; + } + + // Returns true if any test in this test suite should run. + bool should_run() const { return should_run_; } + + // Gets the number of successful tests in this test suite. + int successful_test_count() const; + + // Gets the number of skipped tests in this test suite. + int skipped_test_count() const; + + // Gets the number of failed tests in this test suite. + int failed_test_count() const; + + // Gets the number of disabled tests that will be reported in the XML report. + int reportable_disabled_test_count() const; + + // Gets the number of disabled tests in this test suite. + int disabled_test_count() const; + + // Gets the number of tests to be printed in the XML report. + int reportable_test_count() const; + + // Get the number of tests in this test suite that should run. + int test_to_run_count() const; + + // Gets the number of all tests in this test suite. + int total_test_count() const; + + // Returns true iff the test suite passed. + bool Passed() const { return !Failed(); } + + // Returns true iff the test suite failed. + bool Failed() const { return failed_test_count() > 0; } + + // Returns the elapsed time, in milliseconds. + TimeInMillis elapsed_time() const { return elapsed_time_; } + + // Returns the i-th test among all the tests. i can range from 0 to + // total_test_count() - 1. If i is not in that range, returns NULL. + const TestInfo* GetTestInfo(int i) const; + + // Returns the TestResult that holds test properties recorded during + // execution of SetUpTestSuite and TearDownTestSuite. + const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; } + + private: + friend class Test; + friend class internal::UnitTestImpl; + + // Gets the (mutable) vector of TestInfos in this TestSuite. + std::vector& test_info_list() { return test_info_list_; } + + // Gets the (immutable) vector of TestInfos in this TestSuite. + const std::vector& test_info_list() const { + return test_info_list_; + } + + // Returns the i-th test among all the tests. i can range from 0 to + // total_test_count() - 1. If i is not in that range, returns NULL. + TestInfo* GetMutableTestInfo(int i); + + // Sets the should_run member. + void set_should_run(bool should) { should_run_ = should; } + + // Adds a TestInfo to this test suite. Will delete the TestInfo upon + // destruction of the TestSuite object. + void AddTestInfo(TestInfo * test_info); + + // Clears the results of all tests in this test suite. + void ClearResult(); + + // Clears the results of all tests in the given test suite. + static void ClearTestSuiteResult(TestSuite* test_suite) { + test_suite->ClearResult(); + } + + // Runs every test in this TestSuite. + void Run(); + + // Runs SetUpTestSuite() for this TestSuite. This wrapper is needed + // for catching exceptions thrown from SetUpTestSuite(). + void RunSetUpTestSuite() { + if (set_up_tc_ != nullptr) { + (*set_up_tc_)(); + } + } + + // Runs TearDownTestSuite() for this TestSuite. This wrapper is + // needed for catching exceptions thrown from TearDownTestSuite(). + void RunTearDownTestSuite() { + if (tear_down_tc_ != nullptr) { + (*tear_down_tc_)(); + } + } + + // Returns true iff test passed. + static bool TestPassed(const TestInfo* test_info) { + return test_info->should_run() && test_info->result()->Passed(); + } + + // Returns true iff test skipped. + static bool TestSkipped(const TestInfo* test_info) { + return test_info->should_run() && test_info->result()->Skipped(); + } + + // Returns true iff test failed. + static bool TestFailed(const TestInfo* test_info) { + return test_info->should_run() && test_info->result()->Failed(); + } + + // Returns true iff the test is disabled and will be reported in the XML + // report. + static bool TestReportableDisabled(const TestInfo* test_info) { + return test_info->is_reportable() && test_info->is_disabled_; + } + + // Returns true iff test is disabled. + static bool TestDisabled(const TestInfo* test_info) { + return test_info->is_disabled_; + } + + // Returns true iff this test will appear in the XML report. + static bool TestReportable(const TestInfo* test_info) { + return test_info->is_reportable(); + } + + // Returns true if the given test should run. + static bool ShouldRunTest(const TestInfo* test_info) { + return test_info->should_run(); + } + + // Shuffles the tests in this test suite. + void ShuffleTests(internal::Random* random); + + // Restores the test order to before the first shuffle. + void UnshuffleTests(); + + // Name of the test suite. + std::string name_; + // Name of the parameter type, or NULL if this is not a typed or a + // type-parameterized test. + const std::unique_ptr type_param_; + // The vector of TestInfos in their original order. It owns the + // elements in the vector. + std::vector test_info_list_; + // Provides a level of indirection for the test list to allow easy + // shuffling and restoring the test order. The i-th element in this + // vector is the index of the i-th test in the shuffled test list. + std::vector test_indices_; + // Pointer to the function that sets up the test suite. + internal::SetUpTestSuiteFunc set_up_tc_; + // Pointer to the function that tears down the test suite. + internal::TearDownTestSuiteFunc tear_down_tc_; + // True iff any test in this test suite should run. + bool should_run_; + // Elapsed time, in milliseconds. + TimeInMillis elapsed_time_; + // Holds test properties recorded during execution of SetUpTestSuite and + // TearDownTestSuite. + TestResult ad_hoc_test_result_; + + // We disallow copying TestSuites. + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestSuite); +}; + +// An Environment object is capable of setting up and tearing down an +// environment. You should subclass this to define your own +// environment(s). +// +// An Environment object does the set-up and tear-down in virtual +// methods SetUp() and TearDown() instead of the constructor and the +// destructor, as: +// +// 1. You cannot safely throw from a destructor. This is a problem +// as in some cases Google Test is used where exceptions are enabled, and +// we may want to implement ASSERT_* using exceptions where they are +// available. +// 2. You cannot use ASSERT_* directly in a constructor or +// destructor. +class Environment { + public: + // The d'tor is virtual as we need to subclass Environment. + virtual ~Environment() {} + + // Override this to define how to set up the environment. + virtual void SetUp() {} + + // Override this to define how to tear down the environment. + virtual void TearDown() {} + private: + // If you see an error about overriding the following function or + // about it being private, you have mis-spelled SetUp() as Setup(). + struct Setup_should_be_spelled_SetUp {}; + virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; } +}; + +#if GTEST_HAS_EXCEPTIONS + +// Exception which can be thrown from TestEventListener::OnTestPartResult. +class GTEST_API_ AssertionException + : public internal::GoogleTestFailureException { + public: + explicit AssertionException(const TestPartResult& result) + : GoogleTestFailureException(result) {} +}; + +#endif // GTEST_HAS_EXCEPTIONS + +// The interface for tracing execution of tests. The methods are organized in +// the order the corresponding events are fired. +class TestEventListener { + public: + virtual ~TestEventListener() {} + + // Fired before any test activity starts. + virtual void OnTestProgramStart(const UnitTest& unit_test) = 0; + + // Fired before each iteration of tests starts. There may be more than + // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration + // index, starting from 0. + virtual void OnTestIterationStart(const UnitTest& unit_test, + int iteration) = 0; + + // Fired before environment set-up for each iteration of tests starts. + virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0; + + // Fired after environment set-up for each iteration of tests ends. + virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0; + + // Fired before the test suite starts. + virtual void OnTestSuiteStart(const TestSuite& /*test_suite*/) {} + + // Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + virtual void OnTestCaseStart(const TestCase& /*test_case*/) {} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Fired before the test starts. + virtual void OnTestStart(const TestInfo& test_info) = 0; + + // Fired after a failed assertion or a SUCCEED() invocation. + // If you want to throw an exception from this function to skip to the next + // TEST, it must be AssertionException defined above, or inherited from it. + virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0; + + // Fired after the test ends. + virtual void OnTestEnd(const TestInfo& test_info) = 0; + + // Fired after the test suite ends. + virtual void OnTestSuiteEnd(const TestSuite& /*test_suite*/) {} + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Fired before environment tear-down for each iteration of tests starts. + virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0; + + // Fired after environment tear-down for each iteration of tests ends. + virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0; + + // Fired after each iteration of tests finishes. + virtual void OnTestIterationEnd(const UnitTest& unit_test, + int iteration) = 0; + + // Fired after all test activities have ended. + virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0; +}; + +// The convenience class for users who need to override just one or two +// methods and are not concerned that a possible change to a signature of +// the methods they override will not be caught during the build. For +// comments about each method please see the definition of TestEventListener +// above. +class EmptyTestEventListener : public TestEventListener { + public: + void OnTestProgramStart(const UnitTest& /*unit_test*/) override {} + void OnTestIterationStart(const UnitTest& /*unit_test*/, + int /*iteration*/) override {} + void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) override {} + void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {} + void OnTestSuiteStart(const TestSuite& /*test_suite*/) override {} +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + void OnTestCaseStart(const TestCase& /*test_case*/) override {} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + void OnTestStart(const TestInfo& /*test_info*/) override {} + void OnTestPartResult(const TestPartResult& /*test_part_result*/) override {} + void OnTestEnd(const TestInfo& /*test_info*/) override {} + void OnTestSuiteEnd(const TestSuite& /*test_suite*/) override {} +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + void OnTestCaseEnd(const TestCase& /*test_case*/) override {} +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) override {} + void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {} + void OnTestIterationEnd(const UnitTest& /*unit_test*/, + int /*iteration*/) override {} + void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {} +}; + +// TestEventListeners lets users add listeners to track events in Google Test. +class GTEST_API_ TestEventListeners { + public: + TestEventListeners(); + ~TestEventListeners(); + + // Appends an event listener to the end of the list. Google Test assumes + // the ownership of the listener (i.e. it will delete the listener when + // the test program finishes). + void Append(TestEventListener* listener); + + // Removes the given event listener from the list and returns it. It then + // becomes the caller's responsibility to delete the listener. Returns + // NULL if the listener is not found in the list. + TestEventListener* Release(TestEventListener* listener); + + // Returns the standard listener responsible for the default console + // output. Can be removed from the listeners list to shut down default + // console output. Note that removing this object from the listener list + // with Release transfers its ownership to the caller and makes this + // function return NULL the next time. + TestEventListener* default_result_printer() const { + return default_result_printer_; + } + + // Returns the standard listener responsible for the default XML output + // controlled by the --gtest_output=xml flag. Can be removed from the + // listeners list by users who want to shut down the default XML output + // controlled by this flag and substitute it with custom one. Note that + // removing this object from the listener list with Release transfers its + // ownership to the caller and makes this function return NULL the next + // time. + TestEventListener* default_xml_generator() const { + return default_xml_generator_; + } + + private: + friend class TestSuite; + friend class TestInfo; + friend class internal::DefaultGlobalTestPartResultReporter; + friend class internal::NoExecDeathTest; + friend class internal::TestEventListenersAccessor; + friend class internal::UnitTestImpl; + + // Returns repeater that broadcasts the TestEventListener events to all + // subscribers. + TestEventListener* repeater(); + + // Sets the default_result_printer attribute to the provided listener. + // The listener is also added to the listener list and previous + // default_result_printer is removed from it and deleted. The listener can + // also be NULL in which case it will not be added to the list. Does + // nothing if the previous and the current listener objects are the same. + void SetDefaultResultPrinter(TestEventListener* listener); + + // Sets the default_xml_generator attribute to the provided listener. The + // listener is also added to the listener list and previous + // default_xml_generator is removed from it and deleted. The listener can + // also be NULL in which case it will not be added to the list. Does + // nothing if the previous and the current listener objects are the same. + void SetDefaultXmlGenerator(TestEventListener* listener); + + // Controls whether events will be forwarded by the repeater to the + // listeners in the list. + bool EventForwardingEnabled() const; + void SuppressEventForwarding(); + + // The actual list of listeners. + internal::TestEventRepeater* repeater_; + // Listener responsible for the standard result output. + TestEventListener* default_result_printer_; + // Listener responsible for the creation of the XML output file. + TestEventListener* default_xml_generator_; + + // We disallow copying TestEventListeners. + GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners); +}; + +// A UnitTest consists of a vector of TestSuites. +// +// This is a singleton class. The only instance of UnitTest is +// created when UnitTest::GetInstance() is first called. This +// instance is never deleted. +// +// UnitTest is not copyable. +// +// This class is thread-safe as long as the methods are called +// according to their specification. +class GTEST_API_ UnitTest { + public: + // Gets the singleton UnitTest object. The first time this method + // is called, a UnitTest object is constructed and returned. + // Consecutive calls will return the same object. + static UnitTest* GetInstance(); + + // Runs all tests in this UnitTest object and prints the result. + // Returns 0 if successful, or 1 otherwise. + // + // This method can only be called from the main thread. + // + // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. + int Run() GTEST_MUST_USE_RESULT_; + + // Returns the working directory when the first TEST() or TEST_F() + // was executed. The UnitTest object owns the string. + const char* original_working_dir() const; + + // Returns the TestSuite object for the test that's currently running, + // or NULL if no test is running. + const TestSuite* current_test_suite() const GTEST_LOCK_EXCLUDED_(mutex_); + +// Legacy API is still available but deprecated +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + const TestCase* current_test_case() const GTEST_LOCK_EXCLUDED_(mutex_); +#endif + + // Returns the TestInfo object for the test that's currently running, + // or NULL if no test is running. + const TestInfo* current_test_info() const + GTEST_LOCK_EXCLUDED_(mutex_); + + // Returns the random seed used at the start of the current test run. + int random_seed() const; + + // Returns the ParameterizedTestSuiteRegistry object used to keep track of + // value-parameterized tests and instantiate and register them. + // + // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. + internal::ParameterizedTestSuiteRegistry& parameterized_test_registry() + GTEST_LOCK_EXCLUDED_(mutex_); + + // Gets the number of successful test suites. + int successful_test_suite_count() const; + + // Gets the number of failed test suites. + int failed_test_suite_count() const; + + // Gets the number of all test suites. + int total_test_suite_count() const; + + // Gets the number of all test suites that contain at least one test + // that should run. + int test_suite_to_run_count() const; + + // Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + int successful_test_case_count() const; + int failed_test_case_count() const; + int total_test_case_count() const; + int test_case_to_run_count() const; +#endif // EMOVE_LEGACY_TEST_CASEAPI + + // Gets the number of successful tests. + int successful_test_count() const; + + // Gets the number of skipped tests. + int skipped_test_count() const; + + // Gets the number of failed tests. + int failed_test_count() const; + + // Gets the number of disabled tests that will be reported in the XML report. + int reportable_disabled_test_count() const; + + // Gets the number of disabled tests. + int disabled_test_count() const; + + // Gets the number of tests to be printed in the XML report. + int reportable_test_count() const; + + // Gets the number of all tests. + int total_test_count() const; + + // Gets the number of tests that should run. + int test_to_run_count() const; + + // Gets the time of the test program start, in ms from the start of the + // UNIX epoch. + TimeInMillis start_timestamp() const; + + // Gets the elapsed time, in milliseconds. + TimeInMillis elapsed_time() const; + + // Returns true iff the unit test passed (i.e. all test suites passed). + bool Passed() const; + + // Returns true iff the unit test failed (i.e. some test suite failed + // or something outside of all tests failed). + bool Failed() const; + + // Gets the i-th test suite among all the test suites. i can range from 0 to + // total_test_suite_count() - 1. If i is not in that range, returns NULL. + const TestSuite* GetTestSuite(int i) const; + +// Legacy API is deprecated but still available +#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + const TestCase* GetTestCase(int i) const; +#endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ + + // Returns the TestResult containing information on test failures and + // properties logged outside of individual test suites. + const TestResult& ad_hoc_test_result() const; + + // Returns the list of event listeners that can be used to track events + // inside Google Test. + TestEventListeners& listeners(); + + private: + // Registers and returns a global test environment. When a test + // program is run, all global test environments will be set-up in + // the order they were registered. After all tests in the program + // have finished, all global test environments will be torn-down in + // the *reverse* order they were registered. + // + // The UnitTest object takes ownership of the given environment. + // + // This method can only be called from the main thread. + Environment* AddEnvironment(Environment* env); + + // Adds a TestPartResult to the current TestResult object. All + // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) + // eventually call this to report their results. The user code + // should use the assertion macros instead of calling this directly. + void AddTestPartResult(TestPartResult::Type result_type, + const char* file_name, + int line_number, + const std::string& message, + const std::string& os_stack_trace) + GTEST_LOCK_EXCLUDED_(mutex_); + + // Adds a TestProperty to the current TestResult object when invoked from + // inside a test, to current TestSuite's ad_hoc_test_result_ when invoked + // from SetUpTestSuite or TearDownTestSuite, or to the global property set + // when invoked elsewhere. If the result already contains a property with + // the same key, the value will be updated. + void RecordProperty(const std::string& key, const std::string& value); + + // Gets the i-th test suite among all the test suites. i can range from 0 to + // total_test_suite_count() - 1. If i is not in that range, returns NULL. + TestSuite* GetMutableTestSuite(int i); + + // Accessors for the implementation object. + internal::UnitTestImpl* impl() { return impl_; } + const internal::UnitTestImpl* impl() const { return impl_; } + + // These classes and functions are friends as they need to access private + // members of UnitTest. + friend class ScopedTrace; + friend class Test; + friend class internal::AssertHelper; + friend class internal::StreamingListenerTest; + friend class internal::UnitTestRecordPropertyTestHelper; + friend Environment* AddGlobalTestEnvironment(Environment* env); + friend internal::UnitTestImpl* internal::GetUnitTestImpl(); + friend void internal::ReportFailureInUnknownLocation( + TestPartResult::Type result_type, + const std::string& message); + + // Creates an empty UnitTest. + UnitTest(); + + // D'tor + virtual ~UnitTest(); + + // Pushes a trace defined by SCOPED_TRACE() on to the per-thread + // Google Test trace stack. + void PushGTestTrace(const internal::TraceInfo& trace) + GTEST_LOCK_EXCLUDED_(mutex_); + + // Pops a trace from the per-thread Google Test trace stack. + void PopGTestTrace() + GTEST_LOCK_EXCLUDED_(mutex_); + + // Protects mutable state in *impl_. This is mutable as some const + // methods need to lock it too. + mutable internal::Mutex mutex_; + + // Opaque implementation object. This field is never changed once + // the object is constructed. We don't mark it as const here, as + // doing so will cause a warning in the constructor of UnitTest. + // Mutable state in *impl_ is protected by mutex_. + internal::UnitTestImpl* impl_; + + // We disallow copying UnitTest. + GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest); +}; + +// A convenient wrapper for adding an environment for the test +// program. +// +// You should call this before RUN_ALL_TESTS() is called, probably in +// main(). If you use gtest_main, you need to call this before main() +// starts for it to take effect. For example, you can define a global +// variable like this: +// +// testing::Environment* const foo_env = +// testing::AddGlobalTestEnvironment(new FooEnvironment); +// +// However, we strongly recommend you to write your own main() and +// call AddGlobalTestEnvironment() there, as relying on initialization +// of global variables makes the code harder to read and may cause +// problems when you register multiple environments from different +// translation units and the environments have dependencies among them +// (remember that the compiler doesn't guarantee the order in which +// global variables from different translation units are initialized). +inline Environment* AddGlobalTestEnvironment(Environment* env) { + return UnitTest::GetInstance()->AddEnvironment(env); +} + +// Initializes Google Test. This must be called before calling +// RUN_ALL_TESTS(). In particular, it parses a command line for the +// flags that Google Test recognizes. Whenever a Google Test flag is +// seen, it is removed from argv, and *argc is decremented. +// +// No value is returned. Instead, the Google Test flag variables are +// updated. +// +// Calling the function for the second time has no user-visible effect. +GTEST_API_ void InitGoogleTest(int* argc, char** argv); + +// This overloaded version can be used in Windows programs compiled in +// UNICODE mode. +GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv); + +// This overloaded version can be used on Arduino/embedded platforms where +// there is no argc/argv. +GTEST_API_ void InitGoogleTest(); + +namespace internal { + +// Separate the error generating code from the code path to reduce the stack +// frame size of CmpHelperEQ. This helps reduce the overhead of some sanitizers +// when calling EXPECT_* in a tight loop. +template +AssertionResult CmpHelperEQFailure(const char* lhs_expression, + const char* rhs_expression, + const T1& lhs, const T2& rhs) { + return EqFailure(lhs_expression, + rhs_expression, + FormatForComparisonFailureMessage(lhs, rhs), + FormatForComparisonFailureMessage(rhs, lhs), + false); +} + +// This block of code defines operator==/!= +// to block lexical scope lookup. +// It prevents using invalid operator==/!= defined at namespace scope. +struct faketype {}; +inline bool operator==(faketype, faketype) { return true; } +inline bool operator!=(faketype, faketype) { return false; } + +// The helper function for {ASSERT|EXPECT}_EQ. +template +AssertionResult CmpHelperEQ(const char* lhs_expression, + const char* rhs_expression, + const T1& lhs, + const T2& rhs) { + if (lhs == rhs) { + return AssertionSuccess(); + } + + return CmpHelperEQFailure(lhs_expression, rhs_expression, lhs, rhs); +} + +// With this overloaded version, we allow anonymous enums to be used +// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums +// can be implicitly cast to BiggestInt. +GTEST_API_ AssertionResult CmpHelperEQ(const char* lhs_expression, + const char* rhs_expression, + BiggestInt lhs, + BiggestInt rhs); + +class EqHelper { + public: + // This templatized version is for the general case. + template < + typename T1, typename T2, + // Disable this overload for cases where one argument is a pointer + // and the other is the null pointer constant. + typename std::enable_if::value || + !std::is_pointer::value>::type* = nullptr> + static AssertionResult Compare(const char* lhs_expression, + const char* rhs_expression, const T1& lhs, + const T2& rhs) { + return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs); + } + + // With this overloaded version, we allow anonymous enums to be used + // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous + // enums can be implicitly cast to BiggestInt. + // + // Even though its body looks the same as the above version, we + // cannot merge the two, as it will make anonymous enums unhappy. + static AssertionResult Compare(const char* lhs_expression, + const char* rhs_expression, + BiggestInt lhs, + BiggestInt rhs) { + return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs); + } + + template + static AssertionResult Compare( + const char* lhs_expression, const char* rhs_expression, + // Handle cases where '0' is used as a null pointer literal. + std::nullptr_t /* lhs */, T* rhs) { + // We already know that 'lhs' is a null pointer. + return CmpHelperEQ(lhs_expression, rhs_expression, static_cast(nullptr), + rhs); + } +}; + +// Separate the error generating code from the code path to reduce the stack +// frame size of CmpHelperOP. This helps reduce the overhead of some sanitizers +// when calling EXPECT_OP in a tight loop. +template +AssertionResult CmpHelperOpFailure(const char* expr1, const char* expr2, + const T1& val1, const T2& val2, + const char* op) { + return AssertionFailure() + << "Expected: (" << expr1 << ") " << op << " (" << expr2 + << "), actual: " << FormatForComparisonFailureMessage(val1, val2) + << " vs " << FormatForComparisonFailureMessage(val2, val1); +} + +// A macro for implementing the helper functions needed to implement +// ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste +// of similar code. +// +// For each templatized helper function, we also define an overloaded +// version for BiggestInt in order to reduce code bloat and allow +// anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled +// with gcc 4. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. + +#define GTEST_IMPL_CMP_HELPER_(op_name, op)\ +template \ +AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ + const T1& val1, const T2& val2) {\ + if (val1 op val2) {\ + return AssertionSuccess();\ + } else {\ + return CmpHelperOpFailure(expr1, expr2, val1, val2, #op);\ + }\ +}\ +GTEST_API_ AssertionResult CmpHelper##op_name(\ + const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2) + +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. + +// Implements the helper function for {ASSERT|EXPECT}_NE +GTEST_IMPL_CMP_HELPER_(NE, !=); +// Implements the helper function for {ASSERT|EXPECT}_LE +GTEST_IMPL_CMP_HELPER_(LE, <=); +// Implements the helper function for {ASSERT|EXPECT}_LT +GTEST_IMPL_CMP_HELPER_(LT, <); +// Implements the helper function for {ASSERT|EXPECT}_GE +GTEST_IMPL_CMP_HELPER_(GE, >=); +// Implements the helper function for {ASSERT|EXPECT}_GT +GTEST_IMPL_CMP_HELPER_(GT, >); + +#undef GTEST_IMPL_CMP_HELPER_ + +// The helper function for {ASSERT|EXPECT}_STREQ. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2); + +// The helper function for {ASSERT|EXPECT}_STRCASEEQ. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2); + +// The helper function for {ASSERT|EXPECT}_STRNE. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2); + +// The helper function for {ASSERT|EXPECT}_STRCASENE. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression, + const char* s2_expression, + const char* s1, + const char* s2); + + +// Helper function for *_STREQ on wide strings. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression, + const char* s2_expression, + const wchar_t* s1, + const wchar_t* s2); + +// Helper function for *_STRNE on wide strings. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, + const char* s2_expression, + const wchar_t* s1, + const wchar_t* s2); + +} // namespace internal + +// IsSubstring() and IsNotSubstring() are intended to be used as the +// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by +// themselves. They check whether needle is a substring of haystack +// (NULL is considered a substring of itself only), and return an +// appropriate error message when they fail. +// +// The {needle,haystack}_expr arguments are the stringified +// expressions that generated the two real arguments. +GTEST_API_ AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const char* needle, const char* haystack); +GTEST_API_ AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const wchar_t* needle, const wchar_t* haystack); +GTEST_API_ AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const char* needle, const char* haystack); +GTEST_API_ AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const wchar_t* needle, const wchar_t* haystack); +GTEST_API_ AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::string& needle, const ::std::string& haystack); +GTEST_API_ AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::string& needle, const ::std::string& haystack); + +#if GTEST_HAS_STD_WSTRING +GTEST_API_ AssertionResult IsSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::wstring& needle, const ::std::wstring& haystack); +GTEST_API_ AssertionResult IsNotSubstring( + const char* needle_expr, const char* haystack_expr, + const ::std::wstring& needle, const ::std::wstring& haystack); +#endif // GTEST_HAS_STD_WSTRING + +namespace internal { + +// Helper template function for comparing floating-points. +// +// Template parameter: +// +// RawType: the raw floating-point type (either float or double) +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +template +AssertionResult CmpHelperFloatingPointEQ(const char* lhs_expression, + const char* rhs_expression, + RawType lhs_value, + RawType rhs_value) { + const FloatingPoint lhs(lhs_value), rhs(rhs_value); + + if (lhs.AlmostEquals(rhs)) { + return AssertionSuccess(); + } + + ::std::stringstream lhs_ss; + lhs_ss << std::setprecision(std::numeric_limits::digits10 + 2) + << lhs_value; + + ::std::stringstream rhs_ss; + rhs_ss << std::setprecision(std::numeric_limits::digits10 + 2) + << rhs_value; + + return EqFailure(lhs_expression, + rhs_expression, + StringStreamToString(&lhs_ss), + StringStreamToString(&rhs_ss), + false); +} + +// Helper function for implementing ASSERT_NEAR. +// +// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. +GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1, + const char* expr2, + const char* abs_error_expr, + double val1, + double val2, + double abs_error); + +// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. +// A class that enables one to stream messages to assertion macros +class GTEST_API_ AssertHelper { + public: + // Constructor. + AssertHelper(TestPartResult::Type type, + const char* file, + int line, + const char* message); + ~AssertHelper(); + + // Message assignment is a semantic trick to enable assertion + // streaming; see the GTEST_MESSAGE_ macro below. + void operator=(const Message& message) const; + + private: + // We put our data in a struct so that the size of the AssertHelper class can + // be as small as possible. This is important because gcc is incapable of + // re-using stack space even for temporary variables, so every EXPECT_EQ + // reserves stack space for another AssertHelper. + struct AssertHelperData { + AssertHelperData(TestPartResult::Type t, + const char* srcfile, + int line_num, + const char* msg) + : type(t), file(srcfile), line(line_num), message(msg) { } + + TestPartResult::Type const type; + const char* const file; + int const line; + std::string const message; + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData); + }; + + AssertHelperData* const data_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper); +}; + +enum GTestColor { COLOR_DEFAULT, COLOR_RED, COLOR_GREEN, COLOR_YELLOW }; + +GTEST_API_ GTEST_ATTRIBUTE_PRINTF_(2, 3) void ColoredPrintf(GTestColor color, + const char* fmt, + ...); + +} // namespace internal + +// The pure interface class that all value-parameterized tests inherit from. +// A value-parameterized class must inherit from both ::testing::Test and +// ::testing::WithParamInterface. In most cases that just means inheriting +// from ::testing::TestWithParam, but more complicated test hierarchies +// may need to inherit from Test and WithParamInterface at different levels. +// +// This interface has support for accessing the test parameter value via +// the GetParam() method. +// +// Use it with one of the parameter generator defining functions, like Range(), +// Values(), ValuesIn(), Bool(), and Combine(). +// +// class FooTest : public ::testing::TestWithParam { +// protected: +// FooTest() { +// // Can use GetParam() here. +// } +// ~FooTest() override { +// // Can use GetParam() here. +// } +// void SetUp() override { +// // Can use GetParam() here. +// } +// void TearDown override { +// // Can use GetParam() here. +// } +// }; +// TEST_P(FooTest, DoesBar) { +// // Can use GetParam() method here. +// Foo foo; +// ASSERT_TRUE(foo.DoesBar(GetParam())); +// } +// INSTANTIATE_TEST_SUITE_P(OneToTenRange, FooTest, ::testing::Range(1, 10)); + +template +class WithParamInterface { + public: + typedef T ParamType; + virtual ~WithParamInterface() {} + + // The current parameter value. Is also available in the test fixture's + // constructor. + static const ParamType& GetParam() { + GTEST_CHECK_(parameter_ != nullptr) + << "GetParam() can only be called inside a value-parameterized test " + << "-- did you intend to write TEST_P instead of TEST_F?"; + return *parameter_; + } + + private: + // Sets parameter value. The caller is responsible for making sure the value + // remains alive and unchanged throughout the current test. + static void SetParam(const ParamType* parameter) { + parameter_ = parameter; + } + + // Static value used for accessing parameter during a test lifetime. + static const ParamType* parameter_; + + // TestClass must be a subclass of WithParamInterface and Test. + template friend class internal::ParameterizedTestFactory; +}; + +template +const T* WithParamInterface::parameter_ = nullptr; + +// Most value-parameterized classes can ignore the existence of +// WithParamInterface, and can just inherit from ::testing::TestWithParam. + +template +class TestWithParam : public Test, public WithParamInterface { +}; + +// Macros for indicating success/failure in test code. + +// Skips test in runtime. +// Skipping test aborts current function. +// Skipped tests are neither successful nor failed. +#define GTEST_SKIP() GTEST_SKIP_("Skipped") + +// ADD_FAILURE unconditionally adds a failure to the current test. +// SUCCEED generates a success - it doesn't automatically make the +// current test successful, as a test is only successful when it has +// no failure. +// +// EXPECT_* verifies that a certain condition is satisfied. If not, +// it behaves like ADD_FAILURE. In particular: +// +// EXPECT_TRUE verifies that a Boolean condition is true. +// EXPECT_FALSE verifies that a Boolean condition is false. +// +// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except +// that they will also abort the current function on failure. People +// usually want the fail-fast behavior of FAIL and ASSERT_*, but those +// writing data-driven tests often find themselves using ADD_FAILURE +// and EXPECT_* more. + +// Generates a nonfatal failure with a generic message. +#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed") + +// Generates a nonfatal failure at the given source file location with +// a generic message. +#define ADD_FAILURE_AT(file, line) \ + GTEST_MESSAGE_AT_(file, line, "Failed", \ + ::testing::TestPartResult::kNonFatalFailure) + +// Generates a fatal failure with a generic message. +#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed") + +// Like GTEST_FAIL(), but at the given source file location. +#define GTEST_FAIL_AT(file, line) \ + GTEST_MESSAGE_AT_(file, line, "Failed", \ + ::testing::TestPartResult::kFatalFailure) + +// Define this macro to 1 to omit the definition of FAIL(), which is a +// generic name and clashes with some other libraries. +#if !GTEST_DONT_DEFINE_FAIL +# define FAIL() GTEST_FAIL() +#endif + +// Generates a success with a generic message. +#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded") + +// Define this macro to 1 to omit the definition of SUCCEED(), which +// is a generic name and clashes with some other libraries. +#if !GTEST_DONT_DEFINE_SUCCEED +# define SUCCEED() GTEST_SUCCEED() +#endif + +// Macros for testing exceptions. +// +// * {ASSERT|EXPECT}_THROW(statement, expected_exception): +// Tests that the statement throws the expected exception. +// * {ASSERT|EXPECT}_NO_THROW(statement): +// Tests that the statement doesn't throw any exception. +// * {ASSERT|EXPECT}_ANY_THROW(statement): +// Tests that the statement throws an exception. + +#define EXPECT_THROW(statement, expected_exception) \ + GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_) +#define EXPECT_NO_THROW(statement) \ + GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_) +#define EXPECT_ANY_THROW(statement) \ + GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_) +#define ASSERT_THROW(statement, expected_exception) \ + GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_) +#define ASSERT_NO_THROW(statement) \ + GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_) +#define ASSERT_ANY_THROW(statement) \ + GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_) + +// Boolean assertions. Condition can be either a Boolean expression or an +// AssertionResult. For more information on how to use AssertionResult with +// these macros see comments on that class. +#define EXPECT_TRUE(condition) \ + GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ + GTEST_NONFATAL_FAILURE_) +#define EXPECT_FALSE(condition) \ + GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ + GTEST_NONFATAL_FAILURE_) +#define ASSERT_TRUE(condition) \ + GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ + GTEST_FATAL_FAILURE_) +#define ASSERT_FALSE(condition) \ + GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ + GTEST_FATAL_FAILURE_) + +// Macros for testing equalities and inequalities. +// +// * {ASSERT|EXPECT}_EQ(v1, v2): Tests that v1 == v2 +// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2 +// * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2 +// * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2 +// * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2 +// * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2 +// +// When they are not, Google Test prints both the tested expressions and +// their actual values. The values must be compatible built-in types, +// or you will get a compiler error. By "compatible" we mean that the +// values can be compared by the respective operator. +// +// Note: +// +// 1. It is possible to make a user-defined type work with +// {ASSERT|EXPECT}_??(), but that requires overloading the +// comparison operators and is thus discouraged by the Google C++ +// Usage Guide. Therefore, you are advised to use the +// {ASSERT|EXPECT}_TRUE() macro to assert that two objects are +// equal. +// +// 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on +// pointers (in particular, C strings). Therefore, if you use it +// with two C strings, you are testing how their locations in memory +// are related, not how their content is related. To compare two C +// strings by content, use {ASSERT|EXPECT}_STR*(). +// +// 3. {ASSERT|EXPECT}_EQ(v1, v2) is preferred to +// {ASSERT|EXPECT}_TRUE(v1 == v2), as the former tells you +// what the actual value is when it fails, and similarly for the +// other comparisons. +// +// 4. Do not depend on the order in which {ASSERT|EXPECT}_??() +// evaluate their arguments, which is undefined. +// +// 5. These macros evaluate their arguments exactly once. +// +// Examples: +// +// EXPECT_NE(Foo(), 5); +// EXPECT_EQ(a_pointer, NULL); +// ASSERT_LT(i, array_size); +// ASSERT_GT(records.size(), 0) << "There is no record left."; + +#define EXPECT_EQ(val1, val2) \ + EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2) +#define EXPECT_NE(val1, val2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2) +#define EXPECT_LE(val1, val2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) +#define EXPECT_LT(val1, val2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) +#define EXPECT_GE(val1, val2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) +#define EXPECT_GT(val1, val2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) + +#define GTEST_ASSERT_EQ(val1, val2) \ + ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2) +#define GTEST_ASSERT_NE(val1, val2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2) +#define GTEST_ASSERT_LE(val1, val2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) +#define GTEST_ASSERT_LT(val1, val2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) +#define GTEST_ASSERT_GE(val1, val2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) +#define GTEST_ASSERT_GT(val1, val2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) + +// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of +// ASSERT_XY(), which clashes with some users' own code. + +#if !GTEST_DONT_DEFINE_ASSERT_EQ +# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) +#endif + +#if !GTEST_DONT_DEFINE_ASSERT_NE +# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2) +#endif + +#if !GTEST_DONT_DEFINE_ASSERT_LE +# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2) +#endif + +#if !GTEST_DONT_DEFINE_ASSERT_LT +# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2) +#endif + +#if !GTEST_DONT_DEFINE_ASSERT_GE +# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2) +#endif + +#if !GTEST_DONT_DEFINE_ASSERT_GT +# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2) +#endif + +// C-string Comparisons. All tests treat NULL and any non-NULL string +// as different. Two NULLs are equal. +// +// * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2 +// * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2 +// * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case +// * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case +// +// For wide or narrow string objects, you can use the +// {ASSERT|EXPECT}_??() macros. +// +// Don't depend on the order in which the arguments are evaluated, +// which is undefined. +// +// These macros evaluate their arguments exactly once. + +#define EXPECT_STREQ(s1, s2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2) +#define EXPECT_STRNE(s1, s2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) +#define EXPECT_STRCASEEQ(s1, s2) \ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2) +#define EXPECT_STRCASENE(s1, s2)\ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) + +#define ASSERT_STREQ(s1, s2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2) +#define ASSERT_STRNE(s1, s2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) +#define ASSERT_STRCASEEQ(s1, s2) \ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2) +#define ASSERT_STRCASENE(s1, s2)\ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) + +// Macros for comparing floating-point numbers. +// +// * {ASSERT|EXPECT}_FLOAT_EQ(val1, val2): +// Tests that two float values are almost equal. +// * {ASSERT|EXPECT}_DOUBLE_EQ(val1, val2): +// Tests that two double values are almost equal. +// * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): +// Tests that v1 and v2 are within the given distance to each other. +// +// Google Test uses ULP-based comparison to automatically pick a default +// error bound that is appropriate for the operands. See the +// FloatingPoint template class in gtest-internal.h if you are +// interested in the implementation details. + +#define EXPECT_FLOAT_EQ(val1, val2)\ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ + val1, val2) + +#define EXPECT_DOUBLE_EQ(val1, val2)\ + EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ + val1, val2) + +#define ASSERT_FLOAT_EQ(val1, val2)\ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ + val1, val2) + +#define ASSERT_DOUBLE_EQ(val1, val2)\ + ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ, \ + val1, val2) + +#define EXPECT_NEAR(val1, val2, abs_error)\ + EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ + val1, val2, abs_error) + +#define ASSERT_NEAR(val1, val2, abs_error)\ + ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ + val1, val2, abs_error) + +// These predicate format functions work on floating-point values, and +// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g. +// +// EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0); + +// Asserts that val1 is less than, or almost equal to, val2. Fails +// otherwise. In particular, it fails if either val1 or val2 is NaN. +GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2, + float val1, float val2); +GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2, + double val1, double val2); + + +#if GTEST_OS_WINDOWS + +// Macros that test for HRESULT failure and success, these are only useful +// on Windows, and rely on Windows SDK macros and APIs to compile. +// +// * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr) +// +// When expr unexpectedly fails or succeeds, Google Test prints the +// expected result and the actual result with both a human-readable +// string representation of the error, if available, as well as the +// hex result code. +# define EXPECT_HRESULT_SUCCEEDED(expr) \ + EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) + +# define ASSERT_HRESULT_SUCCEEDED(expr) \ + ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) + +# define EXPECT_HRESULT_FAILED(expr) \ + EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) + +# define ASSERT_HRESULT_FAILED(expr) \ + ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) + +#endif // GTEST_OS_WINDOWS + +// Macros that execute statement and check that it doesn't generate new fatal +// failures in the current thread. +// +// * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement); +// +// Examples: +// +// EXPECT_NO_FATAL_FAILURE(Process()); +// ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed"; +// +#define ASSERT_NO_FATAL_FAILURE(statement) \ + GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_) +#define EXPECT_NO_FATAL_FAILURE(statement) \ + GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_) + +// Causes a trace (including the given source file path and line number, +// and the given message) to be included in every test failure message generated +// by code in the scope of the lifetime of an instance of this class. The effect +// is undone with the destruction of the instance. +// +// The message argument can be anything streamable to std::ostream. +// +// Example: +// testing::ScopedTrace trace("file.cc", 123, "message"); +// +class GTEST_API_ ScopedTrace { + public: + // The c'tor pushes the given source file location and message onto + // a trace stack maintained by Google Test. + + // Template version. Uses Message() to convert the values into strings. + // Slow, but flexible. + template + ScopedTrace(const char* file, int line, const T& message) { + PushTrace(file, line, (Message() << message).GetString()); + } + + // Optimize for some known types. + ScopedTrace(const char* file, int line, const char* message) { + PushTrace(file, line, message ? message : "(null)"); + } + + ScopedTrace(const char* file, int line, const std::string& message) { + PushTrace(file, line, message); + } + + // The d'tor pops the info pushed by the c'tor. + // + // Note that the d'tor is not virtual in order to be efficient. + // Don't inherit from ScopedTrace! + ~ScopedTrace(); + + private: + void PushTrace(const char* file, int line, std::string message); + + GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace); +} GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its + // c'tor and d'tor. Therefore it doesn't + // need to be used otherwise. + +// Causes a trace (including the source file path, the current line +// number, and the given message) to be included in every test failure +// message generated by code in the current scope. The effect is +// undone when the control leaves the current scope. +// +// The message argument can be anything streamable to std::ostream. +// +// In the implementation, we include the current line number as part +// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s +// to appear in the same block - as long as they are on different +// lines. +// +// Assuming that each thread maintains its own stack of traces. +// Therefore, a SCOPED_TRACE() would (correctly) only affect the +// assertions in its own thread. +#define SCOPED_TRACE(message) \ + ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\ + __FILE__, __LINE__, (message)) + + +// Compile-time assertion for type equality. +// StaticAssertTypeEq() compiles iff type1 and type2 are +// the same type. The value it returns is not interesting. +// +// Instead of making StaticAssertTypeEq a class template, we make it a +// function template that invokes a helper class template. This +// prevents a user from misusing StaticAssertTypeEq by +// defining objects of that type. +// +// CAVEAT: +// +// When used inside a method of a class template, +// StaticAssertTypeEq() is effective ONLY IF the method is +// instantiated. For example, given: +// +// template class Foo { +// public: +// void Bar() { testing::StaticAssertTypeEq(); } +// }; +// +// the code: +// +// void Test1() { Foo foo; } +// +// will NOT generate a compiler error, as Foo::Bar() is never +// actually instantiated. Instead, you need: +// +// void Test2() { Foo foo; foo.Bar(); } +// +// to cause a compiler error. +template +bool StaticAssertTypeEq() { + (void)internal::StaticAssertTypeEqHelper(); + return true; +} + +// Defines a test. +// +// The first parameter is the name of the test suite, and the second +// parameter is the name of the test within the test suite. +// +// The convention is to end the test suite name with "Test". For +// example, a test suite for the Foo class can be named FooTest. +// +// Test code should appear between braces after an invocation of +// this macro. Example: +// +// TEST(FooTest, InitializesCorrectly) { +// Foo foo; +// EXPECT_TRUE(foo.StatusIsOK()); +// } + +// Note that we call GetTestTypeId() instead of GetTypeId< +// ::testing::Test>() here to get the type ID of testing::Test. This +// is to work around a suspected linker bug when using Google Test as +// a framework on Mac OS X. The bug causes GetTypeId< +// ::testing::Test>() to return different values depending on whether +// the call is from the Google Test framework itself or from user test +// code. GetTestTypeId() is guaranteed to always return the same +// value, as it always calls GetTypeId<>() from the Google Test +// framework. +#define GTEST_TEST(test_suite_name, test_name) \ + GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \ + ::testing::internal::GetTestTypeId()) + +// Define this macro to 1 to omit the definition of TEST(), which +// is a generic name and clashes with some other libraries. +#if !GTEST_DONT_DEFINE_TEST +#define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name) +#endif + +// Defines a test that uses a test fixture. +// +// The first parameter is the name of the test fixture class, which +// also doubles as the test suite name. The second parameter is the +// name of the test within the test suite. +// +// A test fixture class must be declared earlier. The user should put +// the test code between braces after using this macro. Example: +// +// class FooTest : public testing::Test { +// protected: +// void SetUp() override { b_.AddElement(3); } +// +// Foo a_; +// Foo b_; +// }; +// +// TEST_F(FooTest, InitializesCorrectly) { +// EXPECT_TRUE(a_.StatusIsOK()); +// } +// +// TEST_F(FooTest, ReturnsElementCountCorrectly) { +// EXPECT_EQ(a_.size(), 0); +// EXPECT_EQ(b_.size(), 1); +// } +// +// GOOGLETEST_CM0011 DO NOT DELETE +#define TEST_F(test_fixture, test_name)\ + GTEST_TEST_(test_fixture, test_name, test_fixture, \ + ::testing::internal::GetTypeId()) + +// Returns a path to temporary directory. +// Tries to determine an appropriate directory for the platform. +GTEST_API_ std::string TempDir(); + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +// Dynamically registers a test with the framework. +// +// This is an advanced API only to be used when the `TEST` macros are +// insufficient. The macros should be preferred when possible, as they avoid +// most of the complexity of calling this function. +// +// The `factory` argument is a factory callable (move-constructible) object or +// function pointer that creates a new instance of the Test object. It +// handles ownership to the caller. The signature of the callable is +// `Fixture*()`, where `Fixture` is the test fixture class for the test. All +// tests registered with the same `test_suite_name` must return the same +// fixture type. This is checked at runtime. +// +// The framework will infer the fixture class from the factory and will call +// the `SetUpTestSuite` and `TearDownTestSuite` for it. +// +// Must be called before `RUN_ALL_TESTS()` is invoked, otherwise behavior is +// undefined. +// +// Use case example: +// +// class MyFixture : public ::testing::Test { +// public: +// // All of these optional, just like in regular macro usage. +// static void SetUpTestSuite() { ... } +// static void TearDownTestSuite() { ... } +// void SetUp() override { ... } +// void TearDown() override { ... } +// }; +// +// class MyTest : public MyFixture { +// public: +// explicit MyTest(int data) : data_(data) {} +// void TestBody() override { ... } +// +// private: +// int data_; +// }; +// +// void RegisterMyTests(const std::vector& values) { +// for (int v : values) { +// ::testing::RegisterTest( +// "MyFixture", ("Test" + std::to_string(v)).c_str(), nullptr, +// std::to_string(v).c_str(), +// __FILE__, __LINE__, +// // Important to use the fixture type as the return type here. +// [=]() -> MyFixture* { return new MyTest(v); }); +// } +// } +// ... +// int main(int argc, char** argv) { +// std::vector values_to_test = LoadValuesFromConfig(); +// RegisterMyTests(values_to_test); +// ... +// return RUN_ALL_TESTS(); +// } +// +template +TestInfo* RegisterTest(const char* test_suite_name, const char* test_name, + const char* type_param, const char* value_param, + const char* file, int line, Factory factory) { + using TestT = typename std::remove_pointer::type; + + class FactoryImpl : public internal::TestFactoryBase { + public: + explicit FactoryImpl(Factory f) : factory_(std::move(f)) {} + Test* CreateTest() override { return factory_(); } + + private: + Factory factory_; + }; + + return internal::MakeAndRegisterTestInfo( + test_suite_name, test_name, type_param, value_param, + internal::CodeLocation(file, line), internal::GetTypeId(), + internal::SuiteApiResolver::GetSetUpCaseOrSuite(file, line), + internal::SuiteApiResolver::GetTearDownCaseOrSuite(file, line), + new FactoryImpl{std::move(factory)}); +} + +} // namespace testing + +// Use this function in main() to run all tests. It returns 0 if all +// tests are successful, or 1 otherwise. +// +// RUN_ALL_TESTS() should be invoked after the command line has been +// parsed by InitGoogleTest(). +// +// This function was formerly a macro; thus, it is in the global +// namespace and has an all-caps name. +int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_; + +inline int RUN_ALL_TESTS() { + return ::testing::UnitTest::GetInstance()->Run(); +} + +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + +#endif // GTEST_INCLUDE_GTEST_GTEST_H_ diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/main.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/main.cpp new file mode 100644 index 00000000..d7700e8b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/main.cpp @@ -0,0 +1,38 @@ +#include +#include +#include "gtest/gtest.h" + +std::function()> get_console_logger_factory() +{ + return [] { + return Aws::MakeShared( + "console_logger", Aws::Utils::Logging::LogLevel::Warn); + }; +} + +std::string aws_prefix; + +void parse_args(int argc, char** argv) +{ + const std::string resource_prefix_option = "--aws_prefix="; + for (int i = 1; i < argc; i++) { + std::string arg = argv[i]; + if (arg.find(resource_prefix_option) == 0) { + aws_prefix = arg.substr(resource_prefix_option.length()); // get whatever value after the '=' + break; + } + } +} + +int main(int argc, char** argv) +{ + parse_args(argc, argv); + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Warn; + options.loggingOptions.logger_create_fn = get_console_logger_factory(); + Aws::InitAPI(options); + ::testing::InitGoogleTest(&argc, argv); + int exit_code = RUN_ALL_TESTS(); + Aws::ShutdownAPI(options); + return exit_code; +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/CMakeLists.txt new file mode 100644 index 00000000..af43b1d3 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/CMakeLists.txt @@ -0,0 +1,14 @@ +project(lambda-test-fun LANGUAGES CXX) + +# resources are the actual lambda functions deployed and exercised by the tests +add_executable(${PROJECT_NAME} lambda_function.cpp) +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/include) +target_link_libraries(${PROJECT_NAME} PRIVATE aws-lambda-runtime) +# package the lambda function into lambda.zip +add_custom_target(aws-lambda-package-lambda-test-fun + COMMAND "${CMAKE_SOURCE_DIR}/packaging/packager" "${CMAKE_CURRENT_BINARY_DIR}/lambda-test-fun" + DEPENDS ${PROJECT_NAME}) + +add_custom_target(aws-lambda-package-lambda-test-fun-no-glibc + COMMAND "${CMAKE_SOURCE_DIR}/packaging/packager" -d "${CMAKE_CURRENT_BINARY_DIR}/lambda-test-fun" + DEPENDS ${PROJECT_NAME}) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/lambda_function.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/lambda_function.cpp new file mode 100644 index 00000000..43f3dac2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/resources/lambda_function.cpp @@ -0,0 +1,129 @@ +#include +#include + +#include +#include +#include + +using namespace aws::lambda_runtime; + +constexpr unsigned int AWSLOGO_PNG_LEN = 1451; +extern unsigned char awslogo_png[AWSLOGO_PNG_LEN]; // NOLINT + +invocation_response echo_success(invocation_request const& request) +{ + return invocation_response::success(request.payload, "application/json"); +} + +invocation_response echo_failure(invocation_request const& /*request*/) +{ + return invocation_response::failure("Test error message", "TestErrorType"); +} + +invocation_response binary_response(invocation_request const& /*request*/) +{ + const std::string png((char*)awslogo_png, AWSLOGO_PNG_LEN); + return invocation_response::success(png, "image/png"); +} + +int main(int argc, char* argv[]) +{ + std::unordered_map> handlers; + handlers.emplace("echo_success", echo_success); + handlers.emplace("echo_failure", echo_failure); + handlers.emplace("binary_response", binary_response); + + if (argc < 2) { + aws::logging::log_error("lambda_fun", "Missing handler argument. Exiting."); + return -1; + } + + auto it = handlers.find(argv[1]); + if (it == handlers.end()) { + aws::logging::log_error("lambda_fun", "Handler %s not found. Exiting.", argv[1]); + return -2; + } + run_handler(it->second); + return 0; +} + +/* clang-format off */ +unsigned char awslogo_png[] = { // NOLINT + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, // NOLINT + 0x18, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x06, 0x00, 0x00, 0x00, 0x35, 0xf8, 0xdc, 0x7e, 0x00, 0x00, 0x00, 0x04, 0x67, // NOLINT + 0x41, 0x4d, 0x41, 0x00, 0x00, 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 0x00, 0x00, 0x20, 0x63, 0x48, 0x52, 0x4d, // NOLINT + 0x00, 0x00, 0x7a, 0x26, 0x00, 0x00, 0x80, 0x84, 0x00, 0x00, 0xfa, 0x00, 0x00, 0x00, 0x80, 0xe8, 0x00, 0x00, 0x75, // NOLINT + 0x30, 0x00, 0x00, 0xea, 0x60, 0x00, 0x00, 0x3a, 0x98, 0x00, 0x00, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x00, 0x00, // NOLINT + 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, // NOLINT + 0x00, 0x00, 0x01, 0x59, 0x69, 0x54, 0x58, 0x74, 0x58, 0x4d, 0x4c, 0x3a, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x64, 0x6f, // NOLINT + 0x62, 0x65, 0x2e, 0x78, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x78, 0x3a, 0x78, 0x6d, 0x70, 0x6d, 0x65, // NOLINT + 0x74, 0x61, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x3d, 0x22, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x3a, 0x6e, // NOLINT + 0x73, 0x3a, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x22, 0x20, 0x78, 0x3a, 0x78, 0x6d, 0x70, 0x74, 0x6b, 0x3d, 0x22, 0x58, // NOLINT + 0x4d, 0x50, 0x20, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x35, 0x2e, 0x34, 0x2e, 0x30, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, // NOLINT + 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, // NOLINT + 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, // NOLINT + 0x31, 0x39, 0x39, 0x39, 0x2f, 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, 0x74, // NOLINT + 0x61, 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x72, 0x64, 0x66, // NOLINT + 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x61, 0x62, // NOLINT + 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // NOLINT + 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x74, 0x69, 0x66, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, // NOLINT + 0x6e, 0x73, 0x2e, 0x61, 0x64, 0x6f, 0x62, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x66, 0x66, 0x2f, 0x31, // NOLINT + 0x2e, 0x30, 0x2f, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x66, // NOLINT + 0x66, 0x3a, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x31, 0x3c, 0x2f, 0x74, 0x69, // NOLINT + 0x66, 0x66, 0x3a, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3e, 0x0a, 0x20, 0x20, 0x20, // NOLINT + 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, // NOLINT + 0x6e, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x0a, 0x3c, 0x2f, // NOLINT + 0x78, 0x3a, 0x78, 0x6d, 0x70, 0x6d, 0x65, 0x74, 0x61, 0x3e, 0x0a, 0x4c, 0xc2, 0x27, 0x59, 0x00, 0x00, 0x03, 0xbc, // NOLINT + 0x49, 0x44, 0x41, 0x54, 0x38, 0x11, 0x65, 0x54, 0x6f, 0x6c, 0x53, 0x55, 0x14, 0x3f, 0xe7, 0xbe, 0xd7, 0x75, 0xf2, // NOLINT + 0x18, 0x1a, 0x24, 0xc4, 0xc1, 0x20, 0x0a, 0x6b, 0x27, 0x1b, 0xa3, 0x85, 0xa4, 0x92, 0x29, 0x5d, 0xbb, 0x25, 0x82, // NOLINT + 0xc6, 0x48, 0x0c, 0x61, 0x43, 0x0d, 0x4a, 0x98, 0x91, 0x19, 0xa3, 0x7e, 0x22, 0x41, 0x09, 0xc9, 0xe0, 0x83, 0x06, // NOLINT + 0x35, 0x31, 0x46, 0x8c, 0xc1, 0x05, 0x25, 0xc1, 0xc8, 0x97, 0xc5, 0xc4, 0x38, 0xd0, 0x84, 0x60, 0x52, 0xba, 0x2d, // NOLINT + 0x68, 0xd0, 0x6c, 0x65, 0x56, 0xb1, 0xab, 0x3a, 0x70, 0x09, 0x68, 0x84, 0x0f, 0xba, 0xd5, 0xba, 0xbe, 0x77, 0x8f, // NOLINT + 0xbf, 0x7b, 0xcb, 0x32, 0xff, 0x9c, 0xe6, 0xdc, 0x73, 0xcf, 0xb9, 0xbf, 0xf3, 0xf7, 0xde, 0x57, 0x26, 0x50, 0x74, // NOLINT + 0x7d, 0x47, 0x4c, 0x74, 0xf0, 0x2a, 0xb6, 0x2b, 0x88, 0x69, 0x21, 0x6b, 0x1a, 0xd5, 0x25, 0x6f, 0x07, 0x79, 0x33, // NOLINT + 0x29, 0x26, 0xea, 0xad, 0xf1, 0xd5, 0xae, 0x7c, 0x3e, 0x33, 0x1d, 0x8d, 0xa7, 0x1f, 0x21, 0x09, 0x7a, 0x1d, 0x97, // NOLINT + 0x7a, 0xbe, 0xfb, 0x7a, 0xe8, 0x6a, 0x34, 0x9e, 0x4a, 0x88, 0x48, 0x9f, 0x2a, 0x07, 0x8f, 0x05, 0x61, 0xa7, 0x43, // NOLINT + 0x31, 0xbd, 0x6e, 0xe2, 0x09, 0xd1, 0x34, 0x2b, 0xb5, 0xaf, 0x30, 0x9a, 0x39, 0xab, 0xac, 0x41, 0xcb, 0x0a, 0x04, // NOLINT + 0x1a, 0x55, 0x4a, 0xed, 0x12, 0x96, 0x27, 0x85, 0x69, 0x33, 0x7b, 0x33, 0x6f, 0x6a, 0xd2, 0x93, 0x8e, 0x1b, 0xda, // NOLINT + 0x56, 0x76, 0x25, 0x61, 0x71, 0xa2, 0x77, 0x86, 0x6a, 0xbd, 0x07, 0xfc, 0x0a, 0xdd, 0x5b, 0x0d, 0xa4, 0x77, 0x43, // NOLINT + 0xc6, 0xb4, 0xe7, 0x34, 0x30, 0xd3, 0xc7, 0x9a, 0xf8, 0xa8, 0x62, 0xb5, 0x85, 0x99, 0xdf, 0xd5, 0x5a, 0xdb, 0xd8, // NOLINT + 0x8a, 0xba, 0xba, 0x9c, 0x89, 0x5c, 0xe6, 0x54, 0x21, 0x97, 0x7d, 0xa9, 0xfe, 0x56, 0x1a, 0x2b, 0x8e, 0x0e, 0x9d, // NOLINT + 0x43, 0x09, 0x6f, 0xa0, 0x8a, 0xce, 0x1f, 0x73, 0xc3, 0x85, 0xc0, 0xaf, 0x14, 0x1d, 0xd2, 0x69, 0x13, 0x10, 0xb4, // NOLINT + 0x74, 0xb6, 0x5c, 0xba, 0x40, 0xc4, 0x49, 0xab, 0x09, 0xa7, 0x44, 0xe8, 0x98, 0x2f, 0x7e, 0xc9, 0x71, 0x5c, 0x56, // NOLINT + 0x22, 0x37, 0x2e, 0x8d, 0x65, 0x26, 0x0b, 0x63, 0xe7, 0xfa, 0x8b, 0xb9, 0xec, 0x19, 0x13, 0x1b, 0x85, 0x63, 0x44, // NOLINT + 0xad, 0x9b, 0x56, 0x91, 0x52, 0xc7, 0x10, 0xb4, 0x01, 0xea, 0x15, 0xc8, 0x16, 0x1c, 0x5c, 0x9d, 0xc8, 0x65, 0x37, // NOLINT + 0x44, 0xe2, 0xc9, 0x77, 0x88, 0x54, 0x84, 0x39, 0xd8, 0x2b, 0x5a, 0x1d, 0x11, 0x92, 0x7e, 0x26, 0xde, 0xa3, 0xc5, // NOLINT + 0xdf, 0xae, 0xd8, 0x2d, 0x90, 0xa6, 0xad, 0x13, 0xe3, 0xd9, 0x6c, 0x34, 0x96, 0x3c, 0x24, 0xc4, 0x07, 0xe0, 0xff, // NOLINT + 0x3b, 0xf8, 0x74, 0xc5, 0x57, 0x7b, 0x27, 0xf3, 0x99, 0x6b, 0xb6, 0x0d, 0xad, 0xd4, 0x09, 0x4d, 0xb4, 0x44, 0x09, // NOLINT + 0x6d, 0x91, 0x19, 0xef, 0x21, 0x62, 0x3e, 0x05, 0x50, 0x18, 0x4c, 0x1c, 0xa8, 0x41, 0x12, 0x69, 0xd0, 0xe2, 0xec, // NOLINT + 0x40, 0xe0, 0xcb, 0x61, 0xdf, 0xff, 0x14, 0x23, 0x58, 0xc0, 0xec, 0xf6, 0xe0, 0xf8, 0x67, 0xf9, 0xd3, 0xfb, 0xd2, // NOLINT + 0xe0, 0x0a, 0xb9, 0xa1, 0x3e, 0xdc, 0xd5, 0x72, 0x8c, 0xf7, 0x39, 0xa8, 0xf7, 0x87, 0x42, 0xf2, 0x81, 0xb1, 0xdb, // NOLINT + 0x04, 0xa8, 0x76, 0x0d, 0x78, 0xe4, 0xfb, 0x8b, 0xd9, 0x9f, 0x8a, 0xc5, 0xcf, 0xfe, 0x82, 0x71, 0x3d, 0xba, 0x58, // NOLINT + 0x6c, 0x00, 0x21, 0xbd, 0xf4, 0x73, 0x88, 0x32, 0x8b, 0xec, 0x43, 0xf5, 0xc3, 0xf9, 0xfc, 0xf9, 0x1b, 0xb8, 0xd8, // NOLINT + 0xeb, 0xc0, 0xbf, 0x0c, 0x3e, 0x6d, 0xf0, 0xd1, 0x58, 0xe7, 0xf2, 0xa6, 0x75, 0xed, 0x77, 0xe1, 0x21, 0x5c, 0x2b, // NOLINT + 0x8e, 0x65, 0x3f, 0x0c, 0x84, 0x4e, 0x6a, 0x2d, 0xeb, 0x8c, 0xbf, 0x6b, 0x16, 0x12, 0x3e, 0x8c, 0x54, 0xaf, 0x45, // NOLINT + 0x62, 0xed, 0x1b, 0xf0, 0x8a, 0xca, 0x98, 0xeb, 0x38, 0x9c, 0x17, 0x47, 0x5b, 0xd3, 0x77, 0xe7, 0xc7, 0x07, 0x2e, // NOLINT + 0xc1, 0x9e, 0x55, 0xca, 0x89, 0xfb, 0x81, 0x8c, 0x54, 0xf1, 0x74, 0xc1, 0x09, 0x85, 0x36, 0x57, 0x82, 0xca, 0x27, // NOLINT + 0x55, 0xf7, 0xa0, 0x19, 0x05, 0x1d, 0x8f, 0xc4, 0x92, 0x53, 0x0b, 0x1c, 0xf6, 0x6a, 0x58, 0x56, 0xdf, 0x1e, 0xa6, // NOLINT + 0x9e, 0x1f, 0x2c, 0xf8, 0xe6, 0x92, 0x48, 0xa4, 0x12, 0x2b, 0xd7, 0x26, 0x77, 0x9a, 0x4a, 0x8c, 0xe9, 0xce, 0x96, // NOLINT + 0xf4, 0x1d, 0x10, 0xb6, 0xc3, 0xa6, 0xa6, 0xfb, 0xea, 0x1a, 0xd7, 0x76, 0xae, 0x9e, 0xd3, 0x1b, 0x1b, 0x37, 0x2e, // NOLINT + 0x5a, 0x15, 0x6f, 0x8f, 0x40, 0x47, 0x1d, 0x55, 0x5a, 0x03, 0xbd, 0xa1, 0xb5, 0xfd, 0x71, 0xa2, 0x8e, 0x6d, 0x44, // NOLINT + 0x4f, 0x78, 0x73, 0x76, 0x46, 0x66, 0xbc, 0x30, 0xf3, 0x74, 0xe7, 0xe9, 0xe0, 0x41, 0x52, 0x60, 0x5c, 0x8b, 0x25, // NOLINT + 0x13, 0xe4, 0x9f, 0xe7, 0xff, 0xd5, 0x6f, 0xc2, 0xaa, 0x42, 0xbe, 0xa2, 0x7a, 0x1a, 0xa7, 0xb6, 0xa0, 0x1c, 0xf2, // NOLINT + 0x1c, 0xae, 0x7c, 0xc1, 0x72, 0x94, 0x9e, 0xc5, 0xd1, 0x34, 0x3f, 0x43, 0x27, 0xe6, 0x90, 0x82, 0x04, 0xdf, 0x52, // NOLINT + 0x8b, 0xdb, 0x4c, 0x79, 0x93, 0xc4, 0x26, 0xea, 0xce, 0x77, 0xf1, 0xc0, 0xc0, 0x40, 0x60, 0x30, 0x18, 0x21, 0x1f, // NOLINT + 0xea, 0x48, 0x3b, 0x7d, 0xe9, 0x8c, 0xa6, 0x66, 0xdb, 0x85, 0xc3, 0xdd, 0x34, 0x5b, 0x7a, 0xbb, 0xae, 0x2d, 0xe4, // NOLINT + 0x96, 0xb7, 0x2b, 0x0a, 0x1c, 0xc5, 0xfa, 0x61, 0x40, 0x67, 0x58, 0xde, 0xa2, 0x45, 0x78, 0x2f, 0xaf, 0x40, 0xd9, // NOLINT + 0x08, 0x36, 0x37, 0x7f, 0x92, 0x7b, 0xe9, 0x37, 0xc8, 0xff, 0x91, 0x49, 0x6c, 0x8d, 0x7d, 0xb8, 0x35, 0xfe, 0x57, // NOLINT + 0x57, 0xd6, 0x8c, 0x58, 0x61, 0xaa, 0xa5, 0x6e, 0x94, 0x74, 0x19, 0x86, 0x85, 0xe0, 0x17, 0x4d, 0xbb, 0x96, 0xa4, // NOLINT + 0x9f, 0xb6, 0xc2, 0xc5, 0x7c, 0xea, 0x66, 0xd6, 0xc3, 0xe0, 0x41, 0xd4, 0x76, 0x1e, 0xcf, 0x60, 0x82, 0xae, 0xd0, // NOLINT + 0x75, 0x9e, 0x1f, 0x99, 0xc5, 0x9b, 0x45, 0xde, 0xa3, 0x3a, 0x0a, 0x68, 0x25, 0x02, 0xde, 0x03, 0xec, 0x83, 0x30, // NOLINT + 0xb5, 0x21, 0xc6, 0x14, 0xe4, 0x53, 0x28, 0xe5, 0x79, 0xec, 0xbf, 0x61, 0x5b, 0x15, 0xda, 0x44, 0x8b, 0xd5, 0xf6, // NOLINT + 0xfb, 0xe9, 0x51, 0x1c, 0xbc, 0x80, 0xc0, 0x6d, 0xf6, 0x4b, 0x28, 0x99, 0x48, 0xf4, 0x0b, 0xd6, 0x5f, 0xc1, 0x7f, // NOLINT + 0x80, 0xcd, 0xc8, 0x6e, 0x01, 0x2f, 0x01, 0xd7, 0x53, 0x0d, 0x7e, 0xb3, 0xd6, 0x36, 0x84, 0x24, 0x47, 0x78, 0x0f, // NOLINT + 0x7d, 0x84, 0x98, 0x2e, 0x2d, 0xa3, 0xfd, 0x74, 0x1b, 0x1d, 0x9e, 0xef, 0x00, 0x46, 0x54, 0xe9, 0xc3, 0xc9, 0x92, // NOLINT + 0xbc, 0x8f, 0x3f, 0xbe, 0x59, 0x4a, 0xc1, 0x69, 0x13, 0x0c, 0x2d, 0x48, 0xb2, 0x0c, 0x7b, 0xd3, 0xb6, 0xb9, 0xf0, // NOLINT + 0x69, 0xf0, 0x14, 0x76, 0x17, 0x21, 0x47, 0xc8, 0xa1, 0x0c, 0x3f, 0x6d, 0x8b, 0x80, 0x0a, 0xc0, 0x71, 0xaa, 0xe5, // NOLINT + 0xdd, 0x54, 0x36, 0xfb, 0xbf, 0x01, 0x02, 0x9d, 0x70, 0x74, 0xcd, 0x2a, 0x03, 0x15, 0x00, 0x00, 0x00, 0x00, 0x49, // NOLINT + 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82}; // NOLINT +/* clang-format on */ diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/runtime_tests.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/runtime_tests.cpp new file mode 100644 index 00000000..00324296 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/runtime_tests.cpp @@ -0,0 +1,194 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gtest/gtest.h" + +extern std::string aws_prefix; + +namespace { + +using namespace Aws::Lambda; + +constexpr auto S3BUCKET = "aws-lambda-cpp-tests"; +constexpr auto S3KEY = "lambda-test-fun.zip"; +constexpr auto REQUEST_TIMEOUT = 15 * 1000; + +struct LambdaRuntimeTest : public ::testing::Test { + LambdaClient m_lambda_client; + Aws::IAM::IAMClient m_iam_client; + static Aws::Client::ClientConfiguration create_iam_config() + { + Aws::Client::ClientConfiguration config; + config.requestTimeoutMs = REQUEST_TIMEOUT; + config.region = Aws::Region::US_EAST_1; + return config; + } + + static Aws::Client::ClientConfiguration create_lambda_config() + { + Aws::Client::ClientConfiguration config; + config.requestTimeoutMs = REQUEST_TIMEOUT; + config.region = Aws::Environment::GetEnv("AWS_REGION"); + return config; + } + + static Aws::String build_resource_name(Aws::String const& name) + { + return aws_prefix.c_str() + name; // NOLINT + } + + LambdaRuntimeTest() : m_lambda_client(create_lambda_config()), m_iam_client(create_iam_config()) {} + + ~LambdaRuntimeTest() override + { + // clean up in case we exited one test abnormally + delete_function(build_resource_name("echo_success"), false /*assert*/); + delete_function(build_resource_name("echo_failure"), false /*assert*/); + delete_function(build_resource_name("binary_response"), false /*assert*/); + } + + Aws::String get_role_arn(Aws::String const& role_name) + { + using namespace Aws::IAM; + using namespace Aws::IAM::Model; + GetRoleRequest request; + request.WithRoleName(role_name); + auto outcome = m_iam_client.GetRole(request); + EXPECT_TRUE(outcome.IsSuccess()); + if (outcome.IsSuccess()) { + return outcome.GetResult().GetRole().GetArn(); + } + return {}; + } + + void create_function(Aws::String const& function_name, Aws::String const& handler_name) + { + Model::CreateFunctionRequest create_function_request; + create_function_request.SetHandler(handler_name); + create_function_request.SetFunctionName(function_name); + // I ran into eventual-consistency issues when creating the role dynamically as part of the test. + create_function_request.SetRole(get_role_arn("integration-tests")); + Model::FunctionCode funcode; + funcode.WithS3Bucket(S3BUCKET).WithS3Key(build_resource_name(S3KEY)); + create_function_request.SetCode(funcode); + create_function_request.SetRuntime(Aws::Lambda::Model::Runtime::provided); + + auto outcome = m_lambda_client.CreateFunction(create_function_request); + ASSERT_TRUE(outcome.IsSuccess()) << "Failed to create function " << function_name; + } + + void delete_function(Aws::String const& function_name, bool assert = true) + { + Model::DeleteFunctionRequest delete_function_request; + delete_function_request.SetFunctionName(function_name); + auto outcome = m_lambda_client.DeleteFunction(delete_function_request); + if (assert) { + ASSERT_TRUE(outcome.IsSuccess()) << "Failed to delete function " << function_name; + } + } +}; + +TEST_F(LambdaRuntimeTest, echo_success) +{ + Aws::String const funcname = build_resource_name("echo_success"); + constexpr auto payload_content = "Hello, Lambda!"; + create_function(funcname, "echo_success" /*handler_name*/); + Model::InvokeRequest invoke_request; + invoke_request.SetFunctionName(funcname); + invoke_request.SetInvocationType(Model::InvocationType::RequestResponse); + invoke_request.SetContentType("application/json"); + + std::shared_ptr payload = Aws::MakeShared("FunctionTest"); + Aws::Utils::Json::JsonValue json_payload; + json_payload.WithString("barbaz", payload_content); + *payload << json_payload.View().WriteCompact(); + invoke_request.SetBody(payload); + + Model::InvokeOutcome invoke_outcome = m_lambda_client.Invoke(invoke_request); + EXPECT_TRUE(invoke_outcome.IsSuccess()); + Aws::StringStream output; + if (!invoke_outcome.IsSuccess()) { + delete_function(funcname); + return; + } + EXPECT_EQ(200, invoke_outcome.GetResult().GetStatusCode()); + EXPECT_TRUE(invoke_outcome.GetResult().GetFunctionError().empty()); + auto const json_response = Aws::Utils::Json::JsonValue(invoke_outcome.GetResult().GetPayload()); + EXPECT_TRUE(json_response.WasParseSuccessful()); + EXPECT_STREQ(payload_content, json_response.View().GetString("barbaz").c_str()); + delete_function(funcname); +} + +TEST_F(LambdaRuntimeTest, echo_unicode) +{ + Aws::String const funcname = build_resource_name("echo_success"); // re-use the echo method but with Unicode input + constexpr auto payload_content = "画像は1000語の価値がある"; + create_function(funcname, "echo_success" /*handler_name*/); + Model::InvokeRequest invoke_request; + invoke_request.SetFunctionName(funcname); + invoke_request.SetInvocationType(Model::InvocationType::RequestResponse); + invoke_request.SetContentType("application/json"); + + std::shared_ptr payload = Aws::MakeShared("FunctionTest"); + Aws::Utils::Json::JsonValue json_payload; + json_payload.WithString("UnicodeText", payload_content); + *payload << json_payload.View().WriteCompact(); + invoke_request.SetBody(payload); + + Model::InvokeOutcome invoke_outcome = m_lambda_client.Invoke(invoke_request); + EXPECT_TRUE(invoke_outcome.IsSuccess()); + Aws::StringStream output; + if (!invoke_outcome.IsSuccess()) { + delete_function(funcname); + return; + } + EXPECT_EQ(200, invoke_outcome.GetResult().GetStatusCode()); + EXPECT_TRUE(invoke_outcome.GetResult().GetFunctionError().empty()); + auto const json_response = Aws::Utils::Json::JsonValue(invoke_outcome.GetResult().GetPayload()); + EXPECT_TRUE(json_response.WasParseSuccessful()); + EXPECT_STREQ(payload_content, json_response.View().GetString("UnicodeText").c_str()); + delete_function(funcname); +} + +TEST_F(LambdaRuntimeTest, echo_failure) +{ + Aws::String const funcname = build_resource_name("echo_failure"); + create_function(funcname, "echo_failure" /*handler_name*/); + Model::InvokeRequest invoke_request; + invoke_request.SetFunctionName(funcname); + invoke_request.SetInvocationType(Model::InvocationType::RequestResponse); + + Model::InvokeOutcome invoke_outcome = m_lambda_client.Invoke(invoke_request); + EXPECT_TRUE(invoke_outcome.IsSuccess()); + EXPECT_EQ(200, invoke_outcome.GetResult().GetStatusCode()); + EXPECT_STREQ("Unhandled", invoke_outcome.GetResult().GetFunctionError().c_str()); + delete_function(funcname); +} + +TEST_F(LambdaRuntimeTest, binary_response) +{ + Aws::String const funcname = build_resource_name("binary_response"); + unsigned long constexpr expected_length = 1451; + create_function(funcname, "binary_response" /*handler_name*/); + Model::InvokeRequest invoke_request; + invoke_request.SetFunctionName(funcname); + invoke_request.SetInvocationType(Model::InvocationType::RequestResponse); + + Model::InvokeOutcome invoke_outcome = m_lambda_client.Invoke(invoke_request); + EXPECT_TRUE(invoke_outcome.IsSuccess()); + EXPECT_EQ(200, invoke_outcome.GetResult().GetStatusCode()); + EXPECT_TRUE(invoke_outcome.GetResult().GetFunctionError().empty()); + EXPECT_EQ(expected_length, invoke_outcome.GetResult().GetPayload().tellp()); + delete_function(funcname); +} +} // namespace diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/version_tests.cpp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/version_tests.cpp new file mode 100644 index 00000000..862c6801 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/aws-lambda-cpp-0.2.7/tests/version_tests.cpp @@ -0,0 +1,22 @@ +#include +#include "gtest/gtest.h" + +using namespace aws::lambda_runtime; + +TEST(VersionTests, get_version_major) +{ + auto version = get_version_major(); + ASSERT_EQ(0, version); +} + +TEST(VersionTests, get_version_minor) +{ + auto version = get_version_minor(); + ASSERT_GE(version, 1); +} + +TEST(VersionTests, get_version_patch) +{ + auto version = get_version_patch(); + ASSERT_GE(version, 0); +} diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CHANGES b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CHANGES new file mode 100644 index 00000000..b5bc3059 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CHANGES @@ -0,0 +1,7452 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Changelog + +Version 7.73.0 (14 Oct 2020) + +Daniel Stenberg (14 Oct 2020) +- RELEASE-NOTES: synced + + for 7.73.0 + +- THANKS: from 7.73.0 and .mailmap fixes + +- mailmap: fixups of some contributors + +- projects/build-wolfssl.bat: fix the copyright year range + +Marc Hoersken (14 Oct 2020) +- [Sergei Nikulov brought this change] + + CI/tests: fix invocation of tests for CMake builds + + Update appveyor.yml to set env variable TFLAGS and run tests + Remove curly braces due to CMake error (${TFLAGS} -> $TFLAGS) + Move testdeps build to build step (per review comments) + + Reviewed-by: Marc Hörsken + + Closes #6066 + Fixes #6052 + +- tests/server/util.c: fix support for Windows Unicode builds + + Detected via #6066 + Closes #6070 + +Daniel Stenberg (13 Oct 2020) +- [Jay Satiro brought this change] + + strerror: Revert to local codepage for Windows error string + + - Change get_winapi_error() to return the error string in the local + codepage instead of UTF-8 encoding. + + Two weeks ago bed5f84 fixed get_winapi_error() to work on xbox, but it + also changed the error string's encoding from local codepage to UTF-8. + + We return the local codepage version of the error string because if it + is output to the user's terminal it will likely be with functions which + expect the local codepage (eg fprintf, failf, infof). + + This is essentially a partial revert of bed5f84. The support for xbox + remains but the error string is reverted back to local codepage. + + Ref: https://github.com/curl/curl/pull/6005 + + Reviewed-by: Marcel Raad + Closes #6065 + +Marc Hoersken (13 Oct 2020) +- CI/tests: use verification curl for test reporting APIs + + Avoid using our own, potentially installed, curl for + the test reporting APIs in case it is broken. + + Reviewed-by: Daniel Stenberg + + Preparation for #6049 + Closes #6063 + +Viktor Szakats (12 Oct 2020) +- windows: fix comparison of mismatched types warning + + clang 10, mingw-w64: + ``` + vtls/openssl.c:2917:33: warning: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') + [-Wsign-compare] + if(GetLastError() != CRYPT_E_NOT_FOUND) + ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ + ``` + + Approved-by: Daniel Stenberg + Closes #6062 + +Daniel Stenberg (11 Oct 2020) +- [Viktor Szakats brought this change] + + src/Makefile.m32: fix undefined curlx_dyn_* errors + + by linking `lib/dynbuf.c` when building a static curl binary. + Previously this source file was only included when building + a dynamic curl binary. This was likely possibly because no + functions from the `src/Makefile.inc` / `CURLX_CFILES` sources + were actually required for a curl tool build. This has + recently changed with the introduction of `curlx_dyn_*()` + memory functions and their use by the tool sources. + + Closes #6060 + +- HISTORY: curl verifies SSL certs by default since version 7.10 + +Marc Hoersken (8 Oct 2020) +- runtests.pl: use $LIBDIR variable instead of hardcoded path + + Reviewed-by: Daniel Stenberg + Closes #6051 + +Daniel Stenberg (7 Oct 2020) +- checksrc: detect // comments on column 0 + + Spotted while working on #6045 + + Closes #6048 + +- [Frederik Wedel-Heinen brought this change] + + mbedtls: add missing header when defining MBEDTLS_DEBUG + + Closes #6045 + +- curl: make sure setopt CURLOPT_IPRESOLVE passes on a long + + Previously, it would pass on a define (int) which could make libcurl + read junk as a value - which prevented the CURLOPT_IPRESOLVE option to + "take". This could then make test 2100 do two DoH requests instead of + one! + + Fixes #6042 + Closes #6043 + +- RELEASE-NOTES: synced + +- scripts/release-notes.pl: don't "embed" $ in format string for printf() + + ... since they might contain %-codes that mess up the output! + +Jay Satiro (5 Oct 2020) +- [M.R.T brought this change] + + build-wolfssl: fix build with Visual Studio 2019 + + Closes https://github.com/curl/curl/pull/6033 + +Daniel Stenberg (4 Oct 2020) +- runtests: add %repeat[]% for test files + + ... and use this new keywords in all the test files larger than 50K to reduce + their sizes and make them a lot easier to read and understand. + + Closes #6040 + +- [Emil Engler brought this change] + + --help: move two options from the misc category + + The cmdline opts delegation and suppress-connect-headers + fit better into auth and proxy rather than misc. + + Follow-up to aa8777f63febc + Closes #6038 + +- [Samanta Navarro brought this change] + + docs/opts: fix typos in two manual pages + + Closes #6039 + +- ldap: reduce the amount of #ifdefs needed + + Closes #6035 + +- runtests: provide curl's version string as %VERSION for tests + + ... so that we can check HTTP requests for User-Agent: curl/%VERSION + + Update 600+ test cases accordingly. + + Closes #6037 + +- checksrc: warn on space after exclamation mark + + Closes #6034 + +- test1465: verify --libcurl with binary POST data + +- runtests: allow generating a binary sequence from hex + +- tool_setopt: escape binary data to hex, not octal + +- curl: make --libcurl show binary posts correctly + + Reported-by: Stephan Mühlstrasser + Fixes #6031 + Closes #6032 + +Jay Satiro (1 Oct 2020) +- strerror: fix null deref on winapi out-of-memory + + Follow-up to bed5f84 from several days ago. + + Ref: https://github.com/curl/curl/pull/6005 + +Daniel Stenberg (1 Oct 2020) +- [Kamil Dudka brought this change] + + vtls: deduplicate some DISABLE_PROXY ifdefs + + ... in the code of gtls, nss, and openssl + + Closes #5735 + +- RELEASE-NOTES: synced + +- [Emil Engler brought this change] + + TODO: Add OpenBSD libtool notice + + See #5862 + Closes #6030 + +- tests/unit/README: convert to markdown + + ... and add to dist! + + Closes #6028 + +- tests/README: convert to markdown + + Closes #6028 + +- include/README: convert to markdown + + Closes #6028 + +- examples/README: convert to markdown + + Closes #6028 + +- configure: don't say HTTPS-proxy is enabled when disabled! + + Reported-by: Kamil Dudka + Reviewed-by: Kamil Dudka + Bug: https://github.com/curl/curl/pull/5735#issuecomment-701376388 + Closes #6029 + +Daniel Gustafsson (30 Sep 2020) +- src: Consistently spell whitespace without whitespace + + Whitespace is spelled without a space between white and space, so + make sure to consistently spell it that way across the codebase. + + Closes #6023 + Reviewed-by: Daniel Stenberg + Reviewed-by: Emil Engler + +- MANUAL: update examples to resolve without redirects + + www.netscape.com is redirecting to a cookie consent form on Aol, and + cool.haxx.se isn't responding to FTP anymore. Replace with examples + that resolves in case users try out the commands when reading the + manual. + + Closes #6024 + Reviewed-by: Daniel Stenberg + Reviewed-by: Emil Engler + +Daniel Stenberg (30 Sep 2020) +- HISTORY: add some 2020 events + +- sectransp: make it build with --disable-proxy + + Follow-up from #5466 and f3d501dc678d80 + Reported-by: Javier Navarro + Fixes #6025 + Closes #6026 + +- ECH: renamed from ESNI in docs and configure + + Encrypted Client Hello (ECH) is the current name. + + Closes #6022 + +- configure: use "no" instead of "disabled" for the end summary + + ... for consistency but also to make them more distinctly stand out next + to the "enabled" lines. + +- TODO: SSH over HTTPS proxy with more backends + + ... as right now only the libssh2 backend supports it. + +- libssh2: handle the SSH protocols done over HTTPS proxy + + Reported-by: Robin Douine + Fixes #4295 + Closes #6021 + +- [Emil Engler brought this change] + + memdebug: remove 9 year old unused debug function + + There used to be a way to have memdebug fill allocated memory. 9 years + later this has no value there (valgrind and ASAN etc are way better). If + people need to know about it they can have a look at VCS logs. + + Closes #5973 + +- sendf: move Curl_sendf to dict.c and make it static + + ... as the only remaining user of that function. Also fix gopher.c to + instead use Curl_write() + + Closes #6020 + +- ROADMAP: updates and cleanups + + Fix the HSTS PR + + Remove DoT, thread-safe init and hard-coded localhost. I feel very + little interest for these with users so I downgrade them to plain "TODO" + entries again. + +- schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root + + This matches what is returned in other TLS backends in the same + situation. + + Reviewed-by: Jay Satiro + Reviewed-by: Emil Engler + Follow-up to 5a3efb1 + Reported-by: iammrtau on github + Fixes #6003 + Closes #6018 + +- RELEASE-NOTES: synced + +- ftp: make a 552 response return CURLE_REMOTE_DISK_FULL + + Added test 348 to verify. Added a 'STOR' command to the test FTP + server to enable test 348. Documented the command in FILEFORMAT.md + + Reported-by: Duncan Wilcox + Fixes #6016 + Closes #6017 + +- pause: only trigger a reread if the unpause sticks + + As an unpause might itself get paused again and then triggering another + reread doesn't help. + + Follow-up from e040146f22608fd9 (shipped since 7.69.1) + + Bug: https://curl.haxx.se/mail/lib-2020-09/0081.html + Patch-by: Kunal Chandarana + Fixes #5988 + Closes #6013 + +- test163[12]: require http to be built-in to run + + ... as speaking over an HTTPS proxy implies http! + + Closes #6014 + +- ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX define + + Closes #6012 + +- [Javier Blazquez brought this change] + + strerror: honor Unicode API choice on Windows + + Closes #6005 + +- imap: make imap_send use dynbuf for the send buffer management + + Reuses the buffer and thereby reduces number of mallocs over a transfer. + + Closes #6010 + +- Curl_send: return error when pre_receive_plain can't malloc + + ... will probably trigger some false DEAD CODE positives on non-windows + code analyzers for the conditional code. + + Closes #6011 + +- ftp: separate FTPS from FTP over "HTTPS proxy" + + When using HTTPS proxy, SSL is used but not in the view of the FTP + protocol handler itself so separate the connection's use of SSL from the + FTP control connection's sue. + + Reported-by: Mingtao Yang + Fixes #5523 + Closes #6006 + +Dan Fandrich (23 Sep 2020) +- tests/data: Fix some mismatched XML tags in test cases + + This allows these test files to pass xmllint. + +Daniel Stenberg (23 Sep 2020) +- pingpong: use a dynbuf for the *_pp_sendf() function + + ... reuses the same dynamic buffer instead of doing repeated malloc/free + cycles. + + Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls + after this change in my test setup (132 => 125), curl 7.72.0 needed 140 + calls for this. + + Test case 103 makes 9 less allocations now (130). Down from 149 in + 7.72.0. + + Closes #6004 + +- dynbuf: add Curl_dyn_vaddf + + Closes #6004 + +- dynbuf: make *addf() not require extra mallocs + + ... by introducing a printf() function that appends directly into a + dynbuf: Curl_dyn_vprintf(). This avoids the mandatory extra malloc so if + the buffer is already big enough it can just printf directly into it. + + Since this less-malloc version requires tthe use of a library internal + printf function, we only provide this version when building libcurl and + not for the dynbuf code that is used when building the curl tool. + + Closes #5998 + +- KNOWN_BUGS: Unable to use PKCS12 certificate with Secure Transport + + Closes #5403 + +- pingpong: remove a malloc per Curl_pp_vsendf call + + This typically makes 7-9 fewer mallocs per FTP transfer. + + Closes #5997 + +- symbian: drop support + + The OS is deprecated. I see no traces of anyone having actually built + curl for Symbian after 2012. + + The public headers are unmodified. + + Closes #5989 + +- RELEASE-NOTES: synced + +- curl_krb5.h: rename from krb5.h + + Follow-up from f4873ebd0be32cf + + Turns out some older openssl installations go bananas otherwise. + Reported-by: Tom van der Woerdt + Fixes #5995 + Closes #5996 + +- test1297: verify GOT_NOTHING with http proxy tunnel + +- http_proxy: do not count proxy headers in the header bytecount + + ... as that counter is subsequently used to detect if nothing was + returned from the peer. This made curl return CURLE_OK when it should + have returned CURLE_GOT_NOTHING. + + Fixes #5992 + Reported-by: Tom van der Woerdt + Closes #5994 + +- setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument + + Fixed two return code mixups. CURLE_UNKNOWN_OPTION is saved for when the + option is, yeah, not known. Clarified this in the setopt man page too. + + Closes #5993 + +- krb5: merged security.c and krb specific FTP functions in here + + These two files were always tightly connected and it was hard to + understand what went into which. This also allows us to make the + ftpsend() function static (moved from ftp.c). + + Removed security.c + Renamed curl_sec.h to krb5.h + + Closes #5987 + +- Curl_handler: add 'family' to each protocol + + Makes get_protocol_family() faster and it moves the knowledge about the + "families" to each protocol handler, where it belongs. + + Closes #5986 + +- parsedate: tune the date to epoch conversion + + By avoiding an unnecessary error check and the temp use of the tm + struct, the time2epoch conversion function gets a little bit faster. + When repeating test 517, the updated version is perhaps 1% faster (on + one particular build on one particular architecture). + + Closes #5985 + +- cmake: remove scary warning + + Remove the text saying + + "the curl cmake build system is poorly maintained. Be aware" + + ... not because anything changed just now, but to encourage users to use + it and subsequently improve it. + + Closes #5984 + +- docs/MQTT: remove outdated paaragraphs + +- docs/MQTT: not experimental anymore + + Follow-up to e37e4468688d8f + +- docs/RESOURCES: remove + + This document is not maintained and rather than trying to refresh it, + let's kill it. A more up-to-date document with relevant RFCs is this + page on the curl website: https://curl.haxx.se/rfc/ + + Closes #5980 + +- docs/TheArtOfHttpScripting: convert to markdown + + Makes it easier to browse on github etc. Offers (better) links. + + It should be noted that this document is already mostly outdated and + "Everything curl" at https://ec.haxx.se/ is a better resource and + tutorial. + + Closes #5981 + +- BUGS: convert document to markdown + + Closes #5979 + +- --help: strdup the category + + ... since it is converted and the original pointer is freed on Windows + unicode handling. + + Follow-up to aa8777f63febc + Fixes #5977 + Closes #5978 + Reported-by: xwxbug on github + +- CHECKSRC: document two missing warnings + +- RELEASE-NOTES: synced + +- ftp: avoid risk of reading uninitialized integers + + If the received PASV response doesn't match the expected pattern, we + could end up reading uninitialized integers for IP address and port + number. + + Issue pointed out by muse.dev + Closes #5972 + +- [Quentin Balland brought this change] + + easy_reset: clear retry counter + + Closes #5975 + Fixes #5974 + +- ftp: get rid of the PPSENDF macro + + The use of such a macro hides some of what's actually going on to the + reader and is generally disapproved of in the project. + + Closes #5971 + +- man pages: switch to https://example.com URLs + + Since HTTPS is "the new normal", this update changes a lot of man page + examples to use https://example.com instead of the previous "http://..." + + Closes #5969 + +- github: remove the duplicate "Security vulnerability" entry + + ... since github adds an entry automatically by itself. + + Closes #5970 + +- [Emil Engler brought this change] + + github: use new issue template feature + + This helps us to avoid getting feature requests as well as security + bugs reported into the issue tracker. + + Closes #5936 + +- [Emil Engler brought this change] + + urlapi: use more Curl_safefree + + Closes #5968 + +Marc Hoersken (17 Sep 2020) +- multi: align WinSock mask variables in Curl_multi_wait + + Also skip pre-checking sockets to set timeout_ms to 0 + after the first socket has been detected to be ready. + + Reviewed-by: rcombs on github + Reviewed-by: Daniel Stenberg + + Follow up to #5886 + +- multi: reuse WinSock events variable in Curl_multi_wait + + Since the struct is quite large (1 long and 10 ints) we + declare it once at the beginning of the function instead + of multiple times inside loops to avoid stack movements. + + Reviewed-by: Viktor Szakats + Reviewed-by: Daniel Stenberg + + Closes #5886 + +Daniel Stenberg (16 Sep 2020) +- TODO: dynamically decide to use socketpair + + Suggested-by: Anders Bakken + + Closes #4829 + +- TODO: add PR reference for native IDN support on macOS + + As there was work started on this that never got completed. + + Closes #5371 + +- tool_help.h: update copyright year range + + Follow-up from aa8777f63febca + +- CI/azure: disable test 571 in the msys2 builds + + It's just too flaky there + + Reviewed-by: Marc Hoersken + Closes #5954 + +- tool_writeout: protect fputs() from NULL + + When the code was changed to do fputs() instead of fprintf() it got + sensitive for NULL pointers; add checks for that. + + Follow-up from 0c1e767e83ec66 + + Closes #5963 + +- test3015: verify stdout "as text" + + Follow-up from 0c1e767e83e to please win32 tests + + Closes #5962 + +- travis: use libressl v3.1.4 instead of master + + ... as their git master seems too fragile to use (and 3.2.1 which is the + latest has a build failure). + + Closes #5964 + +- tests/FILEFORMAT: document type=shell for + +- tests/FILEFORMAT: document nonewline support for + + The one in , that creates files. + + Follow-up from b83947c8df7 + +- [anio brought this change] + + tool_writeout: add new writeout variable, %{num_headers} + + This variable gives the number of headers. + + Closes #5947 + +- tool_urlglob: fix compiler warning "unreachable code" + + (On Windows builds.) + + Follow-up to 70a3b003d9 + +- [Gergely Nagy brought this change] + + vtls: deduplicate client certificates in ssl_config_data + + Closes #5629 + +- ftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUND + + This is primarily interesting for cases where CURLOPT_NOBODY is set as + previously curl would not return an error for this case. + + MDTM getting 550 now also returns this error (it returned + CURLE_FTP_COULDNT_RETR_FILE before) in order to unify return codes for + missing files across protocols and specific FTP commands. + + libcurl already returns error on a 550 as a MDTM response (when + CURLOPT_FILETIME is set). If CURLOPT_NOBODY is not set, an error would + happen subsequently anyway since the RETR command would fail. + + Add test 1913 and 1914 to verify. Updated several tests accordingly due + to the updated SIZE behavior. + + Reported-by: Tomas Berger + Fixes #5953 + Closes #5957 + +- curl: make checkpasswd use dynbuf + + Closes #5952 + +- curl: make glob_match_url use dynbuf + + Closes #5952 + +- curl: make file2memory use dynbuf + + Closes #5952 + +- curl: make file2string use dynbuf + + Closes #5952 + +- [Antarpreet Singh brought this change] + + imap: set cselect_bits to CURL_CSELECT_IN initially + + ... when continuing a transfer from a FETCH response. + + When the size of the file was small enough that the entirety of the + transfer happens in a single go and schannel buffers holds the entire + data. However, it wasn't completely read in Curl_pp_readresp since a + line break was found before that could happen. So, by the time we are in + imap_state_fetch_resp - there's data in buffers that needs to be read + via Curl_read but nothing to read from the socket. After we setup a + transfer (Curl_setup_transfer), curl just waits on the socket state to + change - which doesn't happen since no new data ever comes. + + Closes #5961 + +- RELEASE-NOTES: synced + +- test434: test -K use in a single line without newline + + Closes #5946 + +- runtests: allow creating files without newlines + + Closes #5946 + +- curl: use curlx_dynbuf for realloc when loading config files + + ... fixes an integer overflow at the same time. + + Reported-by: ihsinme on github + Assisted-by: Jay Satiro + + Closes #5946 + +- dynbuf: provide curlx_ names for reuse by the curl tool + + Closes #5946 + +- dynbuf: make sure Curl_dyn_tail() zero terminates + + Closes #5959 + +- tests: add test1912 to the dist + + Follow-up to 70984ce1be4cab6c + +- docs/LICENSE-MIXING: remove + + This document is not maintained and I feel that it doesn't provide much + value to users anymore (if it ever did). + + Closes #5955 + +- [Laramie Leavitt brought this change] + + http: consolidate nghttp2_session_mem_recv() call paths + + Previously there were several locations that called + nghttp2_session_mem_recv and handled responses slightly differently. + Those have been converted to call the existing + h2_process_pending_input() function. + + Moved the end-of-session check to h2_process_pending_input() since the + only place the end-of-session state can change is after nghttp2 + processes additional input frames. + + This will likely fix the fuzzing error. While I don't have a root cause + the out-of-bounds read seems like a use after free, so moving the + nghttp2_session_check_request_allowed() call to a location with a + guaranteed nghttp2 session seems reasonable. + + Also updated a few nghttp2 callsites to include error messages and added + a few additional error checks. + + Closes #5648 + +- HISTORY: mention alt-svc added in 2019 + + ... and make 1996 the first year subtitle + +- base64: also build for pop3 and imap + + Follow-up to the fix in 20417a13fb8f83 + + Reported-by: Michael Olbrich + Fixes #5937 + Closes #5948 + +- base64: enable in build with SMTP + + The oauth2 support is used with SMTP and it uses base64 functions. + + Reported-by: Michael Olbrich + Fixes #5937 + Closes #5938 + +- curl_mime_headers.3: fix the example's use of curl_slist_append + + Reported-by: sofaboss on github + Fixes #5942 + Closes #5943 + +- lib583: fix enum mixup + + grrr the previous follow-up to 17fcdf6a31 was wrong + +- libtest: fix build errors + + Follow-up from 17fcdf6a310d4c8076 + +- lib: fix -Wassign-enum warnings + + configure --enable-debug now enables -Wassign-enum with clang, + identifying several enum "abuses" also fixed. + + Reported-by: Gisle Vanem + Bug: https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553 + + Closes #5929 + +- RELEASE-NOTES: synced + +- [Diven Qi brought this change] + + url: use blank credentials when using proxy w/o username and password + + Fixes proxy regression brought in commit ad829b21ae (7.71.0) + + Fixed #5911 + Closes #5914 + +- travis: add a build using libressl (from git master) + + The v3.2.1 tag (latest release atm) results in a broken build. + + Closes #5932 + +- configure: let --enable-debug set -Wenum-conversion with gcc >= 10 + + Unfortunately, this option is not detecting the same issues as clang's + -Wassign-enum flag, but should still be useful to detect future + mistakes. + + Closes #5930 + +- openssl: consider ALERT_CERTIFICATE_EXPIRED a failed verification + + If the error reason from the lib is + SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED, libcurl will return + CURLE_PEER_FAILED_VERIFICATION and not CURLE_SSL_CONNECT_ERROR. + + This unifies the libcurl return code and makes libressl run test 313 + (CRL testing) fine. + + Closes #5934 + +- FAQ: refreshed some very old language + +- cmake: make HTTP_ONLY also disable MQTT + + ... and alphasort the order of disabling protocols to make it easier to + browse. + + Closes #5931 + +- libtest: remove lib1541 leftovers + + Caused automake errors. + + Follow-up to 8ca54a03ea08a + +- tests/libtests: remove test 1900 and 2033 + + We already remove the test files, now remove the libtest codes as well. + + Follow-up to e50a877df74 + +Marc Hoersken (7 Sep 2020) +- CI/azure: add test number to title for display in analytics + + To ease identification of tests the test number is added to + the test case title in order to have it on the Azure DevOps + Analytics pages and reports which currently do not show it. + + Bump test case revision to make Azure DevOps update titles. + + Closes #5927 + +Daniel Stenberg (6 Sep 2020) +- altsvc: clone setting in curl_easy_duphandle + + The cache content is not duplicated, like other caches, but the setting + and specified file name are. + + Test 1908 is extended to verify this somewhat. Since the duplicated + handle gets the same file name, the test unfortunately overwrites the + same file twice (with different contents) which makes it hard to check + automatically. + + Closes #5923 + +- test1541: remove since it is a known bug + + A shared connection cache is not thread-safe is a known issue. Stop + testing this until we believe this issue is addressed. Reduces + occasional test failures we don't care about. + + The test code in lib1541.c is left in git to allow us to restore it when + we get to fix this. + + Closes #5922 + +- tests: remove pipelining tests + + Remove the tests 530, 584, 1900, 1901, 1902, 1903 and 2033. They were + previously disabled. + + The Pipelining code was removed from curl in commit 2f44e94efb3df8e, + April 2019. + + Closes #5921 + +- curl: retry delays in parallel mode no longer sleeps blocking + + The previous sleep for retries would block all other concurrent + transfers. Starting now, the retry will instead be properly marked to + not get restarted until after the delay time but other transfers can + still continue in the mean time. + + Closes #5917 + +- curl:parallel_transfers: make sure retry readds the transfer + + Reported-by: htasta on github + Fixes #5905 + Closes #5917 + +- build: drop support for building with Watcom + + These files are not maintained, they seem to have no users, Watcom + compilers look like not having users nor releases anymore. + + Closes #5918 + +- winbuild/rundebug.cmd: remove + + Seems to have been added by mistake? Not included in dists. + + Closes #5919 + +- curl: in retry output don't call all problems "transient" + + ... because when --retry-all-errors is used, the error isn't necessarily + transient at all. + + Closes #5916 + +- easygetopt: pass a valid enum to avoid compiler warning + + "integer constant not in range of enumerated type 'CURLoption'" + + Reported-by: Gisle Vanem + Bug: https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843 + + Closes #5915 + +- [Emil Engler brought this change] + + tests: Add tests for new --help + + This commit is a part of "--help me if you can" + + Closes #5680 + +- [Emil Engler brought this change] + + tool: update --help with categories + + This commit is a part of "--help me if you can" + + Closes #5680 + +- [Emil Engler brought this change] + + docs: add categories to all cmdline opts + + Adapted gen.pl with 'listcats' + + This commit is a part of "--help me if you can" + + Closes #5680 + +- RELEASE-NOTES: synced + +- [ihsinme brought this change] + + connect.c: remove superfluous 'else' in Curl_getconnectinfo + + Closes #5912 + +- [Samuel Marks brought this change] + + CMake: remove explicit `CMAKE_ANSI_CFLAGS` + + This variable was removed from cmake in commit + https://gitlab.kitware.com/cmake/cmake/commit/5a834b0bb0bc288. A later + CMake commit removes the variable from the tests, claiming that it was + removed in CMake 2.6 + + Reviewed-By: Peter Wu + Closes #5439 + +- [cbe brought this change] + + libssh2: pass on the error from ssh_force_knownhost_key_type + + Closes #5909 + +- scripts/delta: add diffstat summary + + ... and make output more table-like + +- [Martin Bašti brought this change] + + http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set + + ... in case NO_PROXY takes an effect + + Without this patch, the following command crashes: + + $ GIT_CURL_VERBOSE=1 NO_PROXY=github.com HTTPS_PROXY=https://example.com \ + git clone https://github.com/curl/curl.git + + Minimal libcurl-based reproducer: + + #include + + int main() { + CURL *curl = curl_easy_init(); + if(curl) { + CURLcode ret; + curl_easy_setopt(curl, CURLOPT_URL, "https://github.com/"); + curl_easy_setopt(curl, CURLOPT_PROXY, "example.com"); + /* set the proxy type */ + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS); + curl_easy_setopt(curl, CURLOPT_NOPROXY, "github.com"); + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + ret = curl_easy_perform(curl); + curl_easy_cleanup(curl); + return ret; + } + return -1; + } + + Assisted-by: Kamil Dudka + Bug: https://bugzilla.redhat.com/1873327 + Closes #5902 + +- travis: add a CI job with openssl3 (from git master) + + Closes #5908 + +- openssl: avoid error conditions when importing native CA + + The code section that is OpenSSL 3+ specific now uses the same logic as + is used in the version < 3 section. It caused a compiler error without + it. + + Closes #5907 + +- setopt: avoid curl_ on local variable + + Closes #5906 + +- mqtt.c: avoid curl_ prefix on local variable + + Closes #5906 + +- wildcard: strip "curl_" prefix from private symbols + + Closes #5906 + +- vtls: make it 'struct Curl_ssl_session' + + Use uppercase C for internal symbols. + + Closes #5906 + +- curl_threads: make it 'struct Curl_actual_call' + + Internal names should not be prefixed "curl_" + + Closes #5906 + +- schannel: make it 'struct Curl_schannel*' + + As internal global names should use captical C. + + Closes #5906 + +- hash: make it 'struct Curl_hash' + + As internal global names should use captical C. + + Closes #5906 + +- llist: make it "struct Curl_llist" + + As internal global names should use captical C. + + Closes #5906 + +Marc Hoersken (2 Sep 2020) +- telnet.c: depend on static requirement of WinSock version 2 + + Drop dynamic loading of ws2_32.dll and instead rely on the + imported version which is now required to be at least 2.2. + + Reviewed-by: Marcel Raad + Reviewed-by: Jay Satiro + Reviewed-by: Daniel Stenberg + Reviewed-by: Viktor Szakats + + Closes #5854 + +- win32: drop support for WinSock version 1, require version 2 + + IPv6, telnet and now also the multi API require WinSock + version 2 which is available starting with Windows 95. + + Therefore we think it is time to drop support for version 1. + + Reviewed-by: Marcel Raad + Reviewed-by: Jay Satiro + Reviewed-by: Daniel Stenberg + Reviewed-by: Viktor Szakats + + Follow up to #5634 + Closes #5854 + +- select: align poll emulation to return all relevant events + + The poll emulation via select already consumes POLLRDNORM, + POLLWRNORM and POLLRDBAND as input events. Therefore it + should also return them as output events if signaled. + + Also fix indentation in input event handling block. + + Assisted-by: Jay Satiro + Reviewed-by: Daniel Stenberg + + Replaces #5852 + Closes #5883 + +- CI/azure: MQTT is now enabled by default + + Reviewed-by: Daniel Stenberg + + Follow up to #5858 + Closes #5903 + +Daniel Stenberg (2 Sep 2020) +- copyright.pl: ignore buildconf + +- test971: show test mismatches "inline" + +- lib/Makefile.am: bump VERSIONINFO due to new functions + + ... we're generally bad at this, but we are adding new functions for + this release. + + Closes #5899 + +- optiontable: use DEBUGBUILD + + Follow-up to commit 6e18568ba38 (#5877) + +- cmdline-opts/gen.pl: generate nicer "See Also" in curl.1 + + If there are more than two items in the list, use commas for all but the + last separator which is set to 'and'. Reads better. + + Closes #5898 + +- curl.1: add see also no-progress-meter on two spots + + Ref: #5894 + + Closes #5897 + +- RELEASE-NOTES: synced + +- mqtt: enable by default + + No longer considered experimental. + + Closes #5858 + +- [Michael Baentsch brought this change] + + tls: add CURLOPT_SSL_EC_CURVES and --curves + + Closes #5892 + +- url: remove funny embedded comments in Curl_disonnect calls + +- [Chris Paulson-Ellis brought this change] + + conn: check for connection being dead before reuse + + Prevents incorrect reuse of an HTTP connection that has been prematurely + shutdown() by the server. + + Partial revert of 755083d00deb16 + + Fixes #5884 + Closes #5893 + +Marc Hoersken (29 Aug 2020) +- buildconf: exec autoreconf to avoid additional process + + Also make buildconf exit with the return code of autoreconf. + + Reviewed-by: Daniel Stenberg + + Follow up to #5853 + Closes #5890 + +- CI/azure: no longer ignore results of test 1013 + + Follow up to #5771 + Closes #5889 + +- docs: add description about CI platforms to CONTRIBUTE.md + + Reviewed-by: Daniel Stenberg + Reviewed-by: Marcel Raad + Reviewed-by: Jay Satiro + + Closes #5882 + +Daniel Stenberg (29 Aug 2020) +- tests/getpart: use MIME::Base64 instead of home-cooked + + Since we already use the base64 package since a while back, we can just + as well switch to that here too. + + It also happens to use the exact same function name, which otherwise + causes a run-time warning. + + Reported-by: Marc Hörsken + Fixes #5885 + Closes #5887 + +Marcel Raad (29 Aug 2020) +- ntlm: fix condition for curl_ntlm_core usage + + `USE_WINDOWS_SSPI` without `USE_WIN32_CRYPTO` but with any other DES + backend is fine, but was excluded before. + + This also fixes test 1013 as the condition for SMB support in + configure.ac didn't match the condition in the source code. Now it + does. + + Fixes https://github.com/curl/curl/issues/1262 + Closes https://github.com/curl/curl/pull/5771 + +- AppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode + + The Schannel builds are the most useful to verify as they make the most + use of the Windows API. Classic MinGW doesn't support Unicode at all, + only MinGW-w64 and MSVC do. + + Closes https://github.com/curl/curl/pull/5843 + +- CMake: add option to enable Unicode on Windows + + As already existing for winbuild. + + Closes https://github.com/curl/curl/pull/5843 + +Marc Hoersken (29 Aug 2020) +- select: simplify return code handling for poll and select + + poll and select already return -1 on error according to POSIX, + so there is no need to perform a <0 to -1 conversion in code. + + Also we can just use one check with <= 0 on the return code. + + Assisted-by: Daniel Stenberg + Reviewed-by: Jay Satiro + + Replaces #5852 + Closes #5880 + +Daniel Stenberg (28 Aug 2020) +- RELEASE-NOTES: synced + +- [Jeroen Ooms brought this change] + + tests: add test1912 with typechecks + + Validates that gcc-typecheck macros match the new option type API. + + Closes #5873 + +- easyoptions: provide debug function when DEBUGBUILD + + ... not CURLDEBUG as they're not always set in conjunction. + + Follow-up to 6ebe63fac23f38df + + Fixes #5877 + Closes #5878 + +Marc Hoersken (28 Aug 2020) +- sockfilt: handle FD_CLOSE winsock event on write socket + + Learn from the way Cygwin handles and maps the WinSock events + to simulate correct and complete poll and select behaviour + according to Richard W. Stevens Network Programming book. + + Follow up to #5867 + Closes #5879 + +- multi: handle connection state winsock events + + Learn from the way Cygwin handles and maps the WinSock events + to simulate correct and complete poll and select behaviour + according to Richard W. Stevens Network Programming book. + + Reviewed-by: Jay Satiro + Reviewed-by: Marcel Raad + + Follow up to #5634 + Closes #5867 + +Daniel Stenberg (28 Aug 2020) +- Curl_pgrsTime - return new time to avoid timeout integer overflow + + Setting a timeout to INT_MAX could cause an immediate error to get + returned as timeout because of an overflow when different values of + 'now' were used. + + This is primarily fixed by having Curl_pgrsTime() return the "now" when + TIMER_STARTSINGLE is set so that the parent function will continue using + that time. + + Reported-by: Ionuț-Francisc Oancea + Fixes #5583 + Closes #5847 + +- TLS: fix SRP detection by using the proper #ifdefs + + USE_TLS_SRP will be true if *any* selected TLS backend can use SRP + + HAVE_OPENSSL_SRP is defined when OpenSSL can use it + + HAVE_GNUTLS_SRP is defined when GnuTLS can use it + + Clarify in the curl_verison_info docs that CURL_VERSION_TLSAUTH_SRP is + set if at least one of the supported backends offers SRP. + + Reported-by: Stefan Strogin + Fixes #5865 + Closes #5870 + +- [Dan Kenigsberg brought this change] + + docs: SSLCERTS: fix English syntax + + Signed-off-by: Dan Kenigsberg + + Closes #5876 + +- [Alessandro Ghedini brought this change] + + docs: non-existing macros in man pages + + As reported by man(1) when invoked as: + + man --warnings -E UTF-8 -l -Tutf8 -Z >/dev/null + + Closes #5846 + +- [Alessandro Ghedini brought this change] + + curl.1: fix typo invokved -> invoked + + Closes #5846 + +- buildconf: invoke 'autoreconf -fi' instead + + The custom script isn't necessary anymore - but remains for simplicity + and just invokes autoreconf. + + Closes #5853 + +- [Emil Engler brought this change] + + lib: make Curl_gethostname accept a const pointer + + The address of that variable never gets changed, only the data in it so + why not make it a "char * const"? + + Closes #5866 + +- docs/libcurl: update "Added in" version for curl_easy_option* + + Follow-up to 6ebe63fac23f38 + +- scripts: improve the "get latest curl release tag" logic + + ... by insiting on it matching "^curl-". + +- configure: added --disable-get-easy-options + + To allow disabling of the curl_easy_option APIs in a build. + + Closes #5365 + +- options: API for meta-data about easy options + + const struct curl_easyoption *curl_easy_option_by_name(const char *name); + + const struct curl_easyoption *curl_easy_option_by_id (CURLoption id); + + const struct curl_easyoption * + curl_easy_option_next(const struct curl_easyoption *prev); + + The purpose is to provide detailed enough information to allow for + example libcurl bindings to get option information at run-time about + what easy options that exist and what arguments they expect. + + Assisted-by: Jeroen Ooms + Closes #5365 + +- [Eric Curtin brought this change] + + HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29 + + Closes #5871 + +- RELEASE-NOTES: synced + +Jay Satiro (26 Aug 2020) +- openssl: Fix wincrypt symbols conflict with BoringSSL + + OpenSSL undefines the conflicting symbols but BoringSSL does not so we + must do it ourselves. + + Reported-by: Samuel Tranchet + Assisted-by: Javier Blazquez + + Ref: https://bugs.chromium.org/p/boringssl/issues/detail?id=371 + Ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_1g/include/openssl/ossl_typ.h#L66-L73 + + Fixes https://github.com/curl/curl/issues/5669 + Closes https://github.com/curl/curl/pull/5857 + +Daniel Stenberg (26 Aug 2020) +- socketpair: allow CURL_DISABLE_SOCKETPAIR + + ... to completely disable the use of socketpair + + Closes #5850 + +- curl_get_line: build only if cookies or alt-svc are enabled + + Closes #5851 + +- [fullincome brought this change] + + schannel: fix memory leak when using get_cert_location + + The get_cert_location function allocates memory only on success. + Previously get_cert_location was able to allocate memory and return + error. It wasn't obvious and in this case the memory wasn't + released. + + Fixes #5855 + Closes #5860 + +- [Emil Engler brought this change] + + git: ignore libtests in 3XXX area + + Currently the file tests/libtest/lib3010 is not getting + ignored by git. This fixes it by adding the 3XXX area to + the according .gitignore file. + + Closes #5859 + +- [Emil Engler brought this change] + + doh: add error message for DOH_DNS_NAME_TOO_LONG + + When this error code was introduced in b6a53fff6c1d07e8a9, it was + forgotten to be added in the errors array and doh_strerror function. + + Closes #5863 + +- ngtcp2: adapt to the new pkt_info arguments + + Guidance-by: Tatsuhiro Tsujikawa + + Closes #5864 + +- winbuild/README.md: make visible + + Follow-up to be753add31c2d8c + +- winbuild: convert the instruction text to README.md + + Closes #5861 + +- lib1560: verify "redirect" to double-slash leading URL + + Closes #5849 + +Marc Hoersken (25 Aug 2020) +- multi: expand pre-check for socket readiness + + Check readiness of all sockets before waiting on them + to avoid locking in case the one-time event FD_WRITE + was already consumed by a previous wait operation. + + More information about WinSock network events: + https://docs.microsoft.com/en-us/windows/win32/api/ + winsock2/nf-winsock2-wsaeventselect#return-value + + Closes #5634 + +- [rcombs brought this change] + + multi: implement wait using winsock events + + This avoids using a pair of TCP ports to provide wakeup functionality + for every multi instance on Windows, where socketpair() is emulated + using a TCP socket on loopback which could in turn lead to socket + resource exhaustion. + + A previous version of this patch failed to account for how in WinSock, + FD_WRITE is set only once when writing becomes possible and not again + until after a send has failed due to the buffer filling. This contrasts + to how FD_READ and FD_OOB continue to be set until the conditions they + refer to no longer apply. This meant that if a user wrote some data to + a socket, but not enough data to completely fill its send buffer, then + waited on that socket to become writable, we'd erroneously stall until + their configured timeout rather than returning immediately. + + This version of the patch addresses that issue by checking each socket + we're waiting on to become writable with select() before the wait, and + zeroing the timeout if it's already writable. + + Assisted-by: Marc Hörsken + Reviewed-by: Marcel Raad + Reviewed-by: Daniel Stenberg + Tested-by: Gergely Nagy + Tested-by: Rasmus Melchior Jacobsen + Tested-by: Tomas Berger + + Replaces #5397 + Reverts #5632 + Closes #5634 + +- select: reduce duplication of Curl_poll in Curl_socket_check + + Change Curl_socket_check to use select-fallback in Curl_poll + instead of implementing it in Curl_socket_check and Curl_poll. + + Reviewed-by: Daniel Stenberg + Reviewed-by: Jay Satiro + + Replaces #5262 and #5492 + Closes #5707 + +- select: fix poll-based check not detecting connect failure + + This commit changes Curl_socket_check to use POLLPRI to + check for connect failure on the write socket, because + POLLPRI maps to fds_err. This is in line with select(2). + + The select-based socket check correctly checks for connect + failures by adding the write socket also to fds_err. + + The poll-based implementation (which internally can itself + fallback to select again) did not previously check for + connect failure by using POLLPRI with the write socket. + + See the follow up commit to this for more information. + + This commit makes sure connect failures can be detected + and handled if HAVE_POLL_FINE is defined, eg. on msys2-devel. + + Reviewed-by: Daniel Stenberg + Reviewed-by: Jay Satiro + + Replaces #5509 + Prepares #5707 + +- select.h: make socket validation macros test for INVALID_SOCKET + + With Winsock the valid range is [0..INVALID_SOCKET-1] according to + https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 + + Reviewed-by: Jay Satiro + Reviewed-by: Marcel Raad + Reviewed-by: Daniel Stenberg + + Closes #5760 + +Daniel Stenberg (24 Aug 2020) +- docs: --output-dir is added in 7.73.0, nothing else + + Follow-up to 5620d2cc78c0 + +- curl: add --output-dir + + Works with --create-dirs and with -J + + Add test 3008, 3009, 3011, 3012 and 3013 to verify. + + Closes #5637 + +- configure: fix pkg-config detecting wolfssl + + When amending the include path with "/wolfssl", this now properly strips + off all whitespace from the path variable! Previously this would lead to + pkg-config builds creating bad command lines. + + Closes #5848 + +- [Michael Musset brought this change] + + sftp: add the option CURLKHSTAT_FINE_REPLACE + + Replace the old fingerprint of the host with a new. + + Closes #5685 + +- RELEASE-NOTES: synced + + The next release is now to become 7.73.0 + +- checksrc: verify do-while and spaces between the braces + + Updated mprintf.c to comply + + Closes #5845 + +- curl: support XDG_CONFIG_HOME to find .curlrc + + Added test433 to verify. Updated documentation. + + Reviewed-by: Jay Satiro + Suggested-by: Eli Schwartz + Fixes #5829 + Closes #5837 + +- etag: save and use the full received contents + + ... which makes it support weak tags and non-standard etags too! + + Added test case 347 to verify blank incoming ETag: + + Fixes #5610 + Closes #5833 + +- setopt: if the buffer exists, refuse the new BUFFERSIZE + + The buffer only exists during transfer and then we shouldn't change the + size (the setopt is not documented to work then). + + Reported-by: Harry Sintonen + Closes #5842 + +- [COFFEETALES brought this change] + + sftp: add new quote commands 'atime' and 'mtime' + + Closes #5810 + +- CURLE_PROXY: new error code + + Failures clearly returned from a (SOCKS) proxy now causes this return + code. Previously the situation was not very clear as what would be + returned and when. + + In addition: when this error code is returned, an application can use + CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then + returns a value from the new 'CURLproxycode' enum. + + Closes #5770 + +- runtests: make cleardir() erase dot files too + + Because test cases might use dot files. + + Closes #5838 + +- KNOWN_BUGS: 'no_proxy' string-matches IPv6 numerical addreses + + Also: the current behavior is now documented in the curl.1 and + CURLOPT_NOPROXY.3 man pages. + + Reported-by: Andrew Barnes + Closes #5745 + Closes #5841 + +Viktor Szakats (22 Aug 2020) +- Makefile.m32: add ability to override zstd libs [ci skip] + + Similarly to brotli, where this was already possible. + E.g. it allows to link zstd statically to libcurl.dll. + + Ref: https://github.com/curl/curl-for-win/issues/12 + Ref: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89 + + Closes https://github.com/curl/curl/pull/5840 + +Daniel Stenberg (21 Aug 2020) +- runtests: avoid 'fail to start' repeated messages in attempt loops + + Closes #5834 + +- runtests: clear pid variables when failing to start a server + + ... as otherwise the parent doesn't detect the failure and believe it + actually worked to start. + + Reported-by: Christian Weisgerber + Bug: https://curl.haxx.se/mail/lib-2020-08/0018.html + Closes #5834 + +- TODO: Virtual external sockets + + Closes #5835 + +- [Don J Olmstead brought this change] + + dist: add missing CMake Find modules to the distribution + + Closes #5836 + +- RELEASE-NOTES: synced + + ... and version bumped to 7.72.1 + +- tls: provide the CApath verbose log on its own line + + ... not newline separated from the previous line. This makes it output + asterisk prefixed properly like other verbose putput! + + Reported-by: jmdavitt on github + Fixes #5826 + Closes #5827 + +Version 7.72.0 (19 Aug 2020) + +Daniel Stenberg (19 Aug 2020) +- RELEASE-NOTES: synced + + The curl 7.72.0 release + +- THANKS: add names from curl 7.72.0 release + +Jay Satiro (18 Aug 2020) +- KNOWN_BUGS: Schannel TLS 1.2 handshake bug in old Windows versions + + Reported-by: plujon@users.noreply.github.com + + Closes https://github.com/curl/curl/issues/5488 + +Daniel Stenberg (17 Aug 2020) +- Curl_easy: remember last connection by id, not by pointer + + CVE-2020-8231 + + Bug: https://curl.haxx.se/docs/CVE-2020-8231.html + + Reported-by: Marc Aldorasi + Closes #5824 + +- examples/rtsp.c: correct the copyright year + +- RELEASE-PROCEDURE.md: add more future release dates + +- [H3RSKO brought this change] + + docs: change "web site" to "website" + + According to wikipedia: + + While "web site" was the original spelling, this variant has become + rarely used, and "website" has become the standard spelling + + Closes #5822 + +- [Bevan Weiss brought this change] + + CMake: don't complain about missing nroff + + The curl_nroff_check() was always being called, and complaining if + *NROFF wasn't found, even when not making the manual. + + Only check for nroff (and complain) if actually making the manual + + Closes #5817 + +- [Brian Inglis brought this change] + + libtest/Makefile.am: add -no-undefined for libstubgss for Cygwin + + copy the LDFLAGS approach for adding same option with `libhostname` in + `libtest/Makefile.am`: + + - init `libstubgss_la_LDFLAGS_EXTRA` variable, + - add option to variable inside conditional, + - use variable in `libstubgss_la_LDFLAGS` + + Fixes #5819 + Closes #5820 + +- docs: clarify MAX_SEND/RECV_SPEED functionality + + ... in particular what happens if the maximum speed limit is set to a + value that's smaller than the transfer buffer size in use. + + Reported-by: Tomas Berger + Fixes #5788 + Closes #5813 + +- test1140: compare stdout + + To make problems more immediately obvious when tests fail. + + Closes #5814 + +- asyn-ares: correct some bad comments + + Closes #5812 + +- [Emil Engler brought this change] + + docs: Add video link to docs/CONTRIBUTE.md + + Closes #5811 + +- curl-config: ignore REQUIRE_LIB_DEPS in --libs output + + Fixes a curl-config issue on cygwin by making sure REQUIRE_LIB_DEPS is + not considered for the --libs output. + + Reported-by: ramsay-jones on github + Assisted-by: Brian Inglis and Ken Brown + Fixes #5793 + Closes #5808 + +- copyright: update/correct the year range on a few files + +- scripts/copyright.pl: ignore .muse files + +- [Emil Engler brought this change] + + multi: Remove 10-year old out-commented code + + The code hasn't been touched since 2010-08-18 + + Closes #5805 + +- KNOWN_BUGS: A shared connection cache is not thread-safe + + Closes #4915 + Closes #5802 + +- CONTRIBUTE: extend git commit message description + + In particular how the first line works. + + Closes #5803 + +- RELEASE-NOTES: synced + +- [Stefan Yohansson brought this change] + + transfer: move retrycount from connect struct to easy handle + + This flag was applied to the connection struct that is released on + retry. These changes move the retry counter into Curl_easy struct that + lives across retries and retains the new connection. + + Reported-by: Cherish98 on github + Fixes #5794 + Closes #5800 + +- libssh2: s/ssherr/sftperr/ + + The debug output used ssherr instead of sftperr which not only outputs + the wrong error code but also casues a warning on Windows. + + Follow-up to 7370b4e39f1 + + Reported-by: Gisle Vanem + Bug: https://github.com/curl/curl/commit/7370b4e39f1390e701f5b68d910c619151daf72b#r41334700 + Closes #5799 + +- ftp: don't do ssl_shutdown instead of ssl_close + + The shutdown function is for downgrading a connection from TLS to plain, + and this is not requested here. + + Have ssl_close reset the TLS connection state. + + This partially reverts commit f002c850d98d + + Reported-by: Rasmus Melchior Jacobsen + Reported-by: Denis Goleshchikhin + Fixes #5797 + +Marc Hoersken (9 Aug 2020) +- CI/azure: fix test outcome values and use latest API version + + This makes sure that tests ignored or skipped are not shown + just in the category "Other", but with their correct state. + + Closes #5796 + +- CI/azure: show runtime stats to investigate slowness + + Also avoid naming conflict of TFLAGS env and tflags variables. + + Closes #5776 + +Daniel Stenberg (8 Aug 2020) +- TLS naming: fix more Winssl and Darwinssl leftovers + + The CMake option is now called CMAKE_USE_SCHANNEL + + The winbuild flag is USE_SCHANNEL + + The CI jobs and build scripts only use the new names and the new name + options + + Tests now require 'Schannel' (when necessary) + + Closes #5795 + +- smtp_parse_address: handle blank input string properly + + Closes #5792 + +- runtests: run the DICT server on a random port number + + Removed support for -b (base port number) + + Closes #5783 + +- RELEASE-NOTES: synced + +- runtests: move the TELNET server to a dynamic port + + Rename the port variable to TELNETPORT to better match the existing + pattern. + + Closes #5785 + +- ngtcp2: adapt to error code rename + + Closes #5786 + +- runtests: move the smbserver to use a dynamic port number + + Closes #5782 + +- runtests: run the http2 tests on a random port number + + Closes #5779 + +- gtls: survive not being able to get name/issuer + + Closes #5778 + +- runtests: move the gnutls-serv tests to a dynamic port + + Affects test 320, 321, 322 and 324. + + Closes #5778 + +- runtests: support dynamicly base64 encoded sections in tests + + This allows us to make test cases to use base64 at run-time and still + use and verify information determined at run-time, such as the IMAP test + server's port number in test 842. + + This change makes 12 tests run again that basically never ran since we + moved to dynamic port numbers. + + ftpserver.pl is adjusted to load test instructions and test number from + the preprocessed test file. + + FILEFORMAT.md now documents the new base64 encoding syntax. + + Reported-by: Marcel Raad + Fixes #5761 + Closes #5775 + +- curl.1: add a few missing valid exit codes + + 93 - 96 can be returned as well. + + Closes #5777 + +- TODO: Use multiple parallel transfers for a single download + + Closes #5774 + +- TODO: Set the modification date on an uploaded file + + Closes #5768 + +- [Thomas M. DuBuisson brought this change] + + CI: Add muse CI config + + Closes #5772 + +- [Thomas M. DuBuisson brought this change] + + travis/script.sh: fix use of `-n' with unquoted envvar + + Shellcheck tells us "-n doesn't work with unquoted arguments. quote or + use [[ ]]." + + And testing shows: + + ``` + docker run --rm -it ubuntu bash + root@fe85ce156856:/# [ -n $DOES_NOT_EXIST ] && echo "I ran" + I ran + root@fe85ce156856:/# [ -n "$DOES_NOT_EXIST" ] && echo "I ran" + root@fe85ce156856:/# + ``` + + Closes #5773 + +- h2: repair trailer handling + + The previous h2 trailer fix in 54a2b63 was wrong and caused a + regression: it cannot deal with trailers immediately when read since + they may be read off the connection by the wrong 'data' owner. + + This change reverts the logic back to gathering all trailers into a + single buffer, like before 54a2b63. + + Reported-by: Tadej Vengust + Fixes #5663 + Closes #5769 + +Viktor Szakats (3 Aug 2020) +- windows: disable Unix Sockets for old mingw + + Classic mingw and 10y+ old versions of mingw-w64 don't ship with + Windows headers having the typedef necessary for Unix Sockets + support, so try detecting these environments to disable this + feature. + + Ref: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/cf6afc57179a5910621215f8f4037d406892072c/ + + Reviewed-by: Daniel Stenberg + + Fixes #5674 + Closes #5758 + +Marcel Raad (3 Aug 2020) +- test1908: treat file as text + + Fixes the line endings on Windows. + + Closes https://github.com/curl/curl/pull/5767 + +- TrackMemory tests: ignore realloc and free in getenv.c + + These are only called for WIN32. + + Closes https://github.com/curl/curl/pull/5767 + +Daniel Stenberg (3 Aug 2020) +- tests/FILEFORMAT.md: mention %HTTP2PORT + +- RELEASE-NOTES: synced + +- tlsv1.3.d. only for TLS-using connections + + ... and rephrase that "not all" TLS backends support it. + + Closes #5764 + +- tls-max.d: this option is only for TLS-using connections + + Ref: #5763 + Closes #5764 + +Marcel Raad (2 Aug 2020) +- [Cameron Cawley brought this change] + + tool_doswin: Simplify Windows version detection + + Closes https://github.com/curl/curl/pull/5754 + +- [Cameron Cawley brought this change] + + win32: Add Curl_verify_windows_version() to curlx + + Closes https://github.com/curl/curl/pull/5754 + +- runtests.pl: treat LibreSSL and BoringSSL as OpenSSL + + This makes the tests that require the OpenSSL feature also run for + those two compatible libraries. + + Closes https://github.com/curl/curl/pull/5762 + +Daniel Stenberg (1 Aug 2020) +- multi: Condition 'extrawait' is always true + + Reported by Codacy. + + Reviewed-by: Marcel Raad + Closes #5759 + +Marcel Raad (1 Aug 2020) +- openssl: fix build with LibreSSL < 2.9.1 + + `SSL_CTX_add0_chain_cert` and `SSL_CTX_clear_chain_certs` were + introduced in LibreSSL 2.9.1 [0]. + + [0] https://github.com/libressl-portable/openbsd/commit/0db809ee178457c8170abfae3931d7bd13abf3ef + + Closes https://github.com/curl/curl/pull/5757 + +Daniel Stenberg (1 Aug 2020) +- [Marc Aldorasi brought this change] + + multi_remove_handle: close unused connect-only connections + + Previously any connect-only connections in a multi handle would be kept + alive until the multi handle was closed. Since these connections cannot + be re-used, they can be marked for closure when the associated easy + handle is removed from the multi handle. + + Closes #5749 + +- checksrc: invoke script with -D to find .checksrc proper + + Without the -D command line option, checksrc.pl won't know which + directory to load the ".checksrc" file from when building out of the + source tree. + + Reported-by: Marcel Raad + Fixes #5715 + Closes #5755 + +- [Carlo Marcelo Arenas Belón brought this change] + + buildconf: retire ares buildconf invocation + + no longer needed after 4259d2df7dd95637a4b1e3fb174fe5e5aef81069 + +- [Carlo Marcelo Arenas Belón brought this change] + + buildconf: excempt defunct reference to ACLOCAL_FLAGS + + retired with 09f278121e815028adb24d228d8092fc6cb022aa but kept around as + the name is generic enough that it might be in use and relied upon from + the environment. + +- [Carlo Marcelo Arenas Belón brought this change] + + buildconf: avoid array concatenation in die() + + reported as error SC2145[1] by shellcheck, but not expected to cause + any behavioural differences otherwise. + + [1] https://github.com/koalaman/shellcheck/wiki/SC2145 + + Closes #5701 + +- travis: add ppc64le and s390x builds + + Closes #5752 + +Marc Hoersken (31 Jul 2020) +- connect: remove redundant message about connect failure + + Reviewed-by: Daniel Stenberg + + Closes #5708 + +- tests/sshserver.pl: fix compatibility with OpenSSH for Windows + + Follow up to #5721 + +- CI/azure: install libssh2 for use with msys2-based builds + + This enables building and running the SFTP tests. + Unfortunately OpenSSH for Windows does not support SCP (yet). + + Reviewed-by: Daniel Stenberg + + Closes #5721 + +- CI/azure: increase Windows job timeout once again + + Avoid aborted jobs due to performance issues on Azure DevOps. + + Reviewed-by: Daniel Stenberg + Reviewed-by: Jay Satiro + + Closes #5738 + +Jay Satiro (30 Jul 2020) +- TODO: Schannel: 'Add option to allow abrupt server closure' + + We should offer an option to allow abrupt server closures (server closes + SSL transfer without sending a known termination point such as length of + transfer or close_notify alert). Abrupt server closures are usually + because of misconfigured or very old servers. + + Closes https://github.com/curl/curl/issues/4427 + +- url: fix CURLU and location following + + Prior to this change if the user set a URL handle (CURLOPT_CURLU) it was + incorrectly used for the location follow, resulting in infinite requests + to the original location. + + Reported-by: sspiri@users.noreply.github.com + + Fixes https://github.com/curl/curl/issues/5709 + Closes https://github.com/curl/curl/pull/5713 + +Daniel Stenberg (30 Jul 2020) +- RELEASE-NOTES: synced + +- [divinity76 brought this change] + + docs: add date of 7.20 to CURLM_CALL_MULTI_PERFORM mentions + + it helps make it obvious that most developers don't have to care about + the CURLM_CALL_MULTI_PERFORM value (last release using it is nearly 11 + years old, November 4 2009) + + Closes #5744 + +Jay Satiro (29 Jul 2020) +- tool_cb_wrt: fix outfile mode flags for Windows + + - Use S_IREAD and S_IWRITE mode permission flags to create the file + on Windows instead of S_IRUSR, S_IWUSR, etc. + + Windows only accepts a combination of S_IREAD and S_IWRITE. It does not + acknowledge other combinations, for which it may generate an assertion. + + This is a follow-up to 81b4e99 from yesterday, which improved the + existing file check with -J. + + Ref: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen#remarks + Ref: https://github.com/curl/curl/pull/5731 + + Closes https://github.com/curl/curl/pull/5742 + +Daniel Stenberg (28 Jul 2020) +- checksrc: ban gmtime/localtime + + They're not thread-safe so they should not be used in libcurl code. + + Explictly enabled when deemed necessary and in examples and tests + + Reviewed-by: Nicolas Sterchele + Closes #5732 + +- transfer: fix data_pending for builds with both h2 and h3 enabled + + Closes #5734 + +- curl_multi_setopt: fix compiler warning "result is always false" + + On systems with 32 bit long the expression is always false. Avoid + the warning. + + Reported-by: Gisle Vanem + Bug: https://github.com/curl/curl/commit/61a08508f6a458fe21bbb18cd2a9bac2f039452b#commitcomment-40941232 + Closes #5736 + +- curl: improve the existing file check with -J + + Previously a file that isn't user-readable but is user-writable would + not be properly avoided and would get overwritten. + + Reported-by: BrumBrum on hackerone + Assisted-by: Jay Satiro + Bug: https://hackerone.com/reports/926638 + Closes #5731 + +- [Jonathan Nieder brought this change] + + multi: update comment to say easyp list is linear + + Since 09b9fc900 (multi: remove 'Curl_one_easy' struct, phase 1, + 2013-08-02), the easy handle list is not circular but ends with + ->next pointing to NULL. + + Reported-by: Masaya Suzuki + Closes #5737 + +- CURLOPT_NOBODY.3: fix the syntax for referring to options + + As test 1140 fails otherwise! + + Follow-up to e1bac81cc815 + +- ngtcp2: store address in sockaddr_storage + + Reported-by: Tatsuhiro Tsujikawa + Closes #5733 + +- CURLOPT_NOBODY.3: clarify what setting to 0 means + + ... and mention that HTTP with other methods than HEAD might get a body and + there's no option available to stop that. + + Closes #5729 + +- setopt: unset NOBODY switches to GET if still HEAD + + Unsetting CURLOPT_NOBODY with 0L when doing HTTP has no documented + action but before 7.71.0 that used to switch back to GET and with this + change (assuming the method is still set to HEAD) this behavior is + brought back. + + Reported-by: causal-agent on github + Fixes #5725 + Closes #5728 + +- [Ehren Bendler brought this change] + + configure: cleanup wolfssl + pkg-config conflicts when cross compiling. + + Also choose a different wolfSSL function to test for NTLM support. + + Fixes #5605 + Closes #5682 + +- configure: show zstd "no" in summary when built without it + + Reported-by: Marc Hörsken + Fixes #5720 + Closes #5730 + +- quiche: handle calling disconnect twice + + Reported-by: lilongyan-huawei on github + Fixes #5726 + Closes #5727 + +- [Nicolas Sterchele brought this change] + + getinfo: reset retry-after value in initinfo + + - Avoid re-using retry_after value from preceding request + - Add libtest 3010 to verify + + Reported-by: joey-l-us on github + Fixes #5661 + Closes #5672 + +Marcel Raad (27 Jul 2020) +- WIN32: stop forcing narrow-character API + + Except where the results are only used for character output. + getenv is not touched because it's part of the public API, and having + it return UTF-8 instead of ANSI would be a breaking change. + + Fixes https://github.com/curl/curl/issues/5658 + Fixes https://github.com/curl/curl/issues/5712 + Closes https://github.com/curl/curl/pull/5718 + +Jay Satiro (27 Jul 2020) +- [Tobias Stoeckmann brought this change] + + mprintf: Fix stack overflows + + Stack overflows can occur with precisions for integers and floats. + + Proof of concepts: + - curl_mprintf("%d, %.*1$d", 500, 1); + - curl_mprintf("%d, %+0500.*1$f", 500, 1); + + Ideally, compile with -fsanitize=address which makes this undefined + behavior a bit more defined for debug purposes. + + The format strings are valid. The overflows occur due to invalid + arguments. If these arguments are variables with contents controlled + by an attacker, the function's stack can be corrupted. + + Also see CVE-2016-9586 which partially fixed the float aspect. + + Signed-off-by: Tobias Stoeckmann + + Closes https://github.com/curl/curl/pull/5722 + +- [Tobias Stoeckmann brought this change] + + mprintf: Fix dollar string handling + + Verify that specified parameters are in range. If parameters are too + large, fail early on and avoid out of boundary accesses. + + Also do not read behind boundaries of illegal format strings. + + These are defensive measures since it is expected that format strings + are well-formed. Format strings should not be modifiable by user + input due to possible generic format string attacks. + + Closes https://github.com/curl/curl/pull/5722 + +Daniel Stenberg (26 Jul 2020) +- ntlm: free target_info before (re-)malloc + + OSS-Fuzz found a way this could get called again with the pointer still + pointing to a malloc'ed memory, leading to a leak. + + Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24379 + + Closes #5724 + +Marcel Raad (26 Jul 2020) +- CI/macos: set minimum macOS version + + This enables some deprecation warnings. + Previously, autotools defaulted to 10.8. + + Closes https://github.com/curl/curl/pull/5723 + +Daniel Stenberg (26 Jul 2020) +- RELEASE-NOTES: synced + +Marcel Raad (25 Jul 2020) +- CI/macos: enable warnings as errors for CMake builds + + Closes https://github.com/curl/curl/pull/5716 + +- CMake: fix test for warning suppressions + + GCC doesn't warn for unknown `-Wno-` options, except if there are other + warnings or errors [0]. This was problematic with `CURL_WERROR` as that + warning-as-error cannot be suppressed. Notably, this always happened + with `-Wno-pedantic-ms-format` when not targeting Windows. So test for + the positive form of the warning instead, which should always result in + a diagnostic if unknown. + + [0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html + + Closes https://github.com/curl/curl/pull/5714 + +Jay Satiro (23 Jul 2020) +- curl.h: update CURLINFO_LASTONE + + CURLINFO_LASTONE should have been updated when + CURLINFO_EFFECTIVE_METHOD was added. + + Reported-by: xwxbug@users.noreply.github.com + + Fixes https://github.com/curl/curl/issues/5711 + +Marc Hoersken (22 Jul 2020) +- CI/azure: unconditionally enable warnings-as-errors with autotools + + Reviewed-by: Marcel Raad + + Follow up to #5694 + Closes #5706 + +Marcel Raad (21 Jul 2020) +- doh: remove redundant cast + + Closes https://github.com/curl/curl/pull/5704 + +- CI/macos: unconditionally enable warnings-as-errors with autotools + + Previously, warnings were only visible in the output for most jobs. + + Closes https://github.com/curl/curl/pull/5694 + +- util: silence conversion warnings + + timeval::tv_usec might be a 32-bit integer and timespec::tv_nsec might + be a 64-bit integer. This is the case when building for recent macOS + versions, for example. Just treat tv_usec as an int, which should + hopefully always be sufficient on systems with + `HAVE_CLOCK_GETTIME_MONOTONIC`. + + Closes https://github.com/curl/curl/pull/5695 + +- md(4|5): don't use deprecated macOS functions + + They are marked as deprecated for -mmacosx-version-min >= 10.15, + which might result in warnings-as-errors. + + Closes https://github.com/curl/curl/pull/5695 + +Daniel Stenberg (18 Jul 2020) +- strdup: remove the odd strlen check + + It confuses code analyzers with its use of -1 for unsigned value. Also, + a check that's not normally used in strdup() code - and not necessary. + + Closes #5697 + +- [Alessandro Ghedini brought this change] + + travis: update quiche builds for new boringssl layout + + This is required after https://github.com/cloudflare/quiche/pull/593 + moved BoringSSL around slightly. + + This also means that Go is not needed to build BoringSSL anymore (the + one provided by quiche anyway). + + Closes #5691 + +Marcel Raad (17 Jul 2020) +- configure: allow disabling warnings + + When using `--enable-warnings`, it was not possible to disable warnings + via CFLAGS that got explicitly enabled. Now warnings are not enabled + anymore if they are explicitly disabled (or enabled) in CFLAGS. This + works for at least GCC, clang, and TCC as they have corresponding + `-Wno-` options for every warning. + + Closes https://github.com/curl/curl/pull/5689 + +Daniel Stenberg (16 Jul 2020) +- ngtcp2: adjust to recent sockaddr updates + + Closes #5690 + +- page-header: provide protocol details in the curl.1 man page + + Add protocol and version specific information about all protocols curl + supports. + + Fixes #5679 + Reported-by: tbugfinder on github + Closes #5686 + +Daniel Gustafsson (16 Jul 2020) +- docs: Update a few leftover mentions of DarwinSSL + + Commit 76a9c3c4be10b3d4d379d5b23ca76806bbae536a renamed DarwinSSL to the + more correct/common name Secure Transport, but a few mentions in the docs + remained. + + Closes #5688 + Reviewed-by: Daniel Stenberg + +Daniel Stenberg (16 Jul 2020) +- file2memory: use a define instead of -1 unsigned value + + ... to use the maximum value for 'size_t' when detecting integer overflow. + Changed the limit to max/4 as already that seems unreasonably large. + + Codacy didn't like the previous approach. + + Closes #5683 + +- CURL_PUSH_ERROROUT: allow the push callback to fail the parent stream + + ... by adding support for a new dedicated return code. + + Suggested-by: Jonathan Cardoso + Assisted-by: Erik Johansson + URL: https://curl.haxx.se/mail/lib-2020-06/0099.html + Closes #5636 + +- [Baruch Siach brought this change] + + nss: fix build with disabled proxy support + + Avoid reference to fields that do not exist when CURL_DISABLE_PROXY is + defined. + + Closes #5667 + +- test1139: make it display the difference on test failures + +- test1119: verify stdout in the test + + So that failures will be displayed in the terminal, as it makes test failures + visually displayed easier and faster. + + Closes #5644 + +- curl: add %{method} to the -w variables + + Gets the CURLINFO_EFFECTIVE_METHOD from libcurl. + + Added test 1197 to verify. + +- CURLINFO_EFFECTIVE_METHOD: added + + Provide the HTTP method that was used on the latest request, which might + be relevant for users when there was one or more redirects involved. + + Closes #5511 + +Viktor Szakats (14 Jul 2020) +- windows: add unicode to feature list + + Reviewed-by: Marcel Raad + Reviewed-by: Marc Hörsken + + Closes #5491 + +Daniel Stenberg (14 Jul 2020) +- multi: remove two checks always true + + Detected by Codacy + Closes #5676 + +Marc Hoersken (13 Jul 2020) +- workflows: limit what branches to run CodeQL on + + Align CodeQL action with existing CI actions: + - Update branch filter to avoid duplicate CI runs. + - Shorten workflow name due to informative job name. + + Reviewed-by: Daniel Stenberg + + Closes #5660 + +- appveyor: collect libcurl.dll variants with prefix or suffix + + On some platforms libcurl is build with a platform-specific + prefix and/or a version number suffix. + + Assisted-by: Jay Satiro + + Closes #5659 + +Daniel Stenberg (12 Jul 2020) +- [ihsinme brought this change] + + socks: use size_t for size variable + + Use the unsigned type (size_t) in the arithmetic of pointers. In this + context, the signed type (ssize_t) is used unnecessarily. + + Authored-by: ihsinme on github + Closes #5654 + +- RELEASE-NOTES: synced + + ... and bumped to 7.72.0 as the next release version number + +- [Gilles Vollant brought this change] + + content_encoding: add zstd decoding support + + include zstd curl patch for Makefile.m32 from vszakats + and include Add CMake support for zstd from Peter Wu + + Helped-by: Viktor Szakats + Helped-by: Peter Wu + Closes #5453 + +- asyn.h: remove the Curl_resolver_getsock define + + - not used + - used the wrong number of arguments + - confused the Codeacy code analyzer + + Closes #5647 + +- [Nicolas Sterchele brought this change] + + configure.ac: Sort features name in summary + + - Same as protocols + + Closes #5656 + +- [Matthias Naegler brought this change] + + cmake: fix windows xp build + + Reviewed-by: Marcel Raad + Closes #5662 + +- ngtcp2: update to modified qlog callback prototype + + Closes #5675 + +- transfer: fix memory-leak with CURLOPT_CURLU in a duped handle + + Added test case 674 to reproduce and verify the bug report. + + Fixes #5665 + Reported-by: NobodyXu on github + Closes #5673 + +- [Baruch Siach brought this change] + + bearssl: fix build with disabled proxy support + + Avoid reference to fields that do not exist when CURL_DISABLE_PROXY is + defined. + + Reviewed-by: Nicolas Sterchele + Closes #5666 + +- RELEASE-NOTES: synced + +Jay Satiro (11 Jul 2020) +- [Carlo Marcelo Arenas Belón brought this change] + + cirrus-ci: upgrade 11-STABLE to 11.4 + + Meant to be the last of the 11 series and so make sure that all + other references reflect all 11 versions so they can be retired + together later. + + Closes https://github.com/curl/curl/pull/5668 + +- [Filip Salomonsson brought this change] + + CURLINFO_CERTINFO.3: fix typo + + Closes https://github.com/curl/curl/pull/5655 + +Daniel Stenberg (4 Jul 2020) +- http2: only do the *done() cleanups for HTTP + + Follow-up to ef86daf4d3 + + Closes #5650 + Fixes #5646 + +- [Alex Kiernan brought this change] + + gnutls: repair the build with `CURL_DISABLE_PROXY` + + `http_proxy`/`proxy_ssl`/`tunnel_proxy` will not be available in `conn` + if `CURL_DISABLE_PROXY` is enabled. Repair the build with that + configuration. + + Signed-off-by: Alex Kiernan + Closes #5645 + +Alex Kiernan (3 Jul 2020) +- gnutls: Fetch backend when using proxy + + Fixes: 89865c149 ("gnutls: remove the BACKEND define kludge") + Signed-off-by: Alex Kiernan + +Daniel Stenberg (3 Jul 2020) +- [Laramie Leavitt brought this change] + + http2: close the http2 connection when no more requests may be sent + + Well-behaving HTTP2 servers send two GOAWAY messages. The first + message is a warning that indicates that the server is going to + stop accepting streams. The second one actually closes the stream. + + nghttp2 reports this state (and the other state of no more stream + identifiers) via the call nghttp2_session_check_request_allowed(). + In this state the client should not create more streams on the + session (tcp connection), and in curl this means that the server + has requested that the connection is closed. + + It would be also be possible to put the connclose() call into the + on_http2_frame_recv() function that triggers on the GOAWAY message. + + This fixes a bug seen when the client sees the following sequence of + frames: + + // advisory GOAWAY + HTTP2 GOAWAY [stream-id = 0, promised-stream-id = -1] + ... some additional frames + + // final GOAWAY + HTTP2 GOAWAY [stream-id = 0, promised-stream-id = N ] + + Before this change, curl will attempt to reuse the connection even + after the last stream, will encounter this error: + + * Found bundle for host localhost: 0x5595f0a694e0 [can multiplex] + * Re-using existing connection! (#0) with host localhost + * Connected to localhost (::1) port 10443 (#0) + * Using Stream ID: 9 (easy handle 0x5595f0a72e30) + > GET /index.html?5 HTTP/2 + > Host: localhost:10443 + > user-agent: curl/7.68.0 + > accept: */* + > + * stopped the pause stream! + * Connection #0 to host localhost left intact + curl: (16) Error in the HTTP2 framing layer + + This error may posion the connection cache, causing future requests + which resolve to the same curl connection to go through the same error + path. + + Closes #5643 + +- ftpserver: don't verify SMTP MAIL FROM names + + Rely on tests asking the names to get refused instead - test servers + should be as dumb as possible. Edited test 914, 955 and 959 accordingly. + + Closes #5639 + +- curl_version_info.3: CURL_VERSION_KERBEROS4 is deprecated + + This came up in #5640. It make sense to clarify this in the docs! + + Reminded-by: Kamil Dudka + Closes #5642 + +Kamil Dudka (3 Jul 2020) +- tool_getparam: make --krb option work again + + It was disabled by mistake in commit curl-7_37_1-23-ge38ba4301. + + Bug: https://bugzilla.redhat.com/1833193 + Closes #5640 + +Daniel Stenberg (2 Jul 2020) +- [Jeremy Maitin-Shepard brought this change] + + http2: fix nghttp2_strerror -> nghttp2_http2_strerror in debug messages + + Confusingly, nghttp2 has two different error code enums: + + - nghttp2_error, to be used with nghttp2_strerror + - nghttp2_error_code, to be used with nghttp2_http2_strerror + + Closes #5641 + +Marcel Raad (2 Jul 2020) +- url: silence MSVC warning + + Since commit f3d501dc678, if proxy support is disabled, MSVC warns: + url.c : warning C4701: potentially uninitialized local variable + 'hostaddr' used + url.c : error C4703: potentially uninitialized local pointer variable + 'hostaddr' used + + That could actually only happen if both `conn->bits.proxy` and + `CURL_DISABLE_PROXY` were enabled. + Initialize it to NULL to silence the warning. + + Closes https://github.com/curl/curl/pull/5638 + +Daniel Stenberg (1 Jul 2020) +- RELEASE-NOTES: synced + +Version 7.71.1 (30 Jun 2020) + +Daniel Stenberg (30 Jun 2020) +- RELEASE-NOTES: curl 7.71.1 + +- THANKS: add contributors to 7.71.1 + +- scripts/copyright.pl: skip .dcignore + +- Revert "multi: implement wait using winsock events" + + This reverts commit 8bc25c590e530de87595d1bb3577f699eb1309b9. + + That commit (from #5397) introduced a regression in 7.71.0. + + Reported-by: tmkk on github + Fixes #5631 + Closes #5632 + +- TODO: Add flag to specify download directory + +- TODO: return code to CURLMOPT_PUSHFUNCTION to fail connection + +- cirrus-ci: disable FreeBSD 13 (again) + + It has been failing for a good while again. This time we better leave it + disabled until we have more reason to believe it behaves. + + Closes #5628 + +- ngtcp2: sync with current master + + ngtcp2 added two new callbacks + + Reported-by: Lucien Zürcher + Fixes #5624 + Closes #5627 + +- examples/multithread.c: call curl_global_cleanup() + + Reported-by: qiandu2006 on github + Fixes #5622 + Closes #5623 + +- vtls: compare cert blob when finding a connection to reuse + + Reported-by: Gergely Nagy + Fixes #5617 + Closes #5619 + +- RELEASE-NOTES: synced + +- terminology: call them null-terminated strings + + Updated terminology in docs, comments and phrases to refer to C strings + as "null-terminated". Done to unify with how most other C oriented docs + refer of them and what users in general seem to prefer (based on a + single highly unscientific poll on twitter). + + Reported-by: coinhubs on github + Fixes #5598 + Closes #5608 + +- http: fix proxy auth with blank password + + Regression in 7.71.0 + + Added test case 346 to verify. + + Reported-by: Kristoffer Gleditsch + Fixes #5613 + Closes #5616 + +- .dcignore: ignore tests and docs directories + + This is a config file for deepcode.ai, a static code analyzer. + +Jay Satiro (26 Jun 2020) +- tool_cb_hdr: Fix etag warning output and return code + + - Return 'failure' on failure, to follow the existing style. + + - Put Warning: and the warning message on the same line. + + Ref: https://github.com/curl/curl/issues/5610 + + Closes https://github.com/curl/curl/pull/5612 + +Daniel Stenberg (26 Jun 2020) +- CURLOPT_READFUNCTION.3: provide the upload data size up front + + Assisted-by: Jay Satiro + Closes #5607 + +- test1539: do a HTTP 1.0 POST without a set size (fails) + + Attempt to reproduce #5593. Test case 1514 is very similar but uses + HTTP/1.1 and thus switches to chunked. + + Closes #5595 + +- [Baruch Siach brought this change] + + mbedtls: fix build with disabled proxy support + + Don't reference fields that do not exist. Fixes build failure: + + vtls/mbedtls.c: In function 'mbed_connect_step1': + vtls/mbedtls.c:249:54: error: 'struct connectdata' has no member named 'http_proxy' + + Closes #5615 + +- codeql-analysis.yml: fix the 'languages' setting + + It needs a 'with:' in front of it. + +GitHub (26 Jun 2020) +- [Daniel Stenberg brought this change] + + gtihub: codeql-analysis.yml + + enables code security scanning with github actions + +Daniel Stenberg (25 Jun 2020) +- tests: verify newline in username and password for HTTP + + test 1296 is a simply command line test + + test 1910 is a libcurl test including a redirect + +- url: allow user + password to contain "control codes" for HTTP(S) + + Reported-by: Jon Johnson Jr + Fixes #5582 + Closes #5592 + +- escape: make the URL decode able to reject only %00 bytes + + ... or all "control codes" or nothing. + + Assisted-by: Nicolas Sterchele + +- http2: set the correct URL in pushed transfers + + ...previously CURLINFO_EFFECTIVE_URL would report the URL of the + original "mother transfer", not the actually pushed resource. + + Reported-by: Jonathan Cardoso Machado + Fixes #5589 + Closes #5591 + +Jay Satiro (25 Jun 2020) +- [Javier Blazquez brought this change] + + openssl: Fix compilation on Windows when ngtcp2 is enabled + + - Include wincrypt before OpenSSL includes so that the latter can + properly handle any conflicts between the two. + + Closes https://github.com/curl/curl/pull/5606 + +Daniel Stenberg (25 Jun 2020) +- test543: extended to verify zero length input + + As was reported in #5601 + +- escape: zero length input should return a zero length output + + Regression added in 7.71.0. + + Fixes #5601 + Reported-by: Kristoffer Gleditsch + Closes #5602 + +- Curl_inet_ntop: always check the return code + + Reported-by: Siva Sivaraman + Fixes #5412 + Closes #5597 + +- sendf: improve the message on client write errors + + Replace "Failed writing body (X != Y)" with + "Failure writing output to destination". Possibly slightly less cryptic. + + Reported-by: coinhubs on github + Fixes #5594 + Closes #5596 + +- RELEASE-NOTES: synced + +- curlver: start working on 7.71.1 + +- [Denis Baručić brought this change] + + DYNBUF.md: fix a typo: trail => tail + + Closes #5599 + +Version 7.71.0 (23 Jun 2020) + +Daniel Stenberg (23 Jun 2020) +- RELEASE-NOTES: curl 7.71.0 release + +- THANKS: curl 7.71.0 additions + +- url: make sure pushed streams get an allocated download buffer + + Follow-up to c4e6968127e876b0 + + When a new transfer is created, as a resuly of an acknowledged push, + that transfer needs a download buffer allocated. + + Closes #5590 + +Jay Satiro (22 Jun 2020) +- openssl: Don't ignore CA paths when using Windows CA store + + This commit changes the behavior of CURLSSLOPT_NATIVE_CA so that it does + not override CURLOPT_CAINFO / CURLOPT_CAPATH, or the hardcoded default + locations. Instead the CA store can now be used at the same time. + + The change is due to the impending release. The issue is still being + discussed. The behavior of CURLSSLOPT_NATIVE_CA is subject to change and + is now documented as experimental. + + Ref: bc052cc (parent commit) + Ref: https://github.com/curl/curl/issues/5585 + +- tool_operate: Don't use Windows CA store as a fallback + + Background: + + 148534d added CURLSSLOPT_NATIVE_CA to use the Windows OS certificate + store in libcurl w/ OpenSSL on Windows. CURLSSLOPT_NATIVE_CA overrides + CURLOPT_CAINFO if both are set. The curl tool will fall back to + CURLSSLOPT_NATIVE_CA if it could not find a certificate bundle to set + via CURLOPT_CAINFO. + + Problem: + + libcurl may be built with hardcoded paths to a certificate bundle or + directory, and if CURLSSLOPT_NATIVE_CA is used then those paths are + ignored. + + Solution: + + A solution is still being discussed but since there's an impending + release this commit removes using CURLSSLOPT_NATIVE_CA in the curl tool. + + Ref: https://github.com/curl/curl/issues/5585 + +- openssl: Fix CA fallback logic for OpenSSL 3.0 build + + Prior to this change I assume a build error would occur when + CURL_CA_FALLBACK was used. + + Closes https://github.com/curl/curl/pull/5587 + +Daniel Stenberg (22 Jun 2020) +- copyright: update mismatched copyright years + +- test1460: verify that -Ji is not ok + +- tool_getparam: -i is not OK if -J is used + + Reported-by: sn on hackerone + Bug: https://curl.haxx.se/docs/CVE-2020-8177.html + +- [Peter Wu brought this change] + + CMake: ignore INTERFACE_LIBRARY targets for pkg-config file + + Reviewed-by: Marcel Raad + Fixes #5512 + Closes #5517 + +- [Valentyn Korniienko brought this change] + + multibyte: Fixed access-> waccess to file for Windows Plarform + + Reviewed-by: Marcel Raad + Closes #5580 + +- altsvc: bump to h3-29 + + Closes #5584 + +- urlglob: treat literal IPv6 addresses with zone IDs as a host name + + ... and not as a "glob". Now done by passing the supposed host to the + URL parser which supposedly will do a better job at identifying "real" + numerical IPv6 addresses. + + Reported-by: puckipedia on github + Fixes #5576 + Closes #5579 + +- test1179: verify error message for non-existing cmdline option + +- tool_getparam: repair the error message for unknown flag + + Follow-up to 9e5669f3880674 + Detected by Coverity CID 1464582 ("Logically dead code") + + Closes #5577 + +- FILEFORMAT: describe verify/stderr + +- connect: improve happy eyeballs handling + + For QUIC but also for regular TCP when the second family runs out of IPs + with a failure while the first family is still trying to connect. + + Separated the timeout handling for IPv4 and IPv6 connections when they + both have a number of addresses to iterate over. + +- ngtcp2: never call fprintf() in lib code in release version + +- ngtcp2: fix happy eyeballs quic connect crash + + Reported-by: Peter Wu + Fixes #5565 + Closes #5568 + +- select: remove the unused ELAPSED_MS() macro + + Closes #5573 + +Marc Hoersken (17 Jun 2020) +- [rcombs brought this change] + + multi: implement wait using winsock events + + This avoids using a pair of TCP ports to provide wakeup functionality + for every multi instance on Windows, where socketpair() is emulated + using a TCP socket on loopback which could in turn lead to socket + resource exhaustion. + + Reviewed-by: Gergely Nagy + Reviewed-by: Marc Hörsken + + Closes #5397 + +Daniel Stenberg (17 Jun 2020) +- manpage: add three missing environment variables + + CURL_SSL_BACKEND, QLOGDIR and SSLKEYLOGFILE + + Closes #5571 + +- RELEASE-NOTES: synced + +- configure: for wolfSSL, check for the DES func needed for NTLM + + Also adds pkg-config support for the wolfSSL detection. + +- [Ruurd Beerstra brought this change] + + ntlm: enable NTLM support with wolfSSL + + When wolfSSL is built with its OpenSSL API layer, it fetures the same DES* + functions that OpenSSL has. This change take advantage of that. + + Co-authored-by: Daniel Stenberg + Closes #5556 + Fixes #5548 + +- http: move header storage to Curl_easy from connectdata + + Since the connection can be used by many independent requests (using + HTTP/2 or HTTP/3), things like user-agent and other transfer-specific + data MUST NOT be kept connection oriented as it could lead to requests + getting the wrong string for their requests. This struct data was + lingering like this due to old HTTP1 legacy thinking where it didn't + mattered.. + + Fixes #5566 + Closes #5567 + +- CODE_REVIEW.md: how to do code reviews in curl + + Assisted-by: Daniel Gustafsson + Assisted-by: Rich Salz + Assisted-by: Hugo van Kemenade + Assisted-by: James Fuller + Assisted-by: Marc Hörsken + Assisted-by: Jay Satiro + + Closes #5555 + +- altsvc: remove the num field from the altsvc struct + + It was superfluous since we have the list.size alredy + + Reported-by: Jay Satiro + Fixes #5553 + Closes #5563 + +- version.d: expanded and alpha-sorted + + Added a few missing features not previously mentioned. Ordered them + alphabetically. + + Closes #5558 + +- ABI.md: rename to .md and polish the markdown + + Closes #5562 + +- HELP-US: add a section for "smaller tasks" + + The point of this section is to meet the CII Best Practices gold level + critera: + + "The project MUST clearly identify small tasks that can be performed by + new or casual contributors" + + Closes #5560 + +- TODO: retry on the redirected-to URL + + Closes #5462 + +- mailmap: Nicolas Sterchele + +- [Nicolas Sterchele brought this change] + + TODO: remove 19.3 section title + + Follow-up to ad6416986755e417c66e2c6, which caused wrong formatting on + curl documentation website + + Closes #5561 + +- [Martin V brought this change] + + test1560: avoid possibly negative association in wording + + Closes #5549 + +- share: don't set the share flag it something fails + + When asking for a specific feature to be shared in the share object, + that bit was previously set unconditionally even if the shared feature + failed or otherwise wouldn't work. + + Closes #5554 + +- buildconf: remove -print from the find command that removes files + + It's just too annoying and unnecessary to get a long list of files shown + +- RELEASE-NOTES: synced + +- wording: avoid blacklist/whitelist stereotypes + + Instead of discussing if there's value or meaning (implied or not) in + the colors, let's use words without the same possibly negative + associations. + + Closes #5546 + +Jay Satiro (9 Jun 2020) +- tool_getparam: fix memory leak in parse_args + + Prior to this change in Windows Unicode builds most parsed options would + not be freed. + + Found using _CrtDumpMemoryLeaks(). + + Ref: https://github.com/curl/curl/issues/5545 + +Daniel Stenberg (8 Jun 2020) +- socks: detect connection close during handshake + + The SOCKS4/5 state machines weren't properly terminated when the proxy + connection got closed, leading to a busy-loop. + + Reported-By: zloi-user on github + Fixes #5532 + Closes #5542 + +- [James Fuller brought this change] + + multi: add defensive check on data->multi->num_alive + + Closes #5540 + +- Curl_addrinfo: use one malloc instead of three + + To reduce the amount of allocations needed for creating a Curl_addrinfo + struct, make a single larger malloc instead of three separate smaller + ones. + + Closes #5533 + +- [Alessandro Ghedini brought this change] + + quiche: update SSLKEYLOGFILE support + + quiche now requires the application to explicitly set the keylog path + for each connection, rather than reading the environment variable + itself. + + Closes #5541 + +- tests: add two simple tests for --login-options + + Test 895 and 896 - as a follow-up to a3e972313b + + Closes #5539 + +- ngtcp2: update with recent API changes + + Syncs with ngtcp2 commit 7e9a917d386d98 merged June 7 2020. + + Assisted-by: Tatsuhiro Tsujikawa + Closes #5538 + +- [James Fuller brought this change] + + socks: remove unreachable breaks in socks.c and mime.c + + Closes #5537 + +- tool_cfgable: free login_options at exit + + Memory leak + Reported-by: Geeknik Labs + Fixes #5535 + Closes #5536 + +- libssh2: keep sftp errors as 'unsigned long' + + Remove weird work-around for storing the SFTP errors as int instead of + the "unsigned long" that libssh2 actually returns for SFTP errors. + + Closes #5534 + +Marc Hoersken (6 Jun 2020) +- timeouts: move ms timeouts to timediff_t from int and long + + Now that all functions in select.[ch] take timediff_t instead + of the limited int or long, we can remove type conversions + and related preprocessor checks to silence compiler warnings. + + Avoiding conversions from time_t was already done in 842f73de. + + Based upon #5262 + Supersedes #5214, #5220 and #5221 + Follow up to #5343 and #5479 + Closes #5490 + +Daniel Stenberg (6 Jun 2020) +- [François Rigault brought this change] + + openssl: set FLAG_TRUSTED_FIRST unconditionally + + On some systems, openssl 1.0.x is still the default, but it has been + patched to contain all the recent security fixes. As a result of this + patching, it is possible for macro X509_V_FLAG_NO_ALT_CHAINS to be + defined, while the previous behavior of openssl to not look at trusted + chains first, remains. + + Fix it: ensure X509_V_FLAG_TRUSTED_FIRST is always set, do not try to + probe for the behavior of openssl based on the existence ofmacros. + + Closes #5530 + +- server/util: fix logmsg format using curl_off_t argument + + ... this caused segfaults on armv7. + + Regression added in dd0365d560aea5a (7.70.0) + + Reviewed-by: Jay Satiro + Closes #5529 + +- RELEASE-NOTES: synced + +- [Cherish98 brought this change] + + socks: fix expected length of SOCKS5 reply + + Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the + reply ATYP is X'01'. This resulted in erroneously expecting more bytes + when the request length is greater than the reply length (e.g., when + remotely resolving the hostname). + + Closes #5527 + +Marc Hoersken (5 Jun 2020) +- .gitignore: add directory containing the stats repo + + Since the new curl/stats repository is designed to be + checked out into the curl repository working tree as stats/ + it should be on the ignore list to aid in commit staging. + +Daniel Stenberg (5 Jun 2020) +- [Adnan Khan brought this change] + + HTTP3.md: clarify cargo build directory + + Cargo needs to be called from within the 'quiche' directory. + + Closes #5522 + +- user-agent.d: spell out what happens given a blank argument + + Closes #5525 + +- trailers: switch h1-trailer logic to use dynbuf + + In the continued effort to remove "manual" realloc schemes. + + Closes #5524 + +- CURLINFO_ACTIVESOCKET.3: clarify the description + + Reported-by: Jay Satiro + Fixes #5299 + Closes #5520 + +- mailmap: Don J Olmstead + +- configure: only strip first -L from LDFLAGS + + In the logic that works out if a given OpenSSL path works, it stripped + off a possibly leading -L flag using an incorrect sed pattern which + would remove all instances of -L in the string, including if the path + itself contained that two-letter sequence! + + The same pattern was used and is now updated in multiple places. Now it + only removes -L if it starts the strings. + + Reported-by: Mohamed Osama + Fixes #5519 + Closes #5521 + +Peter Wu (4 Jun 2020) +- quiche: advertise draft 28 support + + Fix the verbose message while at it, quiche currently supports draft + 27 and draft 28 simultaneously. + + Closes #5518 + +Daniel Stenberg (4 Jun 2020) +- KNOWN_BUGS: RTSP authentication breaks without redirect support + + Closes #4750 + +Jay Satiro (4 Jun 2020) +- projects: Add crypt32.lib to dependencies for all OpenSSL configs + + Windows project configurations that use OpenSSL with USE_WIN32_CRYPTO + need crypt32. + + Follow-up to 148534d which added CURLSSLOPT_NATIVE_CA for 7.71.0. + + The changes that are in this commit were made by script. + + Ref: https://gist.github.com/jay/a1861b50ecce2b32931237180f856e28 + + Closes https://github.com/curl/curl/pull/5516 + +Marc Hoersken (3 Jun 2020) +- CI/macos: fix 'is already installed' errors by using bundle + + Avoid failing CI builds due to nghttp2 being already installed. + + Closes #5513 + +Daniel Stenberg (3 Jun 2020) +- altsvc: fix 'dsthost' may be used uninitialized in this function + +- RELEASE-NOTES: synced + +- urldata: let the HTTP method be in the set.* struct + + When the method is updated inside libcurl we must still not change the + method as set by the user as then repeated transfers with that same + handle might not execute the same operation anymore! + + This fixes the libcurl part of #5462 + + Test 1633 added to verify. + + Closes #5499 + +- hostip: fix the memory-leak introduced in 67d2802 + + Fixes #5503 + Closes #5504 + +- test970: make it require proxy support + + This test verifies the -w %json output and the test case includes a full + generated "blob". If there's no proxy support built into libcurl, it + will return an error for proxy related info variables and they will not + be included in the json, thus causing a mismatch and this test fails. + + Reported-by: Marc Hörsken + Fixes #5501 + Closes #5502 + +- [Radoslav Georgiev brought this change] + + examples/http2-down/upload: add error checks + + If `index.html` does not exist in the directory from which the example + is invoked, the fopen(upload, "rb") invocation in `setup` would fail, + returning NULL. This value is subsequently passed as the FILE* argument + of the `fread` invocation in the `read_callback` function, which is the + actual cause of the crash (apparently `fread` assumes that argument to + be non-null). + + In addition, mitigate some possible crashes of similar origin. + + Closes #5463 + +- [kotoriのねこ brought this change] + + examples/ephiperfifo: turn off interval when setting timerfd + + Reported-by: therealhirudo on github + Fixes #5485 + Closes #5497 + +- [Saleem Abdulrasool brought this change] + + vtls: repair the build with `CURL_DISABLE_PROXY` + + `http_proxy` will not be available in `conndata` if `CURL_DISABLE_PROXY` + is enabled. Repair the build with that configuration. + + Follow-up to f3d501dc67 + + Closes #5498 + +- transfer: remove k->str NULL check + + "Null-checking k->str suggests that it may be null, but it has already + been dereferenced on all paths leading to the check" - and it can't + legally be NULL at this point. Remove check. + + Detected by Coverity CID 1463884 + + Closes #5495 + +Marc Hoersken (1 Jun 2020) +- select: always use Sleep in Curl_wait_ms on Win32 + + Since Win32 almost always will also have USE_WINSOCK, + we can reduce complexity and always use Sleep there. + + Assisted-by: Jay Satiro + Reviewed-by: Daniel Stenberg + + Follow up to #5343 + Closes #5489 + +Daniel Stenberg (31 May 2020) +- conncache: download buffer needs +1 size for trailing zero + + Follow-up to c4e6968127e + Detected by OSS-Fuzz: https://oss-fuzz.com/testcase-detail/5727799779524608 + +Marc Hoersken (31 May 2020) +- azure: use matrix strategy to avoid configuration redundancy + + This also includes the following changes: + + - Use the same timeout for all jobs on Linux (60 minutes) + and Windows (90 minutes) + - Use CLI stable apt-get install -y instead of apt install + which warns about that and run apt-get update first + - Enable MQTT for Windows msys2 builds instead of + legacy msys1 builds + - Add ./configure --prefix parameter to the msys2 builds + - The MSYSTEM environment variable is now preset inside + the container images for the msys2 builds + + Note: on Azure Pipelines the matrix strategy is basically + just a simple list of job copies and not really a matrix. + + Closes #5468 + +Daniel Stenberg (30 May 2020) +- build: disable more code/data when built without proxy support + + Added build to travis to verify + + Closes #5466 + +- url: alloc the download buffer at transfer start + + ... and free it as soon as the transfer is done. It removes the extra + alloc when a new size is set with setopt() and reduces memory for unused + easy handles. + + In addition: the closure_handle now doesn't use an allocated buffer at + all but the smallest supported size as a stack based one. + + Closes #5472 + +- timeouts: change millisecond timeouts to timediff_t from time_t + + For millisecond timers we like timediff_t better. Also, time_t can be + unsigned so returning a negative value doesn't work then. + + Closes #5479 + +Marc Hoersken (30 May 2020) +- select: add overflow checks for timeval conversions + + Using time_t and suseconds_t if suseconds_t is available, + long on Windows (maybe others in the future) and int elsewhere. + + Also handle case of ULONG_MAX being greater or equal to INFINITE. + + Assisted-by: Jay Satiro + Reviewed-by: Daniel Stenberg + + Part of #5343 + +- select: use timediff_t instead of time_t and int for timeout_ms + + Make all functions in select.[ch] take timeout_ms as timediff_t + which should always be large enough and signed on all platforms + to take all possible timeout values and avoid type conversions. + + Reviewed-by: Jay Satiro + Reviewed-by: Daniel Stenberg + + Replaces #5107 and partially #5262 + Related to #5240 and #5286 + Closes #5343 + +- unit1604.c: fix implicit conv from 'SANITIZEcode' to 'CURLcode' + + GCC 10 warns about this with warning: implicit conversion + from 'SANITIZEcode' to 'CURLcode' [-Wenum-conversion] + + Since 'expected_result' is not really of type 'CURLcode' and + it is not exposed in any way, we can just use 'SANITIZEcode'. + + Reviewed-by: Daniel Stenberg + Reviewed-by: Marcel Raad + + Closes #5476 + +- tests/libtest: fix undefined reference to 'curlx_win32_fopen' + + Since curl_setup.h now makes use of curlx_win32_fopen for Win32 + builds with USE_WIN32_LARGE_FILES or USE_WIN32_SMALL_FILES defined, + we need to include the relevant files for tests using fopen, + because the libtest sources are also including curl_setup.h + + Reviewed-by: Marcel Raad + Reviewed-by: Daniel Stenberg + + Follow up to #3784 (ffdddb45d9) + Closes #5475 + +- appveyor: add non-debug plain autotools-based build + + This should enable us to catch linking issues with the + testsuite early, like the one described/fixed in #5475. + + Reviewed-by: Daniel Stenberg + Reviewed-by: Marcel Raad + + Closes #5477 + +Daniel Stenberg (29 May 2020) +- RELEASE-NOTES: synced + +- Revert "buildconf: use find -execdir" + + This partially reverts commit c712009838f44211958854de431315586995bc61. + + Keep the ares_ files removed but bring back the older way to run find, + to make it work with busybox's find, as apparently that's being used. + + Reported-by: Max Peal + Fixes #5483 + Closes #5484 + +- server/sws: fix asan warning on use of uninitialized variable + +- libssh2: improved error output for wrong quote syntax + + Reported-by: Werner Stolz + + Closes #5474 + +- mk-lib1521: generate code for testing BLOB options as well + + Follow-up to cac5374298b3 + + Closes #5478 + +- configure: repair the check if argv can be written to + + Due to bad escaping of the test code, the test wouldn't build and thus + result in a negative test result, which would lead to the unconditional + assumption that overwriting the arguments doesn't work and thus curl + would never hide credentials given in the command line, even when it + would otherwise be possible. + + Regression from commit 2d4c2152c (7.60.0) + + Reported-by: huzunhao on github + Fixes #5470 + Closes #5471 + +Peter Wu (28 May 2020) +- CMake: rebuild Makefile.inc.cmake when Makefile.inc changes + + Otherwise the build might fail due to missing source files, as + demonstrated by the recent keylog.c addition on an existing build dir. + + Closes #5469 + +Daniel Stenberg (28 May 2020) +- urldata: fix comments: Curl_done() is called multi_done() now + + ... since 575e885db + +Peter Wu (27 May 2020) +- ngtcp2: use common key log routine for better thread-safety + + Tested with ngtcp2 built against the OpenSSL library. Additionally + tested with MultiSSL (NSS for TLS and ngtcp2+OpenSSL for QUIC). + + The TLS backend (independent of QUIC) may or may not already have opened + the keylog file before. Therefore Curl_tls_keylog_open is always called + to ensure the file is open. + +- wolfssl: add SSLKEYLOGFILE support + + Tested following the same curl and tshark commands as in commit + "vtls: Extract and simplify key log file handling from OpenSSL" using + WolfSSL v4.4.0-stable-128-g5179503e8 from git master built with + `./configure --enable-all --enable-debug CFLAGS=-DHAVE_SECRET_CALLBACK`. + + Full support for this feature requires certain wolfSSL build options, + see "Availability note" in lib/vtls/wolfssl.c for details. + + Closes #5327 + +- vtls: Extract and simplify key log file handling from OpenSSL + + Create a set of routines for TLS key log file handling to enable reuse + with other TLS backends. Simplify the OpenSSL backend as follows: + + - Drop the ENABLE_SSLKEYLOGFILE macro as it is unconditionally enabled. + - Do not perform dynamic memory allocation when preparing a log entry. + Unless the TLS specifications change we can suffice with a reasonable + fixed-size buffer. + - Simplify state tracking when SSL_CTX_set_keylog_callback is + unavailable. My original sslkeylog.c code included this tracking in + order to handle multiple calls to SSL_connect and detect new keys + after renegotiation (via SSL_read/SSL_write). For curl however we can + be sure that a single master secret eventually becomes available + after SSL_connect, so a simple flag is sufficient. An alternative to + the flag is examining SSL_state(), but this seems more complex and is + not pursued. Capturing keys after server renegotiation was already + unsupported in curl and remains unsupported. + + Tested with curl built against OpenSSL 0.9.8zh, 1.0.2u, and 1.1.1f + (`SSLKEYLOGFILE=keys.txt curl -vkso /dev/null https://localhost:4433`) + against an OpenSSL 1.1.1f server configured with: + + # Force non-TLSv1.3, use TLSv1.0 since 0.9.8 fails with 1.1 or 1.2 + openssl s_server -www -tls1 + # Likewise, but fail the server handshake. + openssl s_server -www -tls1 -Verify 2 + # TLS 1.3 test. No need to test the failing server handshake. + openssl s_server -www -tls1_3 + + Verify that all secrets (1 for TLS 1.0, 4 for TLS 1.3) are correctly + written using Wireshark. For the first and third case, expect four + matches per connection (decrypted Server Finished, Client Finished, HTTP + Request, HTTP Response). For the second case where the handshake fails, + expect a decrypted Server Finished only. + + tshark -i lo -pf tcp -otls.keylog_file:keys.txt -Tfields \ + -eframe.number -eframe.time -etcp.stream -e_ws.col.Info \ + -dtls.port==4433,http -ohttp.desegment_body:FALSE \ + -Y 'tls.handshake.verify_data or http' + + A single connection can easily be identified via the `tcp.stream` field. + +Daniel Stenberg (27 May 2020) +- FILEFORMAT: add more features that tests can depend on + +- [Michael Kaufmann brought this change] + + transfer: close connection after excess data has been read + + For HTTP 1.x, it's a protocol error when the server sends more bytes + than announced. If this happens, don't reuse the connection, because the + start position of the next response is undefined. + + Closes #5440 + +- [Estanislau Augé-Pujadas brought this change] + + Revert "ssh: ignore timeouts during disconnect" + + This reverts commit f31760e63b4e9ef1eb25f8f211390f8239388515. Shipped in + curl 7.54.1. + + Bug: https://curl.haxx.se/mail/lib-2020-05/0068.html + Closes #5465 + +- urldata: connect related booleans live in struct ConnectBits + + And remove a few unused booleans! + + Closes #5461 + +- hostip: on macOS avoid DoH when given a numerical IP address + + When USE_RESOLVE_ON_IPS is set (defined on macOS), it means that + numerical IP addresses still need to get "resolved" - but not with DoH. + + Reported-by: Viktor Szakats + Fixes #5454 + Closes #5459 + +- ngtcp2: cleanup memory when failing to connect + + Reported-by: Peter Wu + Fixes #5447 (the ngtcp2 side of it) + Closes #5451 + +- quiche: clean up memory properly when failing to connect + + Addresses the quiche side of #5447 + Reported-by: Peter Wu + Closes #5450 + +- cleanup: use a single space after equals sign in assignments + +- url: accept "any length" credentials for proxy auth + + They're only limited to the maximum string input restrictions, not to + 256 bytes. + + Added test 1178 to verify + + Reported-by: Will Roberts + Fixes #5448 + Closes #5449 + +- [Maksim Stsepanenka brought this change] + + test1167: fixes in badsymbols.pl + + Closes #5442 + +- altsvc: fix parser for lines ending with CRLF + + Fixed the alt-svc parser to treat a newline as end of line. + + The unit tests in test 1654 were done without CRLF and thus didn't quite + match the real world. Now they use CRLF as well. + + Reported-by: Peter Wu + Assisted-by: Peter Wu + Assisted-by: Jay Satiro + Fixes #5445 + Closes #5446 + +Viktor Szakats (25 May 2020) +- all: fix codespell errors + + Reviewed-by: Jay Satiro + Reviewed-by: Daniel Stenberg + Closes https://github.com/curl/curl/pull/5452 + +Peter Wu (25 May 2020) +- ngtcp2: fix build with current ngtcp2 master implementing draft 28 + + Based on client.cc changes from ngtcp2. Tested with current git master, + ngtcp2 commit c77d5731ce92, nghttp3 commit 65ff479d4380. + + Fixes #5444 + Closes #5443 + +Daniel Stenberg (25 May 2020) +- RELEASE-NOTES: synced + + moved the new setopts up to a "change" + +- RELEASE-NOTES: synced + +- copyright: updated year ranges out of sync + + ... and whitelisted a few more files in the the copyright.pl script. + +- [Gilles Vollant brought this change] + + setopt: add CURLOPT_PROXY_ISSUERCERT(_BLOB) for coherency + + Closes #5431 + +- curl: remove -J "informational" written on stdout + + curl would previously show "curl: Saved to filename 'name from header'" + if -J was used and a name was picked from the Content-Disposition + header. That output could interfer with other stdout output, such as -w. + + This commit removes that output line. + Bug: https://curl.haxx.se/mail/archive-2020-05/0044.html + Reported-by: Коваленко Анатолий Викторович + Closes #5435 + +Peter Wu (22 May 2020) +- travis: simplify quiche build instructions wrt boringssl + + quiche builds boringssl as static library, reuse that instead of + building another shared library. + + Closes #5438 + +- configure: fix pthread check with static boringssl + + A shared boringssl/OpenSSL library requires -lcrypto only for linking. + A static build additionally requires `-ldl -lpthread`. In the latter + case `-lpthread` is added to LIBS which prevented `-pthread` from being + added to CFLAGS. Clear LIBS to fix linking failures for libtest tests. + +Daniel Stenberg (22 May 2020) +- Revert "sendf: make failf() use the mvsnprintf() return code" + + This reverts commit 74623551f306990e70c7c5515b88972005604a74. + + Instead mark the function call with (void). Getting the return code and + using it instead triggered Coverity warning CID 1463596 because + snprintf() can return a negative value... + + Closes #5441 + +- typecheck-gcc.h: CURLINFO_PRIVATE does not need a 'char *' + + Reported-by: Billyzou0741326 on github + Fixes #5432 + Closes #5436 + +- tests/server/util.h: add extern to silence compiler warning + + Follow-up from a3b0699d5c1 + +- typecheck-gcc.h: fix the OFF_T check + + The option number also needs to be less than CURLOPTTYPE_BLOB. + + Follow-up to cac5374298 + Reported-by: Jeroen Ooms + Bug: https://github.com/curl/curl/pull/5365#issuecomment-631084114 + +- TODO: --dry-run + + Closes #5426 + +- TODO: Ratelimit or wait between serial requests + + Closes #5406 + +- tool_paramhlp: fixup C89 mistake + + Follow-up to c5f0a9db22. + +- [Siva Sivaraman brought this change] + + tool_paramhlp: fixed potentially uninitialized strtol() variable + + Seems highly unlikely to actually be possible, but better safe than + sorry. + + Closes #5417 + +- [Siva Sivaraman brought this change] + + tool_operate: fixed potentially uninitialized variables + + ... in curl_easy_getinfo() calls. They're harmless but clearing the + variables makes the code safer and comforts the reader. + + Closes #5416 + +- sha256: move assign to the declaration line + + Follow-up to fae30656. Should've been squashed with that commit... + +- [Siva Sivaraman brought this change] + + sha256: fixed potentially uninitialized variable + + Closes #5414 + +- sendf: make failf() use the mvsnprintf() return code + + ... and avoid a strlen() call. Fixes a MonocleAI warning. + + Reported-by: MonocleAI + Fixes #5413 + Closes #5420 + +- hostip: make Curl_printable_address not return anything + + It was not used much anyway and instead we let it store a blank buffer + in case of failure. + + Reported-by: MonocleAI + Fixes #5411 + Closes #5418 + +- ftp: mark return-ignoring calls to Curl_GetFTPResponse with (void) + + They're done on purpose, make that visible in the code. + Reported-by: MonocleAI + Fixes #5412 + Closes #549 + +- TODO: forbid TLS post-handshake auth and do TLS record padding + + Closes #5396 + Closes #5398 + +- RELEASE-NOTES: synced + +- dynbuf: return NULL when there's no buffer length + + ... as returning a "" is not a good idea as the string is supposed to be + allocated and returning a const string will cause issues. + + Reported-by: Brian Carpenter + Follow-up to ed35d6590e72c + Closes #5405 + +Peter Wu (16 May 2020) +- travis: upgrade to bionic, clang-9, improve readability + + Changes, partially to reduce build failures from external dependencies: + - Upgrade Ubuntu and drop unnecessary third-party repos. + - Properly clone apt config to ensure retries. + - Upgrade to clang-9 from the standard repos. + - Use Ubuntu 20.04 focal for the libssh build, use of ssh_get_publickey + fails on -Werror=deprecated-declarations in Ubuntu 18.04. Do not use + focal everywhere yet since Travis CI has not documented this option. + In focal, python-impacket (Py2.7) has been removed, leaving only + python3-impacket. Since it is only needed for SMB tests and not SSH, + skip it for the libssh job since it might need more work. + - apt: Remove gcc-8 and libstdc++-8-dev, already installed via g++-8. + + Non-functional cleanups: + - Simplify test matrix, drop redundant os and compiler keys. + - Deprecation fixes: remove sudo, rename matrix -> jobs. + - Every job has an 'env' key, put this key first in a list item. + + Closes #5370 + +- travis: whitespace-only changes for consistency + + Automatically apply a consistent indentation with: + + python3 -c 'from ruamel.yaml import YAML;y=YAML();d=y.load(open(".travis.yml"));y.width=500;y.dump(d,open(".travis.yml.new","w"))' + + followed by manually re-indenting three comments. + + Closes #5370 + +- CMake: add libssh build support + + Closes #5372 + +Daniel Stenberg (15 May 2020) +- KNOWN_BUGS: wolfssh: publickey auth doesn't work + + Closes #4820 + +- KNOWN_BUGS: OS400 port requires deprecated IBM library + + Closes #5176 + +- [Vyron Tsingaras brought this change] + + http2: keep trying to send pending frames after req.upload_done + + Fixes #1410 + Closes #5401 + +- [Gilles Vollant brought this change] + + setopt: support certificate options in memory with struct curl_blob + + This change introduces a generic way to provide binary data in setopt + options, called BLOBs. + + This change introduces these new setopts: + + CURLOPT_ISSUERCERT_BLOB, CURLOPT_PROXY_SSLCERT_BLOB, + CURLOPT_PROXY_SSLKEY_BLOB, CURLOPT_SSLCERT_BLOB and CURLOPT_SSLKEY_BLOB. + + Reviewed-by: Daniel Stenberg + Closes #5357 + +- source cleanup: remove all custom typedef structs + + - Stick to a single unified way to use structs + - Make checksrc complain on 'typedef struct {' + - Allow them in tests, public headers and examples + + - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually + typedef different types/structs depending on build conditions. + + Closes #5338 + +- travis: remove the .checksrc fiddling + +- ftp: make domore_getsock() return the secondary socket properly + + Previously, after PASV and immediately after the data connection has + connected, the function would only return the control socket to wait for + which then made the data connection simply timeout and not get polled + correctly. This become obvious when running test 1631 and 1632 event- + based. + +- test1632: verify FTP through HTTPS-proxy with connection re-use + +- test1631: verify FTP download through HTTPS-proxy + +- sws: as last resort, get test number from server cmd file + + If it can't be found in the request. Also support --cmdfile to set it to + a custom file name. + + runtests.pl always writes this file with the test number in it since a + while back. + +- ftp: shut down the secondary connection properly when SSL is used + + Reported-by: Neal Poole + Fixes #5340 + Closes #5385 + +Marcel Raad (14 May 2020) +- KNOWN_BUGS: adapt 5.5 to recent changes + + It only applies to non-Unicode builds now. + Also merge 5.10 into it as it's effectively a duplicate. + + Closes https://github.com/curl/curl/pull/3784 + +- curl_setup: support Unicode functions to open files on Windows + + Use them only if `_UNICODE` is defined, in which case command-line + arguments have been converted to UTF-8. + + Closes https://github.com/curl/curl/pull/3784 + +- tool: support UTF-16 command line on Windows + + - use `wmain` instead of `main` when `_UNICODE` is defined [0] + - define `argv_item_t` as `wchar_t *` in this case + - use the curl_multibyte gear to convert the command-line arguments to + UTF-8 + + This makes it possible to pass parameters with characters outside of + the current locale on Windows, which is required for some tests, e.g. + the IDN tests. Out of the box, this currently only works with the + Visual Studio project files, which default to Unicode, and winbuild + with the `ENABLE_UNICODE` option. + + [0] https://devblogs.microsoft.com/oldnewthing/?p=40643 + + Ref: https://github.com/curl/curl/issues/3747 + Closes https://github.com/curl/curl/pull/3784 + +- curl_multibyte: add to curlx + + This will also be needed in the tool and tests. + + Ref: https://github.com/curl/curl/pull/3758#issuecomment-482197512 + Closes https://github.com/curl/curl/pull/3784 + +Daniel Stenberg (14 May 2020) +- url: make the updated credentials URL-encoded in the URL + + Found-by: Gregory Jefferis + Reported-by: Jeroen Ooms + Added test 1168 to verify. Bug spotted when doing a redirect. + Bug: https://github.com/jeroen/curl/issues/224 + Closes #5400 + +- tests: add https-proxy support to the test suite + + Initial test 1630 added with basic HTTPS-proxy use. HTTPS-proxy is like + HTTP proxy but with a full TLS connection to the proxy. + + Closes #5399 + +- mailmap: James Fuller + +- [Major_Tom brought this change] + + vauth/cleartext: fix theoretical integer overflow + + Fix theoretical integer overflow in Curl_auth_create_plain_message. + + The security impact of the overflow was discussed on hackerone. We + agreed this is more of a theoretical vulnerability, as the integer + overflow would only be triggerable on systems using 32-bits size_t with + over 4GB of available memory space for the process. + + Closes #5391 + +Jay Satiro (13 May 2020) +- curl.1: Quote globbed URLs + + - Quote the globbing example URLs that contain characters [] {} since + otherwise they may be interpreted as shell metacharacters. + + Bug: https://github.com/curl/curl/issues/5388 + Reported-by: John Simpson + + Closes https://github.com/curl/curl/pull/5394 + +Daniel Stenberg (14 May 2020) +- checksrc: enhance the ASTERISKSPACE and update code accordingly + + Fine: "struct hello *world" + + Not fine: "struct hello* world" (and variations) + + Closes #5386 + +- docs/options-in-versions: which version added each cmdline option + + Added test 971 to verify that the list is in sync with the files in + cmdline-opts. The check also verifies that .d-files that uses Added: + specify the same version number as the options-in-versions file does. + + Closes #5381 + +- docs: unify protocol lists + + We boast support for 25 transfer protocols. Make sure the lists are + consistent + + Closes #5384 + +- OpenSSL: have CURLOPT_CRLFILE imply CURLSSLOPT_NO_PARTIALCHAIN + + ... to avoid an OpenSSL bug that otherwise makes the CRL check to fail. + + Reported-by: Michael Kaufmann + Fixes #5374 + Closes #5376 + +- tls13-ciphers.d: shorten the Arg + +- sasl-authzid.d: add Arg: and shorten the desc + +- cert-type.d: mention the available types in the desc + +- tool: shorten 3 --help descriptions + + --happy-eyeballs-timeout-ms, --resolve and --ssl-revoke-best-effort + + gen.pl already warned about these lines but we didn't listen + + Closes #5379 + +- configure: the wolfssh backend does not provide SCP + + Closes #5387 + +- RELEASE-NOTES: synced + +- url: reject too long input when parsing credentials + + Since input passed to libcurl with CURLOPT_USERPWD and + CURLOPT_PROXYUSERPWD circumvents the regular string length check we have + in Curl_setstropt(), the input length limit is enforced in + Curl_parse_login_details too, separately. + + Reported-by: Thomas Bouzerar + Closes #5383 + +- list-only.d: this option existed already in 4.0 + +Jay Satiro (12 May 2020) +- retry-all-errors.d: Shorten the summary line + + Follow-up to b995bb5 from a few moments ago. + + Reported-by: Daniel Stenberg + + Ref: https://github.com/curl/curl/commit/b995bb5#r39108929 + +- [denzor brought this change] + + easy: fix dangling pointer on easy_perform fail + + Closes https://github.com/curl/curl/pull/5363 + +- tool: Add option --retry-all-errors to retry on any error + + The "sledgehammer" of retrying. + + Closes https://github.com/curl/curl/pull/5185 + +Daniel Stenberg (12 May 2020) +- [James Le Cuirot brought this change] + + libcurl.pc: Merge Libs.private into Libs for static-only builds + + A project being built entirely statically will call pkg-config with + --static, which utilises the Libs.private field. Conversely it will + not use --static when not being built entirely statically, even if + there is only a static build of libcurl available. This will most + likely cause the build to fail due to underlinking unless we merge the + Libs fields. + + Consider that this is what the Meson build system does when it + generates pkg-config files. + + I have also reflected this in the --libs argument of curl-config even + though REQUIRE_LIB_DEPS always seems to be "yes" anyway. + + Closes #5373 + +- [Peter Wu brought this change] + + CMake: fix runtests.pl with CMake, add new test targets + + * runtests.pl: + - Fix out-of-tree build under CMake when srcdir is not set. Default + srcdir to the location of runtests.pl. + - Add a hack to allow CMake to use the TFLAGS option as documented + in tests/README and used in scripts/travis/script.sh. + * Bump CMake version to 3.2 for USES_TERMINAL, dropping Debian Jessie + support (no one should care, it is already EOL.). + * Remove CTest since it defines its own 'test' target with no tests + since all unittests are already broken and not built by default. + * Add new test targets based on the options from Makefile.am. Since + new test targets are rarely added, I opted for duplicating the + runtests.pl options as opposed to creating a new Makefile.inc file. + Use top-level target names (test-x) instead of x-test since that is + used by CI and others. + + Closes #5358 + +- [Peter Wu brought this change] + + CMake: do not build test programs by default + + The default target should only build libcurl and curl. Add a dedicated + 'testdeps' target which will be used later when running tests. Note that + unittests are currently broken in CMake and already excluded. + + Closes #5368 + +- FILEFORMAT: moved up the variables section and further polished + +- runtests: remove ftp2 support, not used + + We once supported two separate ftp instances in the test suite. Has not + been used the last decade. + + Closes #5375 + +- url: sort the protocol schemes in rough popularity order + + When looking for a protocol match among supported schemes, check the + most "popular" schemes first. It has zero functionality difference and + for all practical purposes a speed difference will not be measureable + but it still think it makes sense to put the least likely matches last. + + "Popularity" based on the 2019 user survey. + + Closes #5377 + +Marc Hoersken (11 May 2020) +- test1238: avoid tftpd being busy for tests shortly following + + The tftpd server may still be busy if the total timeout of + 25 seconds has not been reached or no sread error was received + during or after the execution of the timeout test 1238. + + Once the next TFTP test comes around (eg. 1242 or 1243), + those will fail because the tftpd server is still waiting + on data from curl due to the UDP protocol being stateless + and having no connection close. On Linux this error may not + happen, because ICMP errors generated due to a swrite error + can also be returned async on the next sread call instead. + + Therefore we will now just kill the tftpd server after test + 1238 to make sure that the following tests are not affected. + + This enables us to no longer ignore tests 1242, 1243, 2002 + and 2003 on the CI platforms CirrusCI and AppVeyor. + + Assisted-by: Peter Wu + Closes #5364 + +Daniel Stenberg (11 May 2020) +- write-out.d: added "response_code" + +- KNOWN_BUGS: Build with staticly built dependency + + I rewrote the item 5.4 to be more generic about static dependencies. + +- ROADMAP: remove old entries + + MQTT - the start has already landed + + tiny-curl - also mostly landed and is a continuous work + + make menuconfig - basically no interest from users, not pushing there + +- [Peter Wu brought this change] + + travis: Add ngtcp2 and quiche tests for CMake + + To avoid an explosion of jobs, extend the existing CMake tests with + ngtcp2 and quiche support. macOS was previously moved to GitHub actions, + so the non-Linux case can be dropped. + +- [Peter Wu brought this change] + + CMake: add ENABLE_ALT_SVC option + + Tested alt-svc with quiche. While at it, add missing MultiSSL reporting + (not tested). + +- [Peter Wu brought this change] + + CMake: add HTTP/3 support (ngtcp2+nghttp3, quiche) + + Add three new CMake Find modules (using the curl license, but I grant + others the right to apply the CMake BSD license instead). + + This CMake config is simpler than the autotools one because it assumes + ngtcp2 and nghttp3 to be used together. Another difference is that this + CMake config checks whether QUIC is actually supported by the TLS + library (patched OpenSSL or boringssl) since this can be a common + configuration mistake that could result in build errors later. + + Unlike autotools, CMake does not warn you that the features are + experimental. The user is supposed to already know that and read the + documentation. It requires a very special build environment anyway. + + Tested with ngtcp2+OpenSSL+nghttp3 and quiche+boringssl, both built from + current git master. Use `LD_DEBUG=files src/curl |& grep need` to figure + out which features (libldap-2.4, libssh2) to disable due to conflicts + with boringssl. + + Closes #5359 + +Marc Hoersken (10 May 2020) +- tests/server/tftpd.c: fix include and enhance debug logging + + setjmp.h should only be included if HAVE_SETJMP_H is defined. + + Add additional log statements to see wether reads and writes + are blocking or finishing before an alarm signal is received. + + Assisted-by: Peter Wu + Part of #5364 + +Daniel Stenberg (10 May 2020) +- tool_operate: only set CURLOPT_SSL_OPTIONS if SSL support is present + + Reported-by: Marcel Raad + Follow-up to 148534db5 + Fixes #5367 + Closes #5369 + +Marc Hoersken (9 May 2020) +- appveyor: update comments to be clear about toolchain + + - CMake-based MSYS builds use mingw-w64 to cross-compile. + - autotools-based builds are compiled using msys2-devel. + + The difference is that the later ones are not cross-compiled + to Windows and instead require the msys2 runtime to be present. + + At the moment only the Azure Pipelines CI builds actually + run autotools-based cross-compilation builds for Windows. + +- TODO: update regarding missing Schannel features + + Some aspects have already been implemented over the years. + + 15.1 Client certificates are now supported: + + - System stores via e35b0256eb34f1fe562e3e2a2615beb50a391c52 + - PKCS#12 files via 0fdf96512613574591f501d63fe49495ba40e1d5 + + 15.2 Ciphers can now be specified through: + + - Algorithms via 9aefbff30d280c60fc9d8cc3e0b2f19fc70a2f28 + + Reviewed-by: Daniel Stenberg and Marcel Raad + Closes #5358 + +Daniel Stenberg (8 May 2020) +- checksrc: close the .checksrc file handle when done reading + +- RELEASE-NOTES: synced + + And bumped next version to 7.71.0 + +- [Gilles Vollant brought this change] + + CURLOPT_SSL_OPTIONS: add *_NATIVE_CA to use Windows CA store (with openssl) + + Closes #4346 + +- TODO: native IDN support on macOS + +- urlapi: accept :: as a valid IPv6 address + + Text 1560 is extended to verify. + + Reported-by: Pavel Volgarev + Fixes #5344 + Closes #5351 + +- THANKS-filter: Peter Wang + +- [Peter Wang brought this change] + + *_sspi: fix bad uses of CURLE_NOT_BUILT_IN + + Return CURLE_AUTH_ERROR instead of CURLE_NOT_BUILT_IN for other + instances of QuerySecurityPackageInfo failing, as in + commit 2a81439553286f12cd04a4bdcdf66d8e026d8201. + + Closes #5355 + +- docs/HTTP3: add qlog to the quiche build instruction + +- ngtcp2: introduce qlog support + + If the QLOGDIR environment variable is set, enable qlogging. + + ... and create Curl_qlogdir() in the new generic vquic/vquic.c file for + QUIC functions that are backend independent. + + Closes #5353 + +- ntlm_sspi: fix bad use of CURLE_NOT_BUILT_IN + + That return code is reserved for build-time conditional code not being + present while this was a regular run-time error from a Windows API. + + Reported-by: wangp on github + Fixes #5349 + Closes #5350 + +- runtests: show elapsed test time with higher precision (ms) + +- RELEASE-NOTES: synced + +- http2: simplify and clean up trailer handling + + Triggered by a crash detected by OSS-Fuzz after the dynbuf introduction in + ed35d6590e72. This should make the trailer handling more straight forward and + hopefully less error-prone. + + Deliver the trailer header to the callback already at receive-time. No + longer caches the trailers to get delivered at end of stream. + + Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22030 + Closes #5348 + +Marc Hoersken (7 May 2020) +- appveyor: disable test 1139 instead of ignoring it + + Spending time on manpage checking makes no sense + for these builds due to lacking manpage support. + +- appveyor: disable flaky test 1501 and ignore broken 1056 + + Test 1501 is flaky on Windows CI due to being time sensitive + and the testsuite relying on taskkill.exe to check for the + existance of processes which can take to much time itself. + + Test 1056 is broken in autotools-based Windows builds due + to scope ID support missing in these builds at the moment. + +- test613.pl: make tests 613 and 614 work with OpenSSH for Windows + + OpenSSH for Windows shows group and other/world permissions as *, + because those concepts do not exist on Windows. It also does not + show the current or parent directory, so we just ignore those. + + Reviewed-by: Daniel Stenberg + Closes #5328 + +Daniel Stenberg (6 May 2020) +- runtests: set +x mode again + +- libssh2: convert over to use dynbuf + + In my very basic test that lists sftp://127.0.0.1/tmp/, this patched + code makes 161 allocations compared to 194 in git master. A 17% + reduction. + + Closes #5336 + +- travis: add "qlog" as feature in the quiche build + +- quiche: enable qlog output + + quiche has the potential to log qlog files. To enable this, you must + build quiche with the qlog feature enabled `cargo build --features + qlog`. curl then passes a file descriptor to quiche, which takes + ownership of the file. The FD transfer only works on UNIX. + + The convention is to enable logging when the QLOGDIR environment is + set. This should be a path to a folder where files are written with the + naming template .qlog. + + Co-authored-by: Lucas Pardue + Replaces #5337 + Closes #5341 + +- urldata.h: remove #define HEADERSIZE, not used anymore + + Follow-up to ed35d6590e72c + +- ngtcp2: convert to dynbuf + + Closes #5335 + +- connect: make happy eyeballs work for QUIC (again) + + Follow-up from dbd16c3e256c6c (regression in 7.70.0) + + Closes #5334 + +- connect: add two asserts to clue code analyzers in a little + +- http_proxy: ported to use dynbuf instead of a static size buffer + + Removes a 16K static buffer from the easy handle. Simplifies the code. + +- dynbuf: introduce internal generic dynamic buffer functions + + A common set of functions instead of many separate implementations for + creating buffers that can grow when appending data to them. Existing + functionality has been ported over. + + In my early basic testing, the total number of allocations seem at + roughly the same amount as before, possibly a few less. + + See docs/DYNBUF.md for a description of the API. + + Closes #5300 + +- runtests: remove sleep calls + + Remove many one second sleeps that were done *after* each newly started + test server already has been verified. They should not have any purpose + there. + + Closes #5323 + +- asyn-*: remove support for never-used NULL entry pointers + + ... and instead convert those to asserts to make sure they are truly + never NULL. + + Closes #5324 + +- [Emil Engler brought this change] + + doc: Rename VERSIONS to VERSIONS.md as it already has Markdown syntax + + Closes #5325 + +Jay Satiro (2 May 2020) +- asyn-thread: fix cppcheck warning + + - Check for NULL entry parameter before attempting to deref entry in + Curl_resolver_is_resolved, like is already done in asyn-ares. + + This is to silence cppcheck which does not seem to understand that + asyn-ares and asyn-thread have separate Curl_resolver_is_resolved + and those units are mutually exclusive. Prior to this change it warned + of a scenario where asyn-thread's Curl_resolver_is_resolved is called + with a NULL entry from asyn-ares, but that couldn't happen. + + Reported-by: rl1987@users.noreply.github.com + + Fixes https://github.com/curl/curl/issues/5326 + +- select: fix overflow protection in Curl_socket_check + + Follow-up to a96c752 which changed the timeout_ms type from time_t to + timediff_t. + + Ref: https://github.com/curl/curl/pull/5240 + + Closes https://github.com/curl/curl/pull/5286 + +Marc Hoersken (2 May 2020) +- sockfilt: make select_ws stop waiting on exit signal event + + This makes sure that select_ws behaves similar to real select + which stops waiting on a signal handler being triggered. + + This makes it possible to gracefully stop sockfilt.exe on + Windows with taskkill /IM sockfilt.exe (without /F force flag). + + Reviewed-by: Jay Satiro + Part of #5260 + +- tests/server/util.[ch]: add exit event to stop waiting on Windows + + This commit adds a global exit event to the test servers that + Windows-specific wait routines can use to get triggered if the + program was signaled to be terminated, eg. select_ws in sockfilt.c + + The exit event will be managed by the signal handling code and is + set to not reset automatically to support multiple wait routines. + + Reviewed-by: Jay Satiro + Closes #5260 + +- tests/server/util.c: fix thread handle not being closed + + Reviewed-by: Jay Satiro + Part of #5260 + +- tests/server/util.c: use raise instead of calling signal handler + + Use raise to trigger signal handler instead of calling it + directly and causing potential unexpected control flow. + + Reviewed-by: Jay Satiro + Part of #5260 + +- tests: add support for SSH server variant specific transfer paths + + OpenSSH for Windows requires paths in the format of /C:/ + instead of the pseudo-POSIX paths /cygdrive/c/ or just /c/ + + Reviewed-by: Daniel Stenberg + Closes #5298 + +Daniel Stenberg (2 May 2020) +- RELEASE-NOTES: synced + +- libssh2: set the expected total size in SCP upload init + + ... as otherwise the progress callback gets called without that + information, making the progress meter have less info. + + Reported-by: Murugan Balraj + Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html + Closes #5317 + +- runtests: make the logmsg from the ssh server only show in verbose + +- tests: make test 1248 + 1249 use %NOLISTENPORT + + ... instead of a port of a non-running server so that it works + stand-alone. + + Closes #5318 + +- examples: remove asiohiper.cpp + + This example has repeatedly been reported to contain bugs, and as users + copy and paste code from this into production, I now deem it better to + not provide the example at all. + + Closes #5090 + Closes #5322 + +- [Emil Engler brought this change] + + doc: add missing closing parenthesis in CURLINFO_SSL_VERIFYRESULT.3 + + Closes #5320 + +- [Emil Engler brought this change] + + KNOWN_BUGS: Remove "curl --upload-file . hang if delay in STDIN" + + It was fixed in 9a2cbf3 + + Closes #5319 + +- cirrus: disable SFTP and SCP tests + + ... as we can't seem to start the sshd server on it. Those problems + existed before d1239b50bececd (running the SSH server on a random port), + but they're more noticable now since there are more failed attempts in + the logs. + + Closes #5315 + +- [Emil Engler brought this change] + + runtests: fix typo in the existence of disabled tests checker + + Closes #5316 + +Dan Fandrich (30 Apr 2020) +- test75: Remove precheck test + + This has not been needed since commit 9fa42bed and often prevents it + from running at all with dynamic test ports. + +- tests: Stop referring to server ports when they're not used + + Several tests referred to specific server ports even when the test + didn't actually use that server or specify that it's needed. In such + cases, the test harness substitutes the text "[not running]" as the port + number which causes many such tests to fail due to the inability to + parse the URL. These tests are changed to use %NOLISTENPORT which will + always be substituted correctly. + +Daniel Stenberg (30 Apr 2020) +- [Emil Engler brought this change] + + GnuTLS: Backend support for CURLINFO_SSL_VERIFYRESULT + + Closes #5287 + +- conncache: various concept cleanups + + More connection cache accesses are protected by locks. + + CONNCACHE_* is a beter prefix for the connection cache lock macros. + + Curl_attach_connnection: now called as soon as there's a connection + struct available and before the connection is added to the connection + cache. + + Curl_disconnect: now assumes that the connection is already removed from + the connection cache. + + Ref: #4915 + Closes #5009 + +- tests: tests: run stunnel for HTTPS and FTPS on dynamic ports + + As stunnel is an external tool and it has no specific option to export + the actually used port number when asked to listen to 0, runtests + instead iterates over ten randomly picked high number ports and sticks + to the first one stunnel can listen to. + + Closes #5267 + +- tests: pick a random port number for SSH + + Since sshd doesn't have such an option by itself, we iterate over a + series of random ports until one works. + + Closes #5273 + +- [Rikard Falkeborn brought this change] + + libtest/cmake: Remove commented code + + These were commented out in e9dd0998706a when Makefile.inc was included + instead. 11 years have passed since then and the commented code is of + course very outdated. Remove it to avoid confusion. + + Closes #5311 + +- schannel: source code reindent + + White space edits only. Conform better to standard curl source code + indenting style. + + Closes #5305 + +Kamil Dudka (29 Apr 2020) +- test1177: look for curl.h in source directory + + If we use a separate build directory, there is no copy of the header. + + Closes #5310 + +- tests: look for preprocessed tests in build directory + + ... which is not always the same directory as source directory + + Closes #5310 + +Daniel Stenberg (29 Apr 2020) +- RELEASE-NOTES: synced + + ... and bumped curlver.h to 7.70.1 + +Version 7.70.0 (29 Apr 2020) + +Daniel Stenberg (29 Apr 2020) +- RELEASE-NOTES: 7.70.0 + +- THANKS: synced with the 7.70.0 release + +- headers: copyright range fix + +- [Rikard Falkeborn brought this change] + + doh: Constify some input pointers + + Closes #5306 + +- nss: check for PK11_CreateDigestContext() returning NULL + + ... to avoid crashes! + + Reported-by: Hao Wu + Fixes #5302 + Closes #5303 + +- travis: bump the wolfssl CI build to use 4.4.0 + + Closes #5301 + +- copyright updates: adjust year ranges + +Marc Hoersken (26 Apr 2020) +- CI: do not include */ci branches in PR builds + + Align Azure Pipelines with GitHub Actions. + +Daniel Stenberg (25 Apr 2020) +- runtests: check for the disabled tests relative srcdir + + To make it work correctly for out-of-tree builds. + + Follow-up to 75e8feb6fb08b + + Bug: https://github.com/curl/curl/pull/5288#issuecomment-619346389 + Reported-by: Marcel Raad + Closes #5297 + +- runtests: revert commenting out a line I did for debugging + + Follow-up to 11091cd4d. It was not meant to be pushed! + +- smtp: set auth correctly + + Regression since 7.69.0 and 68fb25fa3fcff. + + The code wrongly assigned 'from' instead of 'auth' which probably was a + copy and paste mistake from other code, leading to that auth could + remain NULL and later cause an error to be returned. + + Assisted-by: Eric Sauvageau + Fixes #5294 + Closes #5295 + +Marcel Raad (25 Apr 2020) +- lib: clean up whitespace + + This fixes CodeFactor warnings. + +Daniel Stenberg (25 Apr 2020) +- [Anderson Toshiyuki Sasaki brought this change] + + libssh: avoid options override by configuration files + + Previously, options set explicitly through command line options could be + overridden by the configuration files parsed automatically when + ssh_connect() was called. + + By calling ssh_options_parse_config() explicitly, the configuration + files are parsed before setting the options, avoiding the options + override. Once the configuration files are parsed, the automatic + configuration parsing is not executed. + + Fixes #4972 + Closes #5283 + Signed-off-by: Anderson Toshiyuki Sasaki + +- runtests: when mentions http, kill http/2 too + + Since the http2 test server is a mere proxy that needs to know about the + dynamic port the HTTP server is using, it too needs to get restarted + when the http server is killed. + + A regression caused by 80d6515. + + Fixes #5289 + Closes #5291 + +- [Yuri Slobodyanyuk brought this change] + + docs: fix two typos + + Closes #5292 + +- [Emil Engler brought this change] + + tests/git: ignore mqttd and port files + + Closes #5290 + +- tests: make runtests check that disabled tests exists + + ... and error out if so. Removed '536' from DISABLED as there is no such + test file. + + Closes #5288 + +- test1154: set a proper name + +- select: make Curl_socket_check take timediff_t timeout + + Coverity found CID 1461718: + + Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms > + 9223372036854775807L" is always false regardless of the values of its + operands. This occurs as the logical second operand of "||". + + Closes #5240 + +- [i-ky brought this change] + + libcurl-multi.3: added missing full stop + + Closes #5285 + +Jay Satiro (22 Apr 2020) +- transfer: Switch PUT to GET/HEAD on 303 redirect + + Prior to this change if there was a 303 reply to a PUT request then + the subsequent request to respond to that redirect would also be a PUT. + It was determined that was most likely incorrect based on the language + of the RFCs. Basically 303 means "see other" resource, which implies it + is most likely not the same resource, therefore we should not try to PUT + to that different resource. + + Refer to the discussions in #5237 and #5248 for more information. + + Fixes https://github.com/curl/curl/issues/5237 + Closes https://github.com/curl/curl/pull/5248 + +Daniel Stenberg (22 Apr 2020) +- lib/mk-ca-bundle: skip empty certs + + Reviewed-by: Emil Engler + Reported-by: Ashwin Metpalli + Fixes #5278 + Closes #5280 + +- version: skip idn2_check_version() check and add precaution + + A gcc-10's -fanalyze complaint made me spot and do these improvements. + + Closes #5281 + +- RELEASE-NOTES: synced + +- [Brian Bergeron brought this change] + + curl.h: update comment typo + + "routines with be invoked" -> "routines will be invoked" + + Closes #5279 + +- [Emil Engler brought this change] + + GnuTLS: Don't skip really long certificate fields + + Closes #5271 + +- gnutls: bump lowest supported version to 3.1.10 + + GnuTLS 3.1.10 added new functions we want to use. That version was + released on Mar 22, 2013. Removing support for older versions also + greatly simplifies the code. + + Ref: #5271 + Closes #5276 + +- mqtt: make NOSTATE get within the debug name array + +- tests: run the RTSP test server on a dynamic port number + + To avoid port collisions. + + Closes #5272 + +- tests: add %NOLISTENPORT and use it + + The purpose with this variable is to provide a port number that is + reasonably likely to not have a listener on the local host so that tests + can try connect failures against it. It uses port 47 - "reserved" + according to IANA. + + Updated six tests to use it instead of the previous different ports. + + Assisted-by: Emil Engler + Closes #5270 + +- mqtt: remove code with no purpose + + Detected by Coverity. CID 1462319. + + "The same code is executed when the condition result is true or false, + because the code in the if-then branch and after the if statement is + identical." + + Closes #5275 + +- mqtt: fix Curl_read() error handling while reading remaining length + + Detected by Coverity. CID 1462320. + + Closes #5274 + +- server/tftpd: fix compiler warning + + Follow-up from 369ce38ac1d + Reported-by: Marc Hörsken + +- http: free memory when Alt-Used header creation fails due to OOM + + Reported-by: James Fuller + Fixes #5268 + Closes #5269 + +Daniel Gustafsson (20 Apr 2020) +- lib: fix typos in comments and errormessages + + This fixes a few randomly spotted typos in recently merged code, most + notably one in a userfacing errormessage the schannel code. + +Daniel Stenberg (20 Apr 2020) +- tests: run the SOCKS test server on a dynamic port number + + Closes #5266 + +- [Johannes Schindelin brought this change] + + multi-ssl: reset the SSL backend on `Curl_global_cleanup()` + + When cURL is compiled with support for multiple SSL backends, it is + possible to configure an SSL backend via `curl_global_sslset()`, but + only *before* `curl_global_init()` was called. + + If another SSL backend should be used after that, a user might be + tempted to call `curl_global_cleanup()` to start over. However, we did + not foresee that use case and forgot to reset the SSL backend in that + cleanup. + + Let's allow that use case. + + Fixes #5255 + Closes #5257 + Reported-by: davidedec on github + Signed-off-by: Johannes Schindelin + +- tests: run the TFTP test server on a dynamic port number + + Picking a dynamic unused port is better than a fixed to avoid the + collision risk. + + Closes #5265 + +- mqtt: improve the state machine + + To handle PUBLISH before SUBACK and more. + + Updated the existing tests and added three new ones. + + Reported-by: Christoph Krey + Bug: https://curl.haxx.se/mail/lib-2020-04/0021.html + Closes #5246 + +- runtests: always put test number in servercmd file + +- RELEASE-NOTES: synced + +- release-notes.pl: fix parsing typo + +James Fuller (20 Apr 2020) +- ensure all references to ports are replaced by vars + +- add more alt-svc test coverage + +Daniel Stenberg (20 Apr 2020) +- test1247: use http server to get the port number set + + Follow-up to 0f5db7b263f + +- runtests: use a unix domain socket path with the pid in the name + + To make it impossible for test cases to access the file name without + using the proper variable for the purpose. + + Closes #5264 + +Daniel Gustafsson (19 Apr 2020) +- [Mipsters on github brought this change] + + src: Remove C99 constructs to ensure C89 compliance + + This fixes the error: 'for' loop initial declaration used outside C99 + mode by declaring the loop increment variable in the beginning of the + block instead of inside the for loop. + + Fixes #5254 + Reviewed-by: Daniel Gustafsson + +Daniel Stenberg (19 Apr 2020) +- runtests: dummy init the ports variables to avoid warnings + + ... and generate something that can help debug test cases. + +- [Patrick Monnerat brought this change] + + mime: properly check Content-Type even if it has parameters + + New test 669 checks this fix is effective. + + Fixes #5256 + Closes #5258 + Reported-by: thanhchungbtc on github + +- tests/FILEFORMAT: converted to markdown and extended + + Closes #5261 + +- test1245: make it work with dynamic FTP server port + +- test1055: make it work with dynamic FTP port + +- test1028: make it run on dynamic FTP server port + +- tests: move pingpong server to dynamic listening port + + FTP, IMAP, POP3, SMTP and their IPv6 versions are now all on dynamic + ports + + Test 842-845 are unfortunately a bit hard to move over to this concept + right now and require "default port" still... + +- test1056: work with dynamic HTTP ipv6 port + +- test1448: work with dynamic HTTP server port + +- tests: introduce preprocessed test cases + + The runtests script now always performs variable replacement on the + entire test source file before the test gets executed, and saves the + updated version in a temporary file (log/test[num]) so that all test + case readers/servers can use that version (if present) and thus enjoy + the powers of test case variable substitution. + + This is necessary to allow complete port number freedom. + + Test 309 is updated to work with a non-fixed port number thanks to this. + +- tests: make 2006-2010 handle different port number lengths + +- tests: run the sws server on "any port" + + Makes the test servers for HTTP and Gopher pop up on a currently unused + port and runtests adapts to that! + + Closes #5247 + +Marc Hoersken (18 Apr 2020) +- sockfilt: tidy variable naming and data structure in select_ws + + This commit does not introduce any logical changes to the code. + + Reviewed-by: Jay Satiro and Marcel Raad + Closes #5238 + +Daniel Stenberg (17 Apr 2020) +- [Anderson Toshiyuki Sasaki brought this change] + + libssh: Use new ECDSA key types to check known hosts + + From libssh 0.9.0, ssh_key_type() returns different key types for ECDSA + keys depending on the curve. + + Signed-off-by: Anderson Toshiyuki Sasaki + Fixes #5252 + Closes #5253 + +Marcel Raad (17 Apr 2020) +- appveyor: add Unicode winbuild jobs + + These are cheap as they don't build tests. + + Closes https://github.com/curl/curl/pull/5063 + +Daniel Stenberg (16 Apr 2020) +- mqttd: s/errno/SOCKERRNO + + To behave proper on Windows + Reported-by: Gisle Vanem + Bug: https://github.com/curl/curl/commit/5e855bbd18f84a02c951be7cac6188276818cdac#r38507132 + Closes #5241 + +- buildconf: use find -execdir instead, remove -print and the ares files + + Follow-up to 1e41bec96a6e + + Suggested-by: Marc Hörsken + +- [Alexander V. Tikhonov brought this change] + + buildconf: avoid using tempfile when removing files + + Closes #5213 + +- copyright: bump the copyright year range + +- scripts/release-notes.pl: accept colon after the Fixes/Closes keywords + +- [JP Mens brought this change] + + docs/MQTT: replace confusing 80 by 75 + + I was a bit surprised by the `80`: first thought: what's HTTP doing + here? ;) + + Closes #5236 + +- [Brad King brought this change] + + cmake: Avoid MSVC C4273 warnings in send/recv checks + + We use `check_c_source_compiles` to check possible send/recv signatures + by reproducing the forward declarations from system headers. On Windows + the `winsock2.h` header adds dll linkage settings to its forward + declaration. If ours does not match the compiler warns: + + warning C4273: 'recv': inconsistent dll linkage + + Add `WINSOCK_API_LINKAGE` to our test signatures when it is defined so + that our linkage is consistent with that from `winsock2.h`. + + Fixes #4764 + Closes #5232 + +Jay Satiro (14 Apr 2020) +- KNOWN_BUGS: Add entry 'Blocking socket operations' + + - Add threaded resolver cleanup and GSSAPI for FTP to the TODO list of + known blocking operations. + + - New known bugs entry 'Blocking socket operations in non-blocking API' + that directs to the TODO's list of known blocking operations. + + Ref: https://github.com/curl/curl/pull/5214#issuecomment-612488021 + + Reported-by: Marc Hoersken + + Closes https://github.com/curl/curl/pull/5216 + +Marc Hoersken (14 Apr 2020) +- test2043: use revoked.badssl.com instead of revoked.grc.com + + The certificate of revoked.grc.com has expired on 2020-04-13. + + Reviewed-by: Jay Satiro + + Closes #5233 + +- sockfilt: fix broken pipe on Windows to be ready in select_ws + + Closes #5228 + +Daniel Stenberg (14 Apr 2020) +- RELEASE-NOTES: synced + +- scripts/release-notes: fix duplicate output header + +- github/workflow: enable MQTT in the macOS debug build + +- azure: add mqtt support to one of the Windows builds + +- travis: add mqtt job on Linux + +- tests: add four MQTT tests 1190 - 1193 + +- tests: add the mqtt test server mqttd + +- tests: support hex encoded data and mqtt server + + The mqtt server is started using a "random" port. + +- [Björn Stenberg brought this change] + + mqtt: add new experimental protocol + + Closes #5173 + +- TODO: Consider convenience options for JSON and XML? + + Closes #5203 + +- tool: do not declare functions with Curl_ prefix + + To avoid collision risks with private libcurl symbols when linked with + static versions (or just versions not hiding internal symbols). + + Reported-by: hydra3333 on github + Fixes #5219 + Closes #5234 + +- [Nathaniel R. Lewis brought this change] + + cmake: add aliases so exported target names are available in tree + + Reviewed-by: Brad King + Closes #5206 + +- version: increase buffer space for ssl version output + + To avoid it getting truncated, especially when several SSL backends are + built-in. + + Reported-by: Gisle Vanem + Fixes #5222 + Closes #5226 + +Marc Hoersken (13 Apr 2020) +- cirrus: no longer ignore test 504 which is working again + + The test is working again, because TCP blackholing is disabled. + +- appveyor: completely disable tests that fail to timeout early + + The tests changed from ignored to disabled are tests that are + about connecting to non-listening socket. On AppVeyor these + tests are not reliable, because for some unknown reason the + connect is not timing out before the test time limit is reached. + +Daniel Stenberg (13 Apr 2020) +- test1908: avoid using fixed port number in test data + + Closes #5225 + +Jay Satiro (12 Apr 2020) +- [Andrew Kurushin brought this change] + + schannel: Fix blocking timeout logic + + - Fix schannel_send for the case when no timeout was set. + + Prior to this change schannel would error if the socket was not ready + to send data and no timeout was set. + + This commit is similar to parent commit 89dc6e0 which recently made the + same change for SOCKS, for the same reason. Basically it was not well + understood that when Curl_timeleft returns 0 it is not a timeout of 0 ms + but actually means no timeout. + + Fixes https://github.com/curl/curl/issues/5177 + Closes https://github.com/curl/curl/pull/5221 + +- socks: Fix blocking timeout logic + + - Document in Curl_timeleft's comment block that returning 0 signals no + timeout (ie there's infinite time left). + + - Fix SOCKS' Curl_blockread_all for the case when no timeout was set. + + Prior to this change if the timeout had a value of 0 and that was passed + to SOCKET_READABLE it would return right away instead of blocking. That + was likely because it was not well understood that when Curl_timeleft + returns 0 it is not a timeout of 0 ms but actually means no timeout. + + Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360 + + Closes https://github.com/curl/curl/pull/5220 + +- [Marc Hoersken brought this change] + + gopher: check remaining time left during write busy loop + + Prior to this change gopher's blocking code would block forever, + ignoring any set timeout value. + + Assisted-by: Jay Satiro + Reviewed-by: Daniel Stenberg + + Similar to #5220 and #5221 + Closes #5214 + +Daniel Stenberg (13 Apr 2020) +- [Dirkjan Bussink brought this change] + + gnutls: ensure TLS 1.3 when SRP isn't requested + + When SRP is requested in the priority string, GnuTLS will disable + support for TLS 1.3. Before this change, curl would always add +SRP to + the priority list, effectively always disabling TLS 1.3 support. + + With this change, +SRP is only added to the priority list when SRP + authentication is also requested. This also allows updating the error + handling here to not have to retry without SRP. This is because SRP is + only added when requested and in that case a retry is not needed. + + Closes #5223 + +Marc Hoersken (12 Apr 2020) +- tests/server: add hidden window to gracefully handle WM_CLOSE + + Forward Window events as signals to existing signal event handler. + +- tests/server: add CTRL event handler for Win32 consoles + + Forward CTRL events as signals to existing signal event handler. + +- tests/server: move all signal handling routines to util.[ch] + + Avoid code duplication to prepare for portability enhancements. + +Daniel Stenberg (12 Apr 2020) +- compressed.d: stress that the headers are not modified + + Suggested-by: Michael Osipov + Assisted-by: Jay Satiro + Bug: https://github.com/curl/curl/issues/5182#issuecomment-611638008 + Closes #5217 + +Marc Hoersken (11 Apr 2020) +- tests/server/util.c: use curl_off_t instead of long for pid + + Avoid potential overflow of huge PIDs on Windows. + + Related to #5188 + Assisted-by: Marcel Raad + +- tests: use Cygwin/msys PIDs for stunnel and sshd on Windows + + Since the Windows versions of both programs would write Windows + PIDs to their pidfiles which we cannot handle, we need to use + our known perl.exe Cygwin/msys PID together with exec() in order + to tie the spawned processes to the existance of our perl.exe + + The perl.exe that is executing secureserver.pl and sshserver.pl + has a Cygwin/msys PID, because it is started inside Cygwin/msys. + + Related to #5188 + +- tests: add Windows compatible pidwait like pidkill and pidterm + + Related to #5188 + +- tests: fix conflict between Cygwin/msys and Windows PIDs + + Add 65536 to Windows PIDs to allow Windows specific treatment + by having disjunct ranges for Cygwin/msys and Windows PIDs. + + See also: + - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵ + h=b5e1003722cb14235c4f166be72c09acdffc62ea + - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵ + h=448cf5aa4b429d5a9cebf92a0da4ab4b5b6d23fe + + Replaces #5178 + Closes #5188 + +Daniel Stenberg (11 Apr 2020) +- RELEASE-NOTES: synced + +- release-notes.pl: detect the start of the references in cleanup mode + +- Revert "file: on Windows, refuse paths that start with \\" + + This reverts commit 1b71bc532bde8621fd3260843f8197182a467ff2. + + Reminded-by: Chris Roberts + Bug: https://curl.haxx.se/mail/archive-2020-04/0013.html + + Closes #5215 + +Jay Satiro (11 Apr 2020) +- lib: fix conversion warnings for SOCKET_WRITABLE/READABLE + + - If loss of data may occur converting a timediff_t to time_t and + the time value is > TIME_T_MAX then treat it as TIME_T_MAX. + + This is a follow-up to 8843678 which removed the (time_t) typecast + from the macros so that conversion warnings could be identified. + + Closes https://github.com/curl/curl/pull/5199 + +- test1148: tolerate progress updates better (again) + + - Ignore intermediate progress updates. + + - Support locales that use a character other than period as decimal + separator (eg 100,0%). + + test1148 checks that the progress finishes at 100% and has the right + bar width. Prior to this change the test assumed that the only progress + reported for such a quick transfer was 100%, however in rare instances + (like in the CI where transfer time can slow considerably) there may be + intermediate updates. For example, below is stderrlog1148 from a failed + CI run with explicit \r and \n added (it is one line; broken up so that + it's easier to understand). + + \r + \r################################## 48.3% + \r######################################################################## 100.0% + \n + + Closes https://github.com/curl/curl/pull/5194 + +Marc Hoersken (10 Apr 2020) +- sshserver.pl: use cached Win32 environment check variable + +- appveyor: partially revert 3413a110 to keep build without proxy + + Ref: #5211 and #4526 + Reported-by: Marcel Raad + +- appveyor: ignore failing 'connect to non-listening proxy' tests + + Closes #5211 + +- CI/macos: convert CRLF to LF and align indentation + +Daniel Stenberg (9 Apr 2020) +- url: allow non-HTTPS altsvc-matching for debug builds + + This is already partly supported but this part was missing. + Reported-by: James Fuller + + Closes #5205 + +- server/resolve: remove AI_CANONNAME to make macos tell the truth + + With this bit set, my mac successfully resolves "ip6-localhost" when in + fact there is no such host known to my machine! That in turn made test + 241 wrongly execute and fail. + + Closes #5202 + +- runtests: fix warning about using an undefined variable + + Follow-up from 4d939ef6ceb2db1 + +- release-notes: fix the initial reference list output + +- github actions: run when pushed to master or */ci + PRs + + Avoid double-builds when using "local" branches for PRs. For both macos + and fuzz jobs. + + Closes #5201 + +- runtests: provide nicer errormsg when protocol "dump" file is empty + +- [Gilles Vollant brought this change] + + schannel: support .P12 or .PFX client certificates + + Used with curl command line option like this: --cert + : --cert-type p12 + + Closes #5193 + +- tests: verify split initial HTTP requests with CURL_SMALLREQSEND + + test1294: "split request" being when the entire request isn't sent in + the first go, and the remainder is sent in the PERFORM state. A GET + request is otherwise not sending anything during PERFORM. + + test1295: same kind of split but with POST + + Closes #5197 + +- http: don't consider upload done if the request isn't completely sent off + + Fixes #4919 + Closes #5197 + +- http: allow Curl_add_buffer_send() to do a short first send by force + + In a debug build, settting the environment variable "CURL_SMALLREQSEND" + will make the first HTTP request send not send more bytes than the set + amount, thus ending up verifying that the logic for handling a split + HTTP request send works correctly. + +- connect: store connection info for QUIC connections + + Restores the --head functionality to the curl utility which extracts + 'protocol' that is stored that way. + + Reported-by: James Fuller + Fixes #5196 + Closes #5198 + +- tests/README: update the port numbers list + + Since the pipelining server is long gone. + Reported-by: James Fuller + +- select: remove typecast from SOCKET_WRITABLE/READABLE macros + + So that they don't hide conversions-by-mistake + + Reviewed-by: Jay Satiro + Closes #5190 + +- CURLOPT_WRITEFUNCTION.3: add inline example and new see-also + + Closes #5192 + +- release-notes: output trailing references sorted numerically + +- cleanup: correct copyright year range on a few files + +- configure: remove use of -vec-report0 from CFLAGS with icc + + ... as it apparently isn't (always) supported. + Reported-by: Alain Miniussi + Fixes #5096 + Closes #5191 + +- warnless: remove code block for icc that didn't work + + Reported-by: Alain Miniussi + Fixes #5096 + +Marc Hoersken (6 Apr 2020) +- dist: add missing setup-win32.h + + Follow up to d820224b8b + +Daniel Stenberg (6 Apr 2020) +- RELEASE-NOTES: synced + +- scripts/release-notes.pl: add helper script for RELEASE-NOTES maintenance + + This script helps putting entries in the RELEASE-NOTES using a coherent + style and sorting with a minimal human editing effort - as long as the + first line in the commit message is good enough! There's a short howto + at the top of the file. + +- [Dennis Felsing brought this change] + + configure: don't check for Security.framework when cross-compiling + + Since it checks for the local file, not the cross-compiled one. + + Closes #5189 + +- TODO: Option to make -Z merge lined based outputs on stdout + + Closes #5175 + +- lib: never define CURL_CA_BUNDLE with a getenv + + - it breaks the build (since 6de756c9b1de34b7a1) + - it's not documented and not consistent across platforms + - the curl tool does that getenv magic + + Bug: https://github.com/curl/curl/commit/6de756c#r38127030 + Reported-by: Gisle Vanem + + Closes #5187 + +Marc Hoersken (5 Apr 2020) +- lib670: use the same Win32 API check as all other lib tests + +- appveyor: use random test server ports based upon APPVEYOR_API_URL + + Avoid conflicts of test server ports with AppVeyor API on localhost. + + Closes #5034 + +- appveyor: sort builds by type and add two new variants + + Related to #5034 and #5063 + +- appveyor: show failed tests in log even if test is ignored + + And print API response with newline only if there is one + +- appveyor: turn disabled tests into ignored result tests + +Daniel Stenberg (5 Apr 2020) +- KNOWN_BUGS: fixed "USE_UNIX_SOCKETS on Windows" + + Fixed with #5170 (commit 23a870f2fd041278) + +- test1566: verify --etag-compare that gets a 304 back + + Verifies the fix in #5183 + + Closes #5186 + +- [Kwon-Young Choi brought this change] + + CURLINFO_CONDITION_UNMET: return true for 304 http status code + + In libcurl, CURLINFO_CONDITION_UNMET is used to avoid writing to the + output file if the server did not transfered a file based on time + condition. In the same manner, getting a 304 HTTP response back from the + server, for example after passing a custom If-Match-* header, also + fulfill this condition. + + Fixes #5181 + Closes #5183 + +- [Kwon-Young Choi brought this change] + + curl: allow both --etag-compare and --etag-save with same file name + + This change inverse the order of processing for the --etag-compare and + --etag-save option to process first --etag-compare. This in turn allows + to use the same file name to compare and save an etag. + + The original behavior of not failing if the etag file does not exists is + conserved. + + Fixes #5179 + Closes #5180 + +Viktor Szakats (4 Apr 2020) +- windows: enable UnixSockets with all build toolchains + + Extend existing unix socket support in Windows builds to be + enabled for all toolchain vendors or versions. (Previously + it was only supported with certain MSVC versions + more recent + Windows 10 SDKs) + + Ref: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ + Ref: https://github.com/curl/curl/issues/5162 + Closes: https://github.com/curl/curl/pull/5170 + +Daniel Stenberg (4 Apr 2020) +- KNOWN_BUGS: Store TLS context per transfer instead of per connection + + Closes #5102 + +Marc Hoersken (3 Apr 2020) +- sockfilt: remove redundancy in timeout handling + + And update other logmsg output in select_ws on Windows. + +- sockfilt: fix handling of ready closed sockets on Windows + + Replace the incomplete workaround regarding FD_CLOSE + only signalling once by instead doing a pre-check with + standard select and storing the result for later use. + + select keeps triggering on closed sockets on Windows while + WSAEventSelect fires only once with data still available. + By doing the pre-check we do not run in a deadlock + due to waiting forever for another FD_CLOSE event. + +- sockfilt: fix race-condition of waiting threads and event handling + + Fix race-condition of waiting threads finishing while events are + already being processed which lead to invalid or skipped events. + + Use mutex to check for one event at a time or do post-processing. + In addition to mutex-based locking use specific event as signal. + + Closes #5156 + +Daniel Stenberg (2 Apr 2020) +- [Leo Neat brought this change] + + CI-fuzz: increase fuzz time to 40 minutes + + Closes #5174 + +Marc Hoersken (2 Apr 2020) +- CI: increase Azure Pipelines timeouts due to performance issues + + The current demand on Azure negatively impacts the CI performance. + +- runtests.pl: log host OS as detected by Perl environment + +- ftpserver.pl: log before and after data connection is closed + +Daniel Stenberg (1 Apr 2020) +- RELEASE-NOTES: synced + +- RELEASE-PROCEDURE.md: run the copyright.pl script! + +- vquic/ngtcp2.h: update copyright year range + + Follow-up to 0736ee73d346a52 + +- [Daiki Ueno brought this change] + + CI: add build with ngtcp2 + gnutls on Travis CI + +- [Daiki Ueno brought this change] + + vquic: add support for GnuTLS backend of ngtcp2 + + Currently, the TLS backend used by vquic/ngtcp2.c is selected at compile + time. Therefore OpenSSL support needs to be explicitly disabled. + + Signed-off-by: Daiki Ueno + Closes #5148 + +- [Gisle Vanem brought this change] + + examples/sessioninfo.c: add include to fix compiler warning + + Fixes #5171 + +- misc: copyright year updates + + Follow-up to 7a71965e9 + +- [Harry Sintonen brought this change] + + build: fixed build for systems with select() in unistd.h + + Closes #5169 + +- memdebug: don't log free(NULL) + + ... it serves no purpose and fills up the log. + +- cleanup: insert newline after if() conditions + + Our code style mandates we put the conditional block on a separate + line. These mistakes are now detected by the updated checksrc. + +- checksrc: warn on obvious conditional blocks on the same line as if() + + Closes #5164 + +- [Roger Orr brought this change] + + cmake: add CMAKE_MSVC_RUNTIME_LIBRARY + + Fixes #5165 + Closes #5167 + +- [Daiki Ueno brought this change] + + ngtcp2: update to git master for the key installation API change + + This updates the ngtcp2 OpenSSL backend to follow the API change in + commit 32e703164 of ngtcp2. + + Notable changes are: + - ngtcp2_crypto_derive_and_install_{rx,tx}_key have been added to replace + ngtcp2_crypto_derive_and_install_key + - the 'side' argument of ngtcp2_crypto_derive_and_install_initial_key + has been removed + + Fixes #5166 + Closes #5168 + +- [Cyrus brought this change] + + SECURITY.md: minor rephrase + + Closes #5158 + +- output.d: quote the URL when globbing + + Some shells do globbing of their own unless the URL is quoted, so maybe + encourage this. + + Co-authored-by: Jay Satiro + Closes #5160 + +- dist: add tests/version-scan.pl to tarball + + ... used in test 1177. + + Follow-up to a97d826f6de3 + +- test1177: verify that all the CURL_VERSION_ bits are documented + +- curl.h: remnove CURL_VERSION_ESNI. Never supported nor documented + + Considered experimental and therefore we can do this. + + Closes #5157 + +- KNOWN_BUGS: DoH doesn't inherit all transfer options + + Closes #4578 + Closes #4579 + +- KNOWN_BUGS: DoH leaks memory after followlocation + + Closes #4592 + +- KNOWN_BUGS: "FTPS needs session reuse" + + Closes #4654 + +- KNOWN_BUGS: "stick to same family over SOCKS pro" is presumed fixed + +- TODO: Set custom client ip when using haproxy protocol + + Closes #5125 + +Michael Kaufmann (27 Mar 2020) +- writeout_json: Fix data type issues + + Load long values correctly (e.g. for http_code). + + Use curl_off_t (not long) for: + - size_download (CURLINFO_SIZE_DOWNLOAD_T) + - size_upload (CURLINFO_SIZE_UPLOAD_T) + + The unit for these values is bytes/second, not microseconds: + - speed_download (CURLINFO_SPEED_DOWNLOAD_T) + - speed_upload (CURLINFO_SPEED_UPLOAD_T) + + Fixes #5131 + Closes #5152 + +Daniel Stenberg (27 Mar 2020) +- mailmap: fixup a few author names/fields + + Douglas Steinwand, Gökhan Şengün, Jessa Chandler, Julian Z and + Svyatoslav Mishyn + +- version: add 'cainfo' and 'capath' to version info struct + + Suggested-by: Timothe Litt + URL: https://curl.haxx.se/mail/lib-2020-03/0090.html + Reviewed-by: Jay Satiro + + Closes #5150 + +- RELEASE-NOTES: synced + +Jay Satiro (26 Mar 2020) +- SSLCERTS.md: Fix example code for setting CA cert file + + Prior to this change the documentation erroneously said use + CURLOPT_CAPATH to set a CA cert file. + + Bug: https://curl.haxx.se/mail/lib-2020-03/0121.html + Reported-by: Timothe Litt + + Closes https://github.com/curl/curl/pull/5151 + +Marc Hoersken (26 Mar 2020) +- sockfilt: add logmsg output to select_ws_wait_thread on Windows + + Assisted-by: Jay Satiro + Reviewed-by: Daniel Stenberg + + Closes #5086 + +Daniel Stenberg (26 Mar 2020) +- docs/make: generate curl.1 from listed files only + + Previously it rendered the page from files matching "*.d" in the correct + directory, which worked fine in git builds when the files were added but + made it easy to forget adding the files to the dist. + + Now, only man page sections listed in DPAGES in Makefile.inc will be + used, thus "forcing" us to update this to get the man page right and get + it included in the dist at the same time. + + Ref: #5146 + Closes #5149 + +- openssl: adapt to functions marked as deprecated since version 3 + + OpenSSL 3 deprecates SSL_CTX_load_verify_locations and the MD4, DES + functions we use. + + Fix the MD4 and SSL_CTX_load_verify_locations warnings. + + In configure, detect OpenSSL v3 and if so, inhibit the deprecation + warnings. OpenSSL v3 deprecates the DES functions we use for NTLM and + until we rewrite the code to use non-deprecated functions we better + ignore these warnings as they don't help us. + + Closes #5139 + +- dist: add mail-rcpt-allowfails.d to the tarball + + Reported-by: Maksim Stsepanenka + Reviewed-by: Jat Satiro + + Closes #5146 + +- travis: update the ngtcp2 build to use the latest OpenSSL patch + + ... which also makes it OpenSSL 1.1.1d based and not v3. + +Marc Hoersken (24 Mar 2020) +- CI: remove default Ubuntu build from GitHub Actions + + We are already running a very similar Ubuntu build on Travis CI. + The macOS variant of this default build is kept on Github Actions. + +- CI: bring GitHub Actions fuzzing job in line with macOS jobs + + Update YAML formatting, job naming and triggers. + +- CI: migrate macOS jobs from Azure and Travis CI to GitHub Actions + + Reduce workload on Azure Pipelines and Travis CI while + consolidating macOS jobs onto less utilized GitHub Actions. + + Reviewed-by: Daniel Stenberg + + Closes #5124 + +Daniel Stenberg (24 Mar 2020) +- config: remove all defines of HAVE_DES_H + + As there's no code using it. + + Closes #5144 + +- copyright: fix out-of-date copyright ranges and missing headers + + Reported by the new script 'scripts/copyright.pl'. The script has a + regex whitelist for the files that don't need copyright headers. + + Removed three (mostly usesless) README files from docs/ + + Closes #5141 + +- packages: add OS400/chkstrings.c to the dist + + Reported-by: Jon Rumsey + Fixes #5142 + Closes #5143 + +- [Clément Notin brought this change] + + nghttp2: 1.12.0 required + + since nghttp2_session_set_local_window_size is needed + + Closes #5140 + +- RELEASE-NOTES: synced + +- [Calvin Buckley brought this change] + + OS400: Update strings for ccsid-ifier + + Fixes build. + + Closes #5132 + +- cirrus: make freebsd ignore the tests instead of skipping + + To allow us to see in the CI logs how they actually behave + + Closes #5091 + +- cirrus: move the sanitizer build from freebsd 13 to freebsd 12 + +- Revert "cirrus-ci: disable the FreeBSD 13 builds" + + This reverts commit 691b71be930f0e285c8f7a76efd56bbe0576cda6. + +- getinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE override + + To let debug-builds return fake values, like in test 970. + + Ref: #5131 + Closes #5136 + +- test970: improve the test + + - send more data to make problems more obvious + - don't start the data with minus, it makes diffs harder to read + - skip the headers in the stdout comparison + - save to a file name to also verify 'filename_effective' + + Ref: #5131 + +- CURLINFO_NUM_CONNECTS: improve accuracy + + The counter was not bumped in all cases correctly. + + Reported-by: Marcel Raad + Ref: #5131 + Closes #5135 + +- TODO: Use "random" ports for the test servers + +- lib/curl_setup: adjust the copyright year range + + Follow-up from d820224b8 + +Jay Satiro (21 Mar 2020) +- curl_setup: define _WIN32_WINNT_[OS] symbols + + .. because not all Windows build systems have those symbols, and even + those that do may be missing newer symbols (eg the Windows 7 SDK does + not define _WIN32_WINNT_WIN10). + + Those symbols are used in build-time logic to decide which API to use + and prior to this change if the symbols were missing it would have + resulted in deprecated API being used when more recent functions were + available (eg GetVersionEx used instead of VerifyVersionInfo). + + Reported-by: FuccDucc@users.noreply.github.com + + Probably fixes https://github.com/curl/curl/issues/4995 + Closes https://github.com/curl/curl/pull/5057 + +- [Ross Burton brought this change] + + curl-functions.m4: remove inappropriate AC_REQUIRE + + AC_REQUIRE means "if this macro hasn't been executed already, execute + it". So in a wrapper around AC_RUN_IFELSE, AC_REQUIRE(AC_RUN_IFELSE) + isn't correct at that will execute AC_RUN_IFELSE without any arguments. + + With autoconf 2.69 this is basically a no-op, but with autoconf 2.70, + AC_RUN_IFELSE without a default value when cross-compiling is fatal. + The result is that curl with autoconf 2.70 cannot cross-compile. + + Fixes https://github.com/curl/curl/issues/5126 + Closes https://github.com/curl/curl/pull/5130 + +Marc Hoersken (20 Mar 2020) +- ci/tests: fix Azure Pipelines not running Windows containers + + Workaround posted here: microsoft/azure-pipelines-agent#2864 + + Assisted-by: Simon Chalifoux + Assisted-by: Tommy Petty + + Fixes #5117 + Closes #5129 + +Daniel Stenberg (20 Mar 2020) +- tests: add test 430, 431 and 432 to verify the --config fix + + Verify the fixes in 4e0b4fee4 + +- [Rici Lake brought this change] + + cmdline: fix handling of OperationConfig linked list (--next) + + Ensures that -K/--config inserts new items at the end of the list + instead of overwriting the second item, and that after a -K/--config + option has been parsed, the option parser's view of the current config + is update. + + Fixes #5120 + Closes #5123 + +Marc Hoersken (20 Mar 2020) +- test2100: fix static port instead of dynamic value being used + +- test970: fix static ip:port instead of dynamic values being used + +Daniel Stenberg (19 Mar 2020) +- secure transport: remove the BACKEND define kludge + + Closes #5122 + +- mbedtls: remove the BACKEND define kludge + +- bearssl: remove the BACKEND define kludge + +- wolfssl: remove the BACKEND define kludge + +- nss: remove the BACKEND define kludge + +- gnutls: remove the BACKEND define kludge + +- openssl: remove the BACKEND define kludge + + Use a proper variable instead to make it easier to use a debugger and + read the code. + +Marc Hoersken (19 Mar 2020) +- tests: make Python-based servers compatible with Python 2 and 3 + + Update smbserver.py and negtelnetserver.py to be compatible with + Python 3 while staying backwards-compatible to support Python 2. + + Fix string encoding and handling of echoed and transferred data. + + Tested with both Python 2.7.17 and Python 3.7.7 + + Reported-by: Daniel Stenberg + Assisted-by: Kamil Dudka + Reviewed-by: Marcel Raad + + Fixes #5104 + Closes #5110 + +Daniel Stenberg (18 Mar 2020) +- writeout_json: use curl_off_t printf() option for the time output + + Follow-up to: 04c03416e68fd635a15 + + Closes #5115 + +- RELEASE-NOTES: synced + + Uh, I missed this in 1a46b218db + +- RELEASE-NOTES: synced + + ... and bumped curlver.h to 7.70.0 + +Jay Satiro (18 Mar 2020) +- http2: Fix erroneous debug message that h2 connection closed + + Prior to this change in libcurl debug builds http2 stream closure was + erroneously referred to as connection closure. + + Before: + * nread <= 0, server closed connection, bailing + + After: + * nread == 0, stream closed, bailing + + Closes https://github.com/curl/curl/pull/5118 + +Daniel Stenberg (18 Mar 2020) +- tool_setopt: correct the copyright year range + + Follow-up to 5450428491 + +Jay Satiro (18 Mar 2020) +- [Johannes Schindelin brought this change] + + schannel: add "best effort" revocation check option + + - Implement new option CURLSSLOPT_REVOKE_BEST_EFFORT and + --ssl-revoke-best-effort to allow a "best effort" revocation check. + + A best effort revocation check ignores errors that the revocation check + was unable to take place. The reasoning is described in detail below and + discussed further in the PR. + + --- + + When running e.g. with Fiddler, the schannel backend fails with an + unhelpful error message: + + Unknown error (0x80092012) - The revocation function was unable + to check revocation for the certificate. + + Sadly, many enterprise users who are stuck behind MITM proxies suffer + the very same problem. + + This has been discussed in plenty of issues: + https://github.com/curl/curl/issues/3727, + https://github.com/curl/curl/issues/264, for example. + + In the latter, a Microsoft Edge developer even made the case that the + common behavior is to ignore issues when a certificate has no recorded + distribution point for revocation lists, or when the server is offline. + This is also known as "best effort" strategy and addresses the Fiddler + issue. + + Unfortunately, this strategy was not chosen as the default for schannel + (and is therefore a backend-specific behavior: OpenSSL seems to happily + ignore the offline servers and missing distribution points). + + To maintain backward-compatibility, we therefore add a new flag + (`CURLSSLOPT_REVOKE_BEST_EFFORT`) and a new option + (`--ssl-revoke-best-effort`) to select the new behavior. + + Due to the many related issues Git for Windows and GitHub Desktop, the + plan is to make this behavior the default in these software packages. + + The test 2070 was added to verify this behavior, adapted from 310. + + Based-on-work-by: georgeok + Co-authored-by: Markus Olsson + Signed-off-by: Johannes Schindelin + + Closes https://github.com/curl/curl/pull/4981 + +- multi: Improve parameter check for curl_multi_remove_handle + + - If an easy handle is owned by a multi different from the one specified + then return CURLM_BAD_EASY_HANDLE. + + Prior to this change I assume user error could cause corruption. + + Closes https://github.com/curl/curl/pull/5116 + +Viktor Szakats (17 Mar 2020) +- windows: suppress UI in all CryptAcquireContext() calls + + Ref: https://docs.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontexta#parameters + Reviewed-by: Marc Hörsken + Closes https://github.com/curl/curl/pull/5088 + +Daniel Stenberg (17 Mar 2020) +- writeout_json: add missing comma to fix the HTTP version + + Follow-up to 04c03416e68fd635a15 + +- test 970: verify --write-out '%{json}' + + Makes curl_easy_getinfo() of "variable" numerical content instead return + the number set in the env variable `CURL_TIME`. + + Makes curl_version() of "variable" textual content. This guarantees a + stable version string which can be tested against. Environment variable + `CURL_VERSION` defines the content. + + Assisted-by: Mathias Gumz + +- [Mathias Gumz brought this change] + + writeout: support to generate JSON output + + This commit adds support to generate JSON via the writeout feature: + + -w "%{json}" + + It leverages the existing infrastructure as much as possible. Thus, + generating the JSON on STDERR is possible by: + + -w "%{stderr}%{json}" + + This implements a variant of + https://github.com/curl/curl/wiki/JSON#--write-out-json. + + Closes #4870 + +- CI: stop ignoring 323, it is disabled + +- DISABLED: disable test 323 + + The test uses SRP to "a server not supporting it" but modern stunnel + versions will silently accept it and remain happy. The test is therefore + faulty. + + I haven't figured out how to make stunnel explicitly reject SRP-using + connects. + + Reported-by: Marc Hörsken + Fixes #5105 + Closes #5113 + +Marc Hoersken (17 Mar 2020) +- ci/tests: increase timeouts for torture builds on Azure Pipelines + + For some reason the torture builds have slowed down recently. + + Reported-by: Daniel Stenberg + +Daniel Stenberg (16 Mar 2020) +- cmake: add support for building with wolfSSL + + My working build cmdline: + + $ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON . + + Assisted-by: Brad King + Closes #5095 + +- tool_operate: fix add_parallel_transfers when more are in queue + + Trying to return early from the function if no new transfers were added + would break the "morep" argument and cause issues. This could lead to + zero content "transfers" (within quotes since they would never be + started) when parallel-max was reduced. + + Reported-by: Gavin Wong + Analyzed-by: Jay Satiro + Fixes #4937 + Closes #5112 + +- vtls: free ssl_config leftovers on out-of-memory + + Torture testing 2034 and 2037 found this. + + Reported-by: Marc Hörsken + Fixes #5108 + Closes #5109 + +Marc Hoersken (16 Mar 2020) +- ci/tests: fix Azure Pipelines not running for pull requests + + Closes #5111 + +Daniel Stenberg (15 Mar 2020) +- gskit: update the copyright year range + + Follow-up from 083603c63a3 + +Marc Hoersken (15 Mar 2020) +- gskit: use our internal select wrapper for portability + + Follow up to c52b342 + Closes #5106 + +- tests: fix verification of stdout in test 1452 due to newline + + Fixes test1452:41:1: error: missing tag before + +- ci/tests: install impacket for SMB tests on FreeBSD using CirrusCI + + Also force the package index/cache to be updated before installing. + + Closes #5103 + +- tests/README: add note about manually installing python-impacket + + Follow up to 4be2560 + +Daniel Stenberg (15 Mar 2020) +- transfer: cap retries of "dead connections" to 5 + + When libcurl retries a connection due to it being "seemingly dead" or by + REFUSED_STREAM, it will now only do it up five times before giving up, + to avoid never-ending loops. + + Reported-by: Dima Tisnek + Bug: https://curl.haxx.se/mail/lib-2020-03/0044.html + Closes #5074 + +- TODO: TLS-PSK with OpenSSL + + Closes #5081 + +Marc Hoersken (15 Mar 2020) +- select: add 'timeout_ms' wrap-around precaution to Curl_select + +- select: fix 'pending_ms' is assigned a value that is never used + + Detected by Codacy + +- select: move duplicate select preparation code into Curl_select + + Reviewed by Daniel Stenberg + Reviewed by Marcel Raad + Closes #5078 + +Daniel Stenberg (15 Mar 2020) +- connect: happy eyeballs cleanup + + Make sure each separate index in connn->tempaddr[] is used for a fixed + family (and only that family) during the connection process. + + If family one takes a long time and family two fails immediately, the + previous logic could misbehave and retry the same family two address + repeatedly. + + Reported-by: Paul Vixie + Reported-by: Jay Satiro + Fixes #5083 + Fixes #4954 + Closes #5089 + +Marc Hoersken (15 Mar 2020) +- ci/tests: fix and align setting TFLAGS for make test-nonflaky + +- ci/tests: install test suite dependencies stunnel and impacket + +- tests: remove python_dependencies for smbserver from our tree + + Users of the SMB tests will have to install impacket manually. + + Reasoning: our in-tree version of impacket was quite outdated + and only compatible with Python 2 which is already end-of-life. + Upgrading to Python 3 and a compatible impacket version would + require to import additional Python-only and CPython-extension + dependencies. This would have hindered portability enormously. + + Closes #5094 + +Jay Satiro (14 Mar 2020) +- Makefile.m32: Improve windres parameter compatibility + + - s/COFF/coff/ + + Some versions of windres do not recognize uppercase COFF as a valid + way to specify the COFF output format. + + Reported-by: Steven Penny + + Fixes https://github.com/curl/curl/issues/5099 + Closes https://github.com/curl/curl/pull/5101 + +- easy: Fix curl_easy_duphandle for builds missing IPv6 that use c-ares + + - Ignore CURLE_NOT_BUILT_IN errors returned by c-ares functions in + curl_easy_duphandle. + + Prior to this change if c-ares was used as the resolver backend and + either it was too old or libcurl was built without IPv6 support then + some of our resolver functions could return CURLE_NOT_BUILT_IN to + curl_easy_duphandle causing it to fail. + + Caused by c8f086b which shipped in 7.69.1. + + Reported-by: Karl Chen + + Fixes https://github.com/curl/curl/issues/5097 + Closes https://github.com/curl/curl/pull/5100 + +Daniel Stenberg (13 Mar 2020) +- docs: add warnings about FILE: URLs on Windows + + - --url man page section + - libcurl-security.3 gets the full text + - CURLOPT_URL.3 + + Reported-by: Tim Sedlmeyer + +- server/getpart: make the "XML-parser" stricter + + When extracting a
and there's no before +
, this now outputs an error and returns a wrong string to + make users spot the mistake. + + Ref: #5070 + Closes #5071 + +Marc Hoersken (13 Mar 2020) +- impacket: some more Python 3 code compatibility updates + + This makes smbserver load on Python 3, but still not work completely. + +- smbserver: pin Python version to 2 since we are not yet 3 compatible + + Even though the existing code can be fixed to run on Python 3, the + tests will fail due to the Unicode transition the protocol is invalid. + + Follow up to ee63837 + Closes #5085 + +Daniel Stenberg (12 Mar 2020) +- [Viktor Szakats brought this change] + + cleanup: fix some text/comment typos + + Closes #5087 + +Marc Hoersken (12 Mar 2020) +- smbserver: fix Python version specific ConfigParser import + + Follow up to ee63837 and 8c7c4a6 + Fixes #5077 + +Daniel Stenberg (11 Mar 2020) +- RELEASE-NOTES: synced + + bumped to 7.69.2 + +Dan Fandrich (11 Mar 2020) +- tests/data: Fix some XML formatting issues in test cases + + This allows these test files to pass xmllint. + +Daniel Stenberg (11 Mar 2020) +- [Muhammad Herdiansyah brought this change] + + Makefile: run the cd commands in a subshell + + In bmake, if the directory is changed (with cd or anything else), bmake + won't return to the "root directory" on the next command (in the same + Makefile rule). This commit runs the cd command in a subshell so it + would work in bmake. + + Closes #5073 + +- configure: convert -I to -isystem as a last step + + As all the -I uses in CFLAGS at that point are for system headers and + third party libraries this helps us remove/ignore warnings on those! + + Closes #5060 + +- configure: fix -pedantic-errors for GCC 5 and later + + If --enable-werror is used. + + Follow-up to d5c0351055d5709da which added it too early in the configure + script before $compiler_num was set correctly and thus this option was + never used. + + Reported-by: Stepan Efremov + Fixes #5067 + Closes #5068 + +- configure: document 'compiler_num' for gcc + + The CURL_CHECK_COMPILER_GNU_C function sets the number to MAJOR*100 + + MINOR and ignores the patch version, and since gcc version 7 it only + sets it to MAJOR*100. + + Reported-by: Stepan Efremov + Ref: #5067 + Closes #5069 + +Version 7.69.1 (11 Mar 2020) + +Daniel Stenberg (11 Mar 2020) +- RELEASE-NOTES: 7.69.1 + +- THANKS: from the 7.69.1 release + +- [Marc Hoersken brought this change] + + test1129: fix invalid case of closing XML-tag and Content-Length + + Fixes #5070 + Closes #5072 + +Marc Hoersken (10 Mar 2020) +- tests/data: fix static ip instead of dynamic value being used + + Follow up to 94ced8e + +- tests/data: fix static ip:port instead of dynamic values being used + + Closes #5065 + +- tests/server: fix missing use of exe_ext helper function + + Follow up to 9819984 and 3dce984 + Reviewed-By: Daniel Stenberg + Closes #5064 + +- runtests: log minimal and maximal used port numbers + +Daniel Stenberg (9 Mar 2020) +- [James Fuller brought this change] + + sftp: fix segfault regression introduced by #4747 + + This fix adds a defensive check for the case where the char *name in + struct libssh2_knownhost is NULL + + Fixes #5041 + Closes #5062 + +- RELEASE-NOTES: synced + +- socks4: fix host resolve regression + + 1. The socks4 state machine was broken in the host resolving phase + + 2. The code now insists on IPv4-only when using SOCKS4 as the protocol + only supports that. + + Regression from #4907 and 4a4b63d, shipped in 7.69.0 + + Reported-by: amishmm on github + Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594 + Closes #5061 + +- [Patrick Monnerat brought this change] + + silly web server: silent a compilation warning + + Recent gcc warns when byte count of strncpy() equals the destination + buffer size. Since the destination buffer is previously cleared and + the source string is always shorter, reducing the byte count by one + silents the warning without affecting the result. + + Closes #5059 + +- [Patrick Monnerat brought this change] + + cookie: get_top_domain() sets zero length for null domains + + This silents a compilation warning with gcc -O3. + +- [Patrick Monnerat brought this change] + + test 1560: avoid valgrind false positives + + When using maximum code optimization level (-O3), valgrind wrongly + detects uses of uninitialized values in strcmp(). + + Preset buffers with all zeroes to avoid that. + +Steve Holme (8 Mar 2020) +- sha256: Added WinCrypt implementation + + Closed #5030 + +- sha256: Added SecureTransport implementation + +Daniel Stenberg (7 Mar 2020) +- lib1564: reduce number of mid-wait wakeup calls + + This test does A LOT of *wakeup() calls and then calls curl_multi_poll() + twice. The first *poll() is then expected to return early and the second + not - as the first is supposed to drain the socketpair pipe. + + It turns out however that when given "excessive" amounts of writes to + the pipe, some operating systems (the Solaris based are known) will + return EAGAIN before the pipe is drained, which in our test case causes + the second *poll() call to also abort early. + + This change attempts to avoid the OS-specific behaviors in the test by + reducing the amount of wakeup calls from 1234567 to 10. + + Reported-by: Andy Fiddaman + Fixes #5037 + Closes #5058 + +- [Patrick Monnerat brought this change] + + mime: fix the binary encoder to handle large data properly + + New test 666 checks this is effective. + As upload buffer size is significant in this kind of tests, shorten it + in similar test 652. + + Fixes #4860 + Closes #4833 + Reported-by: RuurdBeerstra on github + +- [Patrick Monnerat brought this change] + + mime: do not perform more than one read in a row + + Input buffer filling may delay the data sending if data reads are slow. + To overcome this problem, file and callback data reads do not accumulate + in buffer anymore. All other data (memory data and mime framing) are + considered as fast and still concatenated in buffer. + As this may highly impact performance in terms of data overhead, an early + end of part data check is added to spare a read call. + When encoding a part's data, an encoder may require more bytes than made + available by a single read. In this case, the above rule does not apply + and reads are performed until the encoder is able to deliver some data. + + Tests 643, 644, 645, 650 and 654 have been adapted to the output data + changes, with test data size reduced to avoid the boredom of long lists of + 1-byte chunks in verification data. + New test 667 checks mimepost using single-byte read callback with encoder. + New test 668 checks the end of part data early detection. + + Fixes #4826 + Reported-by: MrdUkk on github + +- [Patrick Monnerat brought this change] + + mime: latch last read callback status. + + In case a read callback returns a status (pause, abort, eof, + error) instead of a byte count, drain the bytes read so far but + remember this status for further processing. + Takes care of not losing data when pausing, and properly resume a + paused mime structure when requested. + New tests 670-673 check unpausing cases, with easy or multi + interface and mime or form api. + + Fixes #4813 + Reported-by: MrdUkk on github + +Marc Hoersken (7 Mar 2020) +- runtests: fix missing use of exe_ext helper function + +Daniel Stenberg (7 Mar 2020) +- [Ernst Sjöstrand brought this change] + + ares: store dns parameters for duphandle + + With c-ares the dns parameters lives in ares_channel. Store them in the + curl handle and set them again in easy_duphandle. + + Regression introduced in #3228 (6765e6d), shipped in curl 7.63.0. + + Fixes #4893 + Closes #5020 + Signed-off-by: Ernst Sjöstrand + +- version: make curl_version* thread-safe without using global context + + Closes #5010 + +- RELEASE-NOTES: synced + +Marc Hoersken (7 Mar 2020) +- tests: use native Sleep function as fallback on Windows + + Reviewed-By: Daniel Stenberg + Closes #5054 + +- perl: align order and completeness of Windows OS checks + +Daniel Stenberg (7 Mar 2020) +- tool_cb_see: set correct copyright year range + + Follow-up to a39e5bfb9 + +Marc Hoersken (7 Mar 2020) +- seek: fix fallback for missing ftruncate on Windows + + This fixes test 198 on versions of MinGW-w64 without ftruncate + + Reviewed-By: Daniel Stenberg + Reviewed-By: Marcel Raad + Closes #5055 + +- config-win32: Windows does not have ftruncate + +Daniel Stenberg (7 Mar 2020) +- pause: force a connection (re-)check after unpausing + + There might be data available that was already read off the socket, for + example in the TLS layer. + + Reported-by: Anders Berg + Fixes #4966 + Closes #5049 + +- socks5: switch state properly when the resolve is done + + Regression from 4a4b63d (and #4907) + Reported-by: vitaha85 on github + Fixes #5053 + Closes #5056 + +Jay Satiro (7 Mar 2020) +- libssh: Fix matching user-specified MD5 hex key + + Prior to this change a match would never be successful because it + was mistakenly coded to compare binary data from libssh to a + user-specified hex string (ie CURLOPT_SSH_HOST_PUBLIC_KEY_MD5). + + Reported-by: fds242@users.noreply.github.com + + Fixes https://github.com/curl/curl/issues/4971 + Closes https://github.com/curl/curl/pull/4974 + +Daniel Stenberg (6 Mar 2020) +- pause: bail out on bad input + + A NULL easy handle or an easy handle without an associated connection + cannot be paused or unpaused. + + Closes #5050 + +Steve Holme (6 Mar 2020) +- unit1612: fixed the inclusion and compilation of the HMAC unit test + + Follow up to 3f74e5e6 to fix: + + - A typo in Makefile.inc where unit1611 was used instead + - Some compilation issues in unit1612.c + + Closes #5024 + +Daniel Stenberg (6 Mar 2020) +- pause: return early for calls that don't change pause state + + Reviewed-by: Patrick Monnerat + Ref: #4833 + Closes #5026 + +Jay Satiro (6 Mar 2020) +- curl_share_setopt.3: Note sharing cookies doesn't enable the engine + + Follow-up to d0a7ee3 which fixed a bug in 7.66.0 that caused + CURL_LOCK_DATA_COOKIE to enable the easy handle's cookie engine. + + Bug: https://curl.haxx.se/mail/lib-2020-03/0019.html + Reported-by: Felipe Gasper + + Closes https://github.com/curl/curl/pull/5048 + +- multi: skip EINTR check on wakeup socket if it was closed + + - Don't check errno on wakeup socket if sread returned 0 since sread + doesn't set errno in that case. + + This is a follow-up to cf7760a from several days ago which fixed + Curl_multi_wait to stop busy looping sread on the non-blocking wakeup + socket if it was closed (ie sread returns 0). Due to a logic error it + was still possible to busy loop in that case if errno == EINTR. + + Closes https://github.com/curl/curl/pull/5047 + +Daniel Stenberg (6 Mar 2020) +- transfer: set correct copyright year range + +- urldata: remove the 'stream_was_rewound' connectdata struct member + + ... as it is never set anywhere. + + Follow-up to 2f44e94ef + Closes #5046 + +- Revert "pause: force-drain the transfer on unpause" + + This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000) + + Clearly that didn't solve the problem correctly. + + Reported-by: Christopher Reid + Reopens #4966 + Fixes #5044 + +- RELEASE-NOTES: synced + + and bumped curlver.h + +- MANUAL: update a dict-using command line + + The 'web1913' database is now invalid, use 'gcide' instead. + +- KNOWN_BUGS: configure --with-gssapi with Heimdal is ignored on macOS + + Closes #3841 + +- polarssl: remove more references and mentions + + Assisted-by: Jay Satiro + Follow-up to 6357a19ff29dac04 + Closes #5036 + +Marc Hoersken (4 Mar 2020) +- tests: wrap ignored test failures in braces + +- tests: align some Windows sleep defines with each other + +- tests: try to make sleeping portable by avoiding select + + select does not support just waiting on Windows: + https://perldoc.perl.org/perlport.html#select + + Reviewed-By: Daniel Stenberg + Closes #5035 + +Daniel Stenberg (4 Mar 2020) +- runtests.1: rephrase how to specify what tests to run + + Also mention the new tilde-prefixed way to ignore test results. + + Reviewed-By: Marc Hoersken + Closes #5033 + +- cirrus-ci: disable the FreeBSD 13 builds + + FreeBSD 13.0 is apparently close to a year away from a stable release + and has proven to cause intermittent builds failures recently. + + Assisted-by: Dan Fandrich + Assisted-by: Fedor Korotkov + Fixes #5028 + Closes #5029 + +Version 7.69.0 (4 Mar 2020) + +Daniel Stenberg (4 Mar 2020) +- RELEASE-NOTES: 7.69.0 + +- THANKS: from 7.69.0 + + Now sorted case insensitive + +Marc Hoersken (3 Mar 2020) +- ci/tests: fix escaping of testnames and disable proxy for CI APIs + + Follow up to ada581f and c0d8b96 + Closes #5031 + +Jay Satiro (3 Mar 2020) +- cmake: Show HTTPS-proxy in the features output + + - Show HTTPS-proxy in the features output for those backends that + support it: OpenSSL, GnuTLS and NSS. + + Prior to this change HTTPS-proxy was missing from the cmake features + output even if curl was built with it. Only cmake output was affected. + Both the library and tool correctly reported the feature. + + Bug: https://curl.haxx.se/mail/lib-2020-03/0008.html + Reported-by: David Lopes + + Closes https://github.com/curl/curl/pull/5025 + +Marc Hoersken (3 Mar 2020) +- ci/tests: Make it possible to still run but ignore failing tests + + This enables the development of a solution for the failing tests by + running them on CI while ignoring their result for the overall status. + + Closes #4994 + +- README.md: add Azure DevOps Pipelines build status badge + +- ci/tests: Move CI test result creation above environment setup + + This avoids using our test servers as proxy to the AppVeyor API. + + Closes #5022 + +- ci/tests: Send test results to AppVeyor for status overview + + Closes #5021 + +Daniel Stenberg (3 Mar 2020) +- Revert "sha256: Added SecureTransport implementation" + + This reverts commit 4feb38deed33fed14ff7c370a6a9153c661dbb9c (from #4956) + + That commit broke test 1610 on macos builds without TLS. + + Closes #5027 + +- dist: include tests/azure.pm in the tarball + + Bug: https://github.com/curl/curl/commit/ada581f2cc32f48c1629b729707ac19208435b27#commitcomment-37601589 + Reported-by: Marcel Raad + +Steve Holme (3 Mar 2020) +- configure.ac: Disable metalink if mbedTLS is specified + + Follow up to cdcc9df1 and #5006. Even though I mentioned mbedTLS as + being one of the backends that metalink needs to be disabled for, I + seem to have included it in the list of allowed SSL/TLS backends in + comnfigure.ac :( + + Closes #5013 + +- sha256: Tidy up following recent changes + + Reviewed-by: Daniel Stenberg + Closes #4956 + +- sha256: Added WinCrypt implementation + +- sha256: Added SecureTransport implementation + +- sha256: Added mbedtls implementation + +- sha256: Added GNU TLS gcrypt implementation + +- sha256: Added GNU TLS Nettle implementation + +Jay Satiro (2 Mar 2020) +- curl_escape.3: Add a link to curl_free + + Ref: https://github.com/curl/curl/pull/5016#issuecomment-593628582 + +- curl_getenv.3: Fix the memory handling description + + - Tell the user to call curl_free() to free the pointer returned by + curl_getenv(). + + Prior to this change the user was directed to call free(), but that + would not work in cases where the library and application use separate C + runtimes and therefore have separate heap memory management. + + Closes https://github.com/curl/curl/pull/5016 + +Daniel Stenberg (2 Mar 2020) +- [Nick Zitzmann brought this change] + + md4: use init/update/final functions in Secure Transport + + We can use CC_MD4_Init/Update/Final without having to allocate memory + directly. + + Closes #4979 + +Marc Hoersken (2 Mar 2020) +- ci/tests: some MacOS builds randomly take longer than 20min + +Daniel Stenberg (2 Mar 2020) +- multi_wait: stop loop when sread() returns zero + + It's unclear why it would ever return zero here, but this change fixes + Robert's problem and it shouldn't loop forever... + + Reported-by: Robert Dunaj + Bug: https://curl.haxx.se/mail/archive-2020-02/0011.html + Closes #5019 + +- http: mark POSTs with no body as "upload done" from the start + + As we have logic that checks if we get a >= 400 reponse code back before + the upload is done, which then got confused since it wasn't "done" but + yet there was no data to send! + + Reported-by: IvanoG on github + Fixes #4996 + Closes #5002 + +- tests: disable 962, 963 and 964 on Windows + + These tests are also doing UTF-8 SMTP. + + Follow-up to df207d2dd93b9e73 + +Marc Hoersken (2 Mar 2020) +- ci/tests: fine-tune Azure Pipeline timeouts with a small puffer + +Daniel Stenberg (2 Mar 2020) +- configure: bump the AC_COPYRIGHT year range + +- [Steve Holme brought this change] + + tests: disable SMTP UTF-8 tests on Windows + + Fixes #4988 + Closes #4992 + +- formdata/mime: copyright year range update + + Due to the merge/revert cycle + +- Revert "mime: latch last read callback status." + + This reverts commit 87869e38d7afdec3ef1bb4965711458b088e254f. + + Fixes #5014 + Closes #5015 + Reopens #4833 + +- Revert "mime: do not perform more than one read in a row" + + This reverts commit ed0f357f7d25566110d4302f33759f4ffb5a6f83. + +- Revert "mime: fix the binary encoder to handle large data properly" + + This reverts commit b2caaa0681f329eed317ffb6ae6927f4a539f0c1. + +- altsvc: both h3 backends now speak h3-27 + + ... also updated the HTTP3 build description for ngtcp2 accordingly. + +- [Patrick Monnerat brought this change] + + mime: fix the binary encoder to handle large data properly + + New test 666 checks this is effective. + As upload buffer size is significant in this kind of tests, shorten it + in similar test 652. + + Fixes #4860 + Reported-by: RuurdBeerstra on github + +- [Patrick Monnerat brought this change] + + mime: do not perform more than one read in a row + + Input buffer filling may delay the data sending if data reads are slow. + To overcome this problem, file and callback data reads do not accumulate + in buffer anymore. All other data (memory data and mime framing) are + considered as fast and still concatenated in buffer. + As this may highly impact performance in terms of data overhead, an early + end of part data check is added to spare a read call. + When encoding a part's data, an encoder may require more bytes than made + available by a single read. In this case, the above rule does not apply + and reads are performed until the encoder is able to deliver some data. + + Tests 643, 644, 645, 650 and 654 have been adapted to the output data + changes, with test data size reduced to avoid the boredom of long lists of + 1-byte chunks in verification data. + New test 664 checks mimepost using single-byte read callback with encoder. + New test 665 checks the end of part data early detection. + + Fixes #4826 + Reported-by: MrdUkk on github + +- [Patrick Monnerat brought this change] + + mime: latch last read callback status. + + In case a read callback returns a status (pause, abort, eof, + error) instead of a byte count, drain the bytes read so far but + remember this status for further processing. + Takes care of not losing data when pausing, and properly resume a + paused mime structure when requested. + New tests 670-673 check unpausing cases, with easy or multi + interface and mime or form api. + + Fixes #4813 + Reported-by: MrdUkk on github + Closes #4833 + +Steve Holme (1 Mar 2020) +- unit1651: Fixed conversion compilation warning + + 371:17: warning: conversion to 'unsigned char' from 'int' may alter its + value [-Wconversion] + + Closes #5008 + +- configure.ac: Disable metalink support if an incompatible SSL/TLS specified + + tool_metalink only supports cryptography from OpenSSL, GnuTLS, NSS, + The Win32 Crypto library and Apple's Common Crypto library. + + If an TLS backend such as mbedTLS or WolfSSL is specified then the + following error is given during compilation along, with a load of + unresolved extern errors: + + Can't compile METALINK support without a crypto library. + + Reviewed-by: Daniel Stenberg + Closes #5006 + +Marc Hoersken (1 Mar 2020) +- ci/tests: Update Azure DevOps pipeline job display names + + Make the configure step more descriptive and align others. + +- ci/tests: Fix typo in previous commit 597cf2 + +- ci/tests: Make sure that the AZURE_ACCESS_TOKEN is available + + For security reasons the access token is not available to PR builds. + Therefore we should not try to use the DevOps API with an empty token. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CMakeConfigurableFile.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CMakeConfigurableFile.in new file mode 100644 index 00000000..2bafe2c1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CMakeConfigurableFile.in @@ -0,0 +1,22 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +@CMAKE_CONFIGURABLE_FILE_CONTENT@ diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlSymbolHiding.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlSymbolHiding.cmake new file mode 100644 index 00000000..aaac9fea --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlSymbolHiding.cmake @@ -0,0 +1,76 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +include(CheckCSourceCompiles) + +option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON) +mark_as_advanced(CURL_HIDDEN_SYMBOLS) + +if(CURL_HIDDEN_SYMBOLS) + set(SUPPORTS_SYMBOL_HIDING FALSE) + + if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(SUPPORTS_SYMBOL_HIDING TRUE) + set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))") + set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden") + elseif(CMAKE_COMPILER_IS_GNUCC) + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) + # note: this is considered buggy prior to 4.0 but the autotools don't care, so let's ignore that fact + set(SUPPORTS_SYMBOL_HIDING TRUE) + set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))") + set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden") + endif() + elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0) + set(SUPPORTS_SYMBOL_HIDING TRUE) + set(_SYMBOL_EXTERN "__global") + set(_CFLAG_SYMBOLS_HIDE "-xldscope=hidden") + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0) + # note: this should probably just check for version 9.1.045 but I'm not 100% sure + # so let's do it the same way autotools do. + set(SUPPORTS_SYMBOL_HIDING TRUE) + set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))") + set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden") + check_c_source_compiles("#include + int main (void) { printf(\"icc fvisibility bug test\"); return 0; }" _no_bug) + if(NOT _no_bug) + set(SUPPORTS_SYMBOL_HIDING FALSE) + set(_SYMBOL_EXTERN "") + set(_CFLAG_SYMBOLS_HIDE "") + endif() + elseif(MSVC) + set(SUPPORTS_SYMBOL_HIDING TRUE) + endif() + + set(HIDES_CURL_PRIVATE_SYMBOLS ${SUPPORTS_SYMBOL_HIDING}) +elseif(MSVC) + if(NOT CMAKE_VERSION VERSION_LESS 3.7) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) #present since 3.4.3 but broken + set(HIDES_CURL_PRIVATE_SYMBOLS FALSE) + else() + message(WARNING "Hiding private symbols regardless CURL_HIDDEN_SYMBOLS being disabled.") + set(HIDES_CURL_PRIVATE_SYMBOLS TRUE) + endif() +else() + set(HIDES_CURL_PRIVATE_SYMBOLS FALSE) +endif() + +set(CURL_CFLAG_SYMBOLS_HIDE ${_CFLAG_SYMBOLS_HIDE}) +set(CURL_EXTERN_SYMBOL ${_SYMBOL_EXTERN}) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlTests.c b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlTests.c new file mode 100644 index 00000000..3ef35f02 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/CurlTests.c @@ -0,0 +1,617 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +#ifdef TIME_WITH_SYS_TIME +/* Time with sys/time test */ + +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} + +#endif + +#ifdef HAVE_FCNTL_O_NONBLOCK + +/* headers for FCNTL_O_NONBLOCK test */ +#include +#include +#include +/* */ +#if defined(sun) || defined(__sun__) || \ + defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# if defined(__SVR4) || defined(__srv4__) +# define PLATFORM_SOLARIS +# else +# define PLATFORM_SUNOS4 +# endif +#endif +#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41) +# define PLATFORM_AIX_V3 +#endif +/* */ +#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__) +#error "O_NONBLOCK does not work on this platform" +#endif + +int +main () +{ + /* O_NONBLOCK source test */ + int flags = 0; + if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK)) + return 1; + return 0; +} +#endif + +/* tests for gethostbyaddr_r or gethostbyname_r */ +#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \ + defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \ + defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \ + defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \ + defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \ + defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) +# define _REENTRANT + /* no idea whether _REENTRANT is always set, just invent a new flag */ +# define TEST_GETHOSTBYFOO_REENTRANT +#endif +#if defined(HAVE_GETHOSTBYADDR_R_5) || \ + defined(HAVE_GETHOSTBYADDR_R_7) || \ + defined(HAVE_GETHOSTBYADDR_R_8) || \ + defined(HAVE_GETHOSTBYNAME_R_3) || \ + defined(HAVE_GETHOSTBYNAME_R_5) || \ + defined(HAVE_GETHOSTBYNAME_R_6) || \ + defined(TEST_GETHOSTBYFOO_REENTRANT) +#include +#include +int main(void) +{ + char *address = "example.com"; + int length = 0; + int type = 0; + struct hostent h; + int rc = 0; +#if defined(HAVE_GETHOSTBYADDR_R_5) || \ + defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \ + \ + defined(HAVE_GETHOSTBYNAME_R_3) || \ + defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) + struct hostent_data hdata; +#elif defined(HAVE_GETHOSTBYADDR_R_7) || \ + defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \ + defined(HAVE_GETHOSTBYADDR_R_8) || \ + defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \ + \ + defined(HAVE_GETHOSTBYNAME_R_5) || \ + defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \ + defined(HAVE_GETHOSTBYNAME_R_6) || \ + defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) + char buffer[8192]; + int h_errnop; + struct hostent *hp; +#endif + +#ifndef gethostbyaddr_r + (void)gethostbyaddr_r; +#endif + +#if defined(HAVE_GETHOSTBYADDR_R_5) || \ + defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) + rc = gethostbyaddr_r(address, length, type, &h, &hdata); + (void)rc; +#elif defined(HAVE_GETHOSTBYADDR_R_7) || \ + defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) + hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop); + (void)hp; +#elif defined(HAVE_GETHOSTBYADDR_R_8) || \ + defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) + rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop); + (void)rc; +#endif + +#if defined(HAVE_GETHOSTBYNAME_R_3) || \ + defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) + rc = gethostbyname_r(address, &h, &hdata); +#elif defined(HAVE_GETHOSTBYNAME_R_5) || \ + defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) + rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop); + (void)hp; /* not used for test */ +#elif defined(HAVE_GETHOSTBYNAME_R_6) || \ + defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) + rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop); +#endif + + (void)length; + (void)type; + (void)rc; + return 0; +} +#endif + +#ifdef HAVE_SOCKLEN_T +#ifdef _WIN32 +#include +#else +#include +#include +#endif +int +main () +{ +if ((socklen_t *) 0) + return 0; +if (sizeof (socklen_t)) + return 0; + ; + return 0; +} +#endif +#ifdef HAVE_IN_ADDR_T +#include +#include +#include + +int +main () +{ +if ((in_addr_t *) 0) + return 0; +if (sizeof (in_addr_t)) + return 0; + ; + return 0; +} +#endif + +#ifdef HAVE_BOOL_T +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDBOOL_H +#include +#endif +int +main () +{ +if (sizeof (bool *) ) + return 0; + ; + return 0; +} +#endif + +#ifdef STDC_HEADERS +#include +#include +#include +#include +int main() { return 0; } +#endif +#ifdef RETSIGTYPE_TEST +#include +#include +#ifdef signal +# undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int +main () +{ + return 0; +} +#endif +#ifdef HAVE_INET_NTOA_R_DECL +#include + +typedef void (*func_type)(); + +int main() +{ +#ifndef inet_ntoa_r + func_type func; + func = (func_type)inet_ntoa_r; + (void)func; +#endif + return 0; +} +#endif +#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT +#define _REENTRANT +#include + +typedef void (*func_type)(); + +int main() +{ +#ifndef inet_ntoa_r + func_type func; + func = (func_type)&inet_ntoa_r; + (void)func; +#endif + return 0; +} +#endif +#ifdef HAVE_GETADDRINFO +#include +#include +#include + +int main(void) { + struct addrinfo hints, *ai; + int error; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; +#ifndef getaddrinfo + (void)getaddrinfo; +#endif + error = getaddrinfo("127.0.0.1", "8080", &hints, &ai); + if (error) { + return 1; + } + return 0; +} +#endif +#ifdef HAVE_FILE_OFFSET_BITS +#ifdef _FILE_OFFSET_BITS +#undef _FILE_OFFSET_BITS +#endif +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int main () { ; return 0; } +#endif +#ifdef HAVE_IOCTLSOCKET +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif + +int +main () +{ + +/* ioctlsocket source code */ + int socket; + unsigned long flags = ioctlsocket(socket, FIONBIO, &flags); + + ; + return 0; +} + +#endif +#ifdef HAVE_IOCTLSOCKET_CAMEL +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif + +int +main () +{ + +/* IoctlSocket source code */ + if(0 != IoctlSocket(0, 0, 0)) + return 1; + ; + return 0; +} +#endif +#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif + +int +main () +{ + +/* IoctlSocket source code */ + long flags = 0; + if(0 != ioctlsocket(0, FIONBIO, &flags)) + return 1; + ; + return 0; +} +#endif +#ifdef HAVE_IOCTLSOCKET_FIONBIO +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif + +int +main () +{ + + int flags = 0; + if(0 != ioctlsocket(0, FIONBIO, &flags)) + return 1; + + ; + return 0; +} +#endif +#ifdef HAVE_IOCTL_FIONBIO +/* headers for FIONBIO test */ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_SYS_IOCTL_H +# include +#endif +#ifdef HAVE_STROPTS_H +# include +#endif + +int +main () +{ + + int flags = 0; + if(0 != ioctl(0, FIONBIO, &flags)) + return 1; + + ; + return 0; +} +#endif +#ifdef HAVE_IOCTL_SIOCGIFADDR +/* headers for FIONBIO test */ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_SYS_IOCTL_H +# include +#endif +#ifdef HAVE_STROPTS_H +# include +#endif +#include + +int +main () +{ + struct ifreq ifr; + if(0 != ioctl(0, SIOCGIFADDR, &ifr)) + return 1; + + ; + return 0; +} +#endif +#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +/* includes end */ + +int +main () +{ + if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0)) + return 1; + ; + return 0; +} +#endif +#ifdef HAVE_GLIBC_STRERROR_R +#include +#include + +void check(char c) {} + +int +main () { + char buffer[1024]; + /* This will not compile if strerror_r does not return a char* */ + check(strerror_r(EACCES, buffer, sizeof(buffer))[0]); + return 0; +} +#endif +#ifdef HAVE_POSIX_STRERROR_R +#include +#include + +/* float, because a pointer can't be implicitly cast to float */ +void check(float f) {} + +int +main () { + char buffer[1024]; + /* This will not compile if strerror_r does not return an int */ + check(strerror_r(EACCES, buffer, sizeof(buffer))); + return 0; +} +#endif +#ifdef HAVE_FSETXATTR_6 +#include /* header from libc, not from libattr */ +int +main() { + fsetxattr(0, 0, 0, 0, 0, 0); + return 0; +} +#endif +#ifdef HAVE_FSETXATTR_5 +#include /* header from libc, not from libattr */ +int +main() { + fsetxattr(0, 0, 0, 0, 0); + return 0; +} +#endif +#ifdef HAVE_CLOCK_GETTIME_MONOTONIC +#include +int +main() { + struct timespec ts = {0, 0}; + clock_gettime(CLOCK_MONOTONIC, &ts); + return 0; +} +#endif +#ifdef HAVE_BUILTIN_AVAILABLE +int +main() { + if(__builtin_available(macOS 10.12, *)) {} + return 0; +} +#endif +#ifdef HAVE_VARIADIC_MACROS_C99 +#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__) +#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__) + +int fun3(int arg1, int arg2, int arg3); +int fun2(int arg1, int arg2); + +int fun3(int arg1, int arg2, int arg3) { + return arg1 + arg2 + arg3; +} +int fun2(int arg1, int arg2) { + return arg1 + arg2; +} + +int +main() { + int res3 = c99_vmacro3(1, 2, 3); + int res2 = c99_vmacro2(1, 2); + (void)res3; + (void)res2; + return 0; +} +#endif +#ifdef HAVE_VARIADIC_MACROS_GCC +#define gcc_vmacro3(first, args...) fun3(first, args) +#define gcc_vmacro2(first, args...) fun2(first, args) + +int fun3(int arg1, int arg2, int arg3); +int fun2(int arg1, int arg2); + +int fun3(int arg1, int arg2, int arg3) { + return arg1 + arg2 + arg3; +} +int fun2(int arg1, int arg2) { + return arg1 + arg2; +} + +int +main() { + int res3 = gcc_vmacro3(1, 2, 3); + int res2 = gcc_vmacro2(1, 2); + (void)res3; + (void)res2; + return 0; +} +#endif diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBearSSL.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBearSSL.cmake new file mode 100644 index 00000000..a8f72c92 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBearSSL.cmake @@ -0,0 +1,30 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +find_path(BEARSSL_INCLUDE_DIRS bearssl.h) + +find_library(BEARSSL_LIBRARY bearssl) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(BEARSSL DEFAULT_MSG + BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY) + +mark_as_advanced(BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBrotli.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBrotli.cmake new file mode 100644 index 00000000..c43172b6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindBrotli.cmake @@ -0,0 +1,41 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +include(FindPackageHandleStandardArgs) + +find_path(BROTLI_INCLUDE_DIR "brotli/decode.h") + +find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon) +find_library(BROTLIDEC_LIBRARY NAMES brotlidec) + +find_package_handle_standard_args(BROTLI + FOUND_VAR + BROTLI_FOUND + REQUIRED_VARS + BROTLIDEC_LIBRARY + BROTLICOMMON_LIBRARY + BROTLI_INCLUDE_DIR + FAIL_MESSAGE + "Could NOT find BROTLI" +) + +set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR}) +set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY}) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindCARES.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindCARES.cmake new file mode 100644 index 00000000..9160ae5f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindCARES.cmake @@ -0,0 +1,45 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# - Find c-ares +# Find the c-ares includes and library +# This module defines +# CARES_INCLUDE_DIR, where to find ares.h, etc. +# CARES_LIBRARIES, the libraries needed to use c-ares. +# CARES_FOUND, If false, do not try to use c-ares. +# also defined, but not for general use are +# CARES_LIBRARY, where to find the c-ares library. + +find_path(CARES_INCLUDE_DIR ares.h) + +set(CARES_NAMES ${CARES_NAMES} cares) +find_library(CARES_LIBRARY + NAMES ${CARES_NAMES} + ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CARES + REQUIRED_VARS CARES_LIBRARY CARES_INCLUDE_DIR) + +mark_as_advanced( + CARES_LIBRARY + CARES_INCLUDE_DIR + ) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindGSS.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindGSS.cmake new file mode 100644 index 00000000..02111a20 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindGSS.cmake @@ -0,0 +1,310 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# - Try to find the GSS Kerberos library +# Once done this will define +# +# GSS_ROOT_DIR - Set this variable to the root installation of GSS +# +# Read-Only variables: +# GSS_FOUND - system has the Heimdal library +# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found. +# GSS_INCLUDE_DIR - the Heimdal include directory +# GSS_LIBRARIES - The libraries needed to use GSS +# GSS_LINK_DIRECTORIES - Directories to add to linker search path +# GSS_LINKER_FLAGS - Additional linker flags +# GSS_COMPILER_FLAGS - Additional compiler flags +# GSS_VERSION - This is set to version advertised by pkg-config or read from manifest. +# In case the library is found but no version info available it'll be set to "unknown" + +set(_MIT_MODNAME mit-krb5-gssapi) +set(_HEIMDAL_MODNAME heimdal-gssapi) + +include(CheckIncludeFile) +include(CheckIncludeFiles) +include(CheckTypeSize) + +set(_GSS_ROOT_HINTS + "${GSS_ROOT_DIR}" + "$ENV{GSS_ROOT_DIR}" +) + +# try to find library using system pkg-config if user didn't specify root dir +if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}") + if(UNIX) + find_package(PkgConfig QUIET) + pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME}) + list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}") + elseif(WIN32) + list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]") + endif() +endif() + +if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach. + find_file(_GSS_CONFIGURE_SCRIPT + NAMES + "krb5-config" + HINTS + ${_GSS_ROOT_HINTS} + PATH_SUFFIXES + bin + NO_CMAKE_PATH + NO_CMAKE_ENVIRONMENT_PATH + ) + + # if not found in user-supplied directories, maybe system knows better + find_file(_GSS_CONFIGURE_SCRIPT + NAMES + "krb5-config" + PATH_SUFFIXES + bin + ) + + if(_GSS_CONFIGURE_SCRIPT) + execute_process( + COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi" + OUTPUT_VARIABLE _GSS_CFLAGS + RESULT_VARIABLE _GSS_CONFIGURE_FAILED + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + message(STATUS "CFLAGS: ${_GSS_CFLAGS}") + if(NOT _GSS_CONFIGURE_FAILED) # 0 means success + # should also work in an odd case when multiple directories are given + string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS) + string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}") + string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1" _GSS_CFLAGS "${_GSS_CFLAGS}") + + foreach(_flag ${_GSS_CFLAGS}) + if(_flag MATCHES "^-I.*") + string(REGEX REPLACE "^-I" "" _val "${_flag}") + list(APPEND _GSS_INCLUDE_DIR "${_val}") + else() + list(APPEND _GSS_COMPILER_FLAGS "${_flag}") + endif() + endforeach() + endif() + + execute_process( + COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi" + OUTPUT_VARIABLE _GSS_LIB_FLAGS + RESULT_VARIABLE _GSS_CONFIGURE_FAILED + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}") + + if(NOT _GSS_CONFIGURE_FAILED) # 0 means success + # this script gives us libraries and link directories. Blah. We have to deal with it. + string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS) + string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}") + string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}") + + foreach(_flag ${_GSS_LIB_FLAGS}) + if(_flag MATCHES "^-l.*") + string(REGEX REPLACE "^-l" "" _val "${_flag}") + list(APPEND _GSS_LIBRARIES "${_val}") + elseif(_flag MATCHES "^-L.*") + string(REGEX REPLACE "^-L" "" _val "${_flag}") + list(APPEND _GSS_LINK_DIRECTORIES "${_val}") + else() + list(APPEND _GSS_LINKER_FLAGS "${_flag}") + endif() + endforeach() + endif() + + execute_process( + COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version" + OUTPUT_VARIABLE _GSS_VERSION + RESULT_VARIABLE _GSS_CONFIGURE_FAILED + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + # older versions may not have the "--version" parameter. In this case we just don't care. + if(_GSS_CONFIGURE_FAILED) + set(_GSS_VERSION 0) + endif() + + execute_process( + COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor" + OUTPUT_VARIABLE _GSS_VENDOR + RESULT_VARIABLE _GSS_CONFIGURE_FAILED + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + # older versions may not have the "--vendor" parameter. In this case we just don't care. + if(_GSS_CONFIGURE_FAILED) + set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter + else() + if(_GSS_VENDOR MATCHES ".*H|heimdal.*") + set(GSS_FLAVOUR "Heimdal") + else() + set(GSS_FLAVOUR "MIT") + endif() + endif() + + else() # either there is no config script or we are on a platform that doesn't provide one (Windows?) + + find_path(_GSS_INCLUDE_DIR + NAMES + "gssapi/gssapi.h" + HINTS + ${_GSS_ROOT_HINTS} + PATH_SUFFIXES + include + inc + ) + + if(_GSS_INCLUDE_DIR) #jay, we've found something + set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}") + check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS) + + if(_GSS_HAVE_MIT_HEADERS) + set(GSS_FLAVOUR "MIT") + else() + # prevent compiling the header - just check if we can include it + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D__ROKEN_H__") + check_include_file( "roken.h" _GSS_HAVE_ROKEN_H) + + check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H) + if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H) + set(GSS_FLAVOUR "Heimdal") + endif() + set(CMAKE_REQUIRED_DEFINITIONS "") + endif() + else() + # I'm not convinced if this is the right way but this is what autotools do at the moment + find_path(_GSS_INCLUDE_DIR + NAMES + "gssapi.h" + HINTS + ${_GSS_ROOT_HINTS} + PATH_SUFFIXES + include + inc + ) + + if(_GSS_INCLUDE_DIR) + set(GSS_FLAVOUR "Heimdal") + endif() + endif() + + # if we have headers, check if we can link libraries + if(GSS_FLAVOUR) + set(_GSS_LIBDIR_SUFFIXES "") + set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS}) + get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH) + list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT}) + + if(WIN32) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64") + if(GSS_FLAVOUR STREQUAL "MIT") + set(_GSS_LIBNAME "gssapi64") + else() + set(_GSS_LIBNAME "libgssapi") + endif() + else() + list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386") + if(GSS_FLAVOUR STREQUAL "MIT") + set(_GSS_LIBNAME "gssapi32") + else() + set(_GSS_LIBNAME "libgssapi") + endif() + endif() + else() + list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS + if(GSS_FLAVOUR STREQUAL "MIT") + set(_GSS_LIBNAME "gssapi_krb5") + else() + set(_GSS_LIBNAME "gssapi") + endif() + endif() + + find_library(_GSS_LIBRARIES + NAMES + ${_GSS_LIBNAME} + HINTS + ${_GSS_LIBDIR_HINTS} + PATH_SUFFIXES + ${_GSS_LIBDIR_SUFFIXES} + ) + + endif() + endif() +else() + if(_GSS_PKG_${_MIT_MODNAME}_VERSION) + set(GSS_FLAVOUR "MIT") + set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION) + else() + set(GSS_FLAVOUR "Heimdal") + set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION) + endif() +endif() + +set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR}) +set(GSS_LIBRARIES ${_GSS_LIBRARIES}) +set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES}) +set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS}) +set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS}) +set(GSS_VERSION ${_GSS_VERSION}) + +if(GSS_FLAVOUR) + if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest") + else() + set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest") + endif() + + if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}") + file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str + REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$") + + string(REGEX MATCH "[0-9]\\.[^\"]+" + GSS_VERSION "${heimdal_version_str}") + endif() + + if(NOT GSS_VERSION) + set(GSS_VERSION "Heimdal Unknown") + endif() + elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT") + get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE) + if(WIN32 AND _MIT_VERSION) + set(GSS_VERSION "${_MIT_VERSION}") + else() + set(GSS_VERSION "MIT Unknown") + endif() + endif() +endif() + +include(FindPackageHandleStandardArgs) + +set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR) + +find_package_handle_standard_args(GSS + REQUIRED_VARS + ${_GSS_REQUIRED_VARS} + VERSION_VAR + GSS_VERSION + FAIL_MESSAGE + "Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR" +) + +mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindLibSSH2.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindLibSSH2.cmake new file mode 100644 index 00000000..4cdf3e31 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindLibSSH2.cmake @@ -0,0 +1,43 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# - Try to find the libssh2 library +# Once done this will define +# +# LIBSSH2_FOUND - system has the libssh2 library +# LIBSSH2_INCLUDE_DIR - the libssh2 include directory +# LIBSSH2_LIBRARY - the libssh2 library name + +find_path(LIBSSH2_INCLUDE_DIR libssh2.h) + +find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2) + +if(LIBSSH2_INCLUDE_DIR) + file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION[\t ]+\"(.*)\"") + string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBSSH2_VERSION "${libssh2_version_str}") +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibSSH2 + REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR + VERSION_VAR LIBSSH2_VERSION) + +mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindMbedTLS.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindMbedTLS.cmake new file mode 100644 index 00000000..2ebe721a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindMbedTLS.cmake @@ -0,0 +1,34 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h) + +find_library(MBEDTLS_LIBRARY mbedtls) +find_library(MBEDX509_LIBRARY mbedx509) +find_library(MBEDCRYPTO_LIBRARY mbedcrypto) + +set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(MBEDTLS DEFAULT_MSG + MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) + +mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP2.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP2.cmake new file mode 100644 index 00000000..e1eba053 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP2.cmake @@ -0,0 +1,39 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +include(FindPackageHandleStandardArgs) + +find_path(NGHTTP2_INCLUDE_DIR "nghttp2/nghttp2.h") + +find_library(NGHTTP2_LIBRARY NAMES nghttp2) + +find_package_handle_standard_args(NGHTTP2 + FOUND_VAR + NGHTTP2_FOUND + REQUIRED_VARS + NGHTTP2_LIBRARY + NGHTTP2_INCLUDE_DIR +) + +set(NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR}) +set(NGHTTP2_LIBRARIES ${NGHTTP2_LIBRARY}) + +mark_as_advanced(NGHTTP2_INCLUDE_DIRS NGHTTP2_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP3.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP3.cmake new file mode 100644 index 00000000..73ce9e18 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGHTTP3.cmake @@ -0,0 +1,76 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#[=======================================================================[.rst: +FindNGHTTP3 +---------- + +Find the nghttp3 library + +Result Variables +^^^^^^^^^^^^^^^^ + +``NGHTTP3_FOUND`` + System has nghttp3 +``NGHTTP3_INCLUDE_DIRS`` + The nghttp3 include directories. +``NGHTTP3_LIBRARIES`` + The libraries needed to use nghttp3 +``NGHTTP3_VERSION`` + version of nghttp3. +#]=======================================================================] + +if(UNIX) + find_package(PkgConfig QUIET) + pkg_search_module(PC_NGHTTP3 libnghttp3) +endif() + +find_path(NGHTTP3_INCLUDE_DIR nghttp3/nghttp3.h + HINTS + ${PC_NGHTTP3_INCLUDEDIR} + ${PC_NGHTTP3_INCLUDE_DIRS} +) + +find_library(NGHTTP3_LIBRARY NAMES nghttp3 + HINTS + ${PC_NGHTTP3_LIBDIR} + ${PC_NGHTTP3_LIBRARY_DIRS} +) + +if(PC_NGHTTP3_VERSION) + set(NGHTTP3_VERSION ${PC_NGHTTP3_VERSION}) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(NGHTTP3 + REQUIRED_VARS + NGHTTP3_LIBRARY + NGHTTP3_INCLUDE_DIR + VERSION_VAR NGHTTP3_VERSION +) + +if(NGHTTP3_FOUND) + set(NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY}) + set(NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR}) +endif() + +mark_as_advanced(NGHTTP3_INCLUDE_DIRS NGHTTP3_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGTCP2.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGTCP2.cmake new file mode 100644 index 00000000..a1ed8cd4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNGTCP2.cmake @@ -0,0 +1,113 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#[=======================================================================[.rst: +FindNGTCP2 +---------- + +Find the ngtcp2 library + +This module accepts optional COMPONENTS to control the crypto library (these are +mutually exclusive):: + + OpenSSL: Use libngtcp2_crypto_openssl + GnuTLS: Use libngtcp2_crypto_gnutls + +Result Variables +^^^^^^^^^^^^^^^^ + +``NGTCP2_FOUND`` + System has ngtcp2 +``NGTCP2_INCLUDE_DIRS`` + The ngtcp2 include directories. +``NGTCP2_LIBRARIES`` + The libraries needed to use ngtcp2 +``NGTCP2_VERSION`` + version of ngtcp2. +#]=======================================================================] + +if(UNIX) + find_package(PkgConfig QUIET) + pkg_search_module(PC_NGTCP2 libngtcp2) +endif() + +find_path(NGTCP2_INCLUDE_DIR ngtcp2/ngtcp2.h + HINTS + ${PC_NGTCP2_INCLUDEDIR} + ${PC_NGTCP2_INCLUDE_DIRS} +) + +find_library(NGTCP2_LIBRARY NAMES ngtcp2 + HINTS + ${PC_NGTCP2_LIBDIR} + ${PC_NGTCP2_LIBRARY_DIRS} +) + +if(PC_NGTCP2_VERSION) + set(NGTCP2_VERSION ${PC_NGTCP2_VERSION}) +endif() + +if(NGTCP2_FIND_COMPONENTS) + set(NGTCP2_CRYPTO_BACKEND "") + foreach(component IN LISTS NGTCP2_FIND_COMPONENTS) + if(component MATCHES "^(OpenSSL|GnuTLS)") + if(NGTCP2_CRYPTO_BACKEND) + message(FATAL_ERROR "NGTCP2: Only one crypto library can be selected") + endif() + set(NGTCP2_CRYPTO_BACKEND ${component}) + endif() + endforeach() + + if(NGTCP2_CRYPTO_BACKEND) + string(TOLOWER "ngtcp2_crypto_${NGTCP2_CRYPTO_BACKEND}" _crypto_library) + if(UNIX) + pkg_search_module(PC_${_crypto_library} lib${_crypto_library}) + endif() + find_library(${_crypto_library}_LIBRARY + NAMES + ${_crypto_library} + HINTS + ${PC_${_crypto_library}_LIBDIR} + ${PC_${_crypto_library}_LIBRARY_DIRS} + ) + if(${_crypto_library}_LIBRARY) + set(NGTCP2_${NGTCP2_CRYPTO_BACKEND}_FOUND TRUE) + set(NGTCP2_CRYPTO_LIBRARY ${${_crypto_library}_LIBRARY}) + endif() + endif() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(NGTCP2 + REQUIRED_VARS + NGTCP2_LIBRARY + NGTCP2_INCLUDE_DIR + VERSION_VAR NGTCP2_VERSION + HANDLE_COMPONENTS +) + +if(NGTCP2_FOUND) + set(NGTCP2_LIBRARIES ${NGTCP2_LIBRARY} ${NGTCP2_CRYPTO_LIBRARY}) + set(NGTCP2_INCLUDE_DIRS ${NGTCP2_INCLUDE_DIR}) +endif() + +mark_as_advanced(NGTCP2_INCLUDE_DIRS NGTCP2_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNSS.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNSS.cmake new file mode 100644 index 00000000..5fdb2b77 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindNSS.cmake @@ -0,0 +1,38 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +if(UNIX) + find_package(PkgConfig QUIET) + pkg_search_module(PC_NSS nss) +endif() +if(NOT PC_NSS_FOUND) + return() +endif() + +set(NSS_LIBRARIES ${PC_NSS_LINK_LIBRARIES}) +set(NSS_INCLUDE_DIRS ${PC_NSS_INCLUDE_DIRS}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(NSS + REQUIRED_VARS NSS_LIBRARIES NSS_INCLUDE_DIRS + VERSION_VAR PC_NSS_VERSION) + +mark_as_advanced(NSS_INCLUDE_DIRS NSS_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindQUICHE.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindQUICHE.cmake new file mode 100644 index 00000000..01d17582 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindQUICHE.cmake @@ -0,0 +1,68 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#[=======================================================================[.rst: +FindQUICHE +---------- + +Find the quiche library + +Result Variables +^^^^^^^^^^^^^^^^ + +``QUICHE_FOUND`` + System has quiche +``QUICHE_INCLUDE_DIRS`` + The quiche include directories. +``QUICHE_LIBRARIES`` + The libraries needed to use quiche +#]=======================================================================] +if(UNIX) + find_package(PkgConfig QUIET) + pkg_search_module(PC_QUICHE quiche) +endif() + +find_path(QUICHE_INCLUDE_DIR quiche.h + HINTS + ${PC_QUICHE_INCLUDEDIR} + ${PC_QUICHE_INCLUDE_DIRS} +) + +find_library(QUICHE_LIBRARY NAMES quiche + HINTS + ${PC_QUICHE_LIBDIR} + ${PC_QUICHE_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QUICHE + REQUIRED_VARS + QUICHE_LIBRARY + QUICHE_INCLUDE_DIR +) + +if(QUICHE_FOUND) + set(QUICHE_LIBRARIES ${QUICHE_LIBRARY}) + set(QUICHE_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR}) +endif() + +mark_as_advanced(QUICHE_INCLUDE_DIRS QUICHE_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindWolfSSL.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindWolfSSL.cmake new file mode 100644 index 00000000..54df1a86 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindWolfSSL.cmake @@ -0,0 +1,34 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +find_path(WolfSSL_INCLUDE_DIR NAMES wolfssl/ssl.h) +find_library(WolfSSL_LIBRARY NAMES wolfssl) +mark_as_advanced(WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WolfSSL + REQUIRED_VARS WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY + ) + +if(WolfSSL_FOUND) + set(WolfSSL_INCLUDE_DIRS ${WolfSSL_INCLUDE_DIR}) + set(WolfSSL_LIBRARIES ${WolfSSL_LIBRARY}) +endif() diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindZstd.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindZstd.cmake new file mode 100644 index 00000000..44c741ae --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/FindZstd.cmake @@ -0,0 +1,69 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#[=======================================================================[.rst: +FindZstd +---------- + +Find the zstd library + +Result Variables +^^^^^^^^^^^^^^^^ + +``Zstd_FOUND`` + System has zstd +``Zstd_INCLUDE_DIRS`` + The zstd include directories. +``Zstd_LIBRARIES`` + The libraries needed to use zstd +#]=======================================================================] + +if(UNIX) + find_package(PkgConfig QUIET) + pkg_search_module(PC_Zstd libzstd) +endif() + +find_path(Zstd_INCLUDE_DIR zstd.h + HINTS + ${PC_Zstd_INCLUDEDIR} + ${PC_Zstd_INCLUDE_DIRS} +) + +find_library(Zstd_LIBRARY NAMES zstd + HINTS + ${PC_Zstd_LIBDIR} + ${PC_Zstd_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Zstd + REQUIRED_VARS + Zstd_LIBRARY + Zstd_INCLUDE_DIR +) + +if(Zstd_FOUND) + set(Zstd_LIBRARIES ${Zstd_LIBRARY}) + set(Zstd_INCLUDE_DIRS ${Zstd_INCLUDE_DIR}) +endif() + +mark_as_advanced(Zstd_INCLUDE_DIRS Zstd_LIBRARIES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Macros.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Macros.cmake new file mode 100644 index 00000000..65a41e48 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Macros.cmake @@ -0,0 +1,109 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +#File defines convenience macros for available feature testing + +# This macro checks if the symbol exists in the library and if it +# does, it prepends library to the list. It is intended to be called +# multiple times with a sequence of possibly dependent libraries in +# order of least-to-most-dependent. Some libraries depend on others +# to link correctly. +macro(check_library_exists_concat LIBRARY SYMBOL VARIABLE) + check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}" + ${VARIABLE}) + if(${VARIABLE}) + set(CURL_LIBS ${LIBRARY} ${CURL_LIBS}) + endif() +endmacro() + +# Check if header file exists and add it to the list. +# This macro is intended to be called multiple times with a sequence of +# possibly dependent header files. Some headers depend on others to be +# compiled correctly. +macro(check_include_file_concat FILE VARIABLE) + check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE}) + if(${VARIABLE}) + set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE}) + set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}") + endif() +endmacro() + +# For other curl specific tests, use this macro. +macro(curl_internal_test CURL_TEST) + if(NOT DEFINED "${CURL_TEST}") + set(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CURL_TEST_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + endif() + + message(STATUS "Performing Curl Test ${CURL_TEST}") + try_compile(${CURL_TEST} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CURL_TEST_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT) + if(${CURL_TEST}) + set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}") + message(STATUS "Performing Curl Test ${CURL_TEST} - Success") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing Curl Test ${CURL_TEST} passed with the following output:\n" + "${OUTPUT}\n") + else() + message(STATUS "Performing Curl Test ${CURL_TEST} - Failed") + set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing Curl Test ${CURL_TEST} failed with the following output:\n" + "${OUTPUT}\n") + endif() + endif() +endmacro() + +macro(curl_nroff_check) + find_program(NROFF NAMES gnroff nroff) + if(NROFF) + # Need a way to write to stdin, this will do + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test") + # Tests for a valid nroff option to generate a manpage + foreach(_MANOPT "-man" "-mandoc") + execute_process(COMMAND "${NROFF}" ${_MANOPT} + OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT + INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" + ERROR_QUIET) + # Save the option if it was valid + if(NROFF_MANOPT_OUTPUT) + message("Found *nroff option: -- ${_MANOPT}") + set(NROFF_MANOPT ${_MANOPT}) + set(NROFF_USEFUL ON) + break() + endif() + endforeach() + # No need for the temporary file + file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt") + if(NOT NROFF_USEFUL) + message(WARNING "Found no *nroff option to get plaintext from man pages") + endif() + else() + message(WARNING "Found no *nroff program") + endif() +endmacro() diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/OtherTests.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/OtherTests.cmake new file mode 100644 index 00000000..7cec6da6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/OtherTests.cmake @@ -0,0 +1,291 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +include(CheckCSourceCompiles) +# The begin of the sources (macros and includes) +set(_source_epilogue "#undef inline") + +macro(add_header_include check header) + if(${check}) + set(_source_epilogue "${_source_epilogue}\n#include <${header}>") + endif() +endmacro() + +set(signature_call_conv) +if(HAVE_WINDOWS_H) + add_header_include(HAVE_WINSOCK2_H "winsock2.h") + add_header_include(HAVE_WINDOWS_H "windows.h") + add_header_include(HAVE_WINSOCK_H "winsock.h") + set(_source_epilogue + "${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif") + set(signature_call_conv "PASCAL") + if(HAVE_LIBWS2_32) + set(CMAKE_REQUIRED_LIBRARIES ws2_32) + endif() +else() + add_header_include(HAVE_SYS_TYPES_H "sys/types.h") + add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h") +endif() + +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + +check_c_source_compiles("${_source_epilogue} +int main(void) { + recv(0, 0, 0, 0); + return 0; +}" curl_cv_recv) +if(curl_cv_recv) + if(NOT DEFINED curl_cv_func_recv_args OR curl_cv_func_recv_args STREQUAL "unknown") + foreach(recv_retv "int" "ssize_t" ) + foreach(recv_arg1 "SOCKET" "int" ) + foreach(recv_arg2 "char *" "void *" ) + foreach(recv_arg3 "int" "size_t" "socklen_t" "unsigned int") + foreach(recv_arg4 "int" "unsigned int") + if(NOT curl_cv_func_recv_done) + unset(curl_cv_func_recv_test CACHE) + check_c_source_compiles(" + ${_source_epilogue} + #ifdef WINSOCK_API_LINKAGE + WINSOCK_API_LINKAGE + #endif + extern ${recv_retv} ${signature_call_conv} + recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4}); + int main(void) { + ${recv_arg1} s=0; + ${recv_arg2} buf=0; + ${recv_arg3} len=0; + ${recv_arg4} flags=0; + ${recv_retv} res = recv(s, buf, len, flags); + (void) res; + return 0; + }" + curl_cv_func_recv_test) + message(STATUS + "Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})") + if(curl_cv_func_recv_test) + set(curl_cv_func_recv_args + "${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}") + set(RECV_TYPE_ARG1 "${recv_arg1}") + set(RECV_TYPE_ARG2 "${recv_arg2}") + set(RECV_TYPE_ARG3 "${recv_arg3}") + set(RECV_TYPE_ARG4 "${recv_arg4}") + set(RECV_TYPE_RETV "${recv_retv}") + set(HAVE_RECV 1) + set(curl_cv_func_recv_done 1) + endif() + endif() + endforeach() + endforeach() + endforeach() + endforeach() + endforeach() + else() + string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}") + string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}") + endif() + + if(curl_cv_func_recv_args STREQUAL "unknown") + message(FATAL_ERROR "Cannot find proper types to use for recv args") + endif() +else() + message(FATAL_ERROR "Unable to link function recv") +endif() +set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv") +set(HAVE_RECV 1) + +check_c_source_compiles("${_source_epilogue} +int main(void) { + send(0, 0, 0, 0); + return 0; +}" curl_cv_send) +if(curl_cv_send) + if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown") + foreach(send_retv "int" "ssize_t" ) + foreach(send_arg1 "SOCKET" "int" "ssize_t" ) + foreach(send_arg2 "const char *" "const void *" "void *" "char *") + foreach(send_arg3 "int" "size_t" "socklen_t" "unsigned int") + foreach(send_arg4 "int" "unsigned int") + if(NOT curl_cv_func_send_done) + unset(curl_cv_func_send_test CACHE) + check_c_source_compiles(" + ${_source_epilogue} + #ifdef WINSOCK_API_LINKAGE + WINSOCK_API_LINKAGE + #endif + extern ${send_retv} ${signature_call_conv} + send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4}); + int main(void) { + ${send_arg1} s=0; + ${send_arg2} buf=0; + ${send_arg3} len=0; + ${send_arg4} flags=0; + ${send_retv} res = send(s, buf, len, flags); + (void) res; + return 0; + }" + curl_cv_func_send_test) + message(STATUS + "Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})") + if(curl_cv_func_send_test) + string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}") + string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}") + set(curl_cv_func_send_args + "${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}") + set(SEND_TYPE_ARG1 "${send_arg1}") + set(SEND_TYPE_ARG2 "${send_arg2}") + set(SEND_TYPE_ARG3 "${send_arg3}") + set(SEND_TYPE_ARG4 "${send_arg4}") + set(SEND_TYPE_RETV "${send_retv}") + set(HAVE_SEND 1) + set(curl_cv_func_send_done 1) + endif() + endif() + endforeach() + endforeach() + endforeach() + endforeach() + endforeach() + else() + string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}") + string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}") + string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}") + endif() + + if("${curl_cv_func_send_args}" STREQUAL "unknown") + message(FATAL_ERROR "Cannot find proper types to use for send args") + endif() + set(SEND_QUAL_ARG2 "const") +else() + message(FATAL_ERROR "Unable to link function send") +endif() +set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send") +set(HAVE_SEND 1) + +check_c_source_compiles("${_source_epilogue} + int main(void) { + int flag = MSG_NOSIGNAL; + (void)flag; + return 0; + }" HAVE_MSG_NOSIGNAL) + +if(NOT HAVE_WINDOWS_H) + add_header_include(HAVE_SYS_TIME_H "sys/time.h") + add_header_include(TIME_WITH_SYS_TIME "time.h") + add_header_include(HAVE_TIME_H "time.h") +endif() +check_c_source_compiles("${_source_epilogue} +int main(void) { + struct timeval ts; + ts.tv_sec = 0; + ts.tv_usec = 0; + (void)ts; + return 0; +}" HAVE_STRUCT_TIMEVAL) + +set(HAVE_SIG_ATOMIC_T 1) +set(CMAKE_REQUIRED_FLAGS) +if(HAVE_SIGNAL_H) + set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H") + set(CMAKE_EXTRA_INCLUDE_FILES "signal.h") +endif() +check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T) +if(HAVE_SIZEOF_SIG_ATOMIC_T) + check_c_source_compiles(" + #ifdef HAVE_SIGNAL_H + # include + #endif + int main(void) { + static volatile sig_atomic_t dummy = 0; + (void)dummy; + return 0; + }" HAVE_SIG_ATOMIC_T_NOT_VOLATILE) + if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE) + set(HAVE_SIG_ATOMIC_T_VOLATILE 1) + endif() +endif() + +if(HAVE_WINDOWS_H) + set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h) +else() + set(CMAKE_EXTRA_INCLUDE_FILES) + if(HAVE_SYS_SOCKET_H) + set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) + endif() +endif() + +check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE) +if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE) + set(HAVE_STRUCT_SOCKADDR_STORAGE 1) +endif() + +unset(CMAKE_TRY_COMPILE_TARGET_TYPE) + +if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) + # if not cross-compilation... + include(CheckCSourceRuns) + set(CMAKE_REQUIRED_FLAGS "") + if(HAVE_SYS_POLL_H) + set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H") + elseif(HAVE_POLL_H) + set(CMAKE_REQUIRED_FLAGS "-DHAVE_POLL_H") + endif() + check_c_source_runs(" + #include + #include + + #ifdef HAVE_SYS_POLL_H + # include + #elif HAVE_POLL_H + # include + #endif + + int main(void) + { + if(0 != poll(0, 0, 10)) { + return 1; /* fail */ + } + else { + /* detect the 10.12 poll() breakage */ + struct timeval before, after; + int rc; + size_t us; + + gettimeofday(&before, NULL); + rc = poll(NULL, 0, 500); + gettimeofday(&after, NULL); + + us = (after.tv_sec - before.tv_sec) * 1000000 + + (after.tv_usec - before.tv_usec); + + if(us < 400000) { + return 1; + } + } + return 0; + }" HAVE_POLL_FINE) +endif() + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Platforms/WindowsCache.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Platforms/WindowsCache.cmake new file mode 100644 index 00000000..9ae9b56f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Platforms/WindowsCache.cmake @@ -0,0 +1,144 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +if(NOT UNIX) + if(WIN32) + set(HAVE_LIBDL 0) + set(HAVE_LIBUCB 0) + set(HAVE_LIBSOCKET 0) + set(NOT_NEED_LIBNSL 0) + set(HAVE_LIBNSL 0) + set(HAVE_GETHOSTNAME 1) + set(HAVE_LIBZ 0) + + set(HAVE_DLOPEN 0) + + set(HAVE_ALLOCA_H 0) + set(HAVE_ARPA_INET_H 0) + set(HAVE_DLFCN_H 0) + set(HAVE_FCNTL_H 1) + set(HAVE_INTTYPES_H 0) + set(HAVE_IO_H 1) + set(HAVE_MALLOC_H 1) + set(HAVE_MEMORY_H 1) + set(HAVE_NETDB_H 0) + set(HAVE_NETINET_IF_ETHER_H 0) + set(HAVE_NETINET_IN_H 0) + set(HAVE_NET_IF_H 0) + set(HAVE_PROCESS_H 1) + set(HAVE_PWD_H 0) + set(HAVE_SETJMP_H 1) + set(HAVE_SGTTY_H 0) + set(HAVE_SIGNAL_H 1) + set(HAVE_SOCKIO_H 0) + set(HAVE_STDINT_H 0) + set(HAVE_STDLIB_H 1) + set(HAVE_STRINGS_H 0) + set(HAVE_STRING_H 1) + set(HAVE_SYS_PARAM_H 0) + set(HAVE_SYS_POLL_H 0) + set(HAVE_SYS_SELECT_H 0) + set(HAVE_SYS_SOCKET_H 0) + set(HAVE_SYS_SOCKIO_H 0) + set(HAVE_SYS_STAT_H 1) + set(HAVE_SYS_TIME_H 0) + set(HAVE_SYS_TYPES_H 1) + set(HAVE_SYS_UTIME_H 1) + set(HAVE_TERMIOS_H 0) + set(HAVE_TERMIO_H 0) + set(HAVE_TIME_H 1) + set(HAVE_UNISTD_H 0) + set(HAVE_UTIME_H 0) + set(HAVE_X509_H 0) + set(HAVE_ZLIB_H 0) + + set(HAVE_SIZEOF_LONG_DOUBLE 1) + set(SIZEOF_LONG_DOUBLE 8) + + set(HAVE_SOCKET 1) + set(HAVE_POLL 0) + set(HAVE_SELECT 1) + set(HAVE_STRDUP 1) + set(HAVE_STRSTR 1) + set(HAVE_STRTOK_R 0) + set(HAVE_STRFTIME 1) + set(HAVE_UNAME 0) + set(HAVE_STRCASECMP 0) + set(HAVE_STRICMP 1) + set(HAVE_STRCMPI 1) + set(HAVE_GETHOSTBYADDR 1) + set(HAVE_GETTIMEOFDAY 0) + set(HAVE_INET_ADDR 1) + set(HAVE_INET_NTOA 1) + set(HAVE_INET_NTOA_R 0) + set(HAVE_TCGETATTR 0) + set(HAVE_TCSETATTR 0) + set(HAVE_PERROR 1) + set(HAVE_CLOSESOCKET 1) + set(HAVE_SETVBUF 0) + set(HAVE_SIGSETJMP 0) + set(HAVE_GETPASS_R 0) + set(HAVE_STRLCAT 0) + set(HAVE_GETPWUID 0) + set(HAVE_GETEUID 0) + set(HAVE_UTIME 1) + set(HAVE_RAND_EGD 0) + set(HAVE_RAND_SCREEN 0) + set(HAVE_RAND_STATUS 0) + set(HAVE_GMTIME_R 0) + set(HAVE_LOCALTIME_R 0) + set(HAVE_GETHOSTBYADDR_R 0) + set(HAVE_GETHOSTBYNAME_R 0) + set(HAVE_SIGNAL_FUNC 1) + set(HAVE_SIGNAL_MACRO 0) + + set(HAVE_GETHOSTBYADDR_R_5 0) + set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0) + set(HAVE_GETHOSTBYADDR_R_7 0) + set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0) + set(HAVE_GETHOSTBYADDR_R_8 0) + set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0) + set(HAVE_GETHOSTBYNAME_R_3 0) + set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0) + set(HAVE_GETHOSTBYNAME_R_5 0) + set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0) + set(HAVE_GETHOSTBYNAME_R_6 0) + set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0) + + set(TIME_WITH_SYS_TIME 0) + set(HAVE_O_NONBLOCK 0) + set(HAVE_IN_ADDR_T 0) + set(HAVE_INET_NTOA_R_DECL 0) + set(HAVE_INET_NTOA_R_DECL_REENTRANT 0) + if(ENABLE_IPV6) + set(HAVE_GETADDRINFO 1) + else() + set(HAVE_GETADDRINFO 0) + endif() + set(STDC_HEADERS 1) + set(RETSIGTYPE_TEST 1) + + set(HAVE_SIGACTION 0) + set(HAVE_MACRO_SIGSETJMP 0) + else() + message("This file should be included on Windows platform only") + endif() +endif() diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Utilities.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Utilities.cmake new file mode 100644 index 00000000..59b17d07 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/Utilities.cmake @@ -0,0 +1,33 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# File containing various utilities + +# Returns a list of arguments that evaluate to true +function(count_true output_count_var) + set(lst_len 0) + foreach(option_var IN LISTS ARGN) + if(${option_var}) + math(EXPR lst_len "${lst_len} + 1") + endif() + endforeach() + set(${output_count_var} ${lst_len} PARENT_SCOPE) +endfunction() diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/cmake_uninstall.cmake.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/cmake_uninstall.cmake.in new file mode 100644 index 00000000..4a0de5e6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/cmake_uninstall.cmake.in @@ -0,0 +1,47 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +endif() + +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") +endif() +message(${CMAKE_INSTALL_PREFIX}) + +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") +foreach(file ${files}) + message(STATUS "Uninstalling $ENV{DESTDIR}${file}") + if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + if(NOT "${rm_retval}" STREQUAL 0) + message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") + endif() + else() + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif() +endforeach() diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/curl-config.cmake.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/curl-config.cmake.in new file mode 100644 index 00000000..ae8cc30f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMake/curl-config.cmake.in @@ -0,0 +1,33 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +if(@USE_OPENSSL@) + find_dependency(OpenSSL @OPENSSL_VERSION_MAJOR@) +endif() +if(@USE_ZLIB@) + find_dependency(ZLIB @ZLIB_VERSION_MAJOR@) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMakeLists.txt new file mode 100644 index 00000000..ec1cfa78 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/CMakeLists.txt @@ -0,0 +1,1560 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# curl/libcurl CMake script +# by Tetetest and Sukender (Benoit Neil) + +# TODO: +# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file +# Add full (4 or 5 libs) SSL support +# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include). +# Check on all possible platforms +# Test with as many configurations possible (With or without any option) +# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest: +# - lists of headers that 'configure' checks for; +# - curl-specific tests (the ones that are in m4/curl-*.m4 files); +# - (most obvious thing:) curl version numbers. +# Add documentation subproject +# +# To check: +# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not. +# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options. +cmake_minimum_required(VERSION 3.2...3.16 FATAL_ERROR) + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}") +include(Utilities) +include(Macros) +include(CMakeDependentOption) +include(CheckCCompilerFlag) + +project(CURL C) + +file(STRINGS ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS REGEX "#define LIBCURL_VERSION( |_NUM )") +string(REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*" + CURL_VERSION ${CURL_VERSION_H_CONTENTS}) +string(REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION}) +string(REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+" + CURL_VERSION_NUM ${CURL_VERSION_H_CONTENTS}) +string(REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM}) + + +# Setup package meta-data +# SET(PACKAGE "curl") +message(STATUS "curl version=[${CURL_VERSION}]") +# SET(PACKAGE_TARNAME "curl") +# SET(PACKAGE_NAME "curl") +# SET(PACKAGE_VERSION "-") +# SET(PACKAGE_STRING "curl-") +# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/") +set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}") +set(OS "\"${CMAKE_SYSTEM_NAME}\"") + +include_directories(${CURL_SOURCE_DIR}/include) + +option(CURL_WERROR "Turn compiler warnings into errors" OFF) +option(PICKY_COMPILER "Enable picky compiler options" ON) +option(BUILD_CURL_EXE "Set to ON to build curl executable." ON) +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(ENABLE_ARES "Set to ON to enable c-ares support" OFF) +if(WIN32) + option(CURL_STATIC_CRT "Set to ON to build libcurl with static CRT on Windows (/MT)." OFF) + option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when building against modern SDKs while still requiring compatibility with older Windows versions, such as Windows XP, Windows Server 2003 etc." ON) + option(ENABLE_UNICODE "Set to ON to use the Unicode version of the Windows API functions" OFF) + set(CURL_TARGET_WINDOWS_VERSION "" CACHE STRING "Minimum target Windows version as hex string") + if(CURL_TARGET_WINDOWS_VERSION) + add_definitions(-D_WIN32_WINNT=${CURL_TARGET_WINDOWS_VERSION}) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=${CURL_TARGET_WINDOWS_VERSION}") + elseif(ENABLE_INET_PTON) + # _WIN32_WINNT_VISTA (0x0600) + add_definitions(-D_WIN32_WINNT=0x0600) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0600") + else() + # _WIN32_WINNT_WINXP (0x0501) + add_definitions(-D_WIN32_WINNT=0x0501) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0501") + endif() + if(ENABLE_UNICODE) + add_definitions(-DUNICODE -D_UNICODE) + if(MINGW) + add_compile_options(-municode) + endif() + endif() +endif() +option(CURL_LTO "Turn on compiler Link Time Optimizations" OFF) + +cmake_dependent_option(ENABLE_THREADED_RESOLVER "Set to ON to enable threaded DNS lookup" + ON "NOT ENABLE_ARES" + OFF) + +option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF) +option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF) + +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) + if(PICKY_COMPILER) + foreach(_CCOPT -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion) + # surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new + # test result in. + string(MAKE_C_IDENTIFIER "OPT${_CCOPT}" _optvarname) + check_c_compiler_flag(${_CCOPT} ${_optvarname}) + if(${_optvarname}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}") + endif() + endforeach() + foreach(_CCOPT long-long multichar format-nonliteral sign-conversion system-headers pedantic-ms-format) + # GCC only warns about unknown -Wno- options if there are also other diagnostic messages, + # so test for the positive form instead + string(MAKE_C_IDENTIFIER "OPT${_CCOPT}" _optvarname) + check_c_compiler_flag("-W${_CCOPT}" ${_optvarname}) + if(${_optvarname}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-${_CCOPT}") + endif() + endforeach() + endif() +endif() + +if(ENABLE_DEBUG) + # DEBUGBUILD will be defined only for Debug builds + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$:DEBUGBUILD>) + set(ENABLE_CURLDEBUG ON) +endif() + +if(ENABLE_CURLDEBUG) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG) +endif() + +# For debug libs and exes, add "-d" postfix +if(NOT DEFINED CMAKE_DEBUG_POSTFIX) + set(CMAKE_DEBUG_POSTFIX "-d") +endif() + +# initialize CURL_LIBS +set(CURL_LIBS "") + +if(ENABLE_ARES) + set(USE_ARES 1) + find_package(CARES REQUIRED) + list(APPEND CURL_LIBS ${CARES_LIBRARY}) +endif() + +include(CurlSymbolHiding) + +option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF) +mark_as_advanced(HTTP_ONLY) +option(CURL_DISABLE_FTP "disables FTP" OFF) +mark_as_advanced(CURL_DISABLE_FTP) +option(CURL_DISABLE_LDAP "disables LDAP" OFF) +mark_as_advanced(CURL_DISABLE_LDAP) +option(CURL_DISABLE_TELNET "disables Telnet" OFF) +mark_as_advanced(CURL_DISABLE_TELNET) +option(CURL_DISABLE_DICT "disables DICT" OFF) +mark_as_advanced(CURL_DISABLE_DICT) +option(CURL_DISABLE_FILE "disables FILE" OFF) +mark_as_advanced(CURL_DISABLE_FILE) +option(CURL_DISABLE_TFTP "disables TFTP" OFF) +mark_as_advanced(CURL_DISABLE_TFTP) +option(CURL_DISABLE_HTTP "disables HTTP" OFF) +mark_as_advanced(CURL_DISABLE_HTTP) + +option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF) +mark_as_advanced(CURL_DISABLE_LDAPS) + +option(CURL_DISABLE_RTSP "to disable RTSP" OFF) +mark_as_advanced(CURL_DISABLE_RTSP) +option(CURL_DISABLE_PROXY "to disable proxy" OFF) +mark_as_advanced(CURL_DISABLE_PROXY) +option(CURL_DISABLE_POP3 "to disable POP3" OFF) +mark_as_advanced(CURL_DISABLE_POP3) +option(CURL_DISABLE_IMAP "to disable IMAP" OFF) +mark_as_advanced(CURL_DISABLE_IMAP) +option(CURL_DISABLE_SMTP "to disable SMTP" OFF) +mark_as_advanced(CURL_DISABLE_SMTP) +option(CURL_DISABLE_GOPHER "to disable Gopher" OFF) +mark_as_advanced(CURL_DISABLE_GOPHER) +option(CURL_DISABLE_MQTT "to disable MQTT" OFF) +mark_as_advanced(CURL_DISABLE_MQTT) + +if(HTTP_ONLY) + set(CURL_DISABLE_DICT ON) + set(CURL_DISABLE_FILE ON) + set(CURL_DISABLE_FTP ON) + set(CURL_DISABLE_GOPHER ON) + set(CURL_DISABLE_IMAP ON) + set(CURL_DISABLE_LDAP ON) + set(CURL_DISABLE_LDAPS ON) + set(CURL_DISABLE_MQTT ON) + set(CURL_DISABLE_POP3 ON) + set(CURL_DISABLE_RTSP ON) + set(CURL_DISABLE_SMB ON) + set(CURL_DISABLE_SMTP ON) + set(CURL_DISABLE_TELNET ON) + set(CURL_DISABLE_TFTP ON) +endif() + +option(CURL_DISABLE_COOKIES "to disable cookies support" OFF) +mark_as_advanced(CURL_DISABLE_COOKIES) + +option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF) +mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH) +option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF) +mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS) +option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) +mark_as_advanced(ENABLE_IPV6) +if(ENABLE_IPV6 AND NOT WIN32) + include(CheckStructHasMember) + check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" + HAVE_SOCKADDR_IN6_SIN6_ADDR) + check_struct_has_member("struct sockaddr_in6" sin6_scope_id "netinet/in.h" + HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) + if(NOT HAVE_SOCKADDR_IN6_SIN6_ADDR) + message(WARNING "struct sockaddr_in6 not available, disabling IPv6 support") + # Force the feature off as this name is used as guard macro... + set(ENABLE_IPV6 OFF + CACHE BOOL "Define if you want to enable IPv6 support" FORCE) + endif() +endif() + +if(USE_MANUAL) + #nroff is currently only used when USE_MANUAL is set, so we can prevent the warning of no *NROFF if USE_MANUAL is OFF (or not defined), by not even looking for NROFF.. + curl_nroff_check() +endif() +find_package(Perl) + +cmake_dependent_option(ENABLE_MANUAL "to provide the built-in manual" + ON "NROFF_USEFUL;PERL_FOUND" + OFF) + +if(ENABLE_MANUAL) + set(USE_MANUAL ON) +endif() + +if(CURL_STATIC_CRT) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +endif() + +# Disable warnings on Borland to avoid changing 3rd party code. +if(BORLAND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-") +endif() + +# If we are on AIX, do the _ALL_SOURCE magic +if(${CMAKE_SYSTEM_NAME} MATCHES AIX) + set(_ALL_SOURCE 1) +endif() + +# Include all the necessary files for macros +include(CMakePushCheckState) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckIncludeFiles) +include(CheckLibraryExists) +include(CheckSymbolExists) +include(CheckTypeSize) +include(CheckCSourceCompiles) + +# On windows preload settings +if(WIN32) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_=") + include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake) +endif() + +if(ENABLE_THREADED_RESOLVER) + find_package(Threads REQUIRED) + if(WIN32) + set(USE_THREADS_WIN32 ON) + else() + set(USE_THREADS_POSIX ${CMAKE_USE_PTHREADS_INIT}) + set(HAVE_PTHREAD_H ${CMAKE_USE_PTHREADS_INIT}) + endif() + set(CURL_LIBS ${CURL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) +endif() + +# Check for all needed libraries +check_library_exists_concat("${CMAKE_DL_LIBS}" dlopen HAVE_LIBDL) +check_library_exists_concat("socket" connect HAVE_LIBSOCKET) +check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL) + +# Yellowtab Zeta needs different libraries than BeOS 5. +if(BEOS) + set(NOT_NEED_LIBNSL 1) + check_library_exists_concat("bind" gethostbyname HAVE_LIBBIND) + check_library_exists_concat("bnetapi" closesocket HAVE_LIBBNETAPI) +endif() + +if(NOT NOT_NEED_LIBNSL) + check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL) +endif() + +check_function_exists(gethostname HAVE_GETHOSTNAME) + +if(WIN32) + check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32) + check_library_exists_concat("winmm" getch HAVE_LIBWINMM) + list(APPEND CURL_LIBS "advapi32") +endif() + +# check SSL libraries +# TODO support GnuTLS +if(CMAKE_USE_WINSSL) + message(FATAL_ERROR "The cmake option CMAKE_USE_WINSSL was renamed to CMAKE_USE_SCHANNEL.") +endif() + +if(APPLE) + option(CMAKE_USE_SECTRANSP "enable Apple OS native SSL/TLS" OFF) +endif() +if(WIN32) + option(CMAKE_USE_SCHANNEL "enable Windows native SSL/TLS" OFF) + cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON + CMAKE_USE_SCHANNEL OFF) +endif() +option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF) +option(CMAKE_USE_BEARSSL "Enable BearSSL for SSL/TLS" OFF) +option(CMAKE_USE_NSS "Enable NSS for SSL/TLS" OFF) +option(CMAKE_USE_WOLFSSL "enable wolfSSL for SSL/TLS" OFF) + +set(openssl_default ON) +if(WIN32 OR CMAKE_USE_SECTRANSP OR CMAKE_USE_SCHANNEL OR CMAKE_USE_MBEDTLS OR CMAKE_USE_NSS OR CMAKE_USE_WOLFSSL) + set(openssl_default OFF) +endif() +option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default}) + +count_true(enabled_ssl_options_count + CMAKE_USE_SCHANNEL + CMAKE_USE_SECTRANSP + CMAKE_USE_OPENSSL + CMAKE_USE_MBEDTLS + CMAKE_USE_BEARSSL + CMAKE_USE_NSS + CMAKE_USE_WOLFSSL +) +if(enabled_ssl_options_count GREATER "1") + set(CURL_WITH_MULTI_SSL ON) +endif() + +if(CMAKE_USE_SCHANNEL) + set(SSL_ENABLED ON) + set(USE_SCHANNEL ON) # Windows native SSL/TLS support + set(USE_WINDOWS_SSPI ON) # CMAKE_USE_SCHANNEL implies CURL_WINDOWS_SSPI + list(APPEND CURL_LIBS "crypt32") +endif() +if(CURL_WINDOWS_SSPI) + set(USE_WINDOWS_SSPI ON) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DSECURITY_WIN32") +endif() + +if(CMAKE_USE_DARWINSSL) + message(FATAL_ERROR "The cmake option CMAKE_USE_DARWINSSL was renamed to CMAKE_USE_SECTRANSP.") +endif() + +if(CMAKE_USE_SECTRANSP) + find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation") + if(NOT COREFOUNDATION_FRAMEWORK) + message(FATAL_ERROR "CoreFoundation framework not found") + endif() + + find_library(SECURITY_FRAMEWORK "Security") + if(NOT SECURITY_FRAMEWORK) + message(FATAL_ERROR "Security framework not found") + endif() + + set(SSL_ENABLED ON) + set(USE_SECTRANSP ON) + list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}") +endif() + +if(CMAKE_USE_OPENSSL) + find_package(OpenSSL REQUIRED) + set(SSL_ENABLED ON) + set(USE_OPENSSL ON) + + # Depend on OpenSSL via imported targets if supported by the running + # version of CMake. This allows our dependents to get our dependencies + # transitively. + if(NOT CMAKE_VERSION VERSION_LESS 3.4) + list(APPEND CURL_LIBS OpenSSL::SSL OpenSSL::Crypto) + else() + list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) + include_directories(${OPENSSL_INCLUDE_DIR}) + endif() + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) + check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H) + check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H) + check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H) + check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H) + check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H) + check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H) + check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS) + check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN) + check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD) +endif() + +if(CMAKE_USE_MBEDTLS) + find_package(MbedTLS REQUIRED) + set(SSL_ENABLED ON) + set(USE_MBEDTLS ON) + list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES}) + include_directories(${MBEDTLS_INCLUDE_DIRS}) +endif() + +if(CMAKE_USE_BEARSSL) + find_package(BearSSL REQUIRED) + set(SSL_ENABLED ON) + set(USE_BEARSSL ON) + list(APPEND CURL_LIBS ${BEARSSL_LIBRARY}) + include_directories(${BEARSSL_INCLUDE_DIRS}) +endif() + +if(CMAKE_USE_WOLFSSL) + find_package(WolfSSL REQUIRED) + set(SSL_ENABLED ON) + set(USE_WOLFSSL ON) + list(APPEND CURL_LIBS ${WolfSSL_LIBRARIES}) + include_directories(${WolfSSL_INCLUDE_DIRS}) +endif() + +if(CMAKE_USE_NSS) + find_package(NSS REQUIRED) + include_directories(${NSS_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NSS_LIBRARIES}) + set(SSL_ENABLED ON) + set(USE_NSS ON) + cmake_push_check_state() + set(CMAKE_REQUIRED_INCLUDES ${NSS_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${NSS_LIBRARIES}) + check_symbol_exists(PK11_CreateManagedGenericObject "pk11pub.h" HAVE_PK11_CREATEMANAGEDGENERICOBJECT) + cmake_pop_check_state() +endif() + +option(USE_NGHTTP2 "Use Nghttp2 library" OFF) +if(USE_NGHTTP2) + find_package(NGHTTP2 REQUIRED) + include_directories(${NGHTTP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) +endif() + +function(CheckQuicSupportInOpenSSL) + # Be sure that the OpenSSL library actually supports QUIC. + cmake_push_check_state() + set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") + set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}") + check_symbol_exists(SSL_CTX_set_quic_method "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD) + if(NOT HAVE_SSL_CTX_SET_QUIC_METHOD) + message(FATAL_ERROR "QUIC support is missing in OpenSSL/boringssl. Try setting -DOPENSSL_ROOT_DIR") + endif() + cmake_pop_check_state() +endfunction() + +option(USE_NGTCP2 "Use ngtcp2 and nghttp3 libraries for HTTP/3 support" OFF) +if(USE_NGTCP2) + if(USE_OPENSSL) + find_package(NGTCP2 REQUIRED OpenSSL) + CheckQuicSupportInOpenSSL() + elseif(USE_GNUTLS) + # TODO add GnuTLS support as vtls library. + find_package(NGTCP2 REQUIRED GnuTLS) + else() + message(FATAL_ERROR "ngtcp2 requires OpenSSL or GnuTLS") + endif() + set(USE_NGTCP2 ON) + include_directories(${NGTCP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGTCP2_LIBRARIES}) + + find_package(NGHTTP3 REQUIRED) + set(USE_NGHTTP3 ON) + include_directories(${NGHTTP3_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP3_LIBRARIES}) +endif() + +option(USE_QUICHE "Use quiche library for HTTP/3 support" OFF) +if(USE_QUICHE) + if(USE_NGTCP2) + message(FATAL_ERROR "Only one HTTP/3 backend can be selected!") + endif() + find_package(QUICHE REQUIRED) + CheckQuicSupportInOpenSSL() + set(USE_QUICHE ON) + include_directories(${QUICHE_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${QUICHE_LIBRARIES}) + cmake_push_check_state() + set(CMAKE_REQUIRED_INCLUDES "${QUICHE_INCLUDE_DIRS}") + set(CMAKE_REQUIRED_LIBRARIES "${QUICHE_LIBRARIES}") + check_symbol_exists(quiche_conn_set_qlog_fd "quiche.h" HAVE_QUICHE_CONN_SET_QLOG_FD) + cmake_pop_check_state() +endif() + +if(WIN32) + set(USE_WIN32_CRYPTO ON) +endif() + +if(NOT CURL_DISABLE_LDAP) + if(WIN32) + option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON) + if(USE_WIN32_LDAP) + check_library_exists_concat("wldap32" cldap_open HAVE_WLDAP32) + if(NOT HAVE_WLDAP32) + set(USE_WIN32_LDAP OFF) + endif() + endif() + endif() + + option(CMAKE_USE_OPENLDAP "Use OpenLDAP code." OFF) + mark_as_advanced(CMAKE_USE_OPENLDAP) + set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library") + set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library") + + if(CMAKE_USE_OPENLDAP AND USE_WIN32_LDAP) + message(FATAL_ERROR "Cannot use USE_WIN32_LDAP and CMAKE_USE_OPENLDAP at the same time") + endif() + + # Now that we know, we're not using windows LDAP... + if(USE_WIN32_LDAP) + check_include_file_concat("winldap.h" HAVE_WINLDAP_H) + check_include_file_concat("winber.h" HAVE_WINBER_H) + else() + # Check for LDAP + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) + check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP) + check_library_exists_concat(${CMAKE_LBER_LIB} ber_init HAVE_LIBLBER) + + set(CMAKE_REQUIRED_INCLUDES_BAK ${CMAKE_REQUIRED_INCLUDES}) + set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include directory") + if(CMAKE_LDAP_INCLUDE_DIR) + list(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR}) + endif() + check_include_file_concat("ldap.h" HAVE_LDAP_H) + check_include_file_concat("lber.h" HAVE_LBER_H) + + if(NOT HAVE_LDAP_H) + message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON") + set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP includes won't be used + elseif(NOT HAVE_LIBLDAP) + message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found CURL_DISABLE_LDAP set ON") + set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP includes won't be used + else() + if(CMAKE_USE_OPENLDAP) + set(USE_OPENLDAP ON) + endif() + if(CMAKE_LDAP_INCLUDE_DIR) + include_directories(${CMAKE_LDAP_INCLUDE_DIR}) + endif() + set(NEED_LBER_H ON) + set(_HEADER_LIST) + if(HAVE_WINDOWS_H) + list(APPEND _HEADER_LIST "windows.h") + endif() + if(HAVE_SYS_TYPES_H) + list(APPEND _HEADER_LIST "sys/types.h") + endif() + list(APPEND _HEADER_LIST "ldap.h") + + set(_SRC_STRING "") + foreach(_HEADER ${_HEADER_LIST}) + set(_INCLUDE_STRING "${_INCLUDE_STRING}#include <${_HEADER}>\n") + endforeach() + + set(_SRC_STRING + " + ${_INCLUDE_STRING} + int main(int argc, char ** argv) + { + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); + return 0; + }" + ) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DLDAP_DEPRECATED=1") + list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB}) + if(HAVE_LIBLBER) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB}) + endif() + check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H) + unset(CMAKE_REQUIRED_LIBRARIES) + + if(NOT_NEED_LBER_H) + set(NEED_LBER_H OFF) + else() + set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DNEED_LBER_H") + endif() + endif() + endif() +endif() + +# No ldap, no ldaps. +if(CURL_DISABLE_LDAP) + if(NOT CURL_DISABLE_LDAPS) + message(STATUS "LDAP needs to be enabled to support LDAPS") + set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE) + endif() +endif() + +if(NOT CURL_DISABLE_LDAPS) + check_include_file_concat("ldap_ssl.h" HAVE_LDAP_SSL_H) + check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H) +endif() + +# Check for idn +check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) + +# Check for symbol dlopen (same as HAVE_LIBDL) +check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN) + +option(CURL_ZLIB "Set to ON to enable building curl with zlib support." ON) +set(HAVE_LIBZ OFF) +set(HAVE_ZLIB_H OFF) +set(USE_ZLIB OFF) +if(CURL_ZLIB) + find_package(ZLIB QUIET) + if(ZLIB_FOUND) + set(HAVE_ZLIB_H ON) + set(HAVE_LIBZ ON) + set(USE_ZLIB ON) + + # Depend on ZLIB via imported targets if supported by the running + # version of CMake. This allows our dependents to get our dependencies + # transitively. + if(NOT CMAKE_VERSION VERSION_LESS 3.4) + list(APPEND CURL_LIBS ZLIB::ZLIB) + else() + list(APPEND CURL_LIBS ${ZLIB_LIBRARIES}) + include_directories(${ZLIB_INCLUDE_DIRS}) + endif() + list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) + endif() +endif() + +option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF) +set(HAVE_BROTLI OFF) +if(CURL_BROTLI) + find_package(Brotli QUIET) + if(BROTLI_FOUND) + set(HAVE_BROTLI ON) + list(APPEND CURL_LIBS ${BROTLI_LIBRARIES}) + include_directories(${BROTLI_INCLUDE_DIRS}) + list(APPEND CMAKE_REQUIRED_INCLUDES ${BROTLI_INCLUDE_DIRS}) + endif() +endif() + +option(CURL_ZSTD "Set to ON to enable building curl with zstd support." OFF) +set(HAVE_ZSTD OFF) +if(CURL_ZSTD) + find_package(Zstd REQUIRED) + cmake_push_check_state() + set(CMAKE_REQUIRED_INCLUDES ${Zstd_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${Zstd_LIBRARIES}) + check_symbol_exists(ZSTD_createDStream "zstd.h" HAVE_ZSTD_CREATEDSTREAM) + cmake_pop_check_state() + if(Zstd_FOUND AND HAVE_ZSTD_CREATEDSTREAM) + set(HAVE_ZSTD ON) + list(APPEND CURL_LIBS ${Zstd_LIBRARIES}) + include_directories(${Zstd_INCLUDE_DIRS}) + endif() +endif() + +#libSSH2 +option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON) +mark_as_advanced(CMAKE_USE_LIBSSH2) +set(USE_LIBSSH2 OFF) +set(HAVE_LIBSSH2 OFF) +set(HAVE_LIBSSH2_H OFF) + +if(CMAKE_USE_LIBSSH2) + find_package(LibSSH2) + if(LIBSSH2_FOUND) + list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY}) + set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY}) + list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}") + include_directories("${LIBSSH2_INCLUDE_DIR}") + set(HAVE_LIBSSH2 ON) + set(USE_LIBSSH2 ON) + + # find_package has already found the headers + set(HAVE_LIBSSH2_H ON) + set(CURL_INCLUDES ${CURL_INCLUDES} "${LIBSSH2_INCLUDE_DIR}/libssh2.h") + set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DHAVE_LIBSSH2_H") + + # now check for specific libssh2 symbols as they were added in different versions + set(CMAKE_EXTRA_INCLUDE_FILES "libssh2.h") + check_function_exists(libssh2_version HAVE_LIBSSH2_VERSION) + check_function_exists(libssh2_init HAVE_LIBSSH2_INIT) + check_function_exists(libssh2_exit HAVE_LIBSSH2_EXIT) + check_function_exists(libssh2_scp_send64 HAVE_LIBSSH2_SCP_SEND64) + check_function_exists(libssh2_session_handshake HAVE_LIBSSH2_SESSION_HANDSHAKE) + set(CMAKE_EXTRA_INCLUDE_FILES "") + unset(CMAKE_REQUIRED_LIBRARIES) + endif() +endif() + +# libssh +option(CMAKE_USE_LIBSSH "Use libSSH" OFF) +mark_as_advanced(CMAKE_USE_LIBSSH) +if(NOT HAVE_LIBSSH2 AND CMAKE_USE_LIBSSH) + find_package(libssh CONFIG) + if(libssh_FOUND) + message(STATUS "Found libssh ${libssh_VERSION}") + # Use imported target for include and library paths. + list(APPEND CURL_LIBS ssh) + set(USE_LIBSSH ON) + set(HAVE_LIBSSH_LIBSSH_H 1) + endif() +endif() + +option(CMAKE_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is supported with CMake build)" OFF) +mark_as_advanced(CMAKE_USE_GSSAPI) + +if(CMAKE_USE_GSSAPI) + find_package(GSS) + + set(HAVE_GSSAPI ${GSS_FOUND}) + if(GSS_FOUND) + + message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"") + + list(APPEND CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIR}) + check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H) + check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H) + check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H) + + if(GSS_FLAVOUR STREQUAL "Heimdal") + set(HAVE_GSSHEIMDAL ON) + else() # MIT + set(HAVE_GSSMIT ON) + set(_INCLUDE_LIST "") + if(HAVE_GSSAPI_GSSAPI_H) + list(APPEND _INCLUDE_LIST "gssapi/gssapi.h") + endif() + if(HAVE_GSSAPI_GSSAPI_GENERIC_H) + list(APPEND _INCLUDE_LIST "gssapi/gssapi_generic.h") + endif() + if(HAVE_GSSAPI_GSSAPI_KRB5_H) + list(APPEND _INCLUDE_LIST "gssapi/gssapi_krb5.h") + endif() + + string(REPLACE ";" " " _COMPILER_FLAGS_STR "${GSS_COMPILER_FLAGS}") + string(REPLACE ";" " " _LINKER_FLAGS_STR "${GSS_LINKER_FLAGS}") + + foreach(_dir ${GSS_LINK_DIRECTORIES}) + set(_LINKER_FLAGS_STR "${_LINKER_FLAGS_STR} -L\"${_dir}\"") + endforeach() + + set(CMAKE_REQUIRED_FLAGS "${_COMPILER_FLAGS_STR} ${_LINKER_FLAGS_STR}") + set(CMAKE_REQUIRED_LIBRARIES ${GSS_LIBRARIES}) + check_symbol_exists("GSS_C_NT_HOSTBASED_SERVICE" ${_INCLUDE_LIST} HAVE_GSS_C_NT_HOSTBASED_SERVICE) + if(NOT HAVE_GSS_C_NT_HOSTBASED_SERVICE) + set(HAVE_OLD_GSSMIT ON) + endif() + unset(CMAKE_REQUIRED_LIBRARIES) + + endif() + + include_directories(${GSS_INCLUDE_DIR}) + link_directories(${GSS_LINK_DIRECTORIES}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") + list(APPEND CURL_LIBS ${GSS_LIBRARIES}) + + else() + message(WARNING "GSSAPI support has been requested but no supporting libraries found. Skipping.") + endif() +endif() + +option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON) +if(ENABLE_UNIX_SOCKETS) + include(CheckStructHasMember) + check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS) +else() + unset(USE_UNIX_SOCKETS CACHE) +endif() + +option(ENABLE_ALT_SVC "Enable alt-svc support" OFF) +set(USE_ALTSVC ${ENABLE_ALT_SVC}) + +# +# CA handling +# +set(CURL_CA_BUNDLE "auto" CACHE STRING + "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") +set(CURL_CA_FALLBACK OFF CACHE BOOL + "Set ON to use built-in CA store of TLS backend. Defaults to OFF") +set(CURL_CA_PATH "auto" CACHE STRING + "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") + +if("${CURL_CA_BUNDLE}" STREQUAL "") + message(FATAL_ERROR "Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or file path.") +elseif("${CURL_CA_BUNDLE}" STREQUAL "none") + unset(CURL_CA_BUNDLE CACHE) +elseif("${CURL_CA_BUNDLE}" STREQUAL "auto") + unset(CURL_CA_BUNDLE CACHE) + set(CURL_CA_BUNDLE_AUTODETECT TRUE) +else() + set(CURL_CA_BUNDLE_SET TRUE) +endif() + +if("${CURL_CA_PATH}" STREQUAL "") + message(FATAL_ERROR "Invalid value of CURL_CA_PATH. Use 'none', 'auto' or directory path.") +elseif("${CURL_CA_PATH}" STREQUAL "none") + unset(CURL_CA_PATH CACHE) +elseif("${CURL_CA_PATH}" STREQUAL "auto") + unset(CURL_CA_PATH CACHE) + if(NOT USE_NSS) + set(CURL_CA_PATH_AUTODETECT TRUE) + endif() +else() + set(CURL_CA_PATH_SET TRUE) +endif() + +if(CURL_CA_BUNDLE_SET AND CURL_CA_PATH_AUTODETECT) + # Skip autodetection of unset CA path because CA bundle is set explicitly +elseif(CURL_CA_PATH_SET AND CURL_CA_BUNDLE_AUTODETECT) + # Skip autodetection of unset CA bundle because CA path is set explicitly +elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT) + # first try autodetecting a CA bundle, then a CA path + + if(CURL_CA_BUNDLE_AUTODETECT) + set(SEARCH_CA_BUNDLE_PATHS + /etc/ssl/certs/ca-certificates.crt + /etc/pki/tls/certs/ca-bundle.crt + /usr/share/ssl/certs/ca-bundle.crt + /usr/local/share/certs/ca-root-nss.crt + /etc/ssl/cert.pem) + + foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS}) + if(EXISTS "${SEARCH_CA_BUNDLE_PATH}") + message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}") + set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}") + set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been set") + break() + endif() + endforeach() + endif() + + if(CURL_CA_PATH_AUTODETECT AND (NOT CURL_CA_PATH_SET)) + if(EXISTS "/etc/ssl/certs") + set(CURL_CA_PATH "/etc/ssl/certs") + set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been set") + endif() + endif() +endif() + +if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS) + message(STATUS + "CA path only supported by OpenSSL, GnuTLS or mbed TLS. " + "Set CURL_CA_PATH=none or enable one of those TLS backends.") +endif() + +# Check for header files +if(NOT UNIX) + check_include_file_concat("windows.h" HAVE_WINDOWS_H) + check_include_file_concat("winsock.h" HAVE_WINSOCK_H) + check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H) + check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H) + if(NOT CURL_WINDOWS_SSPI AND USE_OPENSSL) + set(CURL_LIBS ${CURL_LIBS} "crypt32") + endif() +endif() + +check_include_file_concat("stdio.h" HAVE_STDIO_H) +check_include_file_concat("inttypes.h" HAVE_INTTYPES_H) +check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H) +check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H) +check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H) +check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H) +check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H) +check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H) +check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H) +check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H) +check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H) +check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H) +check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H) +check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H) +check_include_file_concat("sys/un.h" HAVE_SYS_UN_H) +check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H) +check_include_file_concat("sys/xattr.h" HAVE_SYS_XATTR_H) +check_include_file_concat("alloca.h" HAVE_ALLOCA_H) +check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H) +check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H) +check_include_file_concat("assert.h" HAVE_ASSERT_H) +check_include_file_concat("crypto.h" HAVE_CRYPTO_H) +check_include_file_concat("err.h" HAVE_ERR_H) +check_include_file_concat("errno.h" HAVE_ERRNO_H) +check_include_file_concat("fcntl.h" HAVE_FCNTL_H) +check_include_file_concat("idn2.h" HAVE_IDN2_H) +check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H) +check_include_file_concat("io.h" HAVE_IO_H) +check_include_file_concat("krb.h" HAVE_KRB_H) +check_include_file_concat("libgen.h" HAVE_LIBGEN_H) +check_include_file_concat("locale.h" HAVE_LOCALE_H) +check_include_file_concat("net/if.h" HAVE_NET_IF_H) +check_include_file_concat("netdb.h" HAVE_NETDB_H) +check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H) +check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H) + +check_include_file_concat("pem.h" HAVE_PEM_H) +check_include_file_concat("poll.h" HAVE_POLL_H) +check_include_file_concat("pwd.h" HAVE_PWD_H) +check_include_file_concat("rsa.h" HAVE_RSA_H) +check_include_file_concat("setjmp.h" HAVE_SETJMP_H) +check_include_file_concat("sgtty.h" HAVE_SGTTY_H) +check_include_file_concat("signal.h" HAVE_SIGNAL_H) +check_include_file_concat("ssl.h" HAVE_SSL_H) +check_include_file_concat("stdbool.h" HAVE_STDBOOL_H) +check_include_file_concat("stdint.h" HAVE_STDINT_H) +check_include_file_concat("stdio.h" HAVE_STDIO_H) +check_include_file_concat("stdlib.h" HAVE_STDLIB_H) +check_include_file_concat("string.h" HAVE_STRING_H) +check_include_file_concat("strings.h" HAVE_STRINGS_H) +check_include_file_concat("stropts.h" HAVE_STROPTS_H) +check_include_file_concat("termio.h" HAVE_TERMIO_H) +check_include_file_concat("termios.h" HAVE_TERMIOS_H) +check_include_file_concat("time.h" HAVE_TIME_H) +check_include_file_concat("unistd.h" HAVE_UNISTD_H) +check_include_file_concat("utime.h" HAVE_UTIME_H) +check_include_file_concat("x509.h" HAVE_X509_H) + +check_include_file_concat("process.h" HAVE_PROCESS_H) +check_include_file_concat("stddef.h" HAVE_STDDEF_H) +check_include_file_concat("dlfcn.h" HAVE_DLFCN_H) +check_include_file_concat("malloc.h" HAVE_MALLOC_H) +check_include_file_concat("memory.h" HAVE_MEMORY_H) +check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H) +check_include_file_concat("stdint.h" HAVE_STDINT_H) +check_include_file_concat("sockio.h" HAVE_SOCKIO_H) +check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H) + +check_type_size(size_t SIZEOF_SIZE_T) +check_type_size(ssize_t SIZEOF_SSIZE_T) +check_type_size("long long" SIZEOF_LONG_LONG) +check_type_size("long" SIZEOF_LONG) +check_type_size("short" SIZEOF_SHORT) +check_type_size("int" SIZEOF_INT) +check_type_size("__int64" SIZEOF___INT64) +check_type_size("long double" SIZEOF_LONG_DOUBLE) +check_type_size("time_t" SIZEOF_TIME_T) +if(NOT HAVE_SIZEOF_SSIZE_T) + if(SIZEOF_LONG EQUAL SIZEOF_SIZE_T) + set(ssize_t long) + endif() + if(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T) + set(ssize_t __int64) + endif() +endif() +# off_t is sized later, after the HAVE_FILE_OFFSET_BITS test + +if(HAVE_SIZEOF_LONG_LONG) + set(HAVE_LONGLONG 1) + set(HAVE_LL 1) +endif() + +find_file(RANDOM_FILE urandom /dev) +mark_as_advanced(RANDOM_FILE) + +# Check for some functions that are used +if(HAVE_LIBWS2_32) + set(CMAKE_REQUIRED_LIBRARIES ws2_32) +elseif(HAVE_LIBSOCKET) + set(CMAKE_REQUIRED_LIBRARIES socket) +endif() + +check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME) +check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET) +check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT) +check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL) +check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP) +check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR) +check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R) +check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME) +check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME) +check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP) +check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP) +check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI) +check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI) +check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM) +if(NOT HAVE_STRNCMPI) + set(HAVE_STRCMPI) +endif() +check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR) +check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R) +check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY) +check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR) +check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA) +check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R) +check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR) +check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR) +check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR) +check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET) +check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF) +check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP) +check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R) +check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT) +check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID) +check_symbol_exists(getpwuid_r "${CURL_INCLUDES}" HAVE_GETPWUID_R) +check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID) +check_symbol_exists(usleep "${CURL_INCLUDES}" HAVE_USLEEP) +check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME) +check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R) +check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R) + +check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME) +check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R) + +check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC) +check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO) +if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO) + set(HAVE_SIGNAL 1) +endif() +check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME) +check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL) +check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64) +check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R) +check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT) +check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR) +check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK) +check_symbol_exists(getaddrinfo "${CURL_INCLUDES}" HAVE_GETADDRINFO) +check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO) +check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS) +check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE) +check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE) +check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME) +check_symbol_exists(getpeername "${CURL_INCLUDES}" HAVE_GETPEERNAME) +check_symbol_exists(getsockname "${CURL_INCLUDES}" HAVE_GETSOCKNAME) +check_symbol_exists(if_nametoindex "${CURL_INCLUDES}" HAVE_IF_NAMETOINDEX) +check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT) +check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE) +check_symbol_exists(setmode "${CURL_INCLUDES}" HAVE_SETMODE) +check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT) +check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL) +check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL) +check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) +check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) +check_symbol_exists(inet_pton "${CURL_INCLUDES}" HAVE_INET_PTON) + +check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR) +if(HAVE_FSETXATTR) + foreach(CURL_TEST HAVE_FSETXATTR_5 HAVE_FSETXATTR_6) + curl_internal_test(${CURL_TEST}) + endforeach() +endif() + +# sigaction and sigsetjmp are special. Use special mechanism for +# detecting those, but only if previous attempt failed. +if(HAVE_SIGNAL_H) + check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION) +endif() + +if(NOT HAVE_SIGSETJMP) + if(HAVE_SETJMP_H) + check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP) + if(HAVE_MACRO_SIGSETJMP) + set(HAVE_SIGSETJMP 1) + endif() + endif() +endif() + +# If there is no stricmp(), do not allow LDAP to parse URLs +if(NOT HAVE_STRICMP) + set(HAVE_LDAP_URL_PARSE 1) +endif() + +# Do curl specific tests +foreach(CURL_TEST + HAVE_FCNTL_O_NONBLOCK + HAVE_IOCTLSOCKET + HAVE_IOCTLSOCKET_CAMEL + HAVE_IOCTLSOCKET_CAMEL_FIONBIO + HAVE_IOCTLSOCKET_FIONBIO + HAVE_IOCTL_FIONBIO + HAVE_IOCTL_SIOCGIFADDR + HAVE_SETSOCKOPT_SO_NONBLOCK + HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID + TIME_WITH_SYS_TIME + HAVE_O_NONBLOCK + HAVE_GETHOSTBYADDR_R_5 + HAVE_GETHOSTBYADDR_R_7 + HAVE_GETHOSTBYADDR_R_8 + HAVE_GETHOSTBYADDR_R_5_REENTRANT + HAVE_GETHOSTBYADDR_R_7_REENTRANT + HAVE_GETHOSTBYADDR_R_8_REENTRANT + HAVE_GETHOSTBYNAME_R_3 + HAVE_GETHOSTBYNAME_R_5 + HAVE_GETHOSTBYNAME_R_6 + HAVE_GETHOSTBYNAME_R_3_REENTRANT + HAVE_GETHOSTBYNAME_R_5_REENTRANT + HAVE_GETHOSTBYNAME_R_6_REENTRANT + HAVE_IN_ADDR_T + HAVE_BOOL_T + STDC_HEADERS + RETSIGTYPE_TEST + HAVE_INET_NTOA_R_DECL + HAVE_INET_NTOA_R_DECL_REENTRANT + HAVE_GETADDRINFO + HAVE_FILE_OFFSET_BITS + HAVE_VARIADIC_MACROS_C99 + HAVE_VARIADIC_MACROS_GCC + ) + curl_internal_test(${CURL_TEST}) +endforeach() + +if(HAVE_FILE_OFFSET_BITS) + set(_FILE_OFFSET_BITS 64) + set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64") +endif() +check_type_size("off_t" SIZEOF_OFF_T) + +# include this header to get the type +set(CMAKE_REQUIRED_INCLUDES "${CURL_SOURCE_DIR}/include") +set(CMAKE_EXTRA_INCLUDE_FILES "curl/system.h") +check_type_size("curl_off_t" SIZEOF_CURL_OFF_T) +set(CMAKE_EXTRA_INCLUDE_FILES "") + +set(CMAKE_REQUIRED_FLAGS) + +foreach(CURL_TEST + HAVE_GLIBC_STRERROR_R + HAVE_POSIX_STRERROR_R + ) + curl_internal_test(${CURL_TEST}) +endforeach() + +# Check for reentrant +foreach(CURL_TEST + HAVE_GETHOSTBYADDR_R_5 + HAVE_GETHOSTBYADDR_R_7 + HAVE_GETHOSTBYADDR_R_8 + HAVE_GETHOSTBYNAME_R_3 + HAVE_GETHOSTBYNAME_R_5 + HAVE_GETHOSTBYNAME_R_6 + HAVE_INET_NTOA_R_DECL_REENTRANT) + if(NOT ${CURL_TEST}) + if(${CURL_TEST}_REENTRANT) + set(NEED_REENTRANT 1) + endif() + endif() +endforeach() + +if(NEED_REENTRANT) + foreach(CURL_TEST + HAVE_GETHOSTBYADDR_R_5 + HAVE_GETHOSTBYADDR_R_7 + HAVE_GETHOSTBYADDR_R_8 + HAVE_GETHOSTBYNAME_R_3 + HAVE_GETHOSTBYNAME_R_5 + HAVE_GETHOSTBYNAME_R_6) + set(${CURL_TEST} 0) + if(${CURL_TEST}_REENTRANT) + set(${CURL_TEST} 1) + endif() + endforeach() +endif() + +if(HAVE_INET_NTOA_R_DECL_REENTRANT) + set(HAVE_INET_NTOA_R_DECL 1) + set(NEED_REENTRANT 1) +endif() + +# Check clock_gettime(CLOCK_MONOTONIC, x) support +curl_internal_test(HAVE_CLOCK_GETTIME_MONOTONIC) + +# Check compiler support of __builtin_available() +curl_internal_test(HAVE_BUILTIN_AVAILABLE) + +# Some other minor tests + +if(NOT HAVE_IN_ADDR_T) + set(in_addr_t "unsigned long") +endif() + +# Fix libz / zlib.h + +if(NOT CURL_SPECIAL_LIBZ) + if(NOT HAVE_LIBZ) + set(HAVE_ZLIB_H 0) + endif() + + if(NOT HAVE_ZLIB_H) + set(HAVE_LIBZ 0) + endif() +endif() + +# Check for nonblocking +set(HAVE_DISABLED_NONBLOCKING 1) +if(HAVE_FIONBIO OR + HAVE_IOCTLSOCKET OR + HAVE_IOCTLSOCKET_CASE OR + HAVE_O_NONBLOCK) + set(HAVE_DISABLED_NONBLOCKING) +endif() + +if(RETSIGTYPE_TEST) + set(RETSIGTYPE void) +else() + set(RETSIGTYPE int) +endif() + +if(CMAKE_COMPILER_IS_GNUCC AND APPLE) + include(CheckCCompilerFlag) + check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double) + if(HAVE_C_FLAG_Wno_long_double) + # The Mac version of GCC warns about use of long double. Disable it. + get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS) + if(MPRINTF_COMPILE_FLAGS) + set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double") + else() + set(MPRINTF_COMPILE_FLAGS "-Wno-long-double") + endif() + set_source_files_properties(mprintf.c PROPERTIES + COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS}) + endif() +endif() + +# TODO test which of these headers are required +if(WIN32) + set(CURL_PULL_WS2TCPIP_H ${HAVE_WS2TCPIP_H}) +else() + set(CURL_PULL_SYS_TYPES_H ${HAVE_SYS_TYPES_H}) + set(CURL_PULL_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H}) + set(CURL_PULL_SYS_POLL_H ${HAVE_SYS_POLL_H}) +endif() +set(CURL_PULL_STDINT_H ${HAVE_STDINT_H}) +set(CURL_PULL_INTTYPES_H ${HAVE_INTTYPES_H}) + +include(CMake/OtherTests.cmake) + +add_definitions(-DHAVE_CONFIG_H) + +# For Windows, all compilers used by CMake should support large files +if(WIN32) + set(USE_WIN32_LARGE_FILES ON) + + # Use the manifest embedded in the Windows Resource + set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DCURL_EMBED_MANIFEST") +endif() + +if(MSVC) + # Disable default manifest added by CMake + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") + + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + if(CMAKE_C_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + endif() +endif() + +if(CURL_WERROR) + if(MSVC_VERSION) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + else() + # this assumes clang or gcc style options + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + endif() +endif() + +if(CURL_LTO) + if(CMAKE_VERSION VERSION_LESS 3.9) + message(FATAL_ERROR "Requested LTO but your cmake version ${CMAKE_VERSION} is to old. You need at least 3.9") + endif() + + cmake_policy(SET CMP0069 NEW) + + include(CheckIPOSupported) + check_ipo_supported(RESULT CURL_HAS_LTO OUTPUT CURL_LTO_ERROR LANGUAGES C) + if(CURL_HAS_LTO) + message(STATUS "LTO supported and enabled") + else() + message(FATAL_ERROR "LTO was requested - but compiler doesn't support it\n${CURL_LTO_ERROR}") + endif() +endif() + + +# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it). +function(transform_makefile_inc INPUT_FILE OUTPUT_FILE) + file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT) + string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + + string(REGEX REPLACE "\\\\\n" "!π!α!" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REPLACE "!π!α!" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + + string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${} + string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts. + file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT}) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${INPUT_FILE}") +endfunction() + +include(GNUInstallDirs) + +set(CURL_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) +set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") + +if(USE_MANUAL) + add_subdirectory(docs) +endif() + +add_subdirectory(lib) + +if(BUILD_CURL_EXE) + add_subdirectory(src) +endif() + +option(BUILD_TESTING "Build tests" "${PERL_FOUND}") +if(NOT PERL_FOUND) + message(STATUS "Perl not found, testing disabled.") +elseif(BUILD_TESTING) + add_subdirectory(tests) +endif() + +# NTLM support requires crypto function adaptions from various SSL libs +# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS +if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_DARWINSSL OR USE_MBEDTLS OR USE_WIN32_CRYPTO)) + set(use_ntlm ON) +else() + set(use_ntlm OFF) +endif() + +# Helper to populate a list (_items) with a label when conditions (the remaining +# args) are satisfied +macro(_add_if label) + # needs to be a macro to allow this indirection + if(${ARGN}) + set(_items ${_items} "${label}") + endif() +endmacro() + +# Clear list and try to detect available features +set(_items) +_add_if("SSL" SSL_ENABLED) +_add_if("IPv6" ENABLE_IPV6) +_add_if("unix-sockets" USE_UNIX_SOCKETS) +_add_if("libz" HAVE_LIBZ) +_add_if("brotli" HAVE_BROTLI) +_add_if("zstd" HAVE_ZSTD) +_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32) +_add_if("IDN" HAVE_LIBIDN2) +_add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND + ((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES)) +# TODO SSP1 (Schannel) check is missing +_add_if("SSPI" USE_WINDOWS_SSPI) +_add_if("GSS-API" HAVE_GSSAPI) +_add_if("alt-svc" ENABLE_ALT_SVC) +# TODO SSP1 missing for SPNEGO +_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND + (HAVE_GSSAPI OR USE_WINDOWS_SSPI)) +_add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND + (HAVE_GSSAPI OR USE_WINDOWS_SSPI)) +# NTLM support requires crypto function adaptions from various SSL libs +# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS +_add_if("NTLM" use_ntlm OR USE_WINDOWS_SSPI) +# TODO missing option (autoconf: --enable-ntlm-wb) +_add_if("NTLM_WB" use_ntlm AND NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED) +# TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP +_add_if("TLS-SRP" USE_TLS_SRP) +# TODO option --with-nghttp2 tests for nghttp2 lib and nghttp2/nghttp2.h header +_add_if("HTTP2" USE_NGHTTP2) +_add_if("HTTP3" USE_NGTCP2 OR USE_QUICHE) +_add_if("MultiSSL" CURL_WITH_MULTI_SSL) +_add_if("HTTPS-proxy" SSL_ENABLED AND (USE_OPENSSL OR USE_GNUTLS OR USE_NSS)) +string(REPLACE ";" " " SUPPORT_FEATURES "${_items}") +message(STATUS "Enabled features: ${SUPPORT_FEATURES}") + +# Clear list and try to detect available protocols +set(_items) +_add_if("HTTP" NOT CURL_DISABLE_HTTP) +_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED) +_add_if("FTP" NOT CURL_DISABLE_FTP) +_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED) +_add_if("FILE" NOT CURL_DISABLE_FILE) +_add_if("TELNET" NOT CURL_DISABLE_TELNET) +_add_if("LDAP" NOT CURL_DISABLE_LDAP) +# CURL_DISABLE_LDAP implies CURL_DISABLE_LDAPS +# TODO check HAVE_LDAP_SSL (in autoconf this is enabled with --enable-ldaps) +_add_if("LDAPS" NOT CURL_DISABLE_LDAPS AND + ((USE_OPENLDAP AND SSL_ENABLED) OR + (NOT USE_OPENLDAP AND HAVE_LDAP_SSL))) +_add_if("DICT" NOT CURL_DISABLE_DICT) +_add_if("TFTP" NOT CURL_DISABLE_TFTP) +_add_if("GOPHER" NOT CURL_DISABLE_GOPHER) +_add_if("POP3" NOT CURL_DISABLE_POP3) +_add_if("POP3S" NOT CURL_DISABLE_POP3 AND SSL_ENABLED) +_add_if("IMAP" NOT CURL_DISABLE_IMAP) +_add_if("IMAPS" NOT CURL_DISABLE_IMAP AND SSL_ENABLED) +_add_if("SMB" NOT CURL_DISABLE_SMB AND use_ntlm) +_add_if("SMBS" NOT CURL_DISABLE_SMB AND SSL_ENABLED AND use_ntlm) +_add_if("SMTP" NOT CURL_DISABLE_SMTP) +_add_if("SMTPS" NOT CURL_DISABLE_SMTP AND SSL_ENABLED) +_add_if("SCP" USE_LIBSSH2 OR USE_LIBSSH) +_add_if("SFTP" USE_LIBSSH2 OR USE_LIBSSH) +_add_if("RTSP" NOT CURL_DISABLE_RTSP) +_add_if("RTMP" USE_LIBRTMP) +_add_if("MQTT" NOT CURL_DISABLE_MQTT) +if(_items) + list(SORT _items) +endif() +string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}") +message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}") + +# Clear list and collect SSL backends +set(_items) +_add_if("Schannel" SSL_ENABLED AND USE_WINDOWS_SSPI) +_add_if("OpenSSL" SSL_ENABLED AND USE_OPENSSL) +_add_if("Secure Transport" SSL_ENABLED AND USE_SECTRANSP) +_add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS) +_add_if("BearSSL" SSL_ENABLED AND USE_BEARSSL) +_add_if("NSS" SSL_ENABLED AND USE_NSS) +_add_if("wolfSSL" SSL_ENABLED AND USE_WOLFSSL) +if(_items) + list(SORT _items) +endif() +string(REPLACE ";" " " SSL_BACKENDS "${_items}") +message(STATUS "Enabled SSL backends: ${SSL_BACKENDS}") + +# curl-config needs the following options to be set. +set(CC "${CMAKE_C_COMPILER}") +# TODO probably put a -D... options here? +set(CONFIGURE_OPTIONS "") +# TODO when to set "-DCURL_STATICLIB" for CPPFLAG_CURL_STATICLIB? +set(CPPFLAG_CURL_STATICLIB "") +set(CURLVERSION "${CURL_VERSION}") +set(exec_prefix "\${prefix}") +set(includedir "\${prefix}/include") +set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") +set(LIBCURL_LIBS "") +set(libdir "${CMAKE_INSTALL_PREFIX}/lib") +foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) + if(TARGET "${_lib}") + set(_libname "${_lib}") + get_target_property(_libtype "${_libname}" TYPE) + if(_libtype STREQUAL INTERFACE_LIBRARY) + # Interface libraries can occur when an external project embeds curl and + # defined targets such as ZLIB::ZLIB by themselves. Ignore these as + # reading the LOCATION property will error out. Assume the user won't need + # this information in the .pc file. + continue() + endif() + get_target_property(_lib "${_libname}" LOCATION) + if(NOT _lib) + message(WARNING "Bad lib in library list: ${_libname}") + continue() + endif() + endif() + if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-") + set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}") + else() + set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}") + endif() +endforeach() +if(BUILD_SHARED_LIBS) + set(ENABLE_SHARED "yes") + set(ENABLE_STATIC "no") + set(LIBCURL_NO_SHARED "") +else() + set(ENABLE_SHARED "no") + set(ENABLE_STATIC "yes") + set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}") +endif() +# "a" (Linux) or "lib" (Windows) +string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}") +set(prefix "${CMAKE_INSTALL_PREFIX}") +# Set this to "yes" to append all libraries on which -lcurl is dependent +set(REQUIRE_LIB_DEPS "no") +# SUPPORT_FEATURES +# SUPPORT_PROTOCOLS +set(VERSIONNUM "${CURL_VERSION_NUM}") + +# Finally generate a "curl-config" matching this config +# Use: +# * ENABLE_SHARED +# * ENABLE_STATIC +configure_file("${CURL_SOURCE_DIR}/curl-config.in" + "${CURL_BINARY_DIR}/curl-config" @ONLY) +install(FILES "${CURL_BINARY_DIR}/curl-config" + DESTINATION ${CMAKE_INSTALL_BINDIR} + PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + +# Finally generate a pkg-config file matching this config +configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in" + "${CURL_BINARY_DIR}/libcurl.pc" @ONLY) +install(FILES "${CURL_BINARY_DIR}/libcurl.pc" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +# install headers +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.h") + +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${version_config}" + VERSION ${CURL_VERSION} + COMPATIBILITY SameMajorVersion +) + +# Use: +# * TARGETS_EXPORT_NAME +# * PROJECT_NAME +configure_package_config_file(CMake/curl-config.cmake.in + "${project_config}" + INSTALL_DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) + +install( + EXPORT "${TARGETS_EXPORT_NAME}" + NAMESPACE "${PROJECT_NAME}::" + DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) + +install( + FILES ${version_config} ${project_config} + DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) + +# Workaround for MSVS10 to avoid the Dialog Hell +# FIXME: This could be removed with future version of CMake. +if(MSVC_VERSION EQUAL 1600) + set(CURL_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CURL.sln") + if(EXISTS "${CURL_SLN_FILENAME}") + file(APPEND "${CURL_SLN_FILENAME}" "\n# This should be regenerated!\n") + endif() +endif() + +if(NOT TARGET uninstall) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/CMake/cmake_uninstall.cmake + IMMEDIATE @ONLY) + + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P + ${CMAKE_CURRENT_BINARY_DIR}/CMake/cmake_uninstall.cmake) +endif() diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/COPYING b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/COPYING new file mode 100644 index 00000000..9d9e4af8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/COPYING @@ -0,0 +1,22 @@ +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1996 - 2020, Daniel Stenberg, , and many +contributors, see the THANKS file. + +All rights reserved. + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization of the copyright holder. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/MacOSX-Framework b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/MacOSX-Framework new file mode 100755 index 00000000..73d9ed8b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/MacOSX-Framework @@ -0,0 +1,158 @@ +#!/bin/bash +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# This script performs all of the steps needed to build a +# universal binary libcurl.framework for Mac OS X 10.4 or greater. +# +# Hendrik Visage: +# Generalizations added since Snowleopard (10.6) do not include +# the 10.4u SDK. +# +# Also note: +# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support +#If you need to have PPC64 support then change below to 1 +PPC64_NEEDED=0 +# Apple does not support building for PPC anymore in Xcode 4 and later. +# If you're using Xcode 3 or earlier and need PPC support, then change +# the setting below to 1 +PPC_NEEDED=0 + +# For me the default is to develop for the platform I am on, and if you +#desire compatibility with older versions then change USE_OLD to 1 :) +USE_OLD=0 + +VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h` +FRAMEWORK_VERSION=Versions/Release-$VERSION + +#I also wanted to "copy over" the system, and thus the reason I added the +# version to Versions/Release-7.20.1 etc. +# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it +# and setup the right paths to this version, leaving the system version +# "intact", so you can "fix" it later with the links to Versions/A/... + +DEVELOPER_PATH=`xcode-select --print-path` +# Around Xcode 4.3, SDKs were moved from the Developer folder into the +# MacOSX.platform folder +if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then + SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs" +else + SDK_PATH="$DEVELOPER_PATH/SDKs"; +fi +OLD_SDK=`ls $SDK_PATH|head -1` +NEW_SDK=`ls -r $SDK_PATH|head -1` + +if test "0"$USE_OLD -gt 0 +then + SDK32=$OLD_SDK +else + SDK32=$NEW_SDK +fi + +MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//` + +SDK32_DIR=$SDK_PATH/$SDK32 +MINVER32='-mmacosx-version-min='$MACVER +if test $PPC_NEEDED -gt 0; then + ARCHES32='-arch i386 -arch ppc' +else + ARCHES32='-arch i386' +fi + +if test $PPC64_NEEDED -gt 0 +then + SDK64=10.5 + ARCHES64='-arch x86_64 -arch ppc64' + SDK64=`ls $SDK_PATH|grep 10.5|head -1` +else + ARCHES64='-arch x86_64' + #We "know" that 10.4 and earlier do not support 64bit + OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1` + NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4][^0-9]" | head -1` + if test $USE_OLD -gt 0 + then + SDK64=$OLD_SDK64 + else + SDK64=$NEW_SDK64 + fi +fi + +SDK64_DIR=$SDK_PATH/$SDK64 +MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//` + +MINVER64='-mmacosx-version-min='$MACVER64 + +if test ! -z $SDK32; then + echo "----Configuring libcurl for 32 bit universal framework..." + make clean + ./configure --disable-dependency-tracking --disable-static --with-gssapi --with-secure-transport \ + CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \ + LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \ + CC=$CC + + echo "----Building 32 bit libcurl..." + make -j `sysctl -n hw.logicalcpu_max` + + echo "----Creating 32 bit framework..." + rm -r libcurl.framework + mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources + cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl + install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl + /usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist + mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl + cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl + pushd libcurl.framework + ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl + ln -fs ${FRAMEWORK_VERSION}/Resources Resources + ln -fs ${FRAMEWORK_VERSION}/Headers Headers + cd Versions + ln -fs $(basename "${FRAMEWORK_VERSION}") Current + + echo Testing for SDK64 + if test -d $SDK64_DIR; then + echo entering... + popd + make clean + echo "----Configuring libcurl for 64 bit universal framework..." + ./configure --disable-dependency-tracking --disable-static --with-gssapi --with-secure-transport \ + CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \ + LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \ + CC=$CC + + echo "----Building 64 bit libcurl..." + make -j `sysctl -n hw.logicalcpu_max` + + echo "----Appending 64 bit framework to 32 bit framework..." + cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 + install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 + cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 + pwd + lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl + rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 + fi + + pwd + lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl + echo "libcurl.framework is built and can now be included in other projects." + echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks." +else + echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed." +fi diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile new file mode 100644 index 00000000..8e084604 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile @@ -0,0 +1,115 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +all: + ./configure + make + +ssl: + ./configure --with-ssl + make + +mingw32: + $(MAKE) -C lib -f Makefile.m32 + $(MAKE) -C src -f Makefile.m32 + +mingw32-clean: + $(MAKE) -C lib -f Makefile.m32 clean + $(MAKE) -C src -f Makefile.m32 clean + $(MAKE) -C docs/examples -f Makefile.m32 clean + +mingw32-vclean mingw32-distclean: + $(MAKE) -C lib -f Makefile.m32 vclean + $(MAKE) -C src -f Makefile.m32 vclean + $(MAKE) -C docs/examples -f Makefile.m32 vclean + +mingw32-examples%: + $(MAKE) -C docs/examples -f Makefile.m32 CFG=$@ + +mingw32%: + $(MAKE) -C lib -f Makefile.m32 CFG=$@ + $(MAKE) -C src -f Makefile.m32 CFG=$@ + +vc: + cd winbuild + nmake /f Makefile.vc MACHINE=x86 + +vc-x64: + cd winbuild + nmake /f Makefile.vc MACHINE=x64 + +djgpp: + $(MAKE) -C lib -f Makefile.dj + $(MAKE) -C src -f Makefile.dj + +cygwin: + ./configure + make + +cygwin-ssl: + ./configure --with-ssl + make + +amiga: + cd ./lib && make -f makefile.amiga + cd ./src && make -f makefile.amiga + +netware: + $(MAKE) -C lib -f Makefile.netware + $(MAKE) -C src -f Makefile.netware + +netware-clean: + $(MAKE) -C lib -f Makefile.netware clean + $(MAKE) -C src -f Makefile.netware clean + $(MAKE) -C docs/examples -f Makefile.netware clean + +netware-vclean netware-distclean: + $(MAKE) -C lib -f Makefile.netware vclean + $(MAKE) -C src -f Makefile.netware vclean + $(MAKE) -C docs/examples -f Makefile.netware vclean + +netware-install: + $(MAKE) -C lib -f Makefile.netware install + $(MAKE) -C src -f Makefile.netware install + +netware-examples-%: + $(MAKE) -C docs/examples -f Makefile.netware CFG=$@ + +netware-%: + $(MAKE) -C lib -f Makefile.netware CFG=$@ + $(MAKE) -C src -f Makefile.netware CFG=$@ + +unix: all + +unix-ssl: ssl + +linux: all + +linux-ssl: ssl + +ca-bundle: lib/mk-ca-bundle.pl + @echo "generate a fresh ca-bundle.crt" + @perl $< -b -l -u lib/ca-bundle.crt + +ca-firefox: lib/firefox-db2pem.sh + @echo "generate a fresh ca-bundle.crt" + ./lib/firefox-db2pem.sh lib/ca-bundle.crt diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.am b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.am new file mode 100644 index 00000000..1a6d7f99 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.am @@ -0,0 +1,744 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +AUTOMAKE_OPTIONS = foreign + +ACLOCAL_AMFLAGS = -I m4 + +CMAKE_DIST = \ + CMake/cmake_uninstall.cmake.in \ + CMake/CMakeConfigurableFile.in \ + CMake/curl-config.cmake.in \ + CMake/CurlSymbolHiding.cmake \ + CMake/CurlTests.c \ + CMake/FindBearSSL.cmake \ + CMake/FindBrotli.cmake \ + CMake/FindCARES.cmake \ + CMake/FindGSS.cmake \ + CMake/FindLibSSH2.cmake \ + CMake/FindMbedTLS.cmake \ + CMake/FindNGHTTP2.cmake \ + CMake/FindNGHTTP3.cmake \ + CMake/FindNGTCP2.cmake \ + CMake/FindNSS.cmake \ + CMake/FindQUICHE.cmake \ + CMake/FindWolfSSL.cmake \ + CMake/FindZstd.cmake \ + CMake/Macros.cmake \ + CMake/OtherTests.cmake \ + CMake/Platforms/WindowsCache.cmake \ + CMake/Utilities.cmake \ + CMakeLists.txt + +VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl +VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist +VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc +VC6_SRCTMPL = projects/Windows/VC6/src/curl.tmpl +VC6_SRCDSP = projects/Windows/VC6/src/curl.dsp.dist +VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc + +VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl +VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist +VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc +VC7_SRCTMPL = projects/Windows/VC7/src/curl.tmpl +VC7_SRCVCPROJ = projects/Windows/VC7/src/curl.vcproj.dist +VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc + +VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl +VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist +VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc +VC71_SRCTMPL = projects/Windows/VC7.1/src/curl.tmpl +VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curl.vcproj.dist +VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc + +VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl +VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist +VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc +VC8_SRCTMPL = projects/Windows/VC8/src/curl.tmpl +VC8_SRCVCPROJ = projects/Windows/VC8/src/curl.vcproj.dist +VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc + +VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl +VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist +VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc +VC9_SRCTMPL = projects/Windows/VC9/src/curl.tmpl +VC9_SRCVCPROJ = projects/Windows/VC9/src/curl.vcproj.dist +VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc + +VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl +VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist +VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc +VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl +VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist +VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc + +VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl +VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist +VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc +VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl +VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist +VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc + +VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl +VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist +VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc +VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl +VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist +VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc + +VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl +VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist +VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc +VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl +VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist +VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc + +VC15_LIBTMPL = projects/Windows/VC15/lib/libcurl.tmpl +VC15_LIBVCXPROJ = projects/Windows/VC15/lib/libcurl.vcxproj.dist +VC15_LIBVCXPROJ_DEPS = $(VC15_LIBTMPL) Makefile.am lib/Makefile.inc +VC15_SRCTMPL = projects/Windows/VC15/src/curl.tmpl +VC15_SRCVCXPROJ = projects/Windows/VC15/src/curl.vcxproj.dist +VC15_SRCVCXPROJ_DEPS = $(VC15_SRCTMPL) Makefile.am src/Makefile.inc + +VC_DIST = projects/README \ + projects/build-openssl.bat \ + projects/build-wolfssl.bat \ + projects/checksrc.bat \ + projects/Windows/VC6/curl-all.dsw \ + projects/Windows/VC6/lib/libcurl.dsw \ + projects/Windows/VC6/src/curl.dsw \ + projects/Windows/VC7/curl-all.sln \ + projects/Windows/VC7/lib/libcurl.sln \ + projects/Windows/VC7/src/curl.sln \ + projects/Windows/VC7.1/curl-all.sln \ + projects/Windows/VC7.1/lib/libcurl.sln \ + projects/Windows/VC7.1/src/curl.sln \ + projects/Windows/VC8/curl-all.sln \ + projects/Windows/VC8/lib/libcurl.sln \ + projects/Windows/VC8/src/curl.sln \ + projects/Windows/VC9/curl-all.sln \ + projects/Windows/VC9/lib/libcurl.sln \ + projects/Windows/VC9/src/curl.sln \ + projects/Windows/VC10/curl-all.sln \ + projects/Windows/VC10/lib/libcurl.sln \ + projects/Windows/VC10/lib/libcurl.vcxproj.filters \ + projects/Windows/VC10/src/curl.sln \ + projects/Windows/VC10/src/curl.vcxproj.filters \ + projects/Windows/VC11/curl-all.sln \ + projects/Windows/VC11/lib/libcurl.sln \ + projects/Windows/VC11/lib/libcurl.vcxproj.filters \ + projects/Windows/VC11/src/curl.sln \ + projects/Windows/VC11/src/curl.vcxproj.filters \ + projects/Windows/VC12/curl-all.sln \ + projects/Windows/VC12/lib/libcurl.sln \ + projects/Windows/VC12/lib/libcurl.vcxproj.filters \ + projects/Windows/VC12/src/curl.sln \ + projects/Windows/VC12/src/curl.vcxproj.filters \ + projects/Windows/VC14/curl-all.sln \ + projects/Windows/VC14/lib/libcurl.sln \ + projects/Windows/VC14/lib/libcurl.vcxproj.filters \ + projects/Windows/VC14/src/curl.sln \ + projects/Windows/VC14/src/curl.vcxproj.filters \ + projects/Windows/VC15/curl-all.sln \ + projects/Windows/VC15/lib/libcurl.sln \ + projects/Windows/VC15/lib/libcurl.vcxproj.filters \ + projects/Windows/VC15/src/curl.sln \ + projects/Windows/VC15/src/curl.vcxproj.filters \ + projects/generate.bat \ + projects/wolfssl_options.h \ + projects/wolfssl_override.props + +WINBUILD_DIST = winbuild/README.md winbuild/gen_resp_file.bat \ + winbuild/MakefileBuild.vc winbuild/Makefile.vc + +PLAN9_DIST = plan9/include/mkfile \ + plan9/include/mkfile \ + plan9/mkfile.proto \ + plan9/mkfile \ + plan9/README \ + plan9/lib/mkfile.inc \ + plan9/lib/mkfile \ + plan9/src/mkfile.inc \ + plan9/src/mkfile + +EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \ + RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \ + scripts/updatemanpages.pl $(CMAKE_DIST) \ + $(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) \ + lib/libcurl.vers.in buildconf.bat scripts/coverage.sh scripts/completion.pl + +CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ + $(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \ + $(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \ + $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \ + $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ) + +bin_SCRIPTS = curl-config + +SUBDIRS = lib src +DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libcurl.pc + +# List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files +include lib/Makefile.inc +include src/Makefile.inc + +dist-hook: + rm -rf $(top_builddir)/tests/log + find $(distdir) -name "*.dist" -exec rm {} \; + (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \ + for file in $$distit; do \ + strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ + cp -p $$file $(distdir)$$strip; \ + done) + +html: + cd docs && $(MAKE) html + +pdf: + cd docs && $(MAKE) pdf + +check: test examples check-docs + +if CROSSCOMPILING +test-full: test +test-torture: test + +test: + @echo "NOTICE: we can't run the tests when cross-compiling!" + +else + +test: + @(cd tests; $(MAKE) all quiet-test) + +test-full: + @(cd tests; $(MAKE) all full-test) + +test-nonflaky: + @(cd tests; $(MAKE) all nonflaky-test) + +test-torture: + @(cd tests; $(MAKE) all torture-test) + +test-event: + @(cd tests; $(MAKE) all event-test) + +test-am: + @(cd tests; $(MAKE) all am-test) + +endif + +examples: + @(cd docs/examples; $(MAKE) check) + +check-docs: + @(cd docs/libcurl; $(MAKE) check) + +# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros +# must contain the following line: +# %_topdir /home/loic/local/rpm +# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc. +# +# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS +# +# If additional configure flags are needed to build the package, add the +# following in ~/.rpmmacros +# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS} +# and run make rpm in the following way: +# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm +# + +rpms: + $(MAKE) RPMDIST=curl rpm + $(MAKE) RPMDIST=curl-ssl rpm + +rpm: + RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \ + cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \ + cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \ + rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \ + mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \ + mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . + +# +# Build a Solaris pkgadd format file +# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format +# file (which ends up back in this directory). +# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do +# pkgadd -d ./HAXXcurl-* +# + +# gak - libtool requires an absolute directory, hence the pwd below... +pkgadd: + umask 022 ; \ + $(MAKE) install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ + cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ + cd $(srcdir)/packages/Solaris && $(MAKE) package + +# +# Build a cygwin binary tarball installation file +# resulting .tar.bz2 file will end up at packages/Win32/cygwin +cygwinbin: + $(MAKE) -C packages/Win32/cygwin cygwinbin + +# We extend the standard install with a custom hook: +install-data-hook: + (cd include && $(MAKE) install) + (cd docs && $(MAKE) install) + (cd docs/libcurl && $(MAKE) install) + +# We extend the standard uninstall with a custom hook: +uninstall-hook: + (cd include && $(MAKE) uninstall) + (cd docs && $(MAKE) uninstall) + (cd docs/libcurl && $(MAKE) uninstall) + +ca-bundle: lib/mk-ca-bundle.pl + @echo "generating a fresh ca-bundle.crt" + @perl $< -b -l -u lib/ca-bundle.crt + +ca-firefox: lib/firefox-db2pem.sh + @echo "generating a fresh ca-bundle.crt" + ./lib/firefox-db2pem.sh lib/ca-bundle.crt + +checksrc: + (cd lib && $(MAKE) checksrc) + (cd src && $(MAKE) checksrc) + (cd tests && $(MAKE) checksrc) + (cd include/curl && $(MAKE) checksrc) + (cd docs/examples && $(MAKE) checksrc) + +.PHONY: vc-ide + +vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \ + $(VC7_SRCVCPROJ_DEPS) $(VC71_LIBVCPROJ_DEPS) $(VC71_SRCVCPROJ_DEPS) \ + $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \ + $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \ + $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \ + $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \ + $(VC15_LIBVCXPROJ_DEPS) $(VC15_SRCVCXPROJ_DEPS) + @(win32_lib_srcs='$(LIB_CFILES)'; \ + win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \ + win32_lib_rc='$(LIB_RCFILES)'; \ + win32_lib_vauth_srcs='$(LIB_VAUTH_CFILES)'; \ + win32_lib_vauth_hdrs='$(LIB_VAUTH_HFILES)'; \ + win32_lib_vquic_srcs='$(LIB_VQUIC_CFILES)'; \ + win32_lib_vquic_hdrs='$(LIB_VQUIC_HFILES)'; \ + win32_lib_vssh_srcs='$(LIB_VSSH_CFILES)'; \ + win32_lib_vssh_hdrs='$(LIB_VSSH_HFILES)'; \ + win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \ + win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \ + win32_src_srcs='$(CURL_CFILES)'; \ + win32_src_hdrs='$(CURL_HFILES)'; \ + win32_src_rc='$(CURL_RCFILES)'; \ + win32_src_x_srcs='$(CURLX_CFILES)'; \ + win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \ + \ + sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \ + sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vauth_srcs=`for file in $$win32_lib_vauth_srcs; do echo $$file; done | sort`; \ + sorted_lib_vauth_hdrs=`for file in $$win32_lib_vauth_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vquic_srcs=`for file in $$win32_lib_vquic_srcs; do echo $$file; done | sort`; \ + sorted_lib_vquic_hdrs=`for file in $$win32_lib_vquic_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vssh_srcs=`for file in $$win32_lib_vssh_srcs; do echo $$file; done | sort`; \ + sorted_lib_vssh_hdrs=`for file in $$win32_lib_vssh_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \ + sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \ + sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \ + sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \ + sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \ + sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \ + \ + awk_code='\ +function gen_element(type, dir, file)\ +{\ + sub(/vauth\//, "", file);\ + sub(/vquic\//, "", file);\ + sub(/vssh\//, "", file);\ + sub(/vtls\//, "", file);\ +\ + spaces=" ";\ + if(dir == "lib\\vauth" ||\ + dir == "lib\\vquic" ||\ + dir == "lib\\vssh" ||\ + dir == "lib\\vtls")\ + tabs=" ";\ + else\ + tabs=" ";\ +\ + if(type == "dsp") {\ + printf("# Begin Source File\r\n");\ + printf("\r\n");\ + printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\ + printf("# End Source File\r\n");\ + }\ + else if(type == "vcproj1") {\ + printf("%s\r\n",\ + tabs, dir, file);\ + printf("%s
\r\n", tabs);\ + }\ + else if(type == "vcproj2") {\ + printf("%s\r\n", tabs);\ + printf("%s
\r\n", tabs);\ + }\ + else if(type == "vcxproj") {\ + i = index(file, ".");\ + ext = substr(file, i == 0 ? 0 : i + 1);\ +\ + if(ext == "c")\ + printf("%s\r\n",\ + spaces, dir, file);\ + else if(ext == "h")\ + printf("%s\r\n",\ + spaces, dir, file);\ + else if(ext == "rc")\ + printf("%s\r\n",\ + spaces, dir, file);\ + }\ +}\ +\ +{\ +\ + if($$0 == "CURL_LIB_C_FILES") {\ + split(lib_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_H_FILES") {\ + split(lib_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_RC_FILES") {\ + split(lib_rc, arr);\ + for(val in arr) gen_element(proj_type, "lib", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VAUTH_C_FILES") {\ + split(lib_vauth_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VAUTH_H_FILES") {\ + split(lib_vauth_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VQUIC_C_FILES") {\ + split(lib_vquic_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VQUIC_H_FILES") {\ + split(lib_vquic_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VSSH_C_FILES") {\ + split(lib_vssh_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VSSH_H_FILES") {\ + split(lib_vssh_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VTLS_C_FILES") {\ + split(lib_vtls_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VTLS_H_FILES") {\ + split(lib_vtls_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_C_FILES") {\ + split(src_srcs, arr);\ + for(val in arr) gen_element(proj_type, "src", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_H_FILES") {\ + split(src_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "src", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_RC_FILES") {\ + split(src_rc, arr);\ + for(val in arr) gen_element(proj_type, "src", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_X_C_FILES") {\ + split(src_x_srcs, arr);\ + for(val in arr) {\ + sub(/..\/lib\//, "", arr[val]);\ + gen_element(proj_type, "lib", arr[val]);\ + }\ + }\ + else if($$0 == "CURL_SRC_X_H_FILES") {\ + split(src_x_hdrs, arr);\ + for(val in arr) {\ + sub(/..\/lib\//, "", arr[val]);\ + gen_element(proj_type, "lib", arr[val]);\ + }\ + }\ + else\ + printf("%s\r\n", $$0);\ +}';\ + \ + echo "generating '$(VC6_LIBDSP)'"; \ + awk -v proj_type=dsp \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC6_LIBTMPL) > $(VC6_LIBDSP) || { exit 1; }; \ + \ + echo "generating '$(VC6_SRCDSP)'"; \ + awk -v proj_type=dsp \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \ + \ + echo "generating '$(VC7_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC7_LIBTMPL) > $(VC7_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC7_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC71_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC71_LIBTMPL) > $(VC71_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC71_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC8_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC8_LIBTMPL) > $(VC8_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC8_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC9_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC9_LIBTMPL) > $(VC9_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC9_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC10_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC10_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC11_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC11_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC12_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC12_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC14_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC14_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_LIBTMPL) > $(VC15_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_SRCTMPL) > $(VC15_SRCVCXPROJ) || { exit 1; };) + +tidy: + (cd src && $(MAKE) tidy) + (cd lib && $(MAKE) tidy) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.in new file mode 100644 index 00000000..0ea56643 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/Makefile.in @@ -0,0 +1,1963 @@ +# Makefile.in generated by automake 1.16.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# ./src/Makefile.inc +# Using the backslash as line continuation character might be problematic +# with some make flavours, as Watcom's wmake showed us already. If we +# ever want to change this in a portable manner then we should consider +# this idea (posted to the libcurl list by Adam Kellas): +# CSRC1 = file1.c file2.c file3.c +# CSRC2 = file4.c file5.c file6.c +# CSOURCES = $(CSRC1) $(CSRC2) + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ + $(top_srcdir)/m4/curl-confopts.m4 \ + $(top_srcdir)/m4/curl-functions.m4 \ + $(top_srcdir)/m4/curl-openssl.m4 \ + $(top_srcdir)/m4/curl-override.m4 \ + $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/xc-am-iface.m4 \ + $(top_srcdir)/m4/xc-cc-check.m4 \ + $(top_srcdir)/m4/xc-lt-iface.m4 \ + $(top_srcdir)/m4/xc-translit.m4 \ + $(top_srcdir)/m4/xc-val-flgs.m4 \ + $(top_srcdir)/m4/zz40-xc-ovr.m4 \ + $(top_srcdir)/m4/zz50-xc-ovr.m4 \ + $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h +CONFIG_CLEAN_FILES = curl-config libcurl.pc +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir distdir-am dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/curl-config.in \ + $(srcdir)/lib/Makefile.inc $(srcdir)/libcurl.pc.in \ + $(srcdir)/src/Makefile.inc COPYING README compile config.guess \ + config.sub depcomp install-sh ltmain.sh missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AR_FLAGS = @AR_FLAGS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@ +CURLVERSION = @CURLVERSION@ +CURL_CA_BUNDLE = @CURL_CA_BUNDLE@ +CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@ +CURL_DISABLE_DICT = @CURL_DISABLE_DICT@ +CURL_DISABLE_FILE = @CURL_DISABLE_FILE@ +CURL_DISABLE_FTP = @CURL_DISABLE_FTP@ +CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@ +CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@ +CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@ +CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@ +CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@ +CURL_DISABLE_MQTT = @CURL_DISABLE_MQTT@ +CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@ +CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@ +CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@ +CURL_DISABLE_SMB = @CURL_DISABLE_SMB@ +CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@ +CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@ +CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ +CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ +CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ +CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_SHARED = @ENABLE_SHARED@ +ENABLE_STATIC = @ENABLE_STATIC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ +GCOV = @GCOV@ +GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ +HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ +HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ +HAVE_ZSTD = @HAVE_ZSTD@ +IDN_ENABLED = @IDN_ENABLED@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCURL_LIBS = @LIBCURL_LIBS@ +LIBCURL_NO_SHARED = @LIBCURL_NO_SHARED@ +LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@ +LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@ +LIBMETALINK_LIBS = @LIBMETALINK_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MANOPT = @MANOPT@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NROFF = @NROFF@ +NSS_LIBS = @NSS_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKGADD_NAME = @PKGADD_NAME@ +PKGADD_PKG = @PKGADD_PKG@ +PKGADD_VENDOR = @PKGADD_VENDOR@ +PKGCONFIG = @PKGCONFIG@ +RANDOM_FILE = @RANDOM_FILE@ +RANLIB = @RANLIB@ +REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ +SSL_ENABLED = @SSL_ENABLED@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +SUPPORT_FEATURES = @SUPPORT_FEATURES@ +SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ +USE_ARES = @USE_ARES@ +USE_BEARSSL = @USE_BEARSSL@ +USE_GNUTLS = @USE_GNUTLS@ +USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ +USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ +USE_LIBSSH2 = @USE_LIBSSH2@ +USE_MBEDTLS = @USE_MBEDTLS@ +USE_MESALINK = @USE_MESALINK@ +USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_GNUTLS = @USE_NGTCP2_CRYPTO_GNUTLS@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ +USE_NSS = @USE_NSS@ +USE_OPENLDAP = @USE_OPENLDAP@ +USE_QUICHE = @USE_QUICHE@ +USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ +USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ +USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSH = @USE_WOLFSSH@ +USE_WOLFSSL = @USE_WOLFSSL@ +VERSION = @VERSION@ +VERSIONNUM = @VERSIONNUM@ +ZLIB_LIBS = @ZLIB_LIBS@ +ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libext = @libext@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 +CMAKE_DIST = \ + CMake/cmake_uninstall.cmake.in \ + CMake/CMakeConfigurableFile.in \ + CMake/curl-config.cmake.in \ + CMake/CurlSymbolHiding.cmake \ + CMake/CurlTests.c \ + CMake/FindBearSSL.cmake \ + CMake/FindBrotli.cmake \ + CMake/FindCARES.cmake \ + CMake/FindGSS.cmake \ + CMake/FindLibSSH2.cmake \ + CMake/FindMbedTLS.cmake \ + CMake/FindNGHTTP2.cmake \ + CMake/FindNGHTTP3.cmake \ + CMake/FindNGTCP2.cmake \ + CMake/FindNSS.cmake \ + CMake/FindQUICHE.cmake \ + CMake/FindWolfSSL.cmake \ + CMake/FindZstd.cmake \ + CMake/Macros.cmake \ + CMake/OtherTests.cmake \ + CMake/Platforms/WindowsCache.cmake \ + CMake/Utilities.cmake \ + CMakeLists.txt + +VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl +VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist +VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc +VC6_SRCTMPL = projects/Windows/VC6/src/curl.tmpl +VC6_SRCDSP = projects/Windows/VC6/src/curl.dsp.dist +VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc +VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl +VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist +VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc +VC7_SRCTMPL = projects/Windows/VC7/src/curl.tmpl +VC7_SRCVCPROJ = projects/Windows/VC7/src/curl.vcproj.dist +VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc +VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl +VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist +VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc +VC71_SRCTMPL = projects/Windows/VC7.1/src/curl.tmpl +VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curl.vcproj.dist +VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc +VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl +VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist +VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc +VC8_SRCTMPL = projects/Windows/VC8/src/curl.tmpl +VC8_SRCVCPROJ = projects/Windows/VC8/src/curl.vcproj.dist +VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc +VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl +VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist +VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc +VC9_SRCTMPL = projects/Windows/VC9/src/curl.tmpl +VC9_SRCVCPROJ = projects/Windows/VC9/src/curl.vcproj.dist +VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc +VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl +VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist +VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc +VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl +VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist +VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc +VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl +VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist +VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc +VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl +VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist +VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc +VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl +VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist +VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc +VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl +VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist +VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc +VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl +VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist +VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc +VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl +VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist +VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc +VC15_LIBTMPL = projects/Windows/VC15/lib/libcurl.tmpl +VC15_LIBVCXPROJ = projects/Windows/VC15/lib/libcurl.vcxproj.dist +VC15_LIBVCXPROJ_DEPS = $(VC15_LIBTMPL) Makefile.am lib/Makefile.inc +VC15_SRCTMPL = projects/Windows/VC15/src/curl.tmpl +VC15_SRCVCXPROJ = projects/Windows/VC15/src/curl.vcxproj.dist +VC15_SRCVCXPROJ_DEPS = $(VC15_SRCTMPL) Makefile.am src/Makefile.inc +VC_DIST = projects/README \ + projects/build-openssl.bat \ + projects/build-wolfssl.bat \ + projects/checksrc.bat \ + projects/Windows/VC6/curl-all.dsw \ + projects/Windows/VC6/lib/libcurl.dsw \ + projects/Windows/VC6/src/curl.dsw \ + projects/Windows/VC7/curl-all.sln \ + projects/Windows/VC7/lib/libcurl.sln \ + projects/Windows/VC7/src/curl.sln \ + projects/Windows/VC7.1/curl-all.sln \ + projects/Windows/VC7.1/lib/libcurl.sln \ + projects/Windows/VC7.1/src/curl.sln \ + projects/Windows/VC8/curl-all.sln \ + projects/Windows/VC8/lib/libcurl.sln \ + projects/Windows/VC8/src/curl.sln \ + projects/Windows/VC9/curl-all.sln \ + projects/Windows/VC9/lib/libcurl.sln \ + projects/Windows/VC9/src/curl.sln \ + projects/Windows/VC10/curl-all.sln \ + projects/Windows/VC10/lib/libcurl.sln \ + projects/Windows/VC10/lib/libcurl.vcxproj.filters \ + projects/Windows/VC10/src/curl.sln \ + projects/Windows/VC10/src/curl.vcxproj.filters \ + projects/Windows/VC11/curl-all.sln \ + projects/Windows/VC11/lib/libcurl.sln \ + projects/Windows/VC11/lib/libcurl.vcxproj.filters \ + projects/Windows/VC11/src/curl.sln \ + projects/Windows/VC11/src/curl.vcxproj.filters \ + projects/Windows/VC12/curl-all.sln \ + projects/Windows/VC12/lib/libcurl.sln \ + projects/Windows/VC12/lib/libcurl.vcxproj.filters \ + projects/Windows/VC12/src/curl.sln \ + projects/Windows/VC12/src/curl.vcxproj.filters \ + projects/Windows/VC14/curl-all.sln \ + projects/Windows/VC14/lib/libcurl.sln \ + projects/Windows/VC14/lib/libcurl.vcxproj.filters \ + projects/Windows/VC14/src/curl.sln \ + projects/Windows/VC14/src/curl.vcxproj.filters \ + projects/Windows/VC15/curl-all.sln \ + projects/Windows/VC15/lib/libcurl.sln \ + projects/Windows/VC15/lib/libcurl.vcxproj.filters \ + projects/Windows/VC15/src/curl.sln \ + projects/Windows/VC15/src/curl.vcxproj.filters \ + projects/generate.bat \ + projects/wolfssl_options.h \ + projects/wolfssl_override.props + +WINBUILD_DIST = winbuild/README.md winbuild/gen_resp_file.bat \ + winbuild/MakefileBuild.vc winbuild/Makefile.vc + +PLAN9_DIST = plan9/include/mkfile \ + plan9/include/mkfile \ + plan9/mkfile.proto \ + plan9/mkfile \ + plan9/README \ + plan9/lib/mkfile.inc \ + plan9/lib/mkfile \ + plan9/src/mkfile.inc \ + plan9/src/mkfile + +EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \ + RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \ + scripts/updatemanpages.pl $(CMAKE_DIST) \ + $(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) \ + lib/libcurl.vers.in buildconf.bat scripts/coverage.sh scripts/completion.pl + +CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ + $(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \ + $(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \ + $(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \ + $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ) + +bin_SCRIPTS = curl-config +SUBDIRS = lib src +DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libcurl.pc +LIB_VAUTH_CFILES = vauth/cleartext.c vauth/cram.c vauth/digest.c \ + vauth/digest_sspi.c vauth/krb5_gssapi.c vauth/krb5_sspi.c vauth/ntlm.c \ + vauth/ntlm_sspi.c vauth/oauth2.c vauth/spnego_gssapi.c vauth/spnego_sspi.c \ + vauth/vauth.c + +LIB_VAUTH_HFILES = vauth/digest.h vauth/ntlm.h vauth/vauth.h +LIB_VTLS_CFILES = vtls/bearssl.c vtls/gskit.c vtls/gtls.c vtls/keylog.c \ + vtls/mbedtls.c vtls/mbedtls_threadlock.c vtls/mesalink.c vtls/nss.c \ + vtls/openssl.c vtls/schannel.c vtls/schannel_verify.c vtls/sectransp.c \ + vtls/vtls.c vtls/wolfssl.c + +LIB_VTLS_HFILES = vtls/bearssl.h vtls/gskit.h vtls/gtls.h vtls/keylog.h \ + vtls/mbedtls.h vtls/mbedtls_threadlock.h vtls/mesalink.h vtls/nssg.h \ + vtls/openssl.h vtls/schannel.h vtls/sectransp.h vtls/vtls.h vtls/wolfssl.h + +LIB_VQUIC_CFILES = vquic/ngtcp2.c vquic/quiche.c vquic/vquic.c +LIB_VQUIC_HFILES = vquic/ngtcp2.h vquic/quiche.h vquic/vquic.h +LIB_VSSH_CFILES = vssh/libssh.c vssh/libssh2.c vssh/wolfssh.c +LIB_VSSH_HFILES = vssh/ssh.h +LIB_CFILES = altsvc.c amigaos.c asyn-ares.c asyn-thread.c base64.c \ + conncache.c connect.c content_encoding.c cookie.c curl_addrinfo.c \ + curl_ctype.c curl_des.c curl_endian.c curl_fnmatch.c curl_get_line.c \ + curl_gethostname.c curl_gssapi.c curl_memrchr.c curl_multibyte.c \ + curl_ntlm_core.c curl_ntlm_wb.c curl_path.c curl_range.c curl_rtmp.c \ + curl_sasl.c curl_sspi.c curl_threads.c dict.c dotdot.c easy.c escape.c \ + file.c fileinfo.c formdata.c ftp.c url.c ftplistparser.c getenv.c getinfo.c \ + gopher.c hash.c hmac.c hostasyn.c hostcheck.c hostip.c hostip4.c hostip6.c \ + hostsyn.c http.c http2.c http_chunks.c http_digest.c http_negotiate.c \ + http_ntlm.c http_proxy.c idn_win32.c if2ip.c imap.c inet_ntop.c inet_pton.c \ + krb5.c ldap.c llist.c md4.c md5.c memdebug.c mime.c mprintf.c mqtt.c \ + multi.c netrc.c non-ascii.c nonblock.c openldap.c parsedate.c pingpong.c \ + pop3.c progress.c psl.c doh.c rand.c rename.c rtsp.c select.c \ + sendf.c setopt.c sha256.c share.c slist.c smb.c smtp.c socketpair.c socks.c \ + socks_gssapi.c socks_sspi.c speedcheck.c splay.c strcase.c strdup.c \ + strerror.c strtok.c strtoofft.c system_win32.c telnet.c tftp.c timeval.c \ + transfer.c urlapi.c version.c warnless.c wildcard.c x509asn1.c dynbuf.c \ + version_win32.c easyoptions.c easygetopt.c + +LIB_HFILES = altsvc.h amigaos.h arpa_telnet.h asyn.h conncache.h connect.h \ + content_encoding.h cookie.h curl_addrinfo.h curl_base64.h curl_ctype.h \ + curl_des.h curl_endian.h curl_fnmatch.h curl_get_line.h curl_gethostname.h \ + curl_gssapi.h curl_hmac.h curl_ldap.h curl_md4.h curl_md5.h curl_memory.h \ + curl_memrchr.h curl_multibyte.h curl_ntlm_core.h curl_ntlm_wb.h curl_path.h \ + curl_printf.h curl_range.h curl_rtmp.h curl_sasl.h curl_krb5.h curl_setup.h \ + curl_setup_once.h curl_sha256.h curl_sspi.h curl_threads.h curlx.h dict.h \ + dotdot.h easyif.h escape.h file.h fileinfo.h formdata.h ftp.h url.h \ + ftplistparser.h getinfo.h gopher.h hash.h hostcheck.h hostip.h http.h \ + http2.h http_chunks.h http_digest.h http_negotiate.h http_ntlm.h \ + http_proxy.h if2ip.h imap.h inet_ntop.h inet_pton.h llist.h memdebug.h \ + mime.h mqtt.h multihandle.h multiif.h netrc.h non-ascii.h nonblock.h \ + parsedate.h pingpong.h pop3.h progress.h psl.h doh.h quic.h rand.h rename.h \ + rtsp.h select.h sendf.h setopt.h setup-vms.h share.h sigpipe.h slist.h \ + smb.h smtp.h sockaddr.h socketpair.h socks.h speedcheck.h splay.h strcase.h \ + strdup.h strerror.h strtok.h strtoofft.h system_win32.h telnet.h tftp.h \ + timeval.h transfer.h urlapi-int.h urldata.h warnless.h wildcard.h \ + x509asn1.h dynbuf.h version_win32.h easyoptions.h + +LIB_RCFILES = libcurl.rc +CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) \ + $(LIB_VQUIC_CFILES) $(LIB_VSSH_CFILES) + +HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) \ + $(LIB_VQUIC_HFILES) $(LIB_VSSH_HFILES) + + +# libcurl has sources that provide functions named curlx_* that aren't part of +# the official API, but we re-use the code here to avoid duplication. +CURLX_CFILES = \ + ../lib/strtoofft.c \ + ../lib/nonblock.c \ + ../lib/warnless.c \ + ../lib/curl_ctype.c \ + ../lib/curl_multibyte.c \ + ../lib/version_win32.c \ + ../lib/dynbuf.c + +CURLX_HFILES = \ + ../lib/curl_setup.h \ + ../lib/strtoofft.h \ + ../lib/nonblock.h \ + ../lib/warnless.h \ + ../lib/curl_ctype.h \ + ../lib/curl_multibyte.h \ + ../lib/version_win32.h \ + ../lib/dynbuf.h + +CURL_CFILES = \ + slist_wc.c \ + tool_binmode.c \ + tool_bname.c \ + tool_cb_dbg.c \ + tool_cb_hdr.c \ + tool_cb_prg.c \ + tool_cb_rea.c \ + tool_cb_see.c \ + tool_cb_wrt.c \ + tool_cfgable.c \ + tool_convert.c \ + tool_dirhie.c \ + tool_doswin.c \ + tool_easysrc.c \ + tool_filetime.c \ + tool_formparse.c \ + tool_getparam.c \ + tool_getpass.c \ + tool_help.c \ + tool_helpers.c \ + tool_homedir.c \ + tool_hugehelp.c \ + tool_libinfo.c \ + tool_main.c \ + tool_metalink.c \ + tool_msgs.c \ + tool_operate.c \ + tool_operhlp.c \ + tool_panykey.c \ + tool_paramhlp.c \ + tool_parsecfg.c \ + tool_progress.c \ + tool_strdup.c \ + tool_setopt.c \ + tool_sleep.c \ + tool_urlglob.c \ + tool_util.c \ + tool_vms.c \ + tool_writeout.c \ + tool_writeout_json.c \ + tool_xattr.c + +CURL_HFILES = \ + slist_wc.h \ + tool_binmode.h \ + tool_bname.h \ + tool_cb_dbg.h \ + tool_cb_hdr.h \ + tool_cb_prg.h \ + tool_cb_rea.h \ + tool_cb_see.h \ + tool_cb_wrt.h \ + tool_cfgable.h \ + tool_convert.h \ + tool_dirhie.h \ + tool_doswin.h \ + tool_easysrc.h \ + tool_filetime.h \ + tool_formparse.h \ + tool_getparam.h \ + tool_getpass.h \ + tool_help.h \ + tool_helpers.h \ + tool_homedir.h \ + tool_hugehelp.h \ + tool_libinfo.h \ + tool_main.h \ + tool_metalink.h \ + tool_msgs.h \ + tool_operate.h \ + tool_operhlp.h \ + tool_panykey.h \ + tool_paramhlp.h \ + tool_parsecfg.h \ + tool_progress.h \ + tool_sdecls.h \ + tool_setopt.h \ + tool_setup.h \ + tool_sleep.h \ + tool_strdup.h \ + tool_urlglob.h \ + tool_util.h \ + tool_version.h \ + tool_vms.h \ + tool_writeout.h \ + tool_writeout_json.h \ + tool_xattr.h + +CURL_RCFILES = curl.rc + +# curl_SOURCES is special and gets assigned in src/Makefile.am +CURL_FILES = $(CURL_CFILES) $(CURLX_CFILES) $(CURL_HFILES) +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/lib/Makefile.inc $(srcdir)/src/Makefile.inc $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; +$(srcdir)/lib/Makefile.inc $(srcdir)/src/Makefile.inc $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +curl-config: $(top_builddir)/config.status $(srcdir)/curl-config.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libcurl.pc: $(top_builddir)/config.status $(srcdir)/libcurl.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +.MAKE: $(am__recursive_targets) install-am install-data-am \ + install-strip uninstall-am + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binSCRIPTS \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgconfigDATA install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-hook \ + uninstall-pkgconfigDATA + +.PRECIOUS: Makefile + + +# List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files + +dist-hook: + rm -rf $(top_builddir)/tests/log + find $(distdir) -name "*.dist" -exec rm {} \; + (distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \ + for file in $$distit; do \ + strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ + cp -p $$file $(distdir)$$strip; \ + done) + +html: + cd docs && $(MAKE) html + +pdf: + cd docs && $(MAKE) pdf + +check: test examples check-docs + +@CROSSCOMPILING_TRUE@test-full: test +@CROSSCOMPILING_TRUE@test-torture: test + +@CROSSCOMPILING_TRUE@test: +@CROSSCOMPILING_TRUE@ @echo "NOTICE: we can't run the tests when cross-compiling!" + +@CROSSCOMPILING_FALSE@test: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all quiet-test) + +@CROSSCOMPILING_FALSE@test-full: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all full-test) + +@CROSSCOMPILING_FALSE@test-nonflaky: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all nonflaky-test) + +@CROSSCOMPILING_FALSE@test-torture: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all torture-test) + +@CROSSCOMPILING_FALSE@test-event: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all event-test) + +@CROSSCOMPILING_FALSE@test-am: +@CROSSCOMPILING_FALSE@ @(cd tests; $(MAKE) all am-test) + +examples: + @(cd docs/examples; $(MAKE) check) + +check-docs: + @(cd docs/libcurl; $(MAKE) check) + +# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros +# must contain the following line: +# %_topdir /home/loic/local/rpm +# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc. +# +# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS +# +# If additional configure flags are needed to build the package, add the +# following in ~/.rpmmacros +# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS} +# and run make rpm in the following way: +# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm +# + +rpms: + $(MAKE) RPMDIST=curl rpm + $(MAKE) RPMDIST=curl-ssl rpm + +rpm: + RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \ + cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \ + cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \ + rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \ + mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \ + mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . + +# +# Build a Solaris pkgadd format file +# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format +# file (which ends up back in this directory). +# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do +# pkgadd -d ./HAXXcurl-* +# + +# gak - libtool requires an absolute directory, hence the pwd below... +pkgadd: + umask 022 ; \ + $(MAKE) install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ + cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ + cd $(srcdir)/packages/Solaris && $(MAKE) package + +# +# Build a cygwin binary tarball installation file +# resulting .tar.bz2 file will end up at packages/Win32/cygwin +cygwinbin: + $(MAKE) -C packages/Win32/cygwin cygwinbin + +# We extend the standard install with a custom hook: +install-data-hook: + (cd include && $(MAKE) install) + (cd docs && $(MAKE) install) + (cd docs/libcurl && $(MAKE) install) + +# We extend the standard uninstall with a custom hook: +uninstall-hook: + (cd include && $(MAKE) uninstall) + (cd docs && $(MAKE) uninstall) + (cd docs/libcurl && $(MAKE) uninstall) + +ca-bundle: lib/mk-ca-bundle.pl + @echo "generating a fresh ca-bundle.crt" + @perl $< -b -l -u lib/ca-bundle.crt + +ca-firefox: lib/firefox-db2pem.sh + @echo "generating a fresh ca-bundle.crt" + ./lib/firefox-db2pem.sh lib/ca-bundle.crt + +checksrc: + (cd lib && $(MAKE) checksrc) + (cd src && $(MAKE) checksrc) + (cd tests && $(MAKE) checksrc) + (cd include/curl && $(MAKE) checksrc) + (cd docs/examples && $(MAKE) checksrc) + +.PHONY: vc-ide + +vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \ + $(VC7_SRCVCPROJ_DEPS) $(VC71_LIBVCPROJ_DEPS) $(VC71_SRCVCPROJ_DEPS) \ + $(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \ + $(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \ + $(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \ + $(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \ + $(VC15_LIBVCXPROJ_DEPS) $(VC15_SRCVCXPROJ_DEPS) + @(win32_lib_srcs='$(LIB_CFILES)'; \ + win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \ + win32_lib_rc='$(LIB_RCFILES)'; \ + win32_lib_vauth_srcs='$(LIB_VAUTH_CFILES)'; \ + win32_lib_vauth_hdrs='$(LIB_VAUTH_HFILES)'; \ + win32_lib_vquic_srcs='$(LIB_VQUIC_CFILES)'; \ + win32_lib_vquic_hdrs='$(LIB_VQUIC_HFILES)'; \ + win32_lib_vssh_srcs='$(LIB_VSSH_CFILES)'; \ + win32_lib_vssh_hdrs='$(LIB_VSSH_HFILES)'; \ + win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \ + win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \ + win32_src_srcs='$(CURL_CFILES)'; \ + win32_src_hdrs='$(CURL_HFILES)'; \ + win32_src_rc='$(CURL_RCFILES)'; \ + win32_src_x_srcs='$(CURLX_CFILES)'; \ + win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \ + \ + sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \ + sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vauth_srcs=`for file in $$win32_lib_vauth_srcs; do echo $$file; done | sort`; \ + sorted_lib_vauth_hdrs=`for file in $$win32_lib_vauth_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vquic_srcs=`for file in $$win32_lib_vquic_srcs; do echo $$file; done | sort`; \ + sorted_lib_vquic_hdrs=`for file in $$win32_lib_vquic_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vssh_srcs=`for file in $$win32_lib_vssh_srcs; do echo $$file; done | sort`; \ + sorted_lib_vssh_hdrs=`for file in $$win32_lib_vssh_hdrs; do echo $$file; done | sort`; \ + sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \ + sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \ + sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \ + sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \ + sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \ + sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \ + \ + awk_code='\ +function gen_element(type, dir, file)\ +{\ + sub(/vauth\//, "", file);\ + sub(/vquic\//, "", file);\ + sub(/vssh\//, "", file);\ + sub(/vtls\//, "", file);\ +\ + spaces=" ";\ + if(dir == "lib\\vauth" ||\ + dir == "lib\\vquic" ||\ + dir == "lib\\vssh" ||\ + dir == "lib\\vtls")\ + tabs=" ";\ + else\ + tabs=" ";\ +\ + if(type == "dsp") {\ + printf("# Begin Source File\r\n");\ + printf("\r\n");\ + printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\ + printf("# End Source File\r\n");\ + }\ + else if(type == "vcproj1") {\ + printf("%s\r\n",\ + tabs, dir, file);\ + printf("%s
\r\n", tabs);\ + }\ + else if(type == "vcproj2") {\ + printf("%s\r\n", tabs);\ + printf("%s
\r\n", tabs);\ + }\ + else if(type == "vcxproj") {\ + i = index(file, ".");\ + ext = substr(file, i == 0 ? 0 : i + 1);\ +\ + if(ext == "c")\ + printf("%s\r\n",\ + spaces, dir, file);\ + else if(ext == "h")\ + printf("%s\r\n",\ + spaces, dir, file);\ + else if(ext == "rc")\ + printf("%s\r\n",\ + spaces, dir, file);\ + }\ +}\ +\ +{\ +\ + if($$0 == "CURL_LIB_C_FILES") {\ + split(lib_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_H_FILES") {\ + split(lib_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_RC_FILES") {\ + split(lib_rc, arr);\ + for(val in arr) gen_element(proj_type, "lib", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VAUTH_C_FILES") {\ + split(lib_vauth_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VAUTH_H_FILES") {\ + split(lib_vauth_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VQUIC_C_FILES") {\ + split(lib_vquic_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VQUIC_H_FILES") {\ + split(lib_vquic_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VSSH_C_FILES") {\ + split(lib_vssh_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VSSH_H_FILES") {\ + split(lib_vssh_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VTLS_C_FILES") {\ + split(lib_vtls_srcs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\ + }\ + else if($$0 == "CURL_LIB_VTLS_H_FILES") {\ + split(lib_vtls_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_C_FILES") {\ + split(src_srcs, arr);\ + for(val in arr) gen_element(proj_type, "src", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_H_FILES") {\ + split(src_hdrs, arr);\ + for(val in arr) gen_element(proj_type, "src", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_RC_FILES") {\ + split(src_rc, arr);\ + for(val in arr) gen_element(proj_type, "src", arr[val]);\ + }\ + else if($$0 == "CURL_SRC_X_C_FILES") {\ + split(src_x_srcs, arr);\ + for(val in arr) {\ + sub(/..\/lib\//, "", arr[val]);\ + gen_element(proj_type, "lib", arr[val]);\ + }\ + }\ + else if($$0 == "CURL_SRC_X_H_FILES") {\ + split(src_x_hdrs, arr);\ + for(val in arr) {\ + sub(/..\/lib\//, "", arr[val]);\ + gen_element(proj_type, "lib", arr[val]);\ + }\ + }\ + else\ + printf("%s\r\n", $$0);\ +}';\ + \ + echo "generating '$(VC6_LIBDSP)'"; \ + awk -v proj_type=dsp \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC6_LIBTMPL) > $(VC6_LIBDSP) || { exit 1; }; \ + \ + echo "generating '$(VC6_SRCDSP)'"; \ + awk -v proj_type=dsp \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \ + \ + echo "generating '$(VC7_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC7_LIBTMPL) > $(VC7_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC7_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC71_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC71_LIBTMPL) > $(VC71_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC71_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj1 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC8_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC8_LIBTMPL) > $(VC8_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC8_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC9_LIBVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC9_LIBTMPL) > $(VC9_LIBVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC9_SRCVCPROJ)'"; \ + awk -v proj_type=vcproj2 \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC10_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC10_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC11_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC11_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC12_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC12_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC14_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC14_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_LIBVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v lib_srcs="$$sorted_lib_srcs" \ + -v lib_hdrs="$$sorted_lib_hdrs" \ + -v lib_rc="$$win32_lib_rc" \ + -v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \ + -v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \ + -v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \ + -v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \ + -v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \ + -v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \ + -v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \ + -v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_LIBTMPL) > $(VC15_LIBVCXPROJ) || { exit 1; }; \ + \ + echo "generating '$(VC15_SRCVCXPROJ)'"; \ + awk -v proj_type=vcxproj \ + -v src_srcs="$$sorted_src_srcs" \ + -v src_hdrs="$$sorted_src_hdrs" \ + -v src_rc="$$win32_src_rc" \ + -v src_x_srcs="$$sorted_src_x_srcs" \ + -v src_x_hdrs="$$sorted_src_x_hdrs" \ + "$$awk_code" $(srcdir)/$(VC15_SRCTMPL) > $(VC15_SRCVCXPROJ) || { exit 1; };) + +tidy: + (cd src && $(MAKE) tidy) + (cd lib && $(MAKE) tidy) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/README b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/README new file mode 100644 index 00000000..f337f351 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/README @@ -0,0 +1,55 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +README + + Curl is a command line tool for transferring data specified with URL + syntax. Find out how to use curl by reading the curl.1 man page or the + MANUAL document. Find out how to install Curl by reading the INSTALL + document. + + libcurl is the library curl is using to do its job. It is readily + available to be used by your software. Read the libcurl.3 man page to + learn how! + + You find answers to the most frequent questions we get in the FAQ document. + + Study the COPYING file for distribution terms. + + Those documents and more can be found in the docs/ directory. + +CONTACT + + If you have problems, questions, ideas or suggestions, please contact us + by posting to a suitable mailing list. See https://curl.haxx.se/mail/ + + All contributors to the project are listed in the THANKS document. + +WEBSITE + + Visit the curl website for the latest news and downloads: + + https://curl.haxx.se/ + +GIT + + To download the very latest source off the GIT server do this: + + git clone https://github.com/curl/curl.git + + (you'll get a directory named curl created, filled with the source code) + +SECURITY PROBLEMS + + Report suspected security problems via our HackerOne page and not in public! + + https://hackerone.com/curl + +NOTICE + + Curl contains pieces of source code that is Copyright (c) 1998, 1999 + Kungliga Tekniska Högskolan. This notice is included here to comply with the + distribution terms. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/RELEASE-NOTES b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/RELEASE-NOTES new file mode 100644 index 00000000..7ec031d1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/RELEASE-NOTES @@ -0,0 +1,321 @@ +curl and libcurl 7.73.0 + + Public curl releases: 195 + Command line options: 234 + curl_easy_setopt() options: 278 + Public functions in libcurl: 85 + Contributors: 2270 + +This release includes the following changes: + + o curl: add --output-dir [25] + o curl: support XDG_CONFIG_HOME to find .curlrc [3] + o curl: update --help with categories [77] + o curl_easy_option_*: new API for meta-data about easy options [40] + o CURLE_PROXY: new error code [7] + o mqtt: enable by default [28] + o sftp: add new quote commands 'atime' and 'mtime' [6] + o ssh: add the option CURLKHSTAT_FINE_REPLACE [27] + o tls: add CURLOPT_SSL_EC_CURVES and --curves [29] + +This release includes the following bugfixes: + + o altsvc: clone setting in curl_easy_duphandle [60] + o base64: also build for smtp, pop3 and imap [81] + o BUGS: convert document to markdown [107] + o build-wolfssl: fix build with Visual Studio 2019 [114] + o buildconf: invoke 'autoreconf -fi' instead [37] + o checksrc: detect // comments on column 0 [132] + o checksrc: verify do-while and spaces between the braces [2] + o checksrc: warn on space after exclamation mark [129] + o CI/azure: disable test 571 in the msys2 builds [93] + o CI/azure: MQTT is now enabled by default [64] + o CI/azure: no longer ignore results of test 1013 [43] + o CI/tests: fix invocation of tests for CMake builds [117] + o CI/travis: add a CI job with openssl3 (from git master) [51] + o cleanups: avoid curl_ on local variables [53] + o CMake: add option to enable Unicode on Windows [48] + o cmake: make HTTP_ONLY also disable MQTT [58] + o CMake: remove explicit `CMAKE_ANSI_CFLAGS` [45] + o cmake: remove scary warning [96] + o cmdline-opts/gen.pl: generate nicer "See Also" in curl.1 [66] + o configure: don't say HTTPS-proxy is enabled when disabled [120] + o configure: fix pkg-config detecting wolfssl [26] + o configure: let --enable-debug set -Wenum-conversion with gcc >= 10 [56] + o conn: check for connection being dead before reuse [39] + o connect.c: remove superfluous 'else' in Curl_getconnectinfo [42] + o curl.1: add see also no-progress-meter on two spots [67] + o curl.1: fix typo invokved -> invoked [36] + o curl: in retry output don't call all problems "transient" [74] + o curl: make --libcurl show binary posts correctly [130] + o curl: make checkpasswd use dynbuf [100] + o curl: make file2memory use dynbuf [102] + o curl: make file2string use dynbuf [103] + o curl: make glob_match_url use dynbuf [101] + o curl: make sure setopt CURLOPT_IPRESOLVE passes on a long [134] + o curl: retry delays in parallel mode no longer sleeps blocking [70] + o curl: use curlx_dynbuf for realloc when loading config files [73] + o curl:parallel_transfers: make sure retry readds the transfer [71] + o curl_get_line: build only if cookies or alt-svc are enabled [13] + o curl_mime_headers.3: fix the example's use of curl_slist_append [83] + o Curl_pgrsTime - return new time to avoid timeout integer overflow [32] + o Curl_send: return error when pre_receive_plain can't malloc [111] + o dist: add missing CMake Find modules to the distribution [14] + o docs/LICENSE-MIXING: remove [79] + o docs/opts: fix typos in two manual pages [119] + o docs/RESOURCES: remove [105] + o docs/TheArtOfHttpScripting: convert to markdown [106] + o docs: add description about CI platforms to CONTRIBUTE.md [44] + o docs: correct non-existing macros in man pages [35] + o doh: add error message for DOH_DNS_NAME_TOO_LONG [17] + o dynbuf: make sure Curl_dyn_tail() zero terminates [78] + o easy_reset: clear retry counter [82] + o easygetopt: pass a valid enum to avoid compiler warning [75] + o etag: save and use the full received contents [4] + o ftp: a 550 response to SIZE returns CURLE_REMOTE_FILE_NOT_FOUND [99] + o ftp: avoid risk of reading uninitialized integers [76] + o ftp: get rid of the PPSENDF macro [85] + o ftp: make a 552 response return CURLE_REMOTE_DISK_FULL [87] + o ftp: separate FTPS from FTP over "HTTPS proxy" [112] + o git: ignore libtests in 3XXX area [16] + o github: use new issue template feature [88] + o HISTORY: mention alt-svc added in 2019 + o HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29 [41] + o http: consolidate nghttp2_session_mem_recv() call paths [80] + o http_proxy: do not count proxy headers in the header bytecount [90] + o http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set [50] + o imap: make imap_send use dynbuf for the send buffer management [110] + o imap: set cselect_bits to CURL_CSELECT_IN initially [104] + o ldap: reduce the amount of #ifdefs needed [124] + o lib/Makefile.am: bump VERSIONINFO due to new functions [65] + o lib1560: verify "redirect" to double-slash leading URL [20] + o lib583: fix enum mixup + o lib: fix -Wassign-enum warnings [84] + o lib: make Curl_gethostname accept a const pointer [38] + o libssh2: handle the SSH protocols done over HTTPS proxy [125] + o libssh2: pass on the error from ssh_force_knownhost_key_type [47] + o Makefile.m32: add ability to override zstd libs [ci skip] [10] + o man pages: switch to https://example.com URLs [86] + o MANUAL: update examples to resolve without redirects [122] + o mbedtls: add missing header when defining MBEDTLS_DEBUG [133] + o memdebug: remove 9 year old unused debug function [126] + o multi: expand pre-check for socket readiness [21] + o multi: handle connection state winsock events [31] + o multi: implement wait using winsock events [22] + o ngtcp2: adapt to new NGTCP2_PROTO_VER_MAX define [108] + o ngtcp2: adapt to the new pkt_info arguments [18] + o ntlm: fix condition for curl_ntlm_core usage [46] + o openssl: avoid error conditions when importing native CA [52] + o openssl: consider ALERT_CERTIFICATE_EXPIRED a failed verification [57] + o openssl: Fix wincrypt symbols conflict with BoringSSL [9] + o parsedate: tune the date to epoch conversion [95] + o pause: only trigger a reread if the unpause sticks [92] + o pingpong: use a dynbuf for the *_pp_sendf() function [113] + o READMEs: convert several to markdown [115] + o runtests: add %repeat[]% for test files [116] + o runtests: allow creating files without newlines [72] + o runtests: allow generating a binary sequence from hex + o runtests: clear pid variables when failing to start a server [12] + o runtests: make cleardir() erase dot files too [8] + o runtests: provide curl's version string as %VERSION for tests [127] + o schannel: fix memory leak when using get_cert_location [15] + o schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root [128] + o scripts: improve the "get latest curl release tag" logic + o sectransp: make it build with --disable-proxy [123] + o select.h: make socket validation macros test for INVALID_SOCKET [24] + o select: align poll emulation to return all relevant events [63] + o select: fix poll-based check not detecting connect failure + o select: reduce duplication of Curl_poll in Curl_socket_check [23] + o select: simplify return code handling for poll and select [49] + o setopt: if the buffer exists, refuse the new BUFFERSIZE [5] + o setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument [91] + o socketpair: allow CURL_DISABLE_SOCKETPAIR [11] + o sockfilt: handle FD_CLOSE winsock event on write socket [30] + o src: spell whitespace without whitespace [121] + o SSLCERTS: fix English syntax [34] + o strerror: honor Unicode API choice on Windows [109] + o symbian: drop support [118] + o telnet.c: depend on static requirement of WinSock version 2 [61] + o test1541: remove since it is a known bug [68] + o test163[12]: require http to be built-in to run [94] + o test434: test -K use in a single line without newline [59] + o test971: show test mismatches "inline" + o tests/data: Fix some mismatched XML tags in test cases + o tests/FILEFORMAT: document nonewline support for + o tests/FILEFORMAT: document type=shell for + o tests/server/util.c: fix support for Windows Unicode builds [131] + o tests: remove pipelining tests [69] + o tls: fix SRP detection by using the proper #ifdefs [33] + o tls: provide the CApath verbose log on its own line [1] + o tool_setopt: escape binary data to hex, not octal + o tool_writeout: add new writeout variable, %{num_headers} [97] + o travis: add a build using libressl (from git master) [55] + o url: use blank credentials when using proxy w/o username and password [54] + o urlapi: use more Curl_safefree [89] + o vtls: deduplicate client certificates in ssl_config_data [98] + o win32: drop support for WinSock version 1, require version 2 [62] + o winbuild: convert the instruction text to README.md [19] + +This release includes the following known bugs: + + o see docs/KNOWN_BUGS (https://curl.haxx.se/docs/knownbugs.html) + +This release would not have looked like this without help, code, reports and +advice from friends like these: + + Alessandro Ghedini, Anders Bakken, Andrew Barnes, anio on github, + Antarpreet Singh, beckenc on github, Chris Paulson-Ellis, + Christian Weisgerber, COFFEETALES on github, Dan Fandrich, Daniel Gustafsson, + Daniel Stenberg, Dan Kenigsberg, Diven Qi, Don J Olmstead, Duncan Wilcox, + Eli Schwartz, Emil Engler, Eric Curtin, Frederik Wedel-Heinen, + fullincome on github, Gaurav Malhotra, Gergely Nagy, Gisle Vanem, + Harry Sintonen, htasta on github, iammrtau on github, ihsinme on github, + Ionuț-Francisc Oancea, Javier Blazquez, Javier Navarro, Jeroen Ooms, + jmdavitt on github, Kamil Dudka, Kunal Chandarana, Laramie Leavitt, + Marcel Raad, Marc Hörsken, Martin Bašti, Michael Baentsch, Michael Musset, + Michael Olbrich, Mingtao Yang, M.R.T on github, Peter Körner, Peter Wu, + Quentin Balland, Rasmus Melchior Jacobsen, Ray Satiro, rcombs on github, + Robin Douine, Samanta Navarro, Samuel Marks, Samuel Tranchet, Sergei Nikulov, + sofaboss on github, Stefan Strogin, Stephan Mühlstrasser, + Tatsuhiro Tsujikawa, Tomas Berger, Tom van der Woerdt, Viktor Szakats, + xwxbug on github, + (63 contributors) + + Thanks! (and sorry if I forgot to mention someone) + +References to bug reports and discussions on issues: + + [1] = https://curl.haxx.se/bug/?i=5826 + [2] = https://curl.haxx.se/bug/?i=5845 + [3] = https://curl.haxx.se/bug/?i=5829 + [4] = https://curl.haxx.se/bug/?i=5610 + [5] = https://curl.haxx.se/bug/?i=5842 + [6] = https://curl.haxx.se/bug/?i=5810 + [7] = https://curl.haxx.se/bug/?i=5770 + [8] = https://curl.haxx.se/bug/?i=5838 + [9] = https://curl.haxx.se/bug/?i=5669 + [10] = https://curl.haxx.se/bug/?i=5840 + [11] = https://curl.haxx.se/bug/?i=5850 + [12] = https://curl.haxx.se/mail/lib-2020-08/0018.html + [13] = https://curl.haxx.se/bug/?i=5851 + [14] = https://curl.haxx.se/bug/?i=5836 + [15] = https://curl.haxx.se/bug/?i=5855 + [16] = https://curl.haxx.se/bug/?i=5859 + [17] = https://curl.haxx.se/bug/?i=5863 + [18] = https://curl.haxx.se/bug/?i=5864 + [19] = https://curl.haxx.se/bug/?i=5861 + [20] = https://curl.haxx.se/bug/?i=5849 + [21] = https://curl.haxx.se/bug/?i=5634 + [22] = https://curl.haxx.se/bug/?i=5634 + [23] = https://curl.haxx.se/bug/?i=5707 + [24] = https://curl.haxx.se/bug/?i=5760 + [25] = https://curl.haxx.se/bug/?i=5637 + [26] = https://curl.haxx.se/bug/?i=5848 + [27] = https://curl.haxx.se/bug/?i=5685 + [28] = https://curl.haxx.se/bug/?i=5858 + [29] = https://curl.haxx.se/bug/?i=5892 + [30] = https://curl.haxx.se/bug/?i=5879 + [31] = https://curl.haxx.se/bug/?i=5867 + [32] = https://curl.haxx.se/bug/?i=5583 + [33] = https://curl.haxx.se/bug/?i=5865 + [34] = https://curl.haxx.se/bug/?i=5876 + [35] = https://curl.haxx.se/bug/?i=5846 + [36] = https://curl.haxx.se/bug/?i=5846 + [37] = https://curl.haxx.se/bug/?i=5853 + [38] = https://curl.haxx.se/bug/?i=5866 + [39] = https://curl.haxx.se/bug/?i=5884 + [40] = https://curl.haxx.se/bug/?i=5365 + [41] = https://curl.haxx.se/bug/?i=5871 + [42] = https://curl.haxx.se/bug/?i=5912 + [43] = https://curl.haxx.se/bug/?i=5889 + [44] = https://curl.haxx.se/bug/?i=5882 + [45] = https://curl.haxx.se/bug/?i=5439 + [46] = https://curl.haxx.se/bug/?i=1262 + [47] = https://curl.haxx.se/bug/?i=5909 + [48] = https://curl.haxx.se/bug/?i=5843 + [49] = https://curl.haxx.se/bug/?i=5880 + [50] = https://bugzilla.redhat.com/1873327 + [51] = https://curl.haxx.se/bug/?i=5908 + [52] = https://curl.haxx.se/bug/?i=5907 + [53] = https://curl.haxx.se/bug/?i=5906 + [54] = https://curl.haxx.se/bug/?i=5914 + [55] = https://curl.haxx.se/bug/?i=5932 + [56] = https://curl.haxx.se/bug/?i=5930 + [57] = https://curl.haxx.se/bug/?i=5934 + [58] = https://curl.haxx.se/bug/?i=5931 + [59] = https://curl.haxx.se/bug/?i=5946 + [60] = https://curl.haxx.se/bug/?i=5923 + [61] = https://curl.haxx.se/bug/?i=5854 + [62] = https://curl.haxx.se/bug/?i=5854 + [63] = https://curl.haxx.se/bug/?i=5883 + [64] = https://curl.haxx.se/bug/?i=5903 + [65] = https://curl.haxx.se/bug/?i=5899 + [66] = https://curl.haxx.se/bug/?i=5898 + [67] = https://curl.haxx.se/bug/?i=5897 + [68] = https://curl.haxx.se/bug/?i=5922 + [69] = https://curl.haxx.se/bug/?i=5921 + [70] = https://curl.haxx.se/bug/?i=5917 + [71] = https://curl.haxx.se/bug/?i=5905 + [72] = https://curl.haxx.se/bug/?i=5946 + [73] = https://curl.haxx.se/bug/?i=5946 + [74] = https://curl.haxx.se/bug/?i=5916 + [75] = https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843 + [76] = https://curl.haxx.se/bug/?i=5972 + [77] = https://curl.haxx.se/bug/?i=5680 + [78] = https://curl.haxx.se/bug/?i=5959 + [79] = https://curl.haxx.se/bug/?i=5955 + [80] = https://curl.haxx.se/bug/?i=5648 + [81] = https://curl.haxx.se/bug/?i=5937 + [82] = https://curl.haxx.se/bug/?i=5974 + [83] = https://curl.haxx.se/bug/?i=5942 + [84] = https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553 + [85] = https://curl.haxx.se/bug/?i=5971 + [86] = https://curl.haxx.se/bug/?i=5969 + [87] = https://curl.haxx.se/bug/?i=6016 + [88] = https://curl.haxx.se/bug/?i=5936 + [89] = https://curl.haxx.se/bug/?i=5968 + [90] = https://curl.haxx.se/bug/?i=5992 + [91] = https://curl.haxx.se/bug/?i=5993 + [92] = https://curl.haxx.se/mail/lib-2020-09/0081.html + [93] = https://curl.haxx.se/bug/?i=5954 + [94] = https://curl.haxx.se/bug/?i=6014 + [95] = https://curl.haxx.se/bug/?i=5985 + [96] = https://curl.haxx.se/bug/?i=5984 + [97] = https://curl.haxx.se/bug/?i=5947 + [98] = https://curl.haxx.se/bug/?i=5629 + [99] = https://curl.haxx.se/bug/?i=5953 + [100] = https://curl.haxx.se/bug/?i=5952 + [101] = https://curl.haxx.se/bug/?i=5952 + [102] = https://curl.haxx.se/bug/?i=5952 + [103] = https://curl.haxx.se/bug/?i=5952 + [104] = https://curl.haxx.se/bug/?i=5961 + [105] = https://curl.haxx.se/bug/?i=5980 + [106] = https://curl.haxx.se/bug/?i=5981 + [107] = https://curl.haxx.se/bug/?i=5979 + [108] = https://curl.haxx.se/bug/?i=6012 + [109] = https://curl.haxx.se/bug/?i=6005 + [110] = https://curl.haxx.se/bug/?i=6010 + [111] = https://curl.haxx.se/bug/?i=6011 + [112] = https://curl.haxx.se/bug/?i=5523 + [113] = https://curl.haxx.se/bug/?i=6004 + [114] = https://curl.haxx.se/bug/?i=6033 + [115] = https://curl.haxx.se/bug/?i=6028 + [116] = https://curl.haxx.se/bug/?i=6040 + [117] = https://curl.haxx.se/bug/?i=6052 + [118] = https://curl.haxx.se/bug/?i=5989 + [119] = https://curl.haxx.se/bug/?i=6039 + [120] = https://github.com/curl/curl/pull/5735#issuecomment-701376388 + [121] = https://curl.haxx.se/bug/?i=6023 + [122] = https://curl.haxx.se/bug/?i=6024 + [123] = https://curl.haxx.se/bug/?i=6025 + [124] = https://curl.haxx.se/bug/?i=6035 + [125] = https://curl.haxx.se/bug/?i=4295 + [126] = https://curl.haxx.se/bug/?i=5973 + [127] = https://curl.haxx.se/bug/?i=6037 + [128] = https://curl.haxx.se/bug/?i=6003 + [129] = https://curl.haxx.se/bug/?i=6034 + [130] = https://curl.haxx.se/bug/?i=6031 + [131] = https://curl.haxx.se/bug/?i=6070 + [132] = https://curl.haxx.se/bug/?i=6048 + [133] = https://curl.haxx.se/bug/?i=6045 + [134] = https://curl.haxx.se/bug/?i=6042 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/acinclude.m4 b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/acinclude.m4 new file mode 100644 index 00000000..e7a36e4b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/acinclude.m4 @@ -0,0 +1,2576 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +#*************************************************************************** + +dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT]) +dnl ------------------------------------------------- +dnl Use the C preprocessor to find out if the given object-style symbol +dnl is defined and get its expansion. This macro will not use default +dnl includes even if no INCLUDES argument is given. This macro will run +dnl silently when invoked with three arguments. If the expansion would +dnl result in a set of double-quoted strings the returned expansion will +dnl actually be a single double-quoted string concatenating all them. + +AC_DEFUN([CURL_CHECK_DEF], [ + AC_REQUIRE([CURL_CPP_P])dnl + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl + AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl + if test -z "$SED"; then + AC_MSG_ERROR([SED not set. Cannot continue without SED being set.]) + fi + if test -z "$GREP"; then + AC_MSG_ERROR([GREP not set. Cannot continue without GREP being set.]) + fi + ifelse($3,,[AC_MSG_CHECKING([for preprocessor definition of $1])]) + tmp_exp="" + AC_PREPROC_IFELSE([ + AC_LANG_SOURCE( +ifelse($2,,,[$2])[[ +#ifdef $1 +CURL_DEF_TOKEN $1 +#endif + ]]) + ],[ + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[[ ]][[ ]]*//' 2>/dev/null | \ + "$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "$1"; then + tmp_exp="" + fi + ]) + if test -z "$tmp_exp"; then + AS_VAR_SET(ac_HaveDef, no) + ifelse($3,,[AC_MSG_RESULT([no])]) + else + AS_VAR_SET(ac_HaveDef, yes) + AS_VAR_SET(ac_Def, $tmp_exp) + ifelse($3,,[AC_MSG_RESULT([$tmp_exp])]) + fi + AS_VAR_POPDEF([ac_Def])dnl + AS_VAR_POPDEF([ac_HaveDef])dnl + CPPFLAGS=$OLDCPPFLAGS +]) + + +dnl CURL_CHECK_DEF_CC (SYMBOL, [INCLUDES], [SILENT]) +dnl ------------------------------------------------- +dnl Use the C compiler to find out only if the given symbol is defined +dnl or not, this can not find out its expansion. This macro will not use +dnl default includes even if no INCLUDES argument is given. This macro +dnl will run silently when invoked with three arguments. + +AC_DEFUN([CURL_CHECK_DEF_CC], [ + AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl + ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])]) + AC_COMPILE_IFELSE([ + AC_LANG_SOURCE( +ifelse($2,,,[$2])[[ +int main (void) +{ +#ifdef $1 + return 0; +#else + force compilation error +#endif +} + ]]) + ],[ + tst_symbol_defined="yes" + ],[ + tst_symbol_defined="no" + ]) + if test "$tst_symbol_defined" = "yes"; then + AS_VAR_SET(ac_HaveDef, yes) + ifelse($3,,[AC_MSG_RESULT([yes])]) + else + AS_VAR_SET(ac_HaveDef, no) + ifelse($3,,[AC_MSG_RESULT([no])]) + fi + AS_VAR_POPDEF([ac_HaveDef])dnl +]) + + +dnl CURL_CHECK_LIB_XNET +dnl ------------------------------------------------- +dnl Verify if X/Open network library is required. + +AC_DEFUN([CURL_CHECK_LIB_XNET], [ + AC_MSG_CHECKING([if X/Open network library is required]) + tst_lib_xnet_required="no" + AC_COMPILE_IFELSE([ + AC_LANG_SOURCE([[ +int main (void) +{ +#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600) + return 0; +#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) + return 0; +#else + force compilation error +#endif +} + ]]) + ],[ + tst_lib_xnet_required="yes" + LIBS="-lxnet $LIBS" + ]) + AC_MSG_RESULT([$tst_lib_xnet_required]) +]) + + +dnl CURL_CHECK_AIX_ALL_SOURCE +dnl ------------------------------------------------- +dnl Provides a replacement of traditional AC_AIX with +dnl an uniform behaviour across all autoconf versions, +dnl and with our own placement rules. + +AC_DEFUN([CURL_CHECK_AIX_ALL_SOURCE], [ + AH_VERBATIM([_ALL_SOURCE], + [/* Define to 1 if OS is AIX. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif]) + AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl + AC_BEFORE([$0], [CURL_CONFIGURE_REENTRANT])dnl + AC_BEFORE([$0], [CURL_CONFIGURE_PULL_SYS_POLL])dnl + AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)]) + AC_EGREP_CPP([yes_this_is_aix],[ +#ifdef _AIX + yes_this_is_aix +#endif + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(_ALL_SOURCE) + ],[ + AC_MSG_RESULT([no]) + ]) +]) + + +dnl CURL_CHECK_HEADER_WINDOWS +dnl ------------------------------------------------- +dnl Check for compilable and valid windows.h header + +AC_DEFUN([CURL_CHECK_HEADER_WINDOWS], [ + AC_CACHE_CHECK([for windows.h], [curl_cv_header_windows_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + ]],[[ +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINDOWS_H shall not be defined. +#else + int dummy=2*WINVER; +#endif + ]]) + ],[ + curl_cv_header_windows_h="yes" + ],[ + curl_cv_header_windows_h="no" + ]) + ]) + case "$curl_cv_header_windows_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_WINDOWS_H, 1, + [Define to 1 if you have the windows.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_NATIVE_WINDOWS +dnl ------------------------------------------------- +dnl Check if building a native Windows target + +AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_CACHE_CHECK([whether build target is a native Windows one], [curl_cv_native_windows], [ + if test "$curl_cv_header_windows_h" = "no"; then + curl_cv_native_windows="no" + else + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ +#if defined(__MINGW32__) || defined(__MINGW32CE__) || \ + (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64))) + int dummy=1; +#else + Not a native Windows build target. +#endif + ]]) + ],[ + curl_cv_native_windows="yes" + ],[ + curl_cv_native_windows="no" + ]) + fi + ]) + AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "x$curl_cv_native_windows" = xyes) +]) + + +dnl CURL_CHECK_HEADER_WINSOCK +dnl ------------------------------------------------- +dnl Check for compilable and valid winsock.h header + +AC_DEFUN([CURL_CHECK_HEADER_WINSOCK], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_CACHE_CHECK([for winsock.h], [curl_cv_header_winsock_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + ]],[[ +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINSOCK_H shall not be defined. +#else + int dummy=WSACleanup(); +#endif + ]]) + ],[ + curl_cv_header_winsock_h="yes" + ],[ + curl_cv_header_winsock_h="no" + ]) + ]) + case "$curl_cv_header_winsock_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_WINSOCK_H, 1, + [Define to 1 if you have the winsock.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_WINSOCK2 +dnl ------------------------------------------------- +dnl Check for compilable and valid winsock2.h header + +AC_DEFUN([CURL_CHECK_HEADER_WINSOCK2], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_CACHE_CHECK([for winsock2.h], [curl_cv_header_winsock2_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + ]],[[ +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WINSOCK2_H shall not be defined. +#else + int dummy=2*IPPROTO_ESP; +#endif + ]]) + ],[ + curl_cv_header_winsock2_h="yes" + ],[ + curl_cv_header_winsock2_h="no" + ]) + ]) + case "$curl_cv_header_winsock2_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_WINSOCK2_H, 1, + [Define to 1 if you have the winsock2.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_WS2TCPIP +dnl ------------------------------------------------- +dnl Check for compilable and valid ws2tcpip.h header + +AC_DEFUN([CURL_CHECK_HEADER_WS2TCPIP], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl + AC_CACHE_CHECK([for ws2tcpip.h], [curl_cv_header_ws2tcpip_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include +#include + ]],[[ +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WS2TCPIP_H shall not be defined. +#else + int dummy=2*IP_PKTINFO; +#endif + ]]) + ],[ + curl_cv_header_ws2tcpip_h="yes" + ],[ + curl_cv_header_ws2tcpip_h="no" + ]) + ]) + case "$curl_cv_header_ws2tcpip_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_WS2TCPIP_H, 1, + [Define to 1 if you have the ws2tcpip.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_WINLDAP +dnl ------------------------------------------------- +dnl Check for compilable and valid winldap.h header + +AC_DEFUN([CURL_CHECK_HEADER_WINLDAP], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_CACHE_CHECK([for winldap.h], [curl_cv_header_winldap_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#endif +#include + ]],[[ +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINLDAP_H shall not be defined. +#else + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + ULONG res = ldap_unbind(ldp); +#endif + ]]) + ],[ + curl_cv_header_winldap_h="yes" + ],[ + curl_cv_header_winldap_h="no" + ]) + ]) + case "$curl_cv_header_winldap_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_WINLDAP_H, 1, + [Define to 1 if you have the winldap.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_WINBER +dnl ------------------------------------------------- +dnl Check for compilable and valid winber.h header + +AC_DEFUN([CURL_CHECK_HEADER_WINBER], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINLDAP])dnl + AC_CACHE_CHECK([for winber.h], [curl_cv_header_winber_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#endif +#include +#include + ]],[[ +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINBER_H shall not be defined. +#else + BERVAL *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); +#endif + ]]) + ],[ + curl_cv_header_winber_h="yes" + ],[ + curl_cv_header_winber_h="no" + ]) + ]) + case "$curl_cv_header_winber_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_WINBER_H, 1, + [Define to 1 if you have the winber.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_LBER +dnl ------------------------------------------------- +dnl Check for compilable and valid lber.h header, +dnl and check if it is needed even with ldap.h + +AC_DEFUN([CURL_CHECK_HEADER_LBER], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_CACHE_CHECK([for lber.h], [curl_cv_header_lber_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#include + ]],[[ + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); + ]]) + ],[ + curl_cv_header_lber_h="yes" + ],[ + curl_cv_header_lber_h="no" + ]) + ]) + if test "$curl_cv_header_lber_h" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_LBER_H, 1, + [Define to 1 if you have the lber.h header file.]) + # + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#include + ]],[[ + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); + ]]) + ],[ + curl_cv_need_header_lber_h="no" + ],[ + curl_cv_need_header_lber_h="yes" + ]) + # + case "$curl_cv_need_header_lber_h" in + yes) + AC_DEFINE_UNQUOTED(NEED_LBER_H, 1, + [Define to 1 if you need the lber.h header file even with ldap.h]) + ;; + esac + fi +]) + + +dnl CURL_CHECK_HEADER_LDAP +dnl ------------------------------------------------- +dnl Check for compilable and valid ldap.h header + +AC_DEFUN([CURL_CHECK_HEADER_LDAP], [ + AC_REQUIRE([CURL_CHECK_HEADER_LBER])dnl + AC_CACHE_CHECK([for ldap.h], [curl_cv_header_ldap_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#include + ]],[[ + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + int res = ldap_unbind(ldp); + ]]) + ],[ + curl_cv_header_ldap_h="yes" + ],[ + curl_cv_header_ldap_h="no" + ]) + ]) + case "$curl_cv_header_ldap_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_LDAP_H, 1, + [Define to 1 if you have the ldap.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_LDAP_SSL +dnl ------------------------------------------------- +dnl Check for compilable and valid ldap_ssl.h header + +AC_DEFUN([CURL_CHECK_HEADER_LDAP_SSL], [ + AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl + AC_CACHE_CHECK([for ldap_ssl.h], [curl_cv_header_ldap_ssl_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#ifdef HAVE_LDAP_H +#include +#endif +#include + ]],[[ + LDAP *ldp = ldapssl_init("dummy", LDAPS_PORT, 1); + ]]) + ],[ + curl_cv_header_ldap_ssl_h="yes" + ],[ + curl_cv_header_ldap_ssl_h="no" + ]) + ]) + case "$curl_cv_header_ldap_ssl_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_LDAP_SSL_H, 1, + [Define to 1 if you have the ldap_ssl.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_HEADER_LDAPSSL +dnl ------------------------------------------------- +dnl Check for compilable and valid ldapssl.h header + +AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [ + AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl + AC_CACHE_CHECK([for ldapssl.h], [curl_cv_header_ldapssl_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#ifdef HAVE_LDAP_H +#include +#endif +#include + ]],[[ + char *cert_label = NULL; + LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label); + ]]) + ],[ + curl_cv_header_ldapssl_h="yes" + ],[ + curl_cv_header_ldapssl_h="no" + ]) + ]) + case "$curl_cv_header_ldapssl_h" in + yes) + AC_DEFINE_UNQUOTED(HAVE_LDAPSSL_H, 1, + [Define to 1 if you have the ldapssl.h header file.]) + ;; + esac +]) + + +dnl CURL_CHECK_LIBS_WINLDAP +dnl ------------------------------------------------- +dnl Check for libraries needed for WINLDAP support, +dnl and prepended to LIBS any needed libraries. +dnl This macro can take an optional parameter with a +dnl whitespace separated list of libraries to check +dnl before the WINLDAP default ones. + +AC_DEFUN([CURL_CHECK_LIBS_WINLDAP], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINBER])dnl + # + AC_MSG_CHECKING([for WINLDAP libraries]) + # + u_libs="" + # + ifelse($1,,,[ + for x_lib in $1; do + case "$x_lib" in + -l*) + l_lib="$x_lib" + ;; + *) + l_lib="-l$x_lib" + ;; + esac + if test -z "$u_libs"; then + u_libs="$l_lib" + else + u_libs="$u_libs $l_lib" + fi + done + ]) + # + curl_cv_save_LIBS="$LIBS" + curl_cv_ldap_LIBS="unknown" + # + for x_nlibs in '' "$u_libs" \ + '-lwldap32' ; do + if test "$curl_cv_ldap_LIBS" = "unknown"; then + if test -z "$x_nlibs"; then + LIBS="$curl_cv_save_LIBS" + else + LIBS="$x_nlibs $curl_cv_save_LIBS" + fi + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINLDAP_H +#include +#endif +#ifdef HAVE_WINBER_H +#include +#endif +#endif + ]],[[ + BERVAL *bvp = NULL; + BerElement *bep = ber_init(bvp); + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + ULONG res = ldap_unbind(ldp); + ber_free(bep, 1); + ]]) + ],[ + curl_cv_ldap_LIBS="$x_nlibs" + ]) + fi + done + # + LIBS="$curl_cv_save_LIBS" + # + case X-"$curl_cv_ldap_LIBS" in + X-unknown) + AC_MSG_RESULT([cannot find WINLDAP libraries]) + ;; + X-) + AC_MSG_RESULT([no additional lib required]) + ;; + *) + if test -z "$curl_cv_save_LIBS"; then + LIBS="$curl_cv_ldap_LIBS" + else + LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS" + fi + AC_MSG_RESULT([$curl_cv_ldap_LIBS]) + ;; + esac + # +]) + + +dnl CURL_CHECK_LIBS_LDAP +dnl ------------------------------------------------- +dnl Check for libraries needed for LDAP support, +dnl and prepended to LIBS any needed libraries. +dnl This macro can take an optional parameter with a +dnl whitespace separated list of libraries to check +dnl before the default ones. + +AC_DEFUN([CURL_CHECK_LIBS_LDAP], [ + AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl + # + AC_MSG_CHECKING([for LDAP libraries]) + # + u_libs="" + # + ifelse($1,,,[ + for x_lib in $1; do + case "$x_lib" in + -l*) + l_lib="$x_lib" + ;; + *) + l_lib="-l$x_lib" + ;; + esac + if test -z "$u_libs"; then + u_libs="$l_lib" + else + u_libs="$u_libs $l_lib" + fi + done + ]) + # + curl_cv_save_LIBS="$LIBS" + curl_cv_ldap_LIBS="unknown" + # + for x_nlibs in '' "$u_libs" \ + '-lldap' \ + '-lldap -llber' \ + '-llber -lldap' \ + '-lldapssl -lldapx -lldapsdk' \ + '-lldapsdk -lldapx -lldapssl' \ + '-lldap -llber -lssl -lcrypto' ; do + + if test "$curl_cv_ldap_LIBS" = "unknown"; then + if test -z "$x_nlibs"; then + LIBS="$curl_cv_save_LIBS" + else + LIBS="$x_nlibs $curl_cv_save_LIBS" + fi + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#ifdef HAVE_LDAP_H +#include +#endif + ]],[[ + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + int res = ldap_unbind(ldp); + ber_free(bep, 1); + ]]) + ],[ + curl_cv_ldap_LIBS="$x_nlibs" + ]) + fi + done + # + LIBS="$curl_cv_save_LIBS" + # + case X-"$curl_cv_ldap_LIBS" in + X-unknown) + AC_MSG_RESULT([cannot find LDAP libraries]) + ;; + X-) + AC_MSG_RESULT([no additional lib required]) + ;; + *) + if test -z "$curl_cv_save_LIBS"; then + LIBS="$curl_cv_ldap_LIBS" + else + LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS" + fi + AC_MSG_RESULT([$curl_cv_ldap_LIBS]) + ;; + esac + # +]) + + +dnl CURL_CHECK_HEADER_MALLOC +dnl ------------------------------------------------- +dnl Check for compilable and valid malloc.h header, +dnl and check if it is needed even with stdlib.h + +AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [ + AC_CACHE_CHECK([for malloc.h], [curl_cv_header_malloc_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + ]]) + ],[ + curl_cv_header_malloc_h="yes" + ],[ + curl_cv_header_malloc_h="no" + ]) + ]) + if test "$curl_cv_header_malloc_h" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_MALLOC_H, 1, + [Define to 1 if you have the malloc.h header file.]) + # + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + ]]) + ],[ + curl_cv_need_header_malloc_h="no" + ],[ + curl_cv_need_header_malloc_h="yes" + ]) + # + case "$curl_cv_need_header_malloc_h" in + yes) + AC_DEFINE_UNQUOTED(NEED_MALLOC_H, 1, + [Define to 1 if you need the malloc.h header file even with stdlib.h]) + ;; + esac + fi +]) + + +dnl CURL_CHECK_HEADER_MEMORY +dnl ------------------------------------------------- +dnl Check for compilable and valid memory.h header, +dnl and check if it is needed even with stdlib.h for +dnl memory related functions. + +AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [ + AC_CACHE_CHECK([for memory.h], [curl_cv_header_memory_h], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + ]]) + ],[ + curl_cv_header_memory_h="yes" + ],[ + curl_cv_header_memory_h="no" + ]) + ]) + if test "$curl_cv_header_memory_h" = "yes"; then + AC_DEFINE_UNQUOTED(HAVE_MEMORY_H, 1, + [Define to 1 if you have the memory.h header file.]) + # + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + ]]) + ],[ + curl_cv_need_header_memory_h="no" + ],[ + curl_cv_need_header_memory_h="yes" + ]) + # + case "$curl_cv_need_header_memory_h" in + yes) + AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1, + [Define to 1 if you need the memory.h header file even with stdlib.h]) + ;; + esac + fi +]) + +dnl TYPE_SOCKADDR_STORAGE +dnl ------------------------------------------------- +dnl Check for struct sockaddr_storage. Most IPv6-enabled +dnl hosts have it, but AIX 4.3 is one known exception. + +AC_DEFUN([TYPE_SOCKADDR_STORAGE], +[ + AC_CHECK_TYPE([struct sockaddr_storage], + AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, + [if struct sockaddr_storage is defined]), , + [ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#endif +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#endif + ]) +]) + +dnl CURL_CHECK_FUNC_RECV +dnl ------------------------------------------------- +dnl Test if the socket recv() function is available, +dnl and check its return type and the types of its +dnl arguments. If the function succeeds HAVE_RECV +dnl will be defined, defining the types of the arguments +dnl in RECV_TYPE_ARG1, RECV_TYPE_ARG2, RECV_TYPE_ARG3 +dnl and RECV_TYPE_ARG4, defining the type of the function +dnl return value in RECV_TYPE_RETV. + +AC_DEFUN([CURL_CHECK_FUNC_RECV], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl + AC_CHECK_HEADERS(sys/types.h sys/socket.h) + # + AC_MSG_CHECKING([for recv]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + ]],[[ + recv(0, 0, 0, 0); + ]]) + ],[ + AC_MSG_RESULT([yes]) + curl_cv_recv="yes" + ],[ + AC_MSG_RESULT([no]) + curl_cv_recv="no" + ]) + # + if test "$curl_cv_recv" = "yes"; then + AC_CACHE_CHECK([types of args and return type for recv], + [curl_cv_func_recv_args], [ + curl_cv_func_recv_args="unknown" + for recv_retv in 'int' 'ssize_t'; do + for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do + for recv_arg2 in 'char *' 'void *'; do + for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do + for recv_arg4 in 'int' 'unsigned int'; do + if test "$curl_cv_func_recv_args" = "unknown"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#define RECVCALLCONV PASCAL +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#define RECVCALLCONV +#endif +#ifndef HAVE_PROTO_BSDSOCKET_H + extern $recv_retv RECVCALLCONV + recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4); +#endif + ]],[[ + $recv_arg1 s=0; + $recv_arg2 buf=0; + $recv_arg3 len=0; + $recv_arg4 flags=0; + $recv_retv res = recv(s, buf, len, flags); + ]]) + ],[ + curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv" + ]) + fi + done + done + done + done + done + ]) # AC-CACHE-CHECK + if test "$curl_cv_func_recv_args" = "unknown"; then + AC_MSG_ERROR([Cannot find proper types to use for recv args]) + else + recv_prev_IFS=$IFS; IFS=',' + set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'` + IFS=$recv_prev_IFS + shift + # + AC_DEFINE_UNQUOTED(RECV_TYPE_ARG1, $[1], + [Define to the type of arg 1 for recv.]) + AC_DEFINE_UNQUOTED(RECV_TYPE_ARG2, $[2], + [Define to the type of arg 2 for recv.]) + AC_DEFINE_UNQUOTED(RECV_TYPE_ARG3, $[3], + [Define to the type of arg 3 for recv.]) + AC_DEFINE_UNQUOTED(RECV_TYPE_ARG4, $[4], + [Define to the type of arg 4 for recv.]) + AC_DEFINE_UNQUOTED(RECV_TYPE_RETV, $[5], + [Define to the function return type for recv.]) + # + AC_DEFINE_UNQUOTED(HAVE_RECV, 1, + [Define to 1 if you have the recv function.]) + curl_cv_func_recv="yes" + fi + else + AC_MSG_ERROR([Unable to link function recv]) + fi +]) + + +dnl CURL_CHECK_FUNC_SEND +dnl ------------------------------------------------- +dnl Test if the socket send() function is available, +dnl and check its return type and the types of its +dnl arguments. If the function succeeds HAVE_SEND +dnl will be defined, defining the types of the arguments +dnl in SEND_TYPE_ARG1, SEND_TYPE_ARG2, SEND_TYPE_ARG3 +dnl and SEND_TYPE_ARG4, defining the type of the function +dnl return value in SEND_TYPE_RETV, and also defining the +dnl type qualifier of second argument in SEND_QUAL_ARG2. + +AC_DEFUN([CURL_CHECK_FUNC_SEND], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl + AC_CHECK_HEADERS(sys/types.h sys/socket.h) + # + AC_MSG_CHECKING([for send]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + ]],[[ + send(0, 0, 0, 0); + ]]) + ],[ + AC_MSG_RESULT([yes]) + curl_cv_send="yes" + ],[ + AC_MSG_RESULT([no]) + curl_cv_send="no" + ]) + # + if test "$curl_cv_send" = "yes"; then + AC_CACHE_CHECK([types of args and return type for send], + [curl_cv_func_send_args], [ + curl_cv_func_send_args="unknown" + for send_retv in 'int' 'ssize_t'; do + for send_arg1 in 'int' 'ssize_t' 'SOCKET'; do + for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do + for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do + for send_arg4 in 'int' 'unsigned int'; do + if test "$curl_cv_func_send_args" = "unknown"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#define SENDCALLCONV PASCAL +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#define SENDCALLCONV +#endif +#ifndef HAVE_PROTO_BSDSOCKET_H + extern $send_retv SENDCALLCONV + send($send_arg1, $send_arg2, $send_arg3, $send_arg4); +#endif + ]],[[ + $send_arg1 s=0; + $send_arg3 len=0; + $send_arg4 flags=0; + $send_retv res = send(s, 0, len, flags); + ]]) + ],[ + curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv" + ]) + fi + done + done + done + done + done + ]) # AC-CACHE-CHECK + if test "$curl_cv_func_send_args" = "unknown"; then + AC_MSG_ERROR([Cannot find proper types to use for send args]) + else + send_prev_IFS=$IFS; IFS=',' + set dummy `echo "$curl_cv_func_send_args" | sed 's/\*/\*/g'` + IFS=$send_prev_IFS + shift + # + send_qual_type_arg2=$[2] + # + AC_DEFINE_UNQUOTED(SEND_TYPE_ARG1, $[1], + [Define to the type of arg 1 for send.]) + AC_DEFINE_UNQUOTED(SEND_TYPE_ARG3, $[3], + [Define to the type of arg 3 for send.]) + AC_DEFINE_UNQUOTED(SEND_TYPE_ARG4, $[4], + [Define to the type of arg 4 for send.]) + AC_DEFINE_UNQUOTED(SEND_TYPE_RETV, $[5], + [Define to the function return type for send.]) + # + prev_sh_opts=$- + # + case $prev_sh_opts in + *f*) + ;; + *) + set -f + ;; + esac + # + case "$send_qual_type_arg2" in + const*) + send_qual_arg2=const + send_type_arg2=`echo $send_qual_type_arg2 | sed 's/^const //'` + ;; + *) + send_qual_arg2= + send_type_arg2=$send_qual_type_arg2 + ;; + esac + # + AC_DEFINE_UNQUOTED(SEND_QUAL_ARG2, $send_qual_arg2, + [Define to the type qualifier of arg 2 for send.]) + AC_DEFINE_UNQUOTED(SEND_TYPE_ARG2, $send_type_arg2, + [Define to the type of arg 2 for send.]) + # + case $prev_sh_opts in + *f*) + ;; + *) + set +f + ;; + esac + # + AC_DEFINE_UNQUOTED(HAVE_SEND, 1, + [Define to 1 if you have the send function.]) + curl_cv_func_send="yes" + fi + else + AC_MSG_ERROR([Unable to link function send]) + fi +]) + +dnl CURL_CHECK_MSG_NOSIGNAL +dnl ------------------------------------------------- +dnl Check for MSG_NOSIGNAL + +AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ + AC_CHECK_HEADERS(sys/types.h sys/socket.h) + AC_CACHE_CHECK([for MSG_NOSIGNAL], [curl_cv_msg_nosignal], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + ]],[[ + int flag=MSG_NOSIGNAL; + ]]) + ],[ + curl_cv_msg_nosignal="yes" + ],[ + curl_cv_msg_nosignal="no" + ]) + ]) + case "$curl_cv_msg_nosignal" in + yes) + AC_DEFINE_UNQUOTED(HAVE_MSG_NOSIGNAL, 1, + [Define to 1 if you have the MSG_NOSIGNAL flag.]) + ;; + esac +]) + + +dnl CURL_CHECK_STRUCT_TIMEVAL +dnl ------------------------------------------------- +dnl Check for timeval struct + +AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ + AC_REQUIRE([AC_HEADER_TIME])dnl + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl + AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl + AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h) + AC_CACHE_CHECK([for struct timeval], [curl_cv_struct_timeval], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + ]],[[ + struct timeval ts; + ts.tv_sec = 0; + ts.tv_usec = 0; + ]]) + ],[ + curl_cv_struct_timeval="yes" + ],[ + curl_cv_struct_timeval="no" + ]) + ]) + case "$curl_cv_struct_timeval" in + yes) + AC_DEFINE_UNQUOTED(HAVE_STRUCT_TIMEVAL, 1, + [Define to 1 if you have the timeval struct.]) + ;; + esac +]) + + +dnl TYPE_SIG_ATOMIC_T +dnl ------------------------------------------------- +dnl Check if the sig_atomic_t type is available, and +dnl verify if it is already defined as volatile. + +AC_DEFUN([TYPE_SIG_ATOMIC_T], [ + AC_CHECK_HEADERS(signal.h) + AC_CHECK_TYPE([sig_atomic_t],[ + AC_DEFINE(HAVE_SIG_ATOMIC_T, 1, + [Define to 1 if sig_atomic_t is an available typedef.]) + ], ,[ +#ifdef HAVE_SIGNAL_H +#include +#endif + ]) + case "$ac_cv_type_sig_atomic_t" in + yes) + # + AC_MSG_CHECKING([if sig_atomic_t is already defined as volatile]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#ifdef HAVE_SIGNAL_H +#include +#endif + ]],[[ + static volatile sig_atomic_t dummy = 0; + ]]) + ],[ + AC_MSG_RESULT([no]) + curl_cv_sig_atomic_t_volatile="no" + ],[ + AC_MSG_RESULT([yes]) + curl_cv_sig_atomic_t_volatile="yes" + ]) + # + if test "$curl_cv_sig_atomic_t_volatile" = "yes"; then + AC_DEFINE(HAVE_SIG_ATOMIC_T_VOLATILE, 1, + [Define to 1 if sig_atomic_t is already defined as volatile.]) + fi + ;; + esac +]) + + +dnl TYPE_IN_ADDR_T +dnl ------------------------------------------------- +dnl Check for in_addr_t: it is used to receive the return code of inet_addr() +dnl and a few other things. + +AC_DEFUN([TYPE_IN_ADDR_T], [ + AC_CHECK_TYPE([in_addr_t], ,[ + dnl in_addr_t not available + AC_CACHE_CHECK([for in_addr_t equivalent], + [curl_cv_in_addr_t_equiv], [ + curl_cv_in_addr_t_equiv="unknown" + for t in "unsigned long" int size_t unsigned long; do + if test "$curl_cv_in_addr_t_equiv" = "unknown"; then + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#endif + ]],[[ + $t data = inet_addr ("1.2.3.4"); + ]]) + ],[ + curl_cv_in_addr_t_equiv="$t" + ]) + fi + done + ]) + case "$curl_cv_in_addr_t_equiv" in + unknown) + AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t]) + ;; + *) + AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv, + [Type to use in place of in_addr_t when system does not provide it.]) + ;; + esac + ],[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#endif + ]) +]) + + +dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC +dnl ------------------------------------------------- +dnl Check if monotonic clock_gettime is available. + +AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [ + AC_REQUIRE([AC_HEADER_TIME])dnl + AC_CHECK_HEADERS(sys/types.h sys/time.h time.h) + AC_MSG_CHECKING([for monotonic clock_gettime]) + # + if test "x$dontwant_rt" = "xno" ; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif + ]],[[ + struct timespec ts; + (void)clock_gettime(CLOCK_MONOTONIC, &ts); + ]]) + ],[ + AC_MSG_RESULT([yes]) + curl_func_clock_gettime="yes" + ],[ + AC_MSG_RESULT([no]) + curl_func_clock_gettime="no" + ]) + fi + dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed + dnl until library linking and run-time checks for clock_gettime succeed. +]) + + +dnl CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC +dnl ------------------------------------------------- +dnl If monotonic clock_gettime is available then, +dnl check and prepended to LIBS any needed libraries. + +AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ + AC_REQUIRE([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC])dnl + # + if test "$curl_func_clock_gettime" = "yes"; then + # + AC_MSG_CHECKING([for clock_gettime in libraries]) + # + curl_cv_save_LIBS="$LIBS" + curl_cv_gclk_LIBS="unknown" + # + for x_xlibs in '' '-lrt' '-lposix4' ; do + if test "$curl_cv_gclk_LIBS" = "unknown"; then + if test -z "$x_xlibs"; then + LIBS="$curl_cv_save_LIBS" + else + LIBS="$x_xlibs $curl_cv_save_LIBS" + fi + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif + ]],[[ + struct timespec ts; + (void)clock_gettime(CLOCK_MONOTONIC, &ts); + ]]) + ],[ + curl_cv_gclk_LIBS="$x_xlibs" + ]) + fi + done + # + LIBS="$curl_cv_save_LIBS" + # + case X-"$curl_cv_gclk_LIBS" in + X-unknown) + AC_MSG_RESULT([cannot find clock_gettime]) + AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined]) + curl_func_clock_gettime="no" + ;; + X-) + AC_MSG_RESULT([no additional lib required]) + curl_func_clock_gettime="yes" + ;; + *) + if test -z "$curl_cv_save_LIBS"; then + LIBS="$curl_cv_gclk_LIBS" + else + LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS" + fi + AC_MSG_RESULT([$curl_cv_gclk_LIBS]) + curl_func_clock_gettime="yes" + ;; + esac + # + dnl only do runtime verification when not cross-compiling + if test "x$cross_compiling" != "xyes" && + test "$curl_func_clock_gettime" = "yes"; then + AC_MSG_CHECKING([if monotonic clock_gettime works]) + CURL_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif + ]],[[ + struct timespec ts; + if (0 == clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(0); + else + exit(1); + ]]) + ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined]) + curl_func_clock_gettime="no" + LIBS="$curl_cv_save_LIBS" + ]) + fi + # + case "$curl_func_clock_gettime" in + yes) + AC_DEFINE_UNQUOTED(HAVE_CLOCK_GETTIME_MONOTONIC, 1, + [Define to 1 if you have the clock_gettime function and monotonic timer.]) + ;; + esac + # + fi + # +]) + + +dnl CURL_CHECK_LIBS_CONNECT +dnl ------------------------------------------------- +dnl Verify if network connect function is already available +dnl using current libraries or if another one is required. + +AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [ + AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl + AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl + AC_MSG_CHECKING([for connect in libraries]) + tst_connect_save_LIBS="$LIBS" + tst_connect_need_LIBS="unknown" + for tst_lib in '' '-lsocket' ; do + if test "$tst_connect_need_LIBS" = "unknown"; then + LIBS="$tst_lib $tst_connect_save_LIBS" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + $curl_includes_winsock2 + $curl_includes_bsdsocket + #if !defined(HAVE_WINDOWS_H) && !defined(HAVE_PROTO_BSDSOCKET_H) + int connect(int, void*, int); + #endif + ]],[[ + if(0 != connect(0, 0, 0)) + return 1; + ]]) + ],[ + tst_connect_need_LIBS="$tst_lib" + ]) + fi + done + LIBS="$tst_connect_save_LIBS" + # + case X-"$tst_connect_need_LIBS" in + X-unknown) + AC_MSG_RESULT([cannot find connect]) + AC_MSG_ERROR([cannot find connect function in libraries.]) + ;; + X-) + AC_MSG_RESULT([yes]) + ;; + *) + AC_MSG_RESULT([$tst_connect_need_LIBS]) + LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS" + ;; + esac +]) + + +dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE]) +dnl ------------------------------------------------- +dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor +dnl symbol that can be further used in custom template configuration +dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third +dnl argument for the description. Symbol definitions done with this +dnl macro are intended to be exclusively used in handcrafted *.h.in +dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one +dnl prevents autoheader generation and insertion of symbol template +dnl stub and definition into the first configuration header file. Do +dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each +dnl one serves different functional needs. + +AC_DEFUN([CURL_DEFINE_UNQUOTED], [ +cat >>confdefs.h <<_EOF +[@%:@define] $1 ifelse($#, 2, [$2], 1) +_EOF +]) + +dnl CURL_CONFIGURE_PULL_SYS_POLL +dnl ------------------------------------------------- +dnl The need for the sys/poll.h inclusion arises mainly to properly +dnl interface AIX systems which define macros 'events' and 'revents'. + +AC_DEFUN([CURL_CONFIGURE_PULL_SYS_POLL], [ + AC_REQUIRE([CURL_INCLUDES_POLL])dnl + # + tst_poll_events_macro_defined="unknown" + # + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + $curl_includes_poll + ]],[[ +#if defined(events) || defined(revents) + return 0; +#else + force compilation error +#endif + ]]) + ],[ + tst_poll_events_macro_defined="yes" + ],[ + tst_poll_events_macro_defined="no" + ]) + # + if test "$tst_poll_events_macro_defined" = "yes"; then + if test "x$ac_cv_header_sys_poll_h" = "xyes"; then + CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_POLL_H]) + fi + fi + # +]) + + +dnl CURL_CHECK_FUNC_SELECT +dnl ------------------------------------------------- +dnl Test if the socket select() function is available, +dnl and check its return type and the types of its +dnl arguments. If the function succeeds HAVE_SELECT +dnl will be defined, defining the types of the +dnl arguments in SELECT_TYPE_ARG1, SELECT_TYPE_ARG234 +dnl and SELECT_TYPE_ARG5, defining the type of the +dnl function return value in SELECT_TYPE_RETV, and +dnl also defining the type qualifier of fifth argument +dnl in SELECT_QUAL_ARG5. + +AC_DEFUN([CURL_CHECK_FUNC_SELECT], [ + AC_REQUIRE([CURL_CHECK_STRUCT_TIMEVAL])dnl + AC_CHECK_HEADERS(sys/select.h sys/socket.h) + # + AC_MSG_CHECKING([for select]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif +#ifndef HAVE_WINDOWS_H +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#elif defined(HAVE_UNISTD_H) +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + ]],[[ + select(0, 0, 0, 0, 0); + ]]) + ],[ + AC_MSG_RESULT([yes]) + curl_cv_select="yes" + ],[ + AC_MSG_RESULT([no]) + curl_cv_select="no" + ]) + # + if test "$curl_cv_select" = "yes"; then + AC_CACHE_CHECK([types of args and return type for select], + [curl_cv_func_select_args], [ + curl_cv_func_select_args="unknown" + for sel_retv in 'int' 'ssize_t'; do + for sel_arg1 in 'int' 'ssize_t' 'size_t' 'unsigned long int' 'unsigned int'; do + for sel_arg234 in 'fd_set *' 'int *' 'void *'; do + for sel_arg5 in 'struct timeval *' 'const struct timeval *'; do + if test "$curl_cv_func_select_args" = "unknown"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#define SELECTCALLCONV PASCAL +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif +#ifndef HAVE_WINDOWS_H +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#elif defined(HAVE_UNISTD_H) +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#define SELECTCALLCONV +#endif +#ifndef HAVE_STRUCT_TIMEVAL + struct timeval { + long tv_sec; + long tv_usec; + }; +#endif +#ifndef HAVE_PROTO_BSDSOCKET_H + extern $sel_retv SELECTCALLCONV + select($sel_arg1, + $sel_arg234, + $sel_arg234, + $sel_arg234, + $sel_arg5); +#endif + ]],[[ + $sel_arg1 nfds=0; + $sel_arg234 rfds=0; + $sel_arg234 wfds=0; + $sel_arg234 efds=0; + $sel_retv res = select(nfds, rfds, wfds, efds, 0); + ]]) + ],[ + curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv" + ]) + fi + done + done + done + done + ]) # AC-CACHE-CHECK + if test "$curl_cv_func_select_args" = "unknown"; then + AC_MSG_WARN([Cannot find proper types to use for select args]) + AC_MSG_WARN([HAVE_SELECT will not be defined]) + else + select_prev_IFS=$IFS; IFS=',' + set dummy `echo "$curl_cv_func_select_args" | sed 's/\*/\*/g'` + IFS=$select_prev_IFS + shift + # + sel_qual_type_arg5=$[3] + # + AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1], + [Define to the type of arg 1 for select.]) + AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234, $[2], + [Define to the type of args 2, 3 and 4 for select.]) + AC_DEFINE_UNQUOTED(SELECT_TYPE_RETV, $[4], + [Define to the function return type for select.]) + # + prev_sh_opts=$- + # + case $prev_sh_opts in + *f*) + ;; + *) + set -f + ;; + esac + # + case "$sel_qual_type_arg5" in + const*) + sel_qual_arg5=const + sel_type_arg5=`echo $sel_qual_type_arg5 | sed 's/^const //'` + ;; + *) + sel_qual_arg5= + sel_type_arg5=$sel_qual_type_arg5 + ;; + esac + # + AC_DEFINE_UNQUOTED(SELECT_QUAL_ARG5, $sel_qual_arg5, + [Define to the type qualifier of arg 5 for select.]) + AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, $sel_type_arg5, + [Define to the type of arg 5 for select.]) + # + case $prev_sh_opts in + *f*) + ;; + *) + set +f + ;; + esac + # + AC_DEFINE_UNQUOTED(HAVE_SELECT, 1, + [Define to 1 if you have the select function.]) + curl_cv_func_select="yes" + fi + fi +]) + + +dnl CURL_VERIFY_RUNTIMELIBS +dnl ------------------------------------------------- +dnl Verify that the shared libs found so far can be used when running +dnl programs, since otherwise the situation will create odd configure errors +dnl that are misleading people. +dnl +dnl Make sure this test is run BEFORE the first test in the script that +dnl runs anything, which at the time of this writing is the AC_CHECK_SIZEOF +dnl macro. It must also run AFTER all lib-checking macros are complete. + +AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [ + + dnl this test is of course not sensible if we are cross-compiling! + if test "x$cross_compiling" != xyes; then + + dnl just run a program to verify that the libs checked for previous to this + dnl point also is available run-time! + AC_MSG_CHECKING([run-time libs availability]) + CURL_RUN_IFELSE([ +int main() +{ + return 0; +} +], + AC_MSG_RESULT([fine]), + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS]) + ) + + dnl if this test fails, configure has already stopped + fi +]) + + +dnl CURL_CHECK_VARIADIC_MACROS +dnl ------------------------------------------------- +dnl Check compiler support of variadic macros + +AC_DEFUN([CURL_CHECK_VARIADIC_MACROS], [ + AC_CACHE_CHECK([for compiler support of C99 variadic macro style], + [curl_cv_variadic_macros_c99], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__) +#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__) + int fun3(int arg1, int arg2, int arg3); + int fun2(int arg1, int arg2); + int fun3(int arg1, int arg2, int arg3) + { return arg1 + arg2 + arg3; } + int fun2(int arg1, int arg2) + { return arg1 + arg2; } + ]],[[ + int res3 = c99_vmacro3(1, 2, 3); + int res2 = c99_vmacro2(1, 2); + ]]) + ],[ + curl_cv_variadic_macros_c99="yes" + ],[ + curl_cv_variadic_macros_c99="no" + ]) + ]) + case "$curl_cv_variadic_macros_c99" in + yes) + AC_DEFINE_UNQUOTED(HAVE_VARIADIC_MACROS_C99, 1, + [Define to 1 if compiler supports C99 variadic macro style.]) + ;; + esac + AC_CACHE_CHECK([for compiler support of old gcc variadic macro style], + [curl_cv_variadic_macros_gcc], [ + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define gcc_vmacro3(first, args...) fun3(first, args) +#define gcc_vmacro2(first, args...) fun2(first, args) + int fun3(int arg1, int arg2, int arg3); + int fun2(int arg1, int arg2); + int fun3(int arg1, int arg2, int arg3) + { return arg1 + arg2 + arg3; } + int fun2(int arg1, int arg2) + { return arg1 + arg2; } + ]],[[ + int res3 = gcc_vmacro3(1, 2, 3); + int res2 = gcc_vmacro2(1, 2); + ]]) + ],[ + curl_cv_variadic_macros_gcc="yes" + ],[ + curl_cv_variadic_macros_gcc="no" + ]) + ]) + case "$curl_cv_variadic_macros_gcc" in + yes) + AC_DEFINE_UNQUOTED(HAVE_VARIADIC_MACROS_GCC, 1, + [Define to 1 if compiler supports old gcc variadic macro style.]) + ;; + esac +]) + + +dnl CURL_CHECK_CA_BUNDLE +dnl ------------------------------------------------- +dnl Check if a default ca-bundle should be used +dnl +dnl regarding the paths this will scan: +dnl /etc/ssl/certs/ca-certificates.crt Debian systems +dnl /etc/pki/tls/certs/ca-bundle.crt Redhat and Mandriva +dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat +dnl /usr/local/share/certs/ca-root-nss.crt FreeBSD +dnl /etc/ssl/cert.pem OpenBSD, FreeBSD (symlink) +dnl /etc/ssl/certs/ (ca path) SUSE + +AC_DEFUN([CURL_CHECK_CA_BUNDLE], [ + + AC_MSG_CHECKING([default CA cert bundle/path]) + + AC_ARG_WITH(ca-bundle, +AC_HELP_STRING([--with-ca-bundle=FILE], +[Path to a file containing CA certificates (example: /etc/ca-bundle.crt)]) +AC_HELP_STRING([--without-ca-bundle], [Don't use a default CA bundle]), + [ + want_ca="$withval" + if test "x$want_ca" = "xyes"; then + AC_MSG_ERROR([--with-ca-bundle=FILE requires a path to the CA bundle]) + fi + ], + [ want_ca="unset" ]) + AC_ARG_WITH(ca-path, +AC_HELP_STRING([--with-ca-path=DIRECTORY], +[Path to a directory containing CA certificates stored individually, with \ +their filenames in a hash format. This option can be used with the OpenSSL, \ +GnuTLS and mbedTLS backends. Refer to OpenSSL c_rehash for details. \ +(example: /etc/certificates)]) +AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]), + [ + want_capath="$withval" + if test "x$want_capath" = "xyes"; then + AC_MSG_ERROR([--with-ca-path=DIRECTORY requires a path to the CA path directory]) + fi + ], + [ want_capath="unset"]) + + ca_warning=" (warning: certs not found)" + capath_warning=" (warning: certs not found)" + check_capath="" + + if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \ + "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then + dnl both given + ca="$want_ca" + capath="$want_capath" + elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then + dnl --with-ca-bundle given + ca="$want_ca" + capath="no" + elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then + dnl --with-ca-path given + if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$MBEDTLS_ENABLED" != "x1"; then + AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or mbedTLS]) + fi + capath="$want_capath" + ca="no" + else + dnl first try autodetecting a CA bundle , then a CA path + dnl both autodetections can be skipped by --without-ca-* + ca="no" + capath="no" + if test "x$cross_compiling" != "xyes"; then + dnl NOT cross-compiling and... + dnl neither of the --with-ca-* options are provided + if test "x$want_ca" = "xunset"; then + dnl the path we previously would have installed the curl ca bundle + dnl to, and thus we now check for an already existing cert in that + dnl place in case we find no other + if test "x$prefix" != xNONE; then + cac="${prefix}/share/curl/curl-ca-bundle.crt" + else + cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt" + fi + + for a in /etc/ssl/certs/ca-certificates.crt \ + /etc/pki/tls/certs/ca-bundle.crt \ + /usr/share/ssl/certs/ca-bundle.crt \ + /usr/local/share/certs/ca-root-nss.crt \ + /etc/ssl/cert.pem \ + "$cac"; do + if test -f "$a"; then + ca="$a" + break + fi + done + fi + if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \ + "x$OPENSSL_ENABLED" = "x1"; then + check_capath="/etc/ssl/certs/" + fi + else + dnl no option given and cross-compiling + AC_MSG_WARN([skipped the ca-cert path detection when cross-compiling]) + fi + fi + + if test "x$ca" = "xno" || test -f "$ca"; then + ca_warning="" + fi + + if test "x$capath" != "xno"; then + check_capath="$capath" + fi + + if test ! -z "$check_capath"; then + for a in "$check_capath"; do + if test -d "$a" && ls "$a"/[[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]].0 >/dev/null 2>/dev/null; then + if test "x$capath" = "xno"; then + capath="$a" + fi + capath_warning="" + break + fi + done + fi + + if test "x$capath" = "xno"; then + capath_warning="" + fi + + if test "x$ca" != "xno"; then + CURL_CA_BUNDLE='"'$ca'"' + AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle]) + AC_SUBST(CURL_CA_BUNDLE) + AC_MSG_RESULT([$ca]) + fi + if test "x$capath" != "xno"; then + CURL_CA_PATH="\"$capath\"" + AC_DEFINE_UNQUOTED(CURL_CA_PATH, "$capath", [Location of default ca path]) + AC_MSG_RESULT([$capath (capath)]) + fi + if test "x$ca" = "xno" && test "x$capath" = "xno"; then + AC_MSG_RESULT([no]) + fi + + AC_MSG_CHECKING([whether to use builtin CA store of SSL library]) + AC_ARG_WITH(ca-fallback, +AC_HELP_STRING([--with-ca-fallback], [Use the built in CA store of the SSL library]) +AC_HELP_STRING([--without-ca-fallback], [Don't use the built in CA store of the SSL library]), + [ + if test "x$with_ca_fallback" != "xyes" -a "x$with_ca_fallback" != "xno"; then + AC_MSG_ERROR([--with-ca-fallback only allows yes or no as parameter]) + fi + ], + [ with_ca_fallback="no"]) + AC_MSG_RESULT([$with_ca_fallback]) + if test "x$with_ca_fallback" = "xyes"; then + if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1"; then + AC_MSG_ERROR([--with-ca-fallback only works with OpenSSL or GnuTLS]) + fi + AC_DEFINE_UNQUOTED(CURL_CA_FALLBACK, 1, [define "1" to use built in CA store of SSL library ]) + fi +]) + +dnl CURL_CHECK_WIN32_LARGEFILE +dnl ------------------------------------------------- +dnl Check if curl's WIN32 large file will be used + +AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [ + AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl + AC_MSG_CHECKING([whether build target supports WIN32 file API]) + curl_win32_file_api="no" + if test "$curl_cv_header_windows_h" = "yes"; then + if test x"$enable_largefile" != "xno"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ +#if !defined(_WIN32_WCE) && \ + (defined(__MINGW32__) || \ + (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)))) + int dummy=1; +#else + WIN32 large file API not supported. +#endif + ]]) + ],[ + curl_win32_file_api="win32_large_files" + ]) + fi + if test "$curl_win32_file_api" = "no"; then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ +#if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER) + int dummy=1; +#else + WIN32 small file API not supported. +#endif + ]]) + ],[ + curl_win32_file_api="win32_small_files" + ]) + fi + fi + case "$curl_win32_file_api" in + win32_large_files) + AC_MSG_RESULT([yes (large file enabled)]) + AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1, + [Define to 1 if you are building a Windows target with large file support.]) + ;; + win32_small_files) + AC_MSG_RESULT([yes (large file disabled)]) + AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1, + [Define to 1 if you are building a Windows target without large file support.]) + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +]) + +dnl CURL_EXPORT_PCDIR ($pcdir) +dnl ------------------------ +dnl if $pcdir is not empty, set PKG_CONFIG_LIBDIR to $pcdir and export +dnl +dnl we need this macro since pkg-config distinguishes among empty and unset +dnl variable while checking PKG_CONFIG_LIBDIR +dnl + +AC_DEFUN([CURL_EXPORT_PCDIR], [ + if test -n "$1"; then + PKG_CONFIG_LIBDIR="$1" + export PKG_CONFIG_LIBDIR + fi +]) + +dnl CURL_CHECK_PKGCONFIG ($module, [$pcdir]) +dnl ------------------------ +dnl search for the pkg-config tool. Set the PKGCONFIG variable to hold the +dnl path to it, or 'no' if not found/present. +dnl +dnl If pkg-config is present, check that it has info about the $module or +dnl return "no" anyway! +dnl +dnl Optionally PKG_CONFIG_LIBDIR may be given as $pcdir. +dnl + +AC_DEFUN([CURL_CHECK_PKGCONFIG], [ + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no], + [$PATH:/usr/bin:/usr/local/bin]) + fi + + if test "x$PKGCONFIG" != "xno"; then + AC_MSG_CHECKING([for $1 options with pkg-config]) + dnl ask pkg-config about $1 + itexists=`CURL_EXPORT_PCDIR([$2]) dnl + $PKGCONFIG --exists $1 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + dnl pkg-config does not have info about the given module! set the + dnl variable to 'no' + PKGCONFIG="no" + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([found]) + fi + fi +]) + + +dnl CURL_GENERATE_CONFIGUREHELP_PM +dnl ------------------------------------------------- +dnl Generate test harness configurehelp.pm module, defining and +dnl initializing some perl variables with values which are known +dnl when the configure script runs. For portability reasons, test +dnl harness needs information on how to run the C preprocessor. + +AC_DEFUN([CURL_GENERATE_CONFIGUREHELP_PM], [ + AC_REQUIRE([AC_PROG_CPP])dnl + tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null` + if test -z "$tmp_cpp"; then + tmp_cpp='cpp' + fi + cat >./tests/configurehelp.pm <<_EOF +[@%:@] This is a generated file. Do not edit. + +package configurehelp; + +use strict; +use warnings; +use Exporter; + +use vars qw( + @ISA + @EXPORT_OK + \$Cpreprocessor + ); + +@ISA = qw(Exporter); + +@EXPORT_OK = qw( + \$Cpreprocessor + ); + +\$Cpreprocessor = '$tmp_cpp'; + +1; +_EOF +]) + +dnl CURL_CPP_P +dnl +dnl Check if $cpp -P should be used for extract define values due to gcc 5 +dnl splitting up strings and defines between line outputs. gcc by default +dnl (without -P) will show TEST EINVAL TEST as +dnl +dnl # 13 "conftest.c" +dnl TEST +dnl # 13 "conftest.c" 3 4 +dnl 22 +dnl # 13 "conftest.c" +dnl TEST + +AC_DEFUN([CURL_CPP_P], [ + AC_MSG_CHECKING([if cpp -P is needed]) + AC_EGREP_CPP([TEST.*TEST], [ + #include +TEST EINVAL TEST + ], [cpp=no], [cpp=yes]) + AC_MSG_RESULT([$cpp]) + + dnl we need cpp -P so check if it works then + if test "x$cpp" = "xyes"; then + AC_MSG_CHECKING([if cpp -P works]) + OLDCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -P" + AC_EGREP_CPP([TEST.*TEST], [ + #include +TEST EINVAL TEST + ], [cpp_p=yes], [cpp_p=no]) + AC_MSG_RESULT([$cpp_p]) + + if test "x$cpp_p" = "xno"; then + AC_MSG_WARN([failed to figure out cpp -P alternative]) + # without -P + CPPPFLAG="" + else + # with -P + CPPPFLAG="-P" + fi + dnl restore CPPFLAGS + CPPFLAGS=$OLDCPPFLAGS + else + # without -P + CPPPFLAG="" + fi +]) + + +dnl CURL_MAC_CFLAGS +dnl +dnl Check if -mmacosx-version-min, -miphoneos-version-min or any +dnl similar are set manually, otherwise do. And set +dnl -Werror=partial-availability. +dnl + +AC_DEFUN([CURL_MAC_CFLAGS], [ + + tst_cflags="no" + case $host_os in + darwin*) + tst_cflags="yes" + ;; + esac + + AC_MSG_CHECKING([for good-to-use Mac CFLAGS]) + AC_MSG_RESULT([$tst_cflags]); + + if test "$tst_cflags" = "yes"; then + AC_MSG_CHECKING([for *version-min in CFLAGS]) + min="" + if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then + min="-mmacosx-version-min=10.8" + CFLAGS="$CFLAGS $min" + fi + if test -z "$min"; then + AC_MSG_RESULT([set by user]) + else + AC_MSG_RESULT([$min set]) + fi + + old_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror=partial-availability" + AC_MSG_CHECKING([whether $CC accepts -Werror=partial-availability]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + CFLAGS=$old_CFLAGS]) + fi + +]) + + +dnl CURL_SUPPORTS_BUILTIN_AVAILABLE +dnl +dnl Check to see if the compiler supports __builtin_available. This built-in +dnl compiler function first appeared in Apple LLVM 9.0.0. It's so new that, at +dnl the time this macro was written, the function was not yet documented. Its +dnl purpose is to return true if the code is running under a certain OS version +dnl or later. + +AC_DEFUN([CURL_SUPPORTS_BUILTIN_AVAILABLE], [ + AC_MSG_CHECKING([to see if the compiler supports __builtin_available()]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + if (__builtin_available(macOS 10.8, iOS 5.0, *)) {} + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_BUILTIN_AVAILABLE, 1, + [Define to 1 if you have the __builtin_available function.]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/aclocal.m4 b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/aclocal.m4 new file mode 100644 index 00000000..c287d315 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/aclocal.m4 @@ -0,0 +1,1194 @@ +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.16' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.16.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.16.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) + shift + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf + do + # Strip MF so we end up with the name of the file. + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? + done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. +AC_DEFUN([AM_MAKE_INCLUDE], +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' +am__doit: + @echo this is the am__doit target >confinc.out +.PHONY: am__doit +END +am__include="#" +am__quote= +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/ax_compile_check_sizeof.m4]) +m4_include([m4/curl-compilers.m4]) +m4_include([m4/curl-confopts.m4]) +m4_include([m4/curl-functions.m4]) +m4_include([m4/curl-openssl.m4]) +m4_include([m4/curl-override.m4]) +m4_include([m4/curl-reentrant.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/xc-am-iface.m4]) +m4_include([m4/xc-cc-check.m4]) +m4_include([m4/xc-lt-iface.m4]) +m4_include([m4/xc-translit.m4]) +m4_include([m4/xc-val-flgs.m4]) +m4_include([m4/zz40-xc-ovr.m4]) +m4_include([m4/zz50-xc-ovr.m4]) +m4_include([m4/zz60-xc-ovr.m4]) +m4_include([acinclude.m4]) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf new file mode 100755 index 00000000..4e4c17e9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "*** Do not use buildconf. Instead, just use: autoreconf -fi" >&2 +exec ${AUTORECONF:-autoreconf} -fi "${@}" diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf.bat b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf.bat new file mode 100644 index 00000000..04352331 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/buildconf.bat @@ -0,0 +1,317 @@ +@echo off +rem *************************************************************************** +rem * _ _ ____ _ +rem * Project ___| | | | _ \| | +rem * / __| | | | |_) | | +rem * | (__| |_| | _ <| |___ +rem * \___|\___/|_| \_\_____| +rem * +rem * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. +rem * +rem * This software is licensed as described in the file COPYING, which +rem * you should have received as part of this distribution. The terms +rem * are also available at https://curl.haxx.se/docs/copyright.html. +rem * +rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell +rem * copies of the Software, and permit persons to whom the Software is +rem * furnished to do so, under the terms of the COPYING file. +rem * +rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +rem * KIND, either express or implied. +rem * +rem *************************************************************************** + +rem NOTES +rem +rem This batch file must be used to set up a git tree to build on systems where +rem there is no autotools support (i.e. DOS and Windows). +rem + +:begin + rem Set our variables + if "%OS%" == "Windows_NT" setlocal + set MODE=GENERATE + + rem Switch to this batch file's directory + cd /d "%~0\.." 1>NUL 2>&1 + + rem Check we are running from a curl git repository + if not exist GIT-INFO goto norepo + + rem Detect programs. HAVE_ + rem When not found the variable is set undefined. The undefined pattern + rem allows for statements like "if not defined HAVE_PERL (command)" + groff --version NUL 2>&1 + if errorlevel 1 (set HAVE_GROFF=) else (set HAVE_GROFF=Y) + nroff --version NUL 2>&1 + if errorlevel 1 (set HAVE_NROFF=) else (set HAVE_NROFF=Y) + perl --version NUL 2>&1 + if errorlevel 1 (set HAVE_PERL=) else (set HAVE_PERL=Y) + gzip --version NUL 2>&1 + if errorlevel 1 (set HAVE_GZIP=) else (set HAVE_GZIP=Y) + +:parseArgs + if "%~1" == "" goto start + + if /i "%~1" == "-clean" ( + set MODE=CLEAN + ) else if /i "%~1" == "-?" ( + goto syntax + ) else if /i "%~1" == "-h" ( + goto syntax + ) else if /i "%~1" == "-help" ( + goto syntax + ) else ( + goto unknown + ) + + shift & goto parseArgs + +:start + if "%MODE%" == "GENERATE" ( + echo. + echo Generating prerequisite files + + call :generate + if errorlevel 3 goto nogenhugehelp + if errorlevel 2 goto nogenmakefile + if errorlevel 1 goto warning + + ) else ( + echo. + echo Removing prerequisite files + + call :clean + if errorlevel 2 goto nocleanhugehelp + if errorlevel 1 goto nocleanmakefile + ) + + goto success + +rem Main generate function. +rem +rem Returns: +rem +rem 0 - success +rem 1 - success with simplified tool_hugehelp.c +rem 2 - failed to generate Makefile +rem 3 - failed to generate tool_hugehelp.c +rem +:generate + if "%OS%" == "Windows_NT" setlocal + set BASIC_HUGEHELP=0 + + rem Create Makefile + echo * %CD%\Makefile + if exist Makefile.dist ( + copy /Y Makefile.dist Makefile 1>NUL 2>&1 + if errorlevel 1 ( + if "%OS%" == "Windows_NT" endlocal + exit /B 2 + ) + ) + + rem Create tool_hugehelp.c + echo * %CD%\src\tool_hugehelp.c + call :genHugeHelp + if errorlevel 2 ( + if "%OS%" == "Windows_NT" endlocal + exit /B 3 + ) + if errorlevel 1 ( + set BASIC_HUGEHELP=1 + ) + cmd /c exit 0 + + rem Setup c-ares git tree + if exist ares\buildconf.bat ( + echo. + echo Configuring c-ares build environment + cd ares + call buildconf.bat + cd .. + ) + + if "%BASIC_HUGEHELP%" == "1" ( + if "%OS%" == "Windows_NT" endlocal + exit /B 1 + ) + + if "%OS%" == "Windows_NT" endlocal + exit /B 0 + +rem Main clean function. +rem +rem Returns: +rem +rem 0 - success +rem 1 - failed to clean Makefile +rem 2 - failed to clean tool_hugehelp.c +rem +:clean + rem Remove Makefile + echo * %CD%\Makefile + if exist Makefile ( + del Makefile 2>NUL + if exist Makefile ( + exit /B 1 + ) + ) + + rem Remove tool_hugehelp.c + echo * %CD%\src\tool_hugehelp.c + if exist src\tool_hugehelp.c ( + del src\tool_hugehelp.c 2>NUL + if exist src\tool_hugehelp.c ( + exit /B 2 + ) + ) + + exit /B + +rem Function to generate src\tool_hugehelp.c +rem +rem Returns: +rem +rem 0 - full tool_hugehelp.c generated +rem 1 - simplified tool_hugehelp.c +rem 2 - failure +rem +:genHugeHelp + if "%OS%" == "Windows_NT" setlocal + set LC_ALL=C + set ROFFCMD= + set BASIC=1 + + if defined HAVE_PERL ( + if defined HAVE_GROFF ( + set ROFFCMD=groff -mtty-char -Tascii -P-c -man + ) else if defined HAVE_NROFF ( + set ROFFCMD=nroff -c -Tascii -man + ) + ) + + if defined ROFFCMD ( + echo #include "tool_setup.h"> src\tool_hugehelp.c + echo #include "tool_hugehelp.h">> src\tool_hugehelp.c + + if defined HAVE_GZIP ( + echo #ifndef HAVE_LIBZ>> src\tool_hugehelp.c + ) + + %ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl docs\MANUAL >> src\tool_hugehelp.c + if defined HAVE_GZIP ( + echo #else>> src\tool_hugehelp.c + %ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl -c docs\MANUAL >> src\tool_hugehelp.c + echo #endif /^* HAVE_LIBZ ^*/>> src\tool_hugehelp.c + ) + + set BASIC=0 + ) else ( + if exist src\tool_hugehelp.c.cvs ( + copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c 1>NUL 2>&1 + ) else ( + echo #include "tool_setup.h"> src\tool_hugehelp.c + echo #include "tool_hugehelp.h">> src\tool_hugehelp.c + echo.>> src\tool_hugehelp.c + echo void hugehelp(void^)>> src\tool_hugehelp.c + echo {>> src\tool_hugehelp.c + echo #ifdef USE_MANUAL>> src\tool_hugehelp.c + echo fputs("Built-in manual not included\n", stdout^);>> src\tool_hugehelp.c + echo #endif>> src\tool_hugehelp.c + echo }>> src\tool_hugehelp.c + ) + ) + + findstr "/C:void hugehelp(void)" src\tool_hugehelp.c 1>NUL 2>&1 + if errorlevel 1 ( + if "%OS%" == "Windows_NT" endlocal + exit /B 2 + ) + + if "%BASIC%" == "1" ( + if "%OS%" == "Windows_NT" endlocal + exit /B 1 + ) + + if "%OS%" == "Windows_NT" endlocal + exit /B 0 + +rem Function to clean-up local variables under DOS, Windows 3.x and +rem Windows 9x as setlocal isn't available until Windows NT +rem +:dosCleanup + set MODE= + set HAVE_GROFF= + set HAVE_NROFF= + set HAVE_PERL= + set HAVE_GZIP= + set BASIC_HUGEHELP= + set LC_ALL + set ROFFCMD= + set BASIC= + + exit /B + +:syntax + rem Display the help + echo. + echo Usage: buildconf [-clean] + echo. + echo -clean - Removes the files + goto error + +:unknown + echo. + echo Error: Unknown argument '%1' + goto error + +:norepo + echo. + echo Error: This batch file should only be used with a curl git repository + goto error + +:nogenmakefile + echo. + echo Error: Unable to generate Makefile + goto error + +:nogenhugehelp + echo. + echo Error: Unable to generate src\tool_hugehelp.c + goto error + +:nocleanmakefile + echo. + echo Error: Unable to clean Makefile + goto error + +:nocleanhugehelp + echo. + echo Error: Unable to clean src\tool_hugehelp.c + goto error + +:warning + echo. + echo Warning: The curl manual could not be integrated in the source. This means when + echo you build curl the manual will not be available (curl --man^). Integration of + echo the manual is not required and a summary of the options will still be available + echo (curl --help^). To integrate the manual your PATH is required to have + echo groff/nroff, perl and optionally gzip for compression. + goto success + +:error + if "%OS%" == "Windows_NT" ( + endlocal + ) else ( + call :dosCleanup + ) + exit /B 1 + +:success + if "%OS%" == "Windows_NT" ( + endlocal + ) else ( + call :dosCleanup + ) + exit /B 0 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/compile b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/compile new file mode 100755 index 00000000..23fcba01 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/compile @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.guess b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.guess new file mode 100755 index 00000000..f50dcdb6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.guess @@ -0,0 +1,1480 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-24' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval "$set_cc_for_build" + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval "$set_cc_for_build" + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + eval "$set_cc_for_build" + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + eval "$set_cc_for_build" + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.sub b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.sub new file mode 100755 index 00000000..1d8e98bc --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/config.sub @@ -0,0 +1,1801 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-02-22' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4*) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + ;; +esac + +echo "$basic_machine$os" +exit + +# Local variables: +# eval: (add-hook 'write-file-functions 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure new file mode 100755 index 00000000..2b0a6145 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure @@ -0,0 +1,47845 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for curl -. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +# +# Copyright (c) 1998 - 2020 Daniel Stenberg, +# This configure script may be copied, distributed and modified under the +# terms of the curl license; see COPYING for more details + +## -------------------------------- ## +## XC_CONFIGURE_PREAMBLE ver: 1.0 ## +## -------------------------------- ## + +xc_configure_preamble_ver_major='1' +xc_configure_preamble_ver_minor='0' + +# +# Set IFS to space, tab and newline. +# + +xc_space=' ' +xc_tab=' ' +xc_newline=' +' +IFS="$xc_space$xc_tab$xc_newline" + +# +# Set internationalization behavior variables. +# + +LANG='C' +LC_ALL='C' +LANGUAGE='C' +export LANG +export LC_ALL +export LANGUAGE + +# +# Some useful variables. +# + +xc_msg_warn='configure: WARNING:' +xc_msg_abrt='Can not continue.' +xc_msg_err='configure: error:' + +# +# Verify that 'echo' command is available, otherwise abort. +# + +xc_tst_str='unknown' +(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + # Try built-in echo, and fail. + echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'test' command is available, otherwise abort. +# + +xc_tst_str='unknown' +(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'PATH' variable is set, otherwise abort. +# + +xc_tst_str='unknown' +(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'expr' command is available, otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null` +case "x$xc_tst_str" in # (( + x7) + : + ;; + *) + echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'sed' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | sed -e 's:unknown:success:' 2>/dev/null` +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'grep' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +(`echo "$xc_tst_str" 2>/dev/null \ + | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success' +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'tr' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10" +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | tr -d "0123456789$xc_tab" 2>/dev/null` +case "x$xc_tst_str" in # (( + xsuccess) + : + ;; + *) + echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'wc' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown unknown unknown unknown' +xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ + | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null` +case "x$xc_tst_str" in # (( + x4) + : + ;; + *) + echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Verify that 'cat' utility is found within 'PATH', otherwise abort. +# + +xc_tst_str='unknown' +xc_tst_str=`cat <<_EOT 2>/dev/null \ + | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null +unknown +unknown +unknown +_EOT` +case "x$xc_tst_str" in # (( + x3) + : + ;; + *) + echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2 + exit 1 + ;; +esac + +# +# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set. +# + +# Directory count in 'PATH' when using a colon separator. +xc_tst_dirs_col='x' +xc_tst_prev_IFS=$IFS; IFS=':' +for xc_tst_dir in $PATH; do + IFS=$xc_tst_prev_IFS + xc_tst_dirs_col="x$xc_tst_dirs_col" +done +IFS=$xc_tst_prev_IFS +xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'` + +# Directory count in 'PATH' when using a semicolon separator. +xc_tst_dirs_sem='x' +xc_tst_prev_IFS=$IFS; IFS=';' +for xc_tst_dir in $PATH; do + IFS=$xc_tst_prev_IFS + xc_tst_dirs_sem="x$xc_tst_dirs_sem" +done +IFS=$xc_tst_prev_IFS +xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'` + +if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then + # When both counting methods give the same result we do not want to + # chose one over the other, and consider auto-detection not possible. + if test -z "$PATH_SEPARATOR"; then + # User should provide the correct 'PATH_SEPARATOR' definition. + # Until then, guess that it is colon! + echo "$xc_msg_warn path separator not determined, guessing colon" >&2 + PATH_SEPARATOR=':' + fi +else + # Separator with the greater directory count is the auto-detected one. + if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then + xc_tst_auto_separator=';' + else + xc_tst_auto_separator=':' + fi + if test -z "$PATH_SEPARATOR"; then + # Simply use the auto-detected one when not already set. + PATH_SEPARATOR=$xc_tst_auto_separator + elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then + echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2 + fi +fi +xc_PATH_SEPARATOR=$PATH_SEPARATOR + +xc_configure_preamble_result='yes' + + +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and a suitable curl +$0: mailing list: https://curl.haxx.se/mail/ about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='curl' +PACKAGE_TARNAME='curl' +PACKAGE_VERSION='-' +PACKAGE_STRING='curl -' +PACKAGE_BUGREPORT='a suitable curl mailing list: https://curl.haxx.se/mail/' +PACKAGE_URL='' + +ac_unique_file="lib/urldata.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +enable_option_checking=no +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +SSL_BACKENDS +SUPPORT_PROTOCOLS +SUPPORT_FEATURES +LIBCURL_NO_SHARED +ENABLE_STATIC +ENABLE_SHARED +CROSSCOMPILING_FALSE +CROSSCOMPILING_TRUE +BLANK_AT_MAKETIME +CURL_NETWORK_AND_TIME_LIBS +CURL_NETWORK_LIBS +LIBCURL_LIBS +CFLAG_CURL_SYMBOL_HIDING +DOING_CURL_SYMBOL_HIDING_FALSE +DOING_CURL_SYMBOL_HIDING_TRUE +USE_UNIX_SOCKETS +BUILD_LIBHOSTNAME_FALSE +BUILD_LIBHOSTNAME_TRUE +USE_EMBEDDED_ARES_FALSE +USE_EMBEDDED_ARES_TRUE +USE_ARES +subdirs +USE_MANUAL_FALSE +USE_MANUAL_TRUE +MANOPT +NROFF +PERL +FISH_FUNCTIONS_DIR +ZSH_FUNCTIONS_DIR +USE_QUICHE +USE_NGHTTP3 +USE_NGTCP2_CRYPTO_GNUTLS +USE_NGTCP2_CRYPTO_OPENSSL +USE_NGTCP2 +USE_NGHTTP2 +IDN_ENABLED +CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE +CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE +CURL_LT_SHLIB_VERSIONED_FLAVOUR +USE_LIBRTMP +USE_WOLFSSH +USE_LIBSSH +USE_LIBSSH2 +LIBMETALINK_CPPFLAGS +LIBMETALINK_LDFLAGS +LIBMETALINK_LIBS +USE_LIBPSL_FALSE +USE_LIBPSL_TRUE +CURL_CA_BUNDLE +CURL_WITH_MULTI_SSL +SSL_ENABLED +NSS_LIBS +USE_NSS +USE_BEARSSL +USE_MESALINK +USE_WOLFSSL +USE_MBEDTLS +HAVE_GNUTLS_SRP +USE_GNUTLS_NETTLE +USE_GNUTLS +HAVE_OPENSSL_SRP +RANDOM_FILE +SSL_LIBS +USE_SECTRANSP +USE_WINDOWS_SSPI +USE_SCHANNEL +DEFAULT_SSL_BACKEND +BUILD_STUB_GSS_FALSE +BUILD_STUB_GSS_TRUE +IPV6_ENABLED +USE_OPENLDAP +HAVE_ZSTD +HAVE_BROTLI +ZLIB_LIBS +HAVE_LIBZ_FALSE +HAVE_LIBZ_TRUE +HAVE_LIBZ +PKGCONFIG +HAVE_PROTO_BSDSOCKET_H +CURL_DISABLE_MQTT +CURL_DISABLE_GOPHER +CURL_DISABLE_SMTP +CURL_DISABLE_SMB +CURL_DISABLE_IMAP +CURL_DISABLE_POP3 +CURL_DISABLE_TFTP +CURL_DISABLE_TELNET +CURL_DISABLE_DICT +CURL_DISABLE_PROXY +HAVE_LDAP_SSL +CURL_DISABLE_LDAPS +CURL_DISABLE_LDAP +CURL_DISABLE_FILE +CURL_DISABLE_FTP +CURL_DISABLE_RTSP +CURL_DISABLE_HTTP +DOING_NATIVE_WINDOWS_FALSE +DOING_NATIVE_WINDOWS_TRUE +BUILD_UNITTESTS_FALSE +BUILD_UNITTESTS_TRUE +CURLDEBUG_FALSE +CURLDEBUG_TRUE +CURL_CFLAG_EXTRAS +USE_EXPLICIT_LIB_DEPS_FALSE +USE_EXPLICIT_LIB_DEPS_TRUE +REQUIRE_LIB_DEPS +CPPFLAG_CURL_STATICLIB +USE_CPPFLAG_CURL_STATICLIB_FALSE +USE_CPPFLAG_CURL_STATICLIB_TRUE +CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE +CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE +CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE +CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE +CURL_LT_SHLIB_USE_VERSION_INFO_FALSE +CURL_LT_SHLIB_USE_VERSION_INFO_TRUE +LT_SYS_LIBRARY_PATH +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +LIBTOOL +OBJDUMP +DLLTOOL +AS +AR_FLAGS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +PKGADD_VENDOR +PKGADD_NAME +PKGADD_PKG +VERSIONNUM +CURLVERSION +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__include +DEPDIR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +LCOV +GCOV +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +libext +AR +EGREP +GREP +SED +CONFIGURE_OPTIONS +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +SHELL +PATH_SEPARATOR +am__quote' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_silent_rules +enable_debug +enable_optimize +enable_warnings +enable_werror +enable_curldebug +enable_symbol_hiding +enable_hidden_symbols +enable_ares +enable_rt +enable_ech +enable_code_coverage +enable_dependency_tracking +enable_largefile +enable_shared +enable_static +with_pic +enable_fast_install +with_aix_soname +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_http +enable_ftp +enable_file +enable_ldap +enable_ldaps +enable_rtsp +enable_proxy +enable_dict +enable_telnet +enable_tftp +enable_pop3 +enable_imap +enable_smb +enable_smtp +enable_gopher +enable_mqtt +enable_manual +enable_libcurl_option +enable_libgcc +with_zlib +with_brotli +with_zstd +with_ldap_lib +with_lber_lib +enable_ipv6 +with_gssapi_includes +with_gssapi_libs +with_gssapi +with_default_ssl_backend +with_winssl +with_schannel +with_darwinssl +with_secure_transport +with_amissl +with_ssl +with_egd_socket +with_random +enable_openssl_auto_load_config +with_gnutls +with_mbedtls +with_wolfssl +with_mesalink +with_bearssl +with_nss +with_ca_bundle +with_ca_path +with_ca_fallback +with_libpsl +with_libmetalink +with_libssh2 +with_libssh +with_wolfssh +with_librtmp +enable_versioned_symbols +with_winidn +with_libidn2 +with_nghttp2 +with_ngtcp2 +with_nghttp3 +with_quiche +with_zsh_functions_dir +with_fish_functions_dir +enable_threaded_resolver +enable_pthreads +enable_verbose +enable_sspi +enable_crypto_auth +enable_ntlm_wb +enable_tls_srp +enable_unix_sockets +enable_cookies +enable_socketpair +enable_http_auth +enable_doh +enable_mime +enable_dateparse +enable_netrc +enable_progress_meter +enable_dnsshuffle +enable_get_easy_option +enable_alt_svc +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +LT_SYS_LIBRARY_PATH' +ac_subdirs_all='ares' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures curl - to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/curl] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of curl -:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-debug Enable debug build options + --disable-debug Disable debug build options + --enable-optimize Enable compiler optimizations + --disable-optimize Disable compiler optimizations + --enable-warnings Enable strict compiler warnings + --disable-warnings Disable strict compiler warnings + --enable-werror Enable compiler warnings as errors + --disable-werror Disable compiler warnings as errors + --enable-curldebug Enable curl debug memory tracking + --disable-curldebug Disable curl debug memory tracking + --enable-symbol-hiding Enable hiding of library internal symbols + --disable-symbol-hiding Disable hiding of library internal symbols + --enable-hidden-symbols To be deprecated, use --enable-symbol-hiding + --disable-hidden-symbols + To be deprecated, use --disable-symbol-hiding + --enable-ares[=PATH] Enable c-ares for DNS lookups + --disable-ares Disable c-ares for DNS lookups + --disable-rt disable dependency on -lrt + --enable-ech Enable ECH support + --disable-ech Disable ECH support + --enable-code-coverage Provide code coverage + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-largefile omit support for large files + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-http Enable HTTP support + --disable-http Disable HTTP support + --enable-ftp Enable FTP support + --disable-ftp Disable FTP support + --enable-file Enable FILE support + --disable-file Disable FILE support + --enable-ldap Enable LDAP support + --disable-ldap Disable LDAP support + --enable-ldaps Enable LDAPS support + --disable-ldaps Disable LDAPS support + --enable-rtsp Enable RTSP support + --disable-rtsp Disable RTSP support + --enable-proxy Enable proxy support + --disable-proxy Disable proxy support + --enable-dict Enable DICT support + --disable-dict Disable DICT support + --enable-telnet Enable TELNET support + --disable-telnet Disable TELNET support + --enable-tftp Enable TFTP support + --disable-tftp Disable TFTP support + --enable-pop3 Enable POP3 support + --disable-pop3 Disable POP3 support + --enable-imap Enable IMAP support + --disable-imap Disable IMAP support + --enable-smb Enable SMB/CIFS support + --disable-smb Disable SMB/CIFS support + --enable-smtp Enable SMTP support + --disable-smtp Disable SMTP support + --enable-gopher Enable Gopher support + --disable-gopher Disable Gopher support + --enable-mqtt Enable MQTT support + --disable-mqtt Disable MQTT support + --enable-manual Enable built-in manual + --disable-manual Disable built-in manual + --enable-libcurl-option Enable --libcurl C code generation support + --disable-libcurl-option + Disable --libcurl C code generation support + --enable-libgcc use libgcc when linking + --enable-ipv6 Enable IPv6 (with IPv4) support + --disable-ipv6 Disable IPv6 support + --enable-openssl-auto-load-config + Enable automatic loading of OpenSSL configuration + --disable-openssl-auto-load-config + Disable automatic loading of OpenSSL configuration + --enable-versioned-symbols + Enable versioned symbols in shared library + --disable-versioned-symbols + Disable versioned symbols in shared library + --enable-threaded-resolver + Enable threaded resolver + --disable-threaded-resolver + Disable threaded resolver + --enable-pthreads Enable POSIX threads (default for threaded resolver) + --disable-pthreads Disable POSIX threads + --enable-verbose Enable verbose strings + --disable-verbose Disable verbose strings + --enable-sspi Enable SSPI + --disable-sspi Disable SSPI + --enable-crypto-auth Enable cryptographic authentication + --disable-crypto-auth Disable cryptographic authentication + --enable-ntlm-wb[=FILE] Enable NTLM delegation to winbind's ntlm_auth + helper, where FILE is ntlm_auth's absolute filename + (default: /usr/bin/ntlm_auth) + --disable-ntlm-wb Disable NTLM delegation to winbind's ntlm_auth + helper + --enable-tls-srp Enable TLS-SRP authentication + --disable-tls-srp Disable TLS-SRP authentication + --enable-unix-sockets Enable Unix domain sockets + --disable-unix-sockets Disable Unix domain sockets + --enable-cookies Enable cookies support + --disable-cookies Disable cookies support + --enable-socketpair Enable socketpair support + --disable-socketpair Disable socketpair support + --enable-http-auth Enable HTTP authentication support + --disable-http-auth Disable HTTP authentication support + --enable-doh Enable DoH support + --disable-doh Disable DoH support + --enable-mime Enable mime API support + --disable-mime Disable mime API support + --enable-dateparse Enable date parsing + --disable-dateparse Disable date parsing + --enable-netrc Enable netrc parsing + --disable-netrc Disable netrc parsing + --enable-progress-meter Enable progress-meter + --disable-progress-meter + Disable progress-meter + --enable-dnsshuffle Enable DNS shuffling + --disable-dnsshuffle Disable DNS shuffling + --enable-get-easy-options + Enable curl_easy_options + --disable-get-easy-options + Disable curl_easy_options + --enable-alt-svc Enable alt-svc support + --disable-alt-svc Disable alt-svc support + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). + --with-zlib=PATH search for zlib in PATH + --without-zlib disable use of zlib + --with-brotli=PATH Where to look for brotli, PATH points to the BROTLI + installation; when possible, set the PKG_CONFIG_PATH + environment variable instead of using this option + --without-brotli disable BROTLI + --with-zstd=PATH Where to look for libzstd, PATH points to the + libzstd installation; when possible, set the + PKG_CONFIG_PATH environment variable instead of + using this option + --without-zstd disable libzstd + --with-ldap-lib=libname Specify name of ldap lib file + --with-lber-lib=libname Specify name of lber lib file + --with-gssapi-includes=DIR + Specify location of GSS-API headers + --with-gssapi-libs=DIR Specify location of GSS-API libs + --with-gssapi=DIR Where to look for GSS-API + --with-default-ssl-backend=NAME + Use NAME as default SSL backend + --without-default-ssl-backend + Use implicit default SSL backend + --with-winssl enable Windows native SSL/TLS + --without-winssl disable Windows native SSL/TLS + --with-schannel enable Windows native SSL/TLS + --without-schannel disable Windows native SSL/TLS + --with-darwinssl enable Apple OS native SSL/TLS + --without-darwinssl disable Apple OS native SSL/TLS + --with-secure-transport enable Apple OS native SSL/TLS + --without-secure-transport + disable Apple OS native SSL/TLS + --with-amissl enable Amiga native SSL/TLS (AmiSSL) + --without-amissl disable Amiga native SSL/TLS (AmiSSL) + --with-ssl=PATH Where to look for OpenSSL, PATH points to the SSL + installation (default: /usr/local/ssl); when + possible, set the PKG_CONFIG_PATH environment + variable instead of using this option + --without-ssl disable OpenSSL + --with-egd-socket=FILE Entropy Gathering Daemon socket pathname + --with-random=FILE read randomness from FILE (default=/dev/urandom) + --with-gnutls=PATH where to look for GnuTLS, PATH points to the + installation root + --without-gnutls disable GnuTLS detection + --with-mbedtls=PATH where to look for mbedTLS, PATH points to the + installation root + --without-mbedtls disable mbedTLS detection + --with-wolfssl=PATH where to look for WolfSSL, PATH points to the + installation root (default: system lib default) + --without-wolfssl disable WolfSSL detection + --with-mesalink=PATH where to look for MesaLink, PATH points to the + installation root + --without-mesalink disable MesaLink detection + --with-bearssl=PATH where to look for BearSSL, PATH points to the + installation root + --without-bearssl disable BearSSL detection + --with-nss=PATH where to look for NSS, PATH points to the + installation root + --without-nss disable NSS detection + --with-ca-bundle=FILE Path to a file containing CA certificates (example: + /etc/ca-bundle.crt) + --without-ca-bundle Don't use a default CA bundle + --with-ca-path=DIRECTORY + Path to a directory containing CA certificates + stored individually, with their filenames in a hash + format. This option can be used with the OpenSSL, + GnuTLS and mbedTLS backends. Refer to OpenSSL + c_rehash for details. (example: /etc/certificates) + --without-ca-path Don't use a default CA path + --with-ca-fallback Use the built in CA store of the SSL library + --without-ca-fallback Don't use the built in CA store of the SSL library + --without-libpsl disable support for libpsl cookie checking + --with-libmetalink=PATH where to look for libmetalink, PATH points to the + installation root + --without-libmetalink disable libmetalink detection + --with-libssh2=PATH Where to look for libssh2, PATH points to the + libssh2 installation; when possible, set the + PKG_CONFIG_PATH environment variable instead of + using this option + --with-libssh2 enable libssh2 + --with-libssh=PATH Where to look for libssh, PATH points to the libssh + installation; when possible, set the PKG_CONFIG_PATH + environment variable instead of using this option + --with-libssh enable libssh + --with-wolfssh=PATH Where to look for wolfssh, PATH points to the + wolfSSH installation; when possible, set the + PKG_CONFIG_PATH environment variable instead of + using this option + --with-wolfssh enable wolfssh + --with-librtmp=PATH Where to look for librtmp, PATH points to the + LIBRTMP installation; when possible, set the + PKG_CONFIG_PATH environment variable instead of + using this option + --without-librtmp disable LIBRTMP + --with-winidn=PATH enable Windows native IDN + --without-winidn disable Windows native IDN + --with-libidn2=PATH Enable libidn2 usage + --without-libidn2 Disable libidn2 usage + --with-nghttp2=PATH Enable nghttp2 usage + --without-nghttp2 Disable nghttp2 usage + --with-ngtcp2=PATH Enable ngtcp2 usage + --without-ngtcp2 Disable ngtcp2 usage + --with-nghttp3=PATH Enable nghttp3 usage + --without-nghttp3 Disable nghttp3 usage + --with-quiche=PATH Enable quiche usage + --without-quiche Disable quiche usage + --with-zsh-functions-dir=PATH + Install zsh completions to PATH + --without-zsh-functions-dir + Do not install zsh completions + --with-fish-functions-dir=PATH + Install fish completions to PATH + --without-fish-functions-dir + Do not install fish completions + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +curl configure - +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Copyright (c) 1998 - 2020 Daniel Stenberg, +This configure script may be copied, distributed and modified under the +terms of the curl license; see COPYING for more details +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define $2 innocuous_$2 +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $2 +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------------------------------- ## +## Report this to a suitable curl mailing list: https://curl.haxx.se/mail/ ## +## ----------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int main (void) +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int main (void) +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by curl $as_me -, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + +# using curl-override.m4 + + + + + +ac_config_headers="$ac_config_headers lib/curl_config.h" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debug build options" >&5 +$as_echo_n "checking whether to enable debug build options... " >&6; } + OPT_DEBUG_BUILD="default" + # Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; OPT_DEBUG_BUILD=$enableval +fi + + case "$OPT_DEBUG_BUILD" in + no) + want_debug="no" + ;; + default) + want_debug="no" + ;; + *) + want_debug="yes" + +$as_echo "#define DEBUGBUILD 1" >>confdefs.h + + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_debug" >&5 +$as_echo "$want_debug" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler optimizer" >&5 +$as_echo_n "checking whether to enable compiler optimizer... " >&6; } + OPT_COMPILER_OPTIMIZE="default" + # Check whether --enable-optimize was given. +if test "${enable_optimize+set}" = set; then : + enableval=$enable_optimize; OPT_COMPILER_OPTIMIZE=$enableval +fi + + case "$OPT_COMPILER_OPTIMIZE" in + no) + want_optimize="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + default) + if test "$want_debug" = "yes"; then + want_optimize="assume_no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) no" >&5 +$as_echo "(assumed) no" >&6; } + else + want_optimize="assume_yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5 +$as_echo "(assumed) yes" >&6; } + fi + ;; + *) + want_optimize="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable strict compiler warnings" >&5 +$as_echo_n "checking whether to enable strict compiler warnings... " >&6; } + OPT_COMPILER_WARNINGS="default" + # Check whether --enable-warnings was given. +if test "${enable_warnings+set}" = set; then : + enableval=$enable_warnings; OPT_COMPILER_WARNINGS=$enableval +fi + + case "$OPT_COMPILER_WARNINGS" in + no) + want_warnings="no" + ;; + default) + want_warnings="$want_debug" + ;; + *) + want_warnings="yes" + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_warnings" >&5 +$as_echo "$want_warnings" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler warnings as errors" >&5 +$as_echo_n "checking whether to enable compiler warnings as errors... " >&6; } + OPT_COMPILER_WERROR="default" + # Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; OPT_COMPILER_WERROR=$enableval +fi + + case "$OPT_COMPILER_WERROR" in + no) + want_werror="no" + ;; + default) + want_werror="no" + ;; + *) + want_werror="yes" + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_werror" >&5 +$as_echo "$want_werror" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable curl debug memory tracking" >&5 +$as_echo_n "checking whether to enable curl debug memory tracking... " >&6; } + OPT_CURLDEBUG_BUILD="default" + # Check whether --enable-curldebug was given. +if test "${enable_curldebug+set}" = set; then : + enableval=$enable_curldebug; OPT_CURLDEBUG_BUILD=$enableval +fi + + case "$OPT_CURLDEBUG_BUILD" in + no) + want_curldebug="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + default) + if test "$want_debug" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5 +$as_echo "(assumed) yes" >&6; } + +$as_echo "#define CURLDEBUG 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + want_curldebug_assumed="yes" + want_curldebug="$want_debug" + ;; + *) + want_curldebug="yes" + +$as_echo "#define CURLDEBUG 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hiding of library internal symbols" >&5 +$as_echo_n "checking whether to enable hiding of library internal symbols... " >&6; } + OPT_SYMBOL_HIDING="default" + # Check whether --enable-symbol-hiding was given. +if test "${enable_symbol_hiding+set}" = set; then : + enableval=$enable_symbol_hiding; OPT_SYMBOL_HIDING=$enableval +fi + + # Check whether --enable-hidden-symbols was given. +if test "${enable_hidden_symbols+set}" = set; then : + enableval=$enable_hidden_symbols; OPT_SYMBOL_HIDING=$enableval +fi + + case "$OPT_SYMBOL_HIDING" in + no) + want_symbol_hiding="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + default) + want_symbol_hiding="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + want_symbol_hiding="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable c-ares for DNS lookups" >&5 +$as_echo_n "checking whether to enable c-ares for DNS lookups... " >&6; } + OPT_ARES="default" + # Check whether --enable-ares was given. +if test "${enable_ares+set}" = set; then : + enableval=$enable_ares; OPT_ARES=$enableval +fi + + case "$OPT_ARES" in + no) + want_ares="no" + ;; + default) + want_ares="no" + ;; + *) + want_ares="yes" + if test -n "$enableval" && test "$enableval" != "yes"; then + want_ares_path="$enableval" + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_ares" >&5 +$as_echo "$want_ares" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable dependency on -lrt" >&5 +$as_echo_n "checking whether to disable dependency on -lrt... " >&6; } + OPT_RT="default" + # Check whether --enable-rt was given. +if test "${enable_rt+set}" = set; then : + enableval=$enable_rt; OPT_RT=$enableval +fi + + case "$OPT_RT" in + no) + dontwant_rt="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + default) + dontwant_rt="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed no)" >&5 +$as_echo "(assumed no)" >&6; } + ;; + *) + dontwant_rt="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ECH support" >&5 +$as_echo_n "checking whether to enable ECH support... " >&6; } + OPT_ECH="default" + # Check whether --enable-ech was given. +if test "${enable_ech+set}" = set; then : + enableval=$enable_ech; OPT_ECH=$enableval +fi + + case "$OPT_ECH" in + no) + want_ech="no" + curl_ech_msg="no (--enable-ech)" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + default) + want_ech="no" + curl_ech_msg="no (--enable-ech)" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) + want_ech="yes" + curl_ech_msg="enabled (--disable-ech)" + experimental="ech" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac + + +# +# Check that 'XC_CONFIGURE_PREAMBLE' has already run. +# + +if test -z "$xc_configure_preamble_result"; then + as_fn_error $? "xc_configure_preamble_result not set (internal problem)" "$LINENO" 5 +fi + +# +# Check that 'PATH_SEPARATOR' has already been set. +# + +if test -z "$xc_PATH_SEPARATOR"; then + as_fn_error $? "xc_PATH_SEPARATOR not set (internal problem)" "$LINENO" 5 +fi +if test -z "$PATH_SEPARATOR"; then + as_fn_error $? "PATH_SEPARATOR not set (internal or config.site problem)" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for path separator" >&5 +$as_echo_n "checking for path separator... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_SEPARATOR" >&5 +$as_echo "$PATH_SEPARATOR" >&6; } +if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initial path separator" >&5 +$as_echo_n "checking for initial path separator... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_PATH_SEPARATOR" >&5 +$as_echo "$xc_PATH_SEPARATOR" >&6; } + as_fn_error $? "path separator mismatch (internal or config.site problem)" "$LINENO" 5 +fi + + +# +# save the configure arguments +# +CONFIGURE_OPTIONS="\"$ac_configure_args\"" + + +if test -z "$SED"; then + # Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SED in + [\\/]* | ?:[\\/]*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SED" && ac_cv_path_SED="not_found" + ;; +esac +fi +SED=$ac_cv_path_SED +if test -n "$SED"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 +$as_echo "$SED" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$SED" || test "$SED" = "not_found"; then + as_fn_error $? "sed not found in PATH. Cannot continue without sed." "$LINENO" 5 + fi +fi + + +if test -z "$GREP"; then + # Extract the first word of "grep", so it can be a program name with args. +set dummy grep; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GREP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GREP="$GREP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="not_found" + ;; +esac +fi +GREP=$ac_cv_path_GREP +if test -n "$GREP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5 +$as_echo "$GREP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$GREP" || test "$GREP" = "not_found"; then + as_fn_error $? "grep not found in PATH. Cannot continue without grep." "$LINENO" 5 + fi +fi + + +if test -z "$EGREP"; then + if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } + EGREP="$GREP -E" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5 +$as_echo "$EGREP" >&6; } + else + # Extract the first word of "egrep", so it can be a program name with args. +set dummy egrep; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $EGREP in + [\\/]* | ?:[\\/]*) + ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_EGREP" && ac_cv_path_EGREP="not_found" + ;; +esac +fi +EGREP=$ac_cv_path_EGREP +if test -n "$EGREP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5 +$as_echo "$EGREP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$EGREP" || test "$EGREP" = "not_found"; then + as_fn_error $? "egrep not found in PATH. Cannot continue without egrep." "$LINENO" 5 +fi + + +if test -z "$AR"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $AR in + [\\/]* | ?:[\\/]*) + ac_cv_path_AR="$AR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +AR=$ac_cv_path_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_AR"; then + ac_pt_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_AR in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_AR=$ac_cv_path_ac_pt_AR +if test -n "$ac_pt_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_AR" >&5 +$as_echo "$ac_pt_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_AR" = x; then + AR="not_found" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_pt_AR + fi +else + AR="$ac_cv_path_AR" +fi + + if test -z "$AR" || test "$AR" = "not_found"; then + as_fn_error $? "ar not found in PATH. Cannot continue without ar." "$LINENO" 5 + fi +fi + + + + +CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h` + + xc_prog_cc_prev_IFS=$IFS + xc_prog_cc_prev_LIBS=$LIBS + xc_prog_cc_prev_CFLAGS=$CFLAGS + xc_prog_cc_prev_LDFLAGS=$LDFLAGS + xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS + + + + xc_bad_var_libs=no + for xc_word in $LIBS; do + case "$xc_word" in + -l* | --library=*) + : + ;; + *) + xc_bad_var_libs=yes + ;; + esac + done + if test $xc_bad_var_libs = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5 +$as_echo "$as_me: using LIBS: $LIBS" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS note: LIBS should only be used to specify libraries (-lname)." >&5 +$as_echo "$as_me: LIBS note: LIBS should only be used to specify libraries (-lname)." >&6;} + fi + + + xc_bad_var_ldflags=no + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_ldflags=yes + ;; + -U*) + xc_bad_var_ldflags=yes + ;; + -I*) + xc_bad_var_ldflags=yes + ;; + -l* | --library=*) + xc_bad_var_ldflags=yes + ;; + esac + done + if test $xc_bad_var_ldflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5 +$as_echo "$as_me: using LDFLAGS: $LDFLAGS" >&6;} + xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not" + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + + xc_bad_var_cppflags=no + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + xc_bad_var_cppflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cppflags=yes + ;; + -l* | --library=*) + xc_bad_var_cppflags=yes + ;; + esac + done + if test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5 +$as_echo "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;} + xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not" + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + + xc_bad_var_cflags=no + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_cflags=yes + ;; + -U*) + xc_bad_var_cflags=yes + ;; + -I*) + xc_bad_var_cflags=yes + ;; + -rpath*) + xc_bad_var_cflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cflags=yes + ;; + -l* | --library=*) + xc_bad_var_cflags=yes + ;; + esac + done + if test $xc_bad_var_cflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5 +$as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;} + xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not" + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + if test $xc_bad_var_libs = yes || + test $xc_bad_var_cflags = yes || + test $xc_bad_var_ldflags = yes || + test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5 +$as_echo "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;} + fi + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int main (void) +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int main (void) +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + IFS=$xc_prog_cc_prev_IFS + LIBS=$xc_prog_cc_prev_LIBS + CFLAGS=$xc_prog_cc_prev_CFLAGS + LDFLAGS=$xc_prog_cc_prev_LDFLAGS + CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for code coverage support" >&5 +$as_echo_n "checking for code coverage support... " >&6; } + coverage="no" + curl_coverage_msg="disabled" + + # Check whether --enable-code-coverage was given. +if test "${enable_code_coverage+set}" = set; then : + enableval=$enable_code_coverage; coverage="$enableval" +fi + + + if test "$GCC" != "yes" ; then : + coverage="no" +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $coverage" >&5 +$as_echo "$coverage" >&6; } + + if test "x$coverage" = "xyes"; then + curl_coverage_msg="enabled" + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcov", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCOV"; then + ac_cv_prog_GCOV="$GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GCOV="${ac_tool_prefix}gcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GCOV=$ac_cv_prog_GCOV +if test -n "$GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GCOV"; then + ac_ct_GCOV=$GCOV + # Extract the first word of "gcov", so it can be a program name with args. +set dummy gcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GCOV"; then + ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_GCOV="gcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV +if test -n "$ac_ct_GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_GCOV" = x; then + GCOV="gcov" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + GCOV=$ac_ct_GCOV + fi +else + GCOV="$ac_cv_prog_GCOV" +fi + + if test -z "$GCOV"; then + as_fn_error $? "needs gcov for code coverage" "$LINENO" 5 + fi + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LCOV"; then + ac_cv_prog_LCOV="$LCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LCOV="lcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LCOV=$ac_cv_prog_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$LCOV"; then + as_fn_error $? "needs lcov for code coverage" "$LINENO" 5 + fi + + CPPFLAGS="$CPPFLAGS -DNDEBUG" + CFLAGS="$CLAGS -O0 -g -fprofile-arcs -ftest-coverage" + LIBS="$LIBS -lgcov" + fi + + +am__api_version='1.16' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' +am__doit: + @echo this is the am__doit target >confinc.out +.PHONY: am__doit +END +am__include="#" +am__quote= +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : + ;; +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +## --------------------------------------- ## +## Start of automake initialization code ## +## --------------------------------------- ## + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='curl' + VERSION='-' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + +## ------------------------------------- ## +## End of automake initialization code ## +## ------------------------------------- ## + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking curl version" >&5 +$as_echo_n "checking curl version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLVERSION" >&5 +$as_echo "$CURLVERSION" >&6; } + + + +VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h` + + +PKGADD_PKG="HAXXcurl" +PKGADD_NAME="curl - a client that groks URLs" +PKGADD_VENDOR="curl.haxx.se" + + + + + curl_ssl_msg="no (--with-{ssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl} )" + curl_ssh_msg="no (--with-{libssh,libssh2})" + curl_zlib_msg="no (--with-zlib)" + curl_brotli_msg="no (--with-brotli)" + curl_zstd_msg="no (--with-zstd)" + curl_gss_msg="no (--with-gssapi)" +curl_tls_srp_msg="no (--enable-tls-srp)" + curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" + curl_ipv6_msg="no (--enable-ipv6)" +curl_unix_sockets_msg="no (--enable-unix-sockets)" + curl_idn_msg="no (--with-{libidn2,winidn})" + curl_manual_msg="no (--enable-manual)" +curl_libcurl_msg="enabled (--disable-libcurl-option)" +curl_verbose_msg="enabled (--disable-verbose)" + curl_sspi_msg="no (--enable-sspi)" + curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)" + curl_ldaps_msg="no (--enable-ldaps)" + curl_rtsp_msg="no (--enable-rtsp)" + curl_rtmp_msg="no (--with-librtmp)" + curl_mtlnk_msg="no (--with-libmetalink)" + curl_psl_msg="no (--with-libpsl)" + + ssl_backends= + +INITIAL_LDFLAGS=$LDFLAGS +INITIAL_LIBS=$LIBS + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +cat >>confdefs.h <<_ACEOF +#define OS "${host}" +_ACEOF + + +# Silence warning: ar: 'u' modifier ignored since 'D' is the default +AR_FLAGS=cr + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OS is AIX (to define _ALL_SOURCE)" >&5 +$as_echo_n "checking if OS is AIX (to define _ALL_SOURCE)... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef _AIX + yes_this_is_aix +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes_this_is_aix" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f conftest* + + + + + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is already defined" >&5 +$as_echo_n "checking if _THREAD_SAFE is already defined... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#ifdef _THREAD_SAFE + int dummy=1; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tmp_thread_safe_initially_defined="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tmp_thread_safe_initially_defined="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # + if test "$tmp_thread_safe_initially_defined" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is actually needed" >&5 +$as_echo_n "checking if _THREAD_SAFE is actually needed... " >&6; } + + case $host_os in + aix[123].* | aix4.[012].*) + tmp_need_thread_safe="no" + ;; + aix*) + tmp_need_thread_safe="yes" + ;; + *) + tmp_need_thread_safe="no" + ;; + esac + + if test "$tmp_need_thread_safe" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _THREAD_SAFE is onwards defined" >&5 +$as_echo_n "checking if _THREAD_SAFE is onwards defined... " >&6; } + if test "$tmp_thread_safe_initially_defined" = "yes" || + test "$tmp_need_thread_safe" = "yes"; then + + +$as_echo "#define NEED_THREAD_SAFE 1" >>confdefs.h + +cat >>confdefs.h <<_EOF +#ifndef _THREAD_SAFE +# define _THREAD_SAFE +#endif +_EOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + # + + + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is already defined" >&5 +$as_echo_n "checking if _REENTRANT is already defined... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#ifdef _REENTRANT + int dummy=1; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tmp_reentrant_initially_defined="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tmp_reentrant_initially_defined="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # + if test "$tmp_reentrant_initially_defined" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is actually needed" >&5 +$as_echo_n "checking if _REENTRANT is actually needed... " >&6; } + + case $host_os in + solaris*) + tmp_need_reentrant="yes" + ;; + *) + tmp_need_reentrant="no" + ;; + esac + + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + if(0 != errno) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_errno="yes" + +else + + tmp_errno="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tmp_errno" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + +#ifdef errno + int dummy=1; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_errno="errno_macro_defined" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define _REENTRANT +#include + +int main (void) +{ + +#ifdef errno + int dummy=1; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_errno="errno_macro_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gmtime_r innocuous_gmtime_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gmtime_r +#ifdef __cplusplus +extern "C" +#endif +char gmtime_r (); +#if defined __stub_gmtime_r || defined __stub___gmtime_r +choke me +#endif + +int main (void) +{ +return gmtime_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_gmtime_r="yes" + +else + + tmp_gmtime_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_gmtime_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gmtime_r" >/dev/null 2>&1; then : + + tmp_gmtime_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gmtime_r" >/dev/null 2>&1; then : + + tmp_gmtime_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define localtime_r innocuous_localtime_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef localtime_r +#ifdef __cplusplus +extern "C" +#endif +char localtime_r (); +#if defined __stub_localtime_r || defined __stub___localtime_r +choke me +#endif + +int main (void) +{ +return localtime_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_localtime_r="yes" + +else + + tmp_localtime_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_localtime_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "localtime_r" >/dev/null 2>&1; then : + + tmp_localtime_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "localtime_r" >/dev/null 2>&1; then : + + tmp_localtime_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strerror_r innocuous_strerror_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strerror_r +#ifdef __cplusplus +extern "C" +#endif +char strerror_r (); +#if defined __stub_strerror_r || defined __stub___strerror_r +choke me +#endif + +int main (void) +{ +return strerror_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_strerror_r="yes" + +else + + tmp_strerror_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_strerror_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strerror_r" >/dev/null 2>&1; then : + + tmp_strerror_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strerror_r" >/dev/null 2>&1; then : + + tmp_strerror_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strtok_r innocuous_strtok_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strtok_r +#ifdef __cplusplus +extern "C" +#endif +char strtok_r (); +#if defined __stub_strtok_r || defined __stub___strtok_r +choke me +#endif + +int main (void) +{ +return strtok_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_strtok_r="yes" + +else + + tmp_strtok_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_strtok_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtok_r" >/dev/null 2>&1; then : + + tmp_strtok_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtok_r" >/dev/null 2>&1; then : + + tmp_strtok_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define inet_ntoa_r innocuous_inet_ntoa_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef inet_ntoa_r +#ifdef __cplusplus +extern "C" +#endif +char inet_ntoa_r (); +#if defined __stub_inet_ntoa_r || defined __stub___inet_ntoa_r +choke me +#endif + +int main (void) +{ +return inet_ntoa_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_inet_ntoa_r="yes" + +else + + tmp_inet_ntoa_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_inet_ntoa_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_ntoa_r" >/dev/null 2>&1; then : + + tmp_inet_ntoa_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_ntoa_r" >/dev/null 2>&1; then : + + tmp_inet_ntoa_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gethostbyaddr_r innocuous_gethostbyaddr_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gethostbyaddr_r +#ifdef __cplusplus +extern "C" +#endif +char gethostbyaddr_r (); +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +choke me +#endif + +int main (void) +{ +return gethostbyaddr_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_gethostbyaddr_r="yes" + +else + + tmp_gethostbyaddr_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_gethostbyaddr_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then : + + tmp_gethostbyaddr_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then : + + tmp_gethostbyaddr_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gethostbyname_r innocuous_gethostbyname_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gethostbyname_r +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname_r (); +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +choke me +#endif + +int main (void) +{ +return gethostbyname_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_gethostbyname_r="yes" + +else + + tmp_gethostbyname_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_gethostbyname_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyname_r" >/dev/null 2>&1; then : + + tmp_gethostbyname_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyname_r" >/dev/null 2>&1; then : + + tmp_gethostbyname_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define getprotobyname_r innocuous_getprotobyname_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef getprotobyname_r +#ifdef __cplusplus +extern "C" +#endif +char getprotobyname_r (); +#if defined __stub_getprotobyname_r || defined __stub___getprotobyname_r +choke me +#endif + +int main (void) +{ +return getprotobyname_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_getprotobyname_r="yes" + +else + + tmp_getprotobyname_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_getprotobyname_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getprotobyname_r" >/dev/null 2>&1; then : + + tmp_getprotobyname_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getprotobyname_r" >/dev/null 2>&1; then : + + tmp_getprotobyname_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + if test "$tmp_need_reentrant" = "no"; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define getservbyport_r innocuous_getservbyport_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef getservbyport_r +#ifdef __cplusplus +extern "C" +#endif +char getservbyport_r (); +#if defined __stub_getservbyport_r || defined __stub___getservbyport_r +choke me +#endif + +int main (void) +{ +return getservbyport_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_getservbyport_r="yes" + +else + + tmp_getservbyport_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$tmp_getservbyport_r" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getservbyport_r" >/dev/null 2>&1; then : + + tmp_getservbyport_r="proto_declared" + +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getservbyport_r" >/dev/null 2>&1; then : + + tmp_getservbyport_r="proto_needs_reentrant" + tmp_need_reentrant="yes" + +fi +rm -f conftest* + + +fi +rm -f conftest* + + fi + + fi + + fi + if test "$tmp_need_reentrant" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _REENTRANT is onwards defined" >&5 +$as_echo_n "checking if _REENTRANT is onwards defined... " >&6; } + if test "$tmp_reentrant_initially_defined" = "yes" || + test "$tmp_need_reentrant" = "yes"; then + + +$as_echo "#define NEED_REENTRANT 1" >>confdefs.h + +cat >>confdefs.h <<_EOF +#ifndef _REENTRANT +# define _REENTRANT +#endif +_EOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + # + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int main (void) +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test yes = "$GCC"; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return, which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD=$ac_prog + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test yes = "$with_gnu_ld"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD=$ac_dir/$ac_prog + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM=$NM +else + lt_nm_to_check=${ac_tool_prefix}nm + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break 2 + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break 2 + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS=$lt_save_ifs + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test : != "$DUMPBIN"; then + NM=$DUMPBIN + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring=ABCD + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n "$lt_cv_sys_max_cmd_len"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; + darwin*) + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# 'unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd=$ECHO + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cr} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test no = "$lt_cv_ar_at_file"; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test ia64 = "$host_cpu"; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS=conftstm.$ac_objext + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test yes = "$pipe_works"; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case $with_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test no = "$enable_libtool_lock" || enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE=32 + ;; + *ELF-64*) + HPUX_IA64_MODE=64 + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test yes = "$lt_cv_prog_gnu_ld"; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test yes != "$lt_cv_cc_needs_belf"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS=$SAVE_CFLAGS + fi + ;; +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks=$enable_libtool_lock + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "$LT_MULTI_MODULE"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test yes = "$lt_cv_apple_cc_single_mod"; then + _lt_dar_single_mod='$single_module' + fi + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + fi + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + +# ------------------------------------ # +# Determine libtool default behavior # +# ------------------------------------ # + +# +# Default behavior is to enable shared and static libraries on systems +# where libtool knows how to build both library versions, and does not +# require separate configuration and build runs for each flavor. +# + +xc_lt_want_enable_shared='yes' +xc_lt_want_enable_static='yes' + +# +# User may have disabled shared or static libraries. +# +case "x$enable_shared" in # ( + xno) + xc_lt_want_enable_shared='no' + ;; +esac +case "x$enable_static" in # ( + xno) + xc_lt_want_enable_static='no' + ;; +esac +if test "x$xc_lt_want_enable_shared" = 'xno' && + test "x$xc_lt_want_enable_static" = 'xno'; then + as_fn_error $? "can not disable shared and static libraries simultaneously" "$LINENO" 5 +fi + +# +# Default behavior on systems that require independent configuration +# and build runs for shared and static is to enable shared libraries +# and disable static ones. On these systems option '--disable-shared' +# must be used in order to build a proper static library. +# + +if test "x$xc_lt_want_enable_shared" = 'xyes' && + test "x$xc_lt_want_enable_static" = 'xyes'; then + case $host_os in # ( + pw32* | cegcc* | os2* | aix*) + xc_lt_want_enable_static='no' + ;; + esac +fi + +# +# Make libtool aware of current shared and static library preferences +# taking in account that, depending on host characteristics, libtool +# may modify these option preferences later in this configure script. +# + +enable_shared=$xc_lt_want_enable_shared +enable_static=$xc_lt_want_enable_static + +# +# Default behavior is to build PIC objects for shared libraries and +# non-PIC objects for static libraries. +# + +xc_lt_want_with_pic='default' + +# +# User may have specified PIC preference. +# + +case "x$with_pic" in # (( + xno) + xc_lt_want_with_pic='no' + ;; + xyes) + xc_lt_want_with_pic='yes' + ;; +esac + +# +# Default behavior on some systems where building a shared library out +# of non-PIC compiled objects will fail with following linker error +# "relocation R_X86_64_32 can not be used when making a shared object" +# is to build PIC objects even for static libraries. This behavior may +# be overridden using 'configure --disable-shared --without-pic'. +# + +if test "x$xc_lt_want_with_pic" = 'xdefault'; then + case $host_cpu in # ( + x86_64 | amd64 | ia64) + case $host_os in # ( + linux* | freebsd*) + xc_lt_want_with_pic='yes' + ;; + esac + ;; + esac +fi + +# +# Make libtool aware of current PIC preference taking in account that, +# depending on host characteristics, libtool may modify PIC default +# behavior to fit host system idiosyncrasies later in this script. +# + +with_pic=$xc_lt_want_with_pic + +## ----------------------- ## +## Start of libtool code ## +## ----------------------- ## + + + + +# Set options +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + pic_mode=default +fi + + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for pkg in $enableval; do + IFS=$lt_save_ifs + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS=$lt_save_ifs + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS=$ltmain + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld=$lt_cv_prog_gnu_ld + +old_CC=$CC +old_CFLAGS=$CFLAGS + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +func_cc_basename $compiler +cc_basename=$func_cc_basename_result + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS=$lt_save_ifs + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD=$lt_cv_path_MAGIC_CMD + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD + ;; +esac +fi + +MAGIC_CMD=$lt_cv_path_MAGIC_CMD +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC=$CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test yes = "$GCC"; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + lt_prog_compiler_pic='-fPIC' + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test ia64 = "$host_cpu"; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='$wl-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms that do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_pic_works"; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test yes = "$lt_cv_prog_compiler_static_works"; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test yes != "$GCC"; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd* | bitrig*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='$wl' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test ia64 != "$host_cpu"; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test linux-dietlibc = "$host_os"; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test no = "$tmp_diet" + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test no = "$ld_shlibs"; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test ia64 = "$host_cpu"; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag= + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + aix_use_runtimelinking=yes + break + fi + done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac + + if test yes = "$GCC"; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`$CC -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' + fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' + else + # not using gcc + if test ia64 = "$host_cpu"; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' + else + shared_flag='$wl-bM:SRE' + fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' + fi + fi + + export_dynamic_flag_spec='$wl-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + else + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=/usr/lib:/lib + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=.dll + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag=$_lt_dar_allow_undefined + case $cc_basename in + ifort*|nagfor*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='$wl-E' + ;; + + hpux10*) + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test yes,no = "$GCC,$with_gnu_ld"; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='$wl-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + link_all_deplibs=no + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd* | bitrig*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' + else + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands '-z linker_flag'. GCC discards it without '$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test sequent = "$host_vendor"; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='$wl-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We CANNOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='$wl-Bexport' + runpath_var='LD_RUN_PATH' + + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test sni = "$host_vendor"; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='$wl-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test no = "$ld_shlibs" && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test yes,yes = "$GCC,$enable_shared"; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test yes = "$GCC"; then + case $host_os in + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary... + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo = "/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=.so +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + + + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='$libname$release$shared_ext$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test ia64 = "$host_cpu"; then + # AIX 5 supports IA64 + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec=$LIB + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 + fi + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec=/usr/lib + need_lib_prefix=no + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +os2*) + libname_spec='$name' + version_type=windows + shrext_cmds=.dll + need_version=no + need_lib_prefix=no + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test yes = "$with_gnu_ld"; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=sco + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test yes = "$with_gnu_ld"; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test no = "$dynamic_linker" && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test yes = "$GCC"; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +fi + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +fi + +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test yes = "$hardcode_automatic"; then + + # We can hardcode non-existent directories. + if test no != "$hardcode_direct" && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then + # Fast installation is not supported + enable_fast_install=no +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test yes != "$enable_dlopen"; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen=load_add_on + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen=LoadLibrary + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + + lt_cv_dlopen=dyld + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen=shl_load +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int main (void) +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen=dlopen +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int main (void) +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int main (void) +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test no = "$lt_cv_dlopen"; then + enable_dlopen=no + else + enable_dlopen=yes + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS=$LDFLAGS + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS=$LIBS + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test yes = "$lt_cv_dlopen_self"; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test yes = "$cross_compiling"; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report what library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test no = "$can_build_shared" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test yes = "$enable_shared" && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test yes = "$enable_shared" || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + +## --------------------- ## +## End of libtool code ## +## --------------------- ## + +# +# Verify if finally libtool shared libraries will be built +# + +case "x$enable_shared" in # (( + xyes | xno) + xc_lt_build_shared=$enable_shared + ;; + *) + as_fn_error $? "unexpected libtool enable_shared value: $enable_shared" "$LINENO" 5 + ;; +esac + +# +# Verify if finally libtool static libraries will be built +# + +case "x$enable_static" in # (( + xyes | xno) + xc_lt_build_static=$enable_static + ;; + *) + as_fn_error $? "unexpected libtool enable_static value: $enable_static" "$LINENO" 5 + ;; +esac + +# +# Verify if libtool shared libraries should be linked using flag -version-info +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -version-info" >&5 +$as_echo_n "checking whether to build shared libraries with -version-info... " >&6; } +xc_lt_shlib_use_version_info='yes' +if test "x$version_type" = 'xnone'; then + xc_lt_shlib_use_version_info='no' +fi +case $host_os in # ( + amigaos*) + xc_lt_shlib_use_version_info='yes' + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_version_info" >&5 +$as_echo "$xc_lt_shlib_use_version_info" >&6; } + +# +# Verify if libtool shared libraries should be linked using flag -no-undefined +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -no-undefined" >&5 +$as_echo_n "checking whether to build shared libraries with -no-undefined... " >&6; } +xc_lt_shlib_use_no_undefined='no' +if test "x$allow_undefined" = 'xno'; then + xc_lt_shlib_use_no_undefined='yes' +elif test "x$allow_undefined_flag" = 'xunsupported'; then + xc_lt_shlib_use_no_undefined='yes' +fi +case $host_os in # ( + cygwin* | mingw* | pw32* | cegcc* | os2* | aix*) + xc_lt_shlib_use_no_undefined='yes' + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_no_undefined" >&5 +$as_echo "$xc_lt_shlib_use_no_undefined" >&6; } + +# +# Verify if libtool shared libraries should be linked using flag -mimpure-text +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with -mimpure-text" >&5 +$as_echo_n "checking whether to build shared libraries with -mimpure-text... " >&6; } +xc_lt_shlib_use_mimpure_text='no' +case $host_os in # ( + solaris2*) + if test "x$GCC" = 'xyes'; then + xc_lt_shlib_use_mimpure_text='yes' + fi + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_shlib_use_mimpure_text" >&5 +$as_echo "$xc_lt_shlib_use_mimpure_text" >&6; } + +# +# Find out whether libtool libraries would be built wit PIC +# + +case "x$pic_mode" in # (((( + xdefault) + xc_lt_build_shared_with_pic='yes' + xc_lt_build_static_with_pic='no' + ;; + xyes) + xc_lt_build_shared_with_pic='yes' + xc_lt_build_static_with_pic='yes' + ;; + xno) + xc_lt_build_shared_with_pic='no' + xc_lt_build_static_with_pic='no' + ;; + *) + xc_lt_build_shared_with_pic='unknown' + xc_lt_build_static_with_pic='unknown' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unexpected libtool pic_mode value: $pic_mode" >&5 +$as_echo "$as_me: WARNING: unexpected libtool pic_mode value: $pic_mode" >&2;} + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries with PIC" >&5 +$as_echo_n "checking whether to build shared libraries with PIC... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_with_pic" >&5 +$as_echo "$xc_lt_build_shared_with_pic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries with PIC" >&5 +$as_echo_n "checking whether to build static libraries with PIC... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_with_pic" >&5 +$as_echo "$xc_lt_build_static_with_pic" >&6; } + +# +# Verify if libtool shared libraries will be built while static not built +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries only" >&5 +$as_echo_n "checking whether to build shared libraries only... " >&6; } +if test "$xc_lt_build_shared" = 'yes' && + test "$xc_lt_build_static" = 'no'; then + xc_lt_build_shared_only='yes' +else + xc_lt_build_shared_only='no' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_shared_only" >&5 +$as_echo "$xc_lt_build_shared_only" >&6; } + +# +# Verify if libtool static libraries will be built while shared not built +# + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries only" >&5 +$as_echo_n "checking whether to build static libraries only... " >&6; } +if test "$xc_lt_build_static" = 'yes' && + test "$xc_lt_build_shared" = 'no'; then + xc_lt_build_static_only='yes' +else + xc_lt_build_static_only='no' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xc_lt_build_static_only" >&5 +$as_echo "$xc_lt_build_static_only" >&6; } + + + + +# +# Automake conditionals based on libtool related checks +# + + if test "x$xc_lt_shlib_use_version_info" = 'xyes'; then + CURL_LT_SHLIB_USE_VERSION_INFO_TRUE= + CURL_LT_SHLIB_USE_VERSION_INFO_FALSE='#' +else + CURL_LT_SHLIB_USE_VERSION_INFO_TRUE='#' + CURL_LT_SHLIB_USE_VERSION_INFO_FALSE= +fi + + if test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then + CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE= + CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE='#' +else + CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE='#' + CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE= +fi + + if test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'; then + CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE= + CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE='#' +else + CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE='#' + CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE= +fi + + +# +# Due to libtool and automake machinery limitations of not allowing +# specifying separate CPPFLAGS or CFLAGS when compiling objects for +# inclusion of these in shared or static libraries, we are forced to +# build using separate configure runs for shared and static libraries +# on systems where different CPPFLAGS or CFLAGS are mandatory in order +# to compile objects for each kind of library. Notice that relying on +# the '-DPIC' CFLAG that libtool provides is not valid given that the +# user might for example choose to build static libraries with PIC. +# + +# +# Make our Makefile.am files use the staticlib CPPFLAG only when strictly +# targeting a static library and not building its shared counterpart. +# + + if test "x$xc_lt_build_static_only" = 'xyes'; then + USE_CPPFLAG_CURL_STATICLIB_TRUE= + USE_CPPFLAG_CURL_STATICLIB_FALSE='#' +else + USE_CPPFLAG_CURL_STATICLIB_TRUE='#' + USE_CPPFLAG_CURL_STATICLIB_FALSE= +fi + + +# +# Make staticlib CPPFLAG variable and its definition visible in output +# files unconditionally, providing an empty definition unless strictly +# targeting a static library and not building its shared counterpart. +# + +CPPFLAG_CURL_STATICLIB= +if test "x$xc_lt_build_static_only" = 'xyes'; then + CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB' +fi + + + +# Determine whether all dependent libraries must be specified when linking +if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" +then + REQUIRE_LIB_DEPS=no +else + REQUIRE_LIB_DEPS=yes +fi + + if test x$REQUIRE_LIB_DEPS = xyes; then + USE_EXPLICIT_LIB_DEPS_TRUE= + USE_EXPLICIT_LIB_DEPS_FALSE='#' +else + USE_EXPLICIT_LIB_DEPS_TRUE='#' + USE_EXPLICIT_LIB_DEPS_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpp -P is needed" >&5 +$as_echo_n "checking if cpp -P is needed... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +TEST EINVAL TEST + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "TEST.*TEST" >/dev/null 2>&1; then : + cpp=no +else + cpp=yes +fi +rm -f conftest* + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp" >&5 +$as_echo "$cpp" >&6; } + + if test "x$cpp" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cpp -P works" >&5 +$as_echo_n "checking if cpp -P works... " >&6; } + OLDCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -P" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +TEST EINVAL TEST + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "TEST.*TEST" >/dev/null 2>&1; then : + cpp_p=yes +else + cpp_p=no +fi +rm -f conftest* + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp_p" >&5 +$as_echo "$cpp_p" >&6; } + + if test "x$cpp_p" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to figure out cpp -P alternative" >&5 +$as_echo "$as_me: WARNING: failed to figure out cpp -P alternative" >&2;} + # without -P + CPPPFLAG="" + else + # with -P + CPPPFLAG="-P" + fi + CPPFLAGS=$OLDCPPFLAGS + else + # without -P + CPPPFLAG="" + fi + + + # + compiler_id="unknown" + compiler_num="0" + # + flags_dbg_all="unknown" + flags_dbg_yes="unknown" + flags_dbg_off="unknown" + flags_opt_all="unknown" + flags_opt_yes="unknown" + flags_opt_off="unknown" + # + flags_prefer_cppflags="no" + # + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is DEC/Compaq/HP C" >&5 +$as_echo_n "checking if compiler is DEC/Compaq/HP C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __DECC +CURL_DEF_TOKEN __DECC +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___DECC=no + + else + curl_cv_have_def___DECC=yes + curl_cv_def___DECC=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __DECC_VER +CURL_DEF_TOKEN __DECC_VER +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__DECC_VER"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___DECC_VER=no + + else + curl_cv_have_def___DECC_VER=yes + curl_cv_def___DECC_VER=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___DECC" = "yes" && + test "$curl_cv_have_def___DECC_VER" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="DEC_C" + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_yes="-g2" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -O3 -O4" + flags_opt_yes="-O1" + flags_opt_off="-O0" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is HP-UX C" >&5 +$as_echo_n "checking if compiler is HP-UX C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __HP_cc +CURL_DEF_TOKEN __HP_cc +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__HP_cc"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___HP_cc=no + + else + curl_cv_have_def___HP_cc=yes + curl_cv_def___HP_cc=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___HP_cc" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="HP_UX_C" + flags_dbg_all="-g -s" + flags_dbg_yes="-g" + flags_dbg_off="-s" + flags_opt_all="-O +O0 +O1 +O2 +O3 +O4" + flags_opt_yes="+O2" + flags_opt_off="+O0" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is IBM C" >&5 +$as_echo_n "checking if compiler is IBM C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __IBMC__ +CURL_DEF_TOKEN __IBMC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__IBMC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___IBMC__=no + + else + curl_cv_have_def___IBMC__=yes + curl_cv_def___IBMC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___IBMC__" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="IBM_C" + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5" + flags_opt_all="$flags_opt_all -qnooptimize" + flags_opt_all="$flags_opt_all -qoptimize=0" + flags_opt_all="$flags_opt_all -qoptimize=1" + flags_opt_all="$flags_opt_all -qoptimize=2" + flags_opt_all="$flags_opt_all -qoptimize=3" + flags_opt_all="$flags_opt_all -qoptimize=4" + flags_opt_all="$flags_opt_all -qoptimize=5" + flags_opt_yes="-O2" + flags_opt_off="-qnooptimize" + flags_prefer_cppflags="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is Intel C" >&5 +$as_echo_n "checking if compiler is Intel C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __INTEL_COMPILER +CURL_DEF_TOKEN __INTEL_COMPILER +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__INTEL_COMPILER"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___INTEL_COMPILER=no + + else + curl_cv_have_def___INTEL_COMPILER=yes + curl_cv_def___INTEL_COMPILER=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_num="$curl_cv_def___INTEL_COMPILER" + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __unix__ +CURL_DEF_TOKEN __unix__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = ""; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___unix__=no + + else + curl_cv_have_def___unix__=yes + curl_cv_def___unix__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___unix__" = "yes"; then + compiler_id="INTEL_UNIX_C" + flags_dbg_all="-g -g0" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" + flags_opt_yes="-O2" + flags_opt_off="-O0" + else + compiler_id="INTEL_WINDOWS_C" + flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-" + flags_dbg_all="$flags_dbg_all /debug" + flags_dbg_all="$flags_dbg_all /debug:none" + flags_dbg_all="$flags_dbg_all /debug:minimal" + flags_dbg_all="$flags_dbg_all /debug:partial" + flags_dbg_all="$flags_dbg_all /debug:full" + flags_dbg_all="$flags_dbg_all /debug:semantic_stepping" + flags_dbg_all="$flags_dbg_all /debug:extended" + flags_dbg_yes="/Zi /Oy-" + flags_dbg_off="/debug:none /Oy-" + flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-" + flags_opt_yes="/O2" + flags_opt_off="/Od" + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is clang" >&5 +$as_echo_n "checking if compiler is clang... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __clang__ +CURL_DEF_TOKEN __clang__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__clang__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___clang__=no + + else + curl_cv_have_def___clang__=yes + curl_cv_def___clang__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___clang__" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is xlclang" >&5 +$as_echo_n "checking if compiler is xlclang... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __ibmxl__ +CURL_DEF_TOKEN __ibmxl__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__ibmxl__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___ibmxl__=no + + else + curl_cv_have_def___ibmxl__=yes + curl_cv_def___ibmxl__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___ibmxl__" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="XLCLANG" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + compiler_id="CLANG" + fi + fullclangver=`$CC -v 2>&1 | grep version` + clangver=`echo $fullclangver | grep "based on LLVM " | "$SED" 's/.*(based on LLVM \([0-9]*\.[0-9]*\).*)/\1/'` + if test -z "$clangver"; then + if echo $fullclangver | grep "Apple LLVM version " >/dev/null; then + clangver="3.7" + else + clangver=`echo $fullclangver | "$SED" 's/.*version \([0-9]*\.[0-9]*\).*/\1/'` + fi + fi + clangvhi=`echo $clangver | cut -d . -f1` + clangvlo=`echo $clangver | cut -d . -f2` + compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null` + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_all="$flags_dbg_all -ggdb" + flags_dbg_all="$flags_dbg_all -gstabs" + flags_dbg_all="$flags_dbg_all -gstabs+" + flags_dbg_all="$flags_dbg_all -gcoff" + flags_dbg_all="$flags_dbg_all -gxcoff" + flags_dbg_all="$flags_dbg_all -gdwarf-2" + flags_dbg_all="$flags_dbg_all -gvms" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4" + flags_opt_yes="-Os" + flags_opt_off="-O0" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is GNU C" >&5 +$as_echo_n "checking if compiler is GNU C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __GNUC__ +CURL_DEF_TOKEN __GNUC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___GNUC__=no + + else + curl_cv_have_def___GNUC__=yes + curl_cv_def___GNUC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___GNUC__" = "yes" && + test "$compiler_id" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="GNU_C" + gccver=`$CC -dumpversion` + gccvhi=`echo $gccver | cut -d . -f1` + gccvlo=`echo $gccver | cut -d . -f2` + compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null` + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_all="$flags_dbg_all -ggdb" + flags_dbg_all="$flags_dbg_all -gstabs" + flags_dbg_all="$flags_dbg_all -gstabs+" + flags_dbg_all="$flags_dbg_all -gcoff" + flags_dbg_all="$flags_dbg_all -gxcoff" + flags_dbg_all="$flags_dbg_all -gdwarf-2" + flags_dbg_all="$flags_dbg_all -gvms" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast" + flags_opt_yes="-O2" + flags_opt_off="-O0" + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef _WIN32 +CURL_DEF_TOKEN _WIN32 +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "_WIN32"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def__WIN32=no + + else + curl_cv_have_def__WIN32=yes + curl_cv_def__WIN32=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is LCC" >&5 +$as_echo_n "checking if compiler is LCC... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __LCC__ +CURL_DEF_TOKEN __LCC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__LCC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___LCC__=no + + else + curl_cv_have_def___LCC__=yes + curl_cv_def___LCC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___LCC__" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="LCC" + flags_dbg_all="-g" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="" + flags_opt_yes="" + flags_opt_off="" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPSpro C" >&5 +$as_echo_n "checking if compiler is SGI MIPSpro C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __GNUC__ +CURL_DEF_TOKEN __GNUC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___GNUC__=no + + else + curl_cv_have_def___GNUC__=yes + curl_cv_def___GNUC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef _COMPILER_VERSION +CURL_DEF_TOKEN _COMPILER_VERSION +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "_COMPILER_VERSION"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def__COMPILER_VERSION=no + + else + curl_cv_have_def__COMPILER_VERSION=yes + curl_cv_def__COMPILER_VERSION=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef _SGI_COMPILER_VERSION +CURL_DEF_TOKEN _SGI_COMPILER_VERSION +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "_SGI_COMPILER_VERSION"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def__SGI_COMPILER_VERSION=no + + else + curl_cv_have_def__SGI_COMPILER_VERSION=yes + curl_cv_def__SGI_COMPILER_VERSION=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___GNUC__" = "no" && + (test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" || + test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="SGI_MIPSPRO_C" + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" + flags_opt_yes="-O2" + flags_opt_off="-O0" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is SGI MIPS C" >&5 +$as_echo_n "checking if compiler is SGI MIPS C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __GNUC__ +CURL_DEF_TOKEN __GNUC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__GNUC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___GNUC__=no + + else + curl_cv_have_def___GNUC__=yes + curl_cv_def___GNUC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __sgi +CURL_DEF_TOKEN __sgi +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__sgi"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___sgi=no + + else + curl_cv_have_def___sgi=yes + curl_cv_def___sgi=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___GNUC__" = "no" && + test "$curl_cv_have_def___sgi" = "yes" && + test "$compiler_id" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="SGI_MIPS_C" + flags_dbg_all="-g -g0 -g1 -g2 -g3" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" + flags_opt_yes="-O2" + flags_opt_off="-O0" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is SunPro C" >&5 +$as_echo_n "checking if compiler is SunPro C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __SUNPRO_C +CURL_DEF_TOKEN __SUNPRO_C +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__SUNPRO_C"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___SUNPRO_C=no + + else + curl_cv_have_def___SUNPRO_C=yes + curl_cv_def___SUNPRO_C=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___SUNPRO_C" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="SUNPRO_C" + flags_dbg_all="-g -s" + flags_dbg_yes="-g" + flags_dbg_off="-s" + flags_opt_all="-O -xO -xO1 -xO2 -xO3 -xO4 -xO5" + flags_opt_yes="-xO2" + flags_opt_off="" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is Tiny C" >&5 +$as_echo_n "checking if compiler is Tiny C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __TINYC__ +CURL_DEF_TOKEN __TINYC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__TINYC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___TINYC__=no + + else + curl_cv_have_def___TINYC__=yes + curl_cv_def___TINYC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___TINYC__" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + compiler_id="TINY_C" + flags_dbg_all="-g -b" + flags_dbg_yes="-g" + flags_dbg_off="" + flags_opt_all="" + flags_opt_yes="" + flags_opt_off="" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is Watcom C" >&5 +$as_echo_n "checking if compiler is Watcom C... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __WATCOMC__ +CURL_DEF_TOKEN __WATCOMC__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__WATCOMC__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___WATCOMC__=no + + else + curl_cv_have_def___WATCOMC__=yes + curl_cv_def___WATCOMC__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___WATCOMC__" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __UNIX__ +CURL_DEF_TOKEN __UNIX__ +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "__UNIX__"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def___UNIX__=no + + else + curl_cv_have_def___UNIX__=yes + curl_cv_def___UNIX__=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def___UNIX__" = "yes"; then + compiler_id="WATCOM_UNIX_C" + flags_dbg_all="-g1 -g1+ -g2 -g3" + flags_dbg_yes="-g2" + flags_dbg_off="" + flags_opt_all="-O0 -O1 -O2 -O3" + flags_opt_yes="-O2" + flags_opt_off="-O0" + else + compiler_id="WATCOM_WINDOWS_C" + flags_dbg_all="" + flags_dbg_yes="" + flags_dbg_off="" + flags_opt_all="" + flags_opt_yes="" + flags_opt_off="" + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + # + if test "$compiler_id" = "unknown"; then + cat <<_EOF 1>&2 +*** +*** Warning: This configure script does not have information about the +*** compiler you are using, relative to the flags required to enable or +*** disable generation of debug info, optimization options or warnings. +*** +*** Whatever settings are present in CFLAGS will be used for this run. +*** +*** If you wish to help the curl project to better support your compiler +*** you can report this and the required info on the libcurl development +*** mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/ +*** +_EOF + fi + + +squeeze() { + _sqz_result="" + eval _sqz_input=\$$1 + for _sqz_token in $_sqz_input; do + if test -z "$_sqz_result"; then + _sqz_result="$_sqz_token" + else + _sqz_result="$_sqz_result $_sqz_token" + fi + done + eval $1=\$_sqz_result + return 0 +} + + + # + if test "$compiler_id" != "unknown"; then + # + tmp_save_CPPFLAGS="$CPPFLAGS" + tmp_save_CFLAGS="$CFLAGS" + tmp_CPPFLAGS="" + tmp_CFLAGS="" + # + case "$compiler_id" in + # + CLANG) + # + tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments" + ;; + # + DEC_C) + # + tmp_CFLAGS="$tmp_CFLAGS -std1" + tmp_CFLAGS="$tmp_CFLAGS -noansi_alias" + tmp_CFLAGS="$tmp_CFLAGS -warnprotos" + tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs" + ;; + # + GNU_C) + # + if test "$compiler_num" -ge "295"; then + tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration" + fi + ;; + # + HP_UX_C) + # + tmp_CFLAGS="$tmp_CFLAGS -z" + tmp_CFLAGS="$tmp_CFLAGS +W 4227,4255" + ;; + # + IBM_C) + # + tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded" + tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias" + tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e" + ;; + # + INTEL_UNIX_C) + # + tmp_CFLAGS="$tmp_CFLAGS -std=gnu89" + tmp_CPPFLAGS="$tmp_CPPFLAGS -we140,147,165,266" + tmp_CPPFLAGS="$tmp_CPPFLAGS -wd279,981,1469" + ;; + # + INTEL_WINDOWS_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + LCC) + # + tmp_CFLAGS="$tmp_CFLAGS -n" + ;; + # + SGI_MIPS_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + SGI_MIPSPRO_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + SUNPRO_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + TINY_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + WATCOM_UNIX_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + WATCOM_WINDOWS_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + esac + # + squeeze tmp_CPPFLAGS + squeeze tmp_CFLAGS + # + if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts some basic options" >&5 +$as_echo_n "checking if compiler accepts some basic options... " >&6; } + CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS" + CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS" + squeeze CPPFLAGS + squeeze CFLAGS + + tmp_compiler_works="unknown" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/cc-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tmp_compiler_works" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/link-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "x$cross_compiling" != "xyes" && + test "$tmp_compiler_works" = "yes"; then + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# ifdef __STDC__ +# include +# endif + +int main (void) +{ + + int i = 0; + exit(i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tmp_compiler_works="yes" + +else + tmp_compiler_works="no" + echo " " >&6 + echo "run-fail: test program exited with status $ac_status" >&6 + echo " " >&6 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + if test "$tmp_compiler_works" = "yes"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5 +$as_echo "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;} + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5 +$as_echo "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;} + CPPFLAGS="$tmp_save_CPPFLAGS" + CFLAGS="$tmp_save_CFLAGS" + + fi + + fi + # + fi + + + # + if test "$compiler_id" != "unknown"; then + # + tmp_save_CFLAGS="$CFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + # + tmp_options="" + tmp_CFLAGS="$CFLAGS" + tmp_CPPFLAGS="$CPPFLAGS" + + ac_var_stripped="" + for word1 in $tmp_CFLAGS; do + ac_var_strip_word="no" + for word2 in $flags_dbg_all; do + if test "$word1" = "$word2"; then + ac_var_strip_word="yes" + fi + done + if test "$ac_var_strip_word" = "no"; then + ac_var_stripped="$ac_var_stripped $word1" + fi + done + tmp_CFLAGS="$ac_var_stripped" + squeeze tmp_CFLAGS + + + ac_var_stripped="" + for word1 in $tmp_CPPFLAGS; do + ac_var_strip_word="no" + for word2 in $flags_dbg_all; do + if test "$word1" = "$word2"; then + ac_var_strip_word="yes" + fi + done + if test "$ac_var_strip_word" = "no"; then + ac_var_stripped="$ac_var_stripped $word1" + fi + done + tmp_CPPFLAGS="$ac_var_stripped" + squeeze tmp_CPPFLAGS + + # + if test "$want_debug" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug enabling options" >&5 +$as_echo_n "checking if compiler accepts debug enabling options... " >&6; } + tmp_options="$flags_dbg_yes" + fi + if test "$want_debug" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts debug disabling options" >&5 +$as_echo_n "checking if compiler accepts debug disabling options... " >&6; } + tmp_options="$flags_dbg_off" + fi + # + if test "$flags_prefer_cppflags" = "yes"; then + CPPFLAGS="$tmp_CPPFLAGS $tmp_options" + CFLAGS="$tmp_CFLAGS" + else + CPPFLAGS="$tmp_CPPFLAGS" + CFLAGS="$tmp_CFLAGS $tmp_options" + fi + squeeze CPPFLAGS + squeeze CFLAGS + + tmp_compiler_works="unknown" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/cc-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tmp_compiler_works" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/link-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "x$cross_compiling" != "xyes" && + test "$tmp_compiler_works" = "yes"; then + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# ifdef __STDC__ +# include +# endif + +int main (void) +{ + + int i = 0; + exit(i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tmp_compiler_works="yes" + +else + tmp_compiler_works="no" + echo " " >&6 + echo "run-fail: test program exited with status $ac_status" >&6 + echo " " >&6 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + if test "$tmp_compiler_works" = "yes"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_options" >&5 +$as_echo "$as_me: compiler options added: $tmp_options" >&6;} + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_options" >&5 +$as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} + CPPFLAGS="$tmp_save_CPPFLAGS" + CFLAGS="$tmp_save_CFLAGS" + + fi + + # + fi + + + # + if test "$compiler_id" != "unknown"; then + # + tmp_save_CFLAGS="$CFLAGS" + tmp_save_CPPFLAGS="$CPPFLAGS" + # + tmp_options="" + tmp_CFLAGS="$CFLAGS" + tmp_CPPFLAGS="$CPPFLAGS" + honor_optimize_option="yes" + # + # + if test "$want_optimize" = "assume_no" || + test "$want_optimize" = "assume_yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler optimizer assumed setting might be used" >&5 +$as_echo_n "checking if compiler optimizer assumed setting might be used... " >&6; } + + + ac_var_match_word="no" + for word1 in $tmp_CFLAGS; do + for word2 in $flags_opt_all; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "yes"; then + + honor_optimize_option="no" + + + fi + + + + ac_var_match_word="no" + for word1 in $tmp_CPPFLAGS; do + for word2 in $flags_opt_all; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "yes"; then + + honor_optimize_option="no" + + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $honor_optimize_option" >&5 +$as_echo "$honor_optimize_option" >&6; } + if test "$honor_optimize_option" = "yes"; then + if test "$want_optimize" = "assume_yes"; then + want_optimize="yes" + fi + if test "$want_optimize" = "assume_no"; then + want_optimize="no" + fi + fi + fi + # + if test "$honor_optimize_option" = "yes"; then + + ac_var_stripped="" + for word1 in $tmp_CFLAGS; do + ac_var_strip_word="no" + for word2 in $flags_opt_all; do + if test "$word1" = "$word2"; then + ac_var_strip_word="yes" + fi + done + if test "$ac_var_strip_word" = "no"; then + ac_var_stripped="$ac_var_stripped $word1" + fi + done + tmp_CFLAGS="$ac_var_stripped" + squeeze tmp_CFLAGS + + + ac_var_stripped="" + for word1 in $tmp_CPPFLAGS; do + ac_var_strip_word="no" + for word2 in $flags_opt_all; do + if test "$word1" = "$word2"; then + ac_var_strip_word="yes" + fi + done + if test "$ac_var_strip_word" = "no"; then + ac_var_stripped="$ac_var_stripped $word1" + fi + done + tmp_CPPFLAGS="$ac_var_stripped" + squeeze tmp_CPPFLAGS + + if test "$want_optimize" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer enabling options" >&5 +$as_echo_n "checking if compiler accepts optimizer enabling options... " >&6; } + tmp_options="$flags_opt_yes" + fi + if test "$want_optimize" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer disabling options" >&5 +$as_echo_n "checking if compiler accepts optimizer disabling options... " >&6; } + tmp_options="$flags_opt_off" + fi + if test "$flags_prefer_cppflags" = "yes"; then + CPPFLAGS="$tmp_CPPFLAGS $tmp_options" + CFLAGS="$tmp_CFLAGS" + else + CPPFLAGS="$tmp_CPPFLAGS" + CFLAGS="$tmp_CFLAGS $tmp_options" + fi + squeeze CPPFLAGS + squeeze CFLAGS + + tmp_compiler_works="unknown" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/cc-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tmp_compiler_works" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/link-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "x$cross_compiling" != "xyes" && + test "$tmp_compiler_works" = "yes"; then + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# ifdef __STDC__ +# include +# endif + +int main (void) +{ + + int i = 0; + exit(i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tmp_compiler_works="yes" + +else + tmp_compiler_works="no" + echo " " >&6 + echo "run-fail: test program exited with status $ac_status" >&6 + echo " " >&6 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + if test "$tmp_compiler_works" = "yes"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_options" >&5 +$as_echo "$as_me: compiler options added: $tmp_options" >&6;} + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_options" >&5 +$as_echo "$as_me: WARNING: compiler options rejected: $tmp_options" >&2;} + CPPFLAGS="$tmp_save_CPPFLAGS" + CFLAGS="$tmp_save_CFLAGS" + + fi + + fi + # + fi + + + # + if test "$compiler_id" != "unknown"; then + # + tmp_save_CPPFLAGS="$CPPFLAGS" + tmp_save_CFLAGS="$CFLAGS" + tmp_CPPFLAGS="" + tmp_CFLAGS="" + # + case "$compiler_id" in + # + CLANG) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -pedantic" + + ac_var_added_warnings="" + for warning in all extra; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in pointer-arith write-strings; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in shadow; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in inline nested-externs; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in missing-declarations; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in missing-prototypes; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long" + + ac_var_added_warnings="" + for warning in float-equal; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in no-multichar sign-compare; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in undef; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral" + + ac_var_added_warnings="" + for warning in endif-labels strict-prototypes; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in declaration-after-statement; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in cast-align; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers" + + ac_var_added_warnings="" + for warning in shorten-64-to-32; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + # + if test "$compiler_num" -ge "101"; then + + ac_var_added_warnings="" + for warning in unused; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "208"; then + + ac_var_added_warnings="" + for warning in vla; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "209"; then + + ac_var_added_warnings="" + for warning in shift-sign-overflow; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "302"; then + case $host_os in + cygwin* | mingw*) + ;; + *) + + ac_var_added_warnings="" + for warning in missing-variable-declarations; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + ;; + esac + fi + # + if test "$compiler_num" -ge "306"; then + + ac_var_added_warnings="" + for warning in double-promotion; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "309"; then + + ac_var_added_warnings="" + for warning in comma; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + # avoid the varargs warning, fixed in 4.0 + # https://bugs.llvm.org/show_bug.cgi?id=29140 + if test "$compiler_num" -lt "400"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs" + fi + fi + if test "$compiler_num" -ge "700"; then + + ac_var_added_warnings="" + for warning in assign-enum; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + fi + ;; + # + DEC_C) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -msg_enable level3" + fi + ;; + # + GNU_C) + # + if test "$want_warnings" = "yes"; then + # + if test "x$cross_compiling" != "xyes" || + test "$compiler_num" -ge "300"; then + tmp_CFLAGS="$tmp_CFLAGS -pedantic" + fi + # + + ac_var_added_warnings="" + for warning in all; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -W" + # + if test "$compiler_num" -ge "104"; then + + ac_var_added_warnings="" + for warning in pointer-arith write-strings; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + if test "x$cross_compiling" != "xyes" || + test "$compiler_num" -ge "300"; then + + ac_var_added_warnings="" + for warning in unused shadow; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + fi + # + if test "$compiler_num" -ge "207"; then + + ac_var_added_warnings="" + for warning in inline nested-externs; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + if test "x$cross_compiling" != "xyes" || + test "$compiler_num" -ge "300"; then + + ac_var_added_warnings="" + for warning in missing-declarations; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in missing-prototypes; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + fi + # + if test "$compiler_num" -ge "295"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long" + + ac_var_added_warnings="" + for warning in bad-function-cast; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "296"; then + + ac_var_added_warnings="" + for warning in float-equal; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar" + + ac_var_added_warnings="" + for warning in sign-compare; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in undef; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "297"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-format-nonliteral" + fi + # + if test "$compiler_num" -ge "300"; then + tmp_CFLAGS="$tmp_CFLAGS" + fi + # + if test "$compiler_num" -ge "303"; then + + ac_var_added_warnings="" + for warning in endif-labels strict-prototypes; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "304"; then + + ac_var_added_warnings="" + for warning in declaration-after-statement; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in old-style-definition; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "400"; then + tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3" + fi + # + if test "$compiler_num" -ge "402"; then + + ac_var_added_warnings="" + for warning in cast-align; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "403"; then + + ac_var_added_warnings="" + for warning in type-limits old-style-declaration; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in missing-parameter-type empty-body; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in clobbered ignored-qualifiers; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in conversion; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion" + + ac_var_added_warnings="" + for warning in vla; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp" + fi + # + if test "$compiler_num" -ge "405"; then + if test "$curl_cv_have_def__WIN32" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format" + fi + fi + # + if test "$compiler_num" -ge "406"; then + + ac_var_added_warnings="" + for warning in double-promotion; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "408"; then + tmp_CFLAGS="$tmp_CFLAGS -Wformat=2" + fi + # + if test "$compiler_num" -ge "500"; then + tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2" + fi + # + if test "$compiler_num" -ge "600"; then + + ac_var_added_warnings="" + for warning in shift-negative-value; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2" + + ac_var_added_warnings="" + for warning in null-dereference; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -fdelete-null-pointer-checks" + + ac_var_added_warnings="" + for warning in duplicated-cond; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in unused-const-variable; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + # + if test "$compiler_num" -ge "700"; then + + ac_var_added_warnings="" + for warning in duplicated-branches; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in restrict; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in alloc-zero; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2" + tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2" + tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4" + fi + # + fi + # + if test "$compiler_num" -ge "300"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers" + else + if test "x$cross_compiling" = "xyes"; then + if test "$compiler_num" -ge "104"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow" + fi + if test "$compiler_num" -ge "207"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations" + tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes" + fi + fi + fi + if test "$compiler_num" -ge "1000"; then + + ac_var_added_warnings="" + for warning in enum-conversion; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + ;; + # + HP_UX_C) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS +w1" + fi + ;; + # + IBM_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + INTEL_UNIX_C) + # + if test "$want_warnings" = "yes"; then + if test "$compiler_num" -gt "600"; then + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wall -w2" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcheck" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wcomment" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wdeprecated" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wmissing-prototypes" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wuninitialized" + tmp_CPPFLAGS="$tmp_CPPFLAGS -Wunused-function" + fi + fi + tmp_CFLAGS="$tmp_CFLAGS -fno-omit-frame-pointer" + tmp_CFLAGS="$tmp_CFLAGS -fno-strict-aliasing" + tmp_CFLAGS="$tmp_CFLAGS -fp-model precise" + ;; + # + INTEL_WINDOWS_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + LCC) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS" + fi + ;; + # + SGI_MIPS_C) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -fullwarn" + fi + ;; + # + SGI_MIPSPRO_C) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -fullwarn" + tmp_CFLAGS="$tmp_CFLAGS -woff 1209" + fi + ;; + # + SUNPRO_C) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -v" + fi + ;; + # + TINY_C) + # + if test "$want_warnings" = "yes"; then + + ac_var_added_warnings="" + for warning in all; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in write-strings; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + + ac_var_added_warnings="" + for warning in unsupported; do + + ac_var_match_word="no" + for word1 in $CFLAGS; do + for word2 in -Wno-$warning -W$warning; do + if test "$word1" = "$word2"; then + ac_var_match_word="yes" + fi + done + done + + if test "$ac_var_match_word" = "no"; then + ac_var_added_warnings="$ac_var_added_warnings -W$warning" + fi + done + tmp_CFLAGS="$tmp_CFLAGS $ac_var_added_warnings" + squeeze tmp_CFLAGS + + fi + ;; + # + WATCOM_UNIX_C) + # + if test "$want_warnings" = "yes"; then + tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra" + fi + ;; + # + WATCOM_WINDOWS_C) + # + tmp_CFLAGS="$tmp_CFLAGS" + ;; + # + esac + # + squeeze tmp_CPPFLAGS + squeeze tmp_CFLAGS + # + if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts strict warning options" >&5 +$as_echo_n "checking if compiler accepts strict warning options... " >&6; } + CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS" + CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS" + squeeze CPPFLAGS + squeeze CFLAGS + + tmp_compiler_works="unknown" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/cc-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tmp_compiler_works" = "yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + int i = 1; + return i; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_compiler_works="yes" + +else + + tmp_compiler_works="no" + echo " " >&6 + sed 's/^/link-fail: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "x$cross_compiling" != "xyes" && + test "$tmp_compiler_works" = "yes"; then + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# ifdef __STDC__ +# include +# endif + +int main (void) +{ + + int i = 0; + exit(i); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + tmp_compiler_works="yes" + +else + tmp_compiler_works="no" + echo " " >&6 + echo "run-fail: test program exited with status $ac_status" >&6 + echo " " >&6 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + if test "$tmp_compiler_works" = "yes"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&5 +$as_echo "$as_me: compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS" >&6;} + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&5 +$as_echo "$as_me: WARNING: compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS" >&2;} + CPPFLAGS="$tmp_save_CPPFLAGS" + CFLAGS="$tmp_save_CFLAGS" + + fi + + fi + # + fi + + +if test "$compiler_id" = "INTEL_UNIX_C"; then + # + if test "$compiler_num" -ge "1000"; then + CFLAGS="$CFLAGS -shared-intel" + elif test "$compiler_num" -ge "900"; then + CFLAGS="$CFLAGS -i-dynamic" + fi + # +fi + +CURL_CFLAG_EXTRAS="" +if test X"$want_werror" = Xyes; then + CURL_CFLAG_EXTRAS="-Werror" + if test "$compiler_id" = "GNU_C"; then + if test "$compiler_num" -ge "500"; then + CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors" + fi + fi +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on compilation errors" >&5 +$as_echo_n "checking if compiler halts on compilation errors... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + force compilation error + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "compiler does not halt on compilation errors." "$LINENO" 5 + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on negative sized arrays" >&5 +$as_echo_n "checking if compiler halts on negative sized arrays... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ]; + +int main (void) +{ + + bad_t dummy; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "compiler does not halt on negative sized arrays." "$LINENO" 5 + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler halts on function prototype mismatch" >&5 +$as_echo_n "checking if compiler halts on function prototype mismatch... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# include + int rand(int n); + int rand(int n) + { + if(n) + return ++n; + else + return n; + } + +int main (void) +{ + + int i[2]={0,0}; + int j = rand(i[0]); + if(j) + return j; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "compiler does not halt on function prototype mismatch." "$LINENO" 5 + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports hiding library internal symbols" >&5 +$as_echo_n "checking if compiler supports hiding library internal symbols... " >&6; } + supports_symbol_hiding="no" + symbol_hiding_CFLAGS="" + symbol_hiding_EXTERN="" + tmp_CFLAGS="" + tmp_EXTERN="" + case "$compiler_id" in + CLANG) + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" + tmp_CFLAGS="-fvisibility=hidden" + supports_symbol_hiding="yes" + ;; + GNU_C) + if test "$compiler_num" -ge "304"; then + if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null ; then + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" + tmp_CFLAGS="-fvisibility=hidden" + supports_symbol_hiding="yes" + fi + fi + ;; + INTEL_UNIX_C) + if test "$compiler_num" -ge "900"; then + if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# include + +int main (void) +{ + + printf("icc fvisibility bug test"); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))" + tmp_CFLAGS="-fvisibility=hidden" + supports_symbol_hiding="yes" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" + fi + fi + ;; + SUNPRO_C) + if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then + tmp_EXTERN="__global" + tmp_CFLAGS="-xldscope=hidden" + supports_symbol_hiding="yes" + fi + ;; + esac + if test "$supports_symbol_hiding" = "yes"; then + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS" + squeeze CFLAGS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $tmp_EXTERN char *dummy(char *buff); + char *dummy(char *buff) + { + if(buff) + return ++buff; + else + return buff; + } + +int main (void) +{ + + char b[16]; + char *r = dummy(&b[0]); + if(r) + return (int)*r; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + supports_symbol_hiding="yes" + if test -f conftest.err; then + grep 'visibility' conftest.err >/dev/null + if test "$?" -eq "0"; then + supports_symbol_hiding="no" + fi + fi + +else + + supports_symbol_hiding="no" + echo " " >&6 + sed 's/^/cc-src: /' conftest.$ac_ext >&6 + sed 's/^/cc-err: /' conftest.err >&6 + echo " " >&6 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$tmp_save_CFLAGS" + fi + if test "$supports_symbol_hiding" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + symbol_hiding_CFLAGS="$tmp_CFLAGS" + symbol_hiding_EXTERN="$tmp_EXTERN" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + + supports_curldebug="unknown" + if test "$want_curldebug" = "yes"; then + if test "x$enable_shared" != "xno" && + test "x$enable_shared" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown enable_shared setting." >&5 +$as_echo "$as_me: WARNING: unknown enable_shared setting." >&2;} + supports_curldebug="no" + fi + if test "x$enable_static" != "xno" && + test "x$enable_static" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown enable_static setting." >&5 +$as_echo "$as_me: WARNING: unknown enable_static setting." >&2;} + supports_curldebug="no" + fi + if test "$supports_curldebug" != "no"; then + if test "$enable_shared" = "yes" && + test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then + supports_curldebug="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: shared library does not support undefined symbols." >&5 +$as_echo "$as_me: WARNING: shared library does not support undefined symbols." >&2;} + fi + fi + fi + # + if test "$want_curldebug" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if curl debug memory tracking can be enabled" >&5 +$as_echo_n "checking if curl debug memory tracking can be enabled... " >&6; } + test "$supports_curldebug" = "no" || supports_curldebug="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports_curldebug" >&5 +$as_echo "$supports_curldebug" >&6; } + if test "$supports_curldebug" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable curl debug memory tracking." >&5 +$as_echo "$as_me: WARNING: cannot enable curl debug memory tracking." >&2;} + want_curldebug="no" + fi + fi + + if test x$want_curldebug = xyes; then + CURLDEBUG_TRUE= + CURLDEBUG_FALSE='#' +else + CURLDEBUG_TRUE='#' + CURLDEBUG_FALSE= +fi + + +supports_unittests=yes +# cross-compilation of unit tests static library/programs fails when +# libcurl shared library is built. This might be due to a libtool or +# automake issue. In this case we disable unit tests. +if test "x$cross_compiling" != "xno" && + test "x$enable_shared" != "xno"; then + supports_unittests=no +fi + +# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to +# a problem related with OpenSSL headers and library versions not matching. +# Disable unit tests while time to further investigate this is found. +case $host in + mips-sgi-irix6.5) + if test "$compiler_id" = "GNU_C"; then + supports_unittests=no + fi + ;; +esac + +# All AIX autobuilds fails unit tests linking against unittests library +# due to unittests library being built with no symbols or members. Libtool ? +# Disable unit tests while time to further investigate this is found. +case $host_os in + aix*) + supports_unittests=no + ;; +esac + +if test "x$want_debug" = "xyes" && + test "x$supports_unittests" = "xyes"; then + want_unittests=yes +else + want_unittests=no +fi + if test x$want_unittests = xyes; then + BUILD_UNITTESTS_TRUE= + BUILD_UNITTESTS_FALSE='#' +else + BUILD_UNITTESTS_TRUE='#' + BUILD_UNITTESTS_FALSE= +fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5 +$as_echo_n "checking for windows.h... " >&6; } +if ${curl_cv_header_windows_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINDOWS_H shall not be defined. +#else + int dummy=2*WINVER; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_windows_h="yes" + +else + + curl_cv_header_windows_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5 +$as_echo "$curl_cv_header_windows_h" >&6; } + case "$curl_cv_header_windows_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target is a native Windows one" >&5 +$as_echo_n "checking whether build target is a native Windows one... " >&6; } +if ${curl_cv_native_windows+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$curl_cv_header_windows_h" = "no"; then + curl_cv_native_windows="no" + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#if defined(__MINGW32__) || defined(__MINGW32CE__) || \ + (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64))) + int dummy=1; +#else + Not a native Windows build target. +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_native_windows="yes" + +else + + curl_cv_native_windows="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_native_windows" >&5 +$as_echo "$curl_cv_native_windows" >&6; } + if test "x$curl_cv_native_windows" = xyes; then + DOING_NATIVE_WINDOWS_TRUE= + DOING_NATIVE_WINDOWS_FALSE='#' +else + DOING_NATIVE_WINDOWS_TRUE='#' + DOING_NATIVE_WINDOWS_FALSE= +fi + + +case X-"$curl_cv_native_windows" in + X-yes) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5 +$as_echo_n "checking for winsock.h... " >&6; } +if ${curl_cv_header_winsock_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINSOCK_H shall not be defined. +#else + int dummy=WSACleanup(); +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winsock_h="yes" + +else + + curl_cv_header_winsock_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock_h" >&5 +$as_echo "$curl_cv_header_winsock_h" >&6; } + case "$curl_cv_header_winsock_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5 +$as_echo_n "checking for winsock2.h... " >&6; } +if ${curl_cv_header_winsock2_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WINSOCK2_H shall not be defined. +#else + int dummy=2*IPPROTO_ESP; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winsock2_h="yes" + +else + + curl_cv_header_winsock2_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5 +$as_echo "$curl_cv_header_winsock2_h" >&6; } + case "$curl_cv_header_winsock2_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5 +$as_echo_n "checking for ws2tcpip.h... " >&6; } +if ${curl_cv_header_ws2tcpip_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WS2TCPIP_H shall not be defined. +#else + int dummy=2*IP_PKTINFO; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_ws2tcpip_h="yes" + +else + + curl_cv_header_ws2tcpip_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ws2tcpip_h" >&5 +$as_echo "$curl_cv_header_ws2tcpip_h" >&6; } + case "$curl_cv_header_ws2tcpip_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winldap.h" >&5 +$as_echo_n "checking for winldap.h... " >&6; } +if ${curl_cv_header_winldap_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#endif +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINLDAP_H shall not be defined. +#else + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + ULONG res = ldap_unbind(ldp); +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winldap_h="yes" + +else + + curl_cv_header_winldap_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winldap_h" >&5 +$as_echo "$curl_cv_header_winldap_h" >&6; } + case "$curl_cv_header_winldap_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINLDAP_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winber.h" >&5 +$as_echo_n "checking for winber.h... " >&6; } +if ${curl_cv_header_winber_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#endif +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINBER_H shall not be defined. +#else + BERVAL *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winber_h="yes" + +else + + curl_cv_header_winber_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winber_h" >&5 +$as_echo "$curl_cv_header_winber_h" >&6; } + case "$curl_cv_header_winber_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINBER_H 1 +_ACEOF + + ;; + esac + + ;; + *) + curl_cv_header_winsock_h="no" + curl_cv_header_winsock2_h="no" + curl_cv_header_ws2tcpip_h="no" + curl_cv_header_winldap_h="no" + curl_cv_header_winber_h="no" + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build target supports WIN32 file API" >&5 +$as_echo_n "checking whether build target supports WIN32 file API... " >&6; } + curl_win32_file_api="no" + if test "$curl_cv_header_windows_h" = "yes"; then + if test x"$enable_largefile" != "xno"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#if !defined(_WIN32_WCE) && \ + (defined(__MINGW32__) || \ + (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)))) + int dummy=1; +#else + WIN32 large file API not supported. +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_win32_file_api="win32_large_files" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$curl_win32_file_api" = "no"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#if defined(_WIN32_WCE) || defined(__MINGW32__) || defined(_MSC_VER) + int dummy=1; +#else + WIN32 small file API not supported. +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_win32_file_api="win32_small_files" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + fi + case "$curl_win32_file_api" in + win32_large_files) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (large file enabled)" >&5 +$as_echo "yes (large file enabled)" >&6; } + +cat >>confdefs.h <<_ACEOF +#define USE_WIN32_LARGE_FILES 1 +_ACEOF + + ;; + win32_small_files) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (large file disabled)" >&5 +$as_echo "yes (large file disabled)" >&6; } + +cat >>confdefs.h <<_ACEOF +#define USE_WIN32_SMALL_FILES 1 +_ACEOF + + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac + + + + + tst_cflags="no" + case $host_os in + darwin*) + tst_cflags="yes" + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good-to-use Mac CFLAGS" >&5 +$as_echo_n "checking for good-to-use Mac CFLAGS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_cflags" >&5 +$as_echo "$tst_cflags" >&6; }; + + if test "$tst_cflags" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for *version-min in CFLAGS" >&5 +$as_echo_n "checking for *version-min in CFLAGS... " >&6; } + min="" + if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then + min="-mmacosx-version-min=10.8" + CFLAGS="$CFLAGS $min" + fi + if test -z "$min"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: set by user" >&5 +$as_echo "set by user" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $min set" >&5 +$as_echo "$min set" >&6; } + fi + + old_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror=partial-availability" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Werror=partial-availability" >&5 +$as_echo_n "checking whether $CC accepts -Werror=partial-availability... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS=$old_CFLAGS +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if the compiler supports __builtin_available()" >&5 +$as_echo_n "checking to see if the compiler supports __builtin_available()... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + if (__builtin_available(macOS 10.8, iOS 5.0, *)) {} + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_BUILTIN_AVAILABLE 1 +_ACEOF + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support http" >&5 +$as_echo_n "checking whether to support http... " >&6; } +# Check whether --enable-http was given. +if test "${enable_http+set}" = set; then : + enableval=$enable_http; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_HTTP 1" >>confdefs.h + + disable_http="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disable HTTP disables FTP over proxy and RTSP" >&5 +$as_echo "$as_me: WARNING: disable HTTP disables FTP over proxy and RTSP" >&2;} + CURL_DISABLE_HTTP=1 + + +$as_echo "#define CURL_DISABLE_RTSP 1" >>confdefs.h + + CURL_DISABLE_RTSP=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support ftp" >&5 +$as_echo_n "checking whether to support ftp... " >&6; } +# Check whether --enable-ftp was given. +if test "${enable_ftp+set}" = set; then : + enableval=$enable_ftp; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_FTP 1" >>confdefs.h + + CURL_DISABLE_FTP=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support file" >&5 +$as_echo_n "checking whether to support file... " >&6; } +# Check whether --enable-file was given. +if test "${enable_file+set}" = set; then : + enableval=$enable_file; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_FILE 1" >>confdefs.h + + CURL_DISABLE_FILE=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support ldap" >&5 +$as_echo_n "checking whether to support ldap... " >&6; } +# Check whether --enable-ldap was given. +if test "${enable_ldap+set}" = set; then : + enableval=$enable_ldap; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h + + CURL_DISABLE_LDAP=1 + + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support ldaps" >&5 +$as_echo_n "checking whether to support ldaps... " >&6; } +# Check whether --enable-ldaps was given. +if test "${enable_ldaps+set}" = set; then : + enableval=$enable_ldaps; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h + + CURL_DISABLE_LDAPS=1 + + ;; + *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: LDAP needs to be enabled to support LDAPS" >&5 +$as_echo "LDAP needs to be enabled to support LDAPS" >&6; } + +$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h + + CURL_DISABLE_LDAPS=1 + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LDAP_SSL 1" >>confdefs.h + + HAVE_LDAP_SSL=1 + + fi + ;; + esac +else + + if test "x$CURL_DISABLE_LDAP" = "x1" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h + + CURL_DISABLE_LDAPS=1 + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LDAP_SSL 1" >>confdefs.h + + HAVE_LDAP_SSL=1 + + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support rtsp" >&5 +$as_echo_n "checking whether to support rtsp... " >&6; } +# Check whether --enable-rtsp was given. +if test "${enable_rtsp+set}" = set; then : + enableval=$enable_rtsp; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_RTSP 1" >>confdefs.h + + CURL_DISABLE_RTSP=1 + + ;; + *) if test x$CURL_DISABLE_HTTP = x1 ; then + as_fn_error $? "HTTP support needs to be enabled in order to enable RTSP support!" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_rtsp_msg="enabled" + fi + ;; + esac +else + if test "x$CURL_DISABLE_HTTP" != "x1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_rtsp_msg="enabled" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support proxies" >&5 +$as_echo_n "checking whether to support proxies... " >&6; } +# Check whether --enable-proxy was given. +if test "${enable_proxy+set}" = set; then : + enableval=$enable_proxy; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_PROXY 1" >>confdefs.h + + CURL_DISABLE_PROXY=1 + + https_proxy="no" + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support dict" >&5 +$as_echo_n "checking whether to support dict... " >&6; } +# Check whether --enable-dict was given. +if test "${enable_dict+set}" = set; then : + enableval=$enable_dict; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_DICT 1" >>confdefs.h + + CURL_DISABLE_DICT=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support telnet" >&5 +$as_echo_n "checking whether to support telnet... " >&6; } +# Check whether --enable-telnet was given. +if test "${enable_telnet+set}" = set; then : + enableval=$enable_telnet; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_TELNET 1" >>confdefs.h + + CURL_DISABLE_TELNET=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support tftp" >&5 +$as_echo_n "checking whether to support tftp... " >&6; } +# Check whether --enable-tftp was given. +if test "${enable_tftp+set}" = set; then : + enableval=$enable_tftp; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_TFTP 1" >>confdefs.h + + CURL_DISABLE_TFTP=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support pop3" >&5 +$as_echo_n "checking whether to support pop3... " >&6; } +# Check whether --enable-pop3 was given. +if test "${enable_pop3+set}" = set; then : + enableval=$enable_pop3; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_POP3 1" >>confdefs.h + + CURL_DISABLE_POP3=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support imap" >&5 +$as_echo_n "checking whether to support imap... " >&6; } +# Check whether --enable-imap was given. +if test "${enable_imap+set}" = set; then : + enableval=$enable_imap; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_IMAP 1" >>confdefs.h + + CURL_DISABLE_IMAP=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support smb" >&5 +$as_echo_n "checking whether to support smb... " >&6; } +# Check whether --enable-smb was given. +if test "${enable_smb+set}" = set; then : + enableval=$enable_smb; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_SMB 1" >>confdefs.h + + CURL_DISABLE_SMB=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support smtp" >&5 +$as_echo_n "checking whether to support smtp... " >&6; } +# Check whether --enable-smtp was given. +if test "${enable_smtp+set}" = set; then : + enableval=$enable_smtp; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_SMTP 1" >>confdefs.h + + CURL_DISABLE_SMTP=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support gopher" >&5 +$as_echo_n "checking whether to support gopher... " >&6; } +# Check whether --enable-gopher was given. +if test "${enable_gopher+set}" = set; then : + enableval=$enable_gopher; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_GOPHER 1" >>confdefs.h + + CURL_DISABLE_GOPHER=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support mqtt" >&5 +$as_echo_n "checking whether to support mqtt... " >&6; } +# Check whether --enable-mqtt was given. +if test "${enable_mqtt+set}" = set; then : + enableval=$enable_mqtt; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_MQTT 1" >>confdefs.h + + CURL_DISABLE_MQTT=1 + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to provide built-in manual" >&5 +$as_echo_n "checking whether to provide built-in manual... " >&6; } +# Check whether --enable-manual was given. +if test "${enable_manual+set}" = set; then : + enableval=$enable_manual; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + USE_MANUAL="1" + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + USE_MANUAL="1" + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable generation of C code" >&5 +$as_echo_n "checking whether to enable generation of C code... " >&6; } +# Check whether --enable-libcurl_option was given. +if test "${enable_libcurl_option+set}" = set; then : + enableval=$enable_libcurl_option; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_LIBCURL_OPTION 1" >>confdefs.h + + curl_libcurl_msg="no" + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libgcc" >&5 +$as_echo_n "checking whether to use libgcc... " >&6; } +# Check whether --enable-libgcc was given. +if test "${enable_libgcc+set}" = set; then : + enableval=$enable_libgcc; case "$enableval" in + yes) + LIBS="-lgcc $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X/Open network library is required" >&5 +$as_echo_n "checking if X/Open network library is required... " >&6; } + tst_lib_xnet_required="no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int main (void) +{ +#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600) + return 0; +#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) + return 0; +#else + force compilation error +#endif +} + + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_lib_xnet_required="yes" + LIBS="-lxnet $LIBS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_lib_xnet_required" >&5 +$as_echo "$tst_lib_xnet_required" >&6; } + + +ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes; then : + HAVE_GETHOSTBYNAME="1" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_gethostbyname=yes +else + ac_cv_lib_nsl_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : + HAVE_GETHOSTBYNAME="1" + LIBS="-lnsl $LIBS" + +fi + + +fi + + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5 +$as_echo_n "checking for gethostbyname in -lsocket... " >&6; } +if ${ac_cv_lib_socket_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_gethostbyname=yes +else + ac_cv_lib_socket_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5 +$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; } +if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then : + HAVE_GETHOSTBYNAME="1" + LIBS="-lsocket $LIBS" + +fi + +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lwatt" >&5 +$as_echo_n "checking for gethostbyname in -lwatt... " >&6; } +if ${ac_cv_lib_watt_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwatt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_watt_gethostbyname=yes +else + ac_cv_lib_watt_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_watt_gethostbyname" >&5 +$as_echo "$ac_cv_lib_watt_gethostbyname" >&6; } +if test "x$ac_cv_lib_watt_gethostbyname" = xyes; then : + HAVE_GETHOSTBYNAME="1" + CPPFLAGS="-I/dev/env/WATT_ROOT/inc" + LDFLAGS="-L/dev/env/WATT_ROOT/lib" + LIBS="-lwatt $LIBS" + +fi + +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname with both nsl and socket libs" >&5 +$as_echo_n "checking for gethostbyname with both nsl and socket libs... " >&6; } + my_ac_save_LIBS=$LIBS + LIBS="-lnsl -lsocket $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + gethostbyname(); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GETHOSTBYNAME="1" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBS=$my_ac_save_LIBS + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + if test "$curl_cv_header_windows_h" = "yes"; then + if test "$curl_cv_header_winsock_h" = "yes"; then + case $host in + *-*-mingw32ce*) + winsock_LIB="-lwinsock" + ;; + *) + winsock_LIB="-lwsock32" + ;; + esac + fi + if test "$curl_cv_header_winsock2_h" = "yes"; then + winsock_LIB="-lws2_32" + fi + if test ! -z "$winsock_LIB"; then + my_ac_save_LIBS=$LIBS + LIBS="$winsock_LIB $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in $winsock_LIB" >&5 +$as_echo_n "checking for gethostbyname in $winsock_LIB... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif + +int main (void) +{ + + gethostbyname("www.dummysite.com"); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GETHOSTBYNAME="1" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + winsock_LIB="" + LIBS=$my_ac_save_LIBS + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + fi +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for Minix 3" >&5 +$as_echo_n "checking for gethostbyname for Minix 3... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +/* Older Minix versions may need here instead */ +#include + +int main (void) +{ + + gethostbyname("www.dummysite.com"); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GETHOSTBYNAME="1" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for eCos" >&5 +$as_echo_n "checking for gethostbyname for eCos... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +#include + +int main (void) +{ + + gethostbyname("www.dummysite.com"); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GETHOSTBYNAME="1" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname for AmigaOS bsdsocket.library" >&5 +$as_echo_n "checking for gethostbyname for AmigaOS bsdsocket.library... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +struct Library *SocketBase = NULL; + +int main (void) +{ + + gethostbyname("www.dummysite.com"); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_GETHOSTBYNAME="1" + HAVE_PROTO_BSDSOCKET_H="1" + +$as_echo "#define HAVE_PROTO_BSDSOCKET_H 1" >>confdefs.h + + HAVE_PROTO_BSDSOCKET_H=1 + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnetwork" >&5 +$as_echo_n "checking for gethostbyname in -lnetwork... " >&6; } +if ${ac_cv_lib_network_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_network_gethostbyname=yes +else + ac_cv_lib_network_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_gethostbyname" >&5 +$as_echo "$ac_cv_lib_network_gethostbyname" >&6; } +if test "x$ac_cv_lib_network_gethostbyname" = xyes; then : + HAVE_GETHOSTBYNAME="1" + LIBS="-lnetwork $LIBS" + +fi + +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnet" >&5 +$as_echo_n "checking for gethostbyname in -lnet... " >&6; } +if ${ac_cv_lib_net_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnet $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int main (void) +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_net_gethostbyname=yes +else + ac_cv_lib_net_gethostbyname=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_gethostbyname" >&5 +$as_echo "$ac_cv_lib_net_gethostbyname" >&6; } +if test "x$ac_cv_lib_net_gethostbyname" = xyes; then : + HAVE_GETHOSTBYNAME="1" + LIBS="-lnet $LIBS" + +fi + +fi + + +if test "$HAVE_GETHOSTBYNAME" != "1"; then + as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5 +fi + + +curl_includes_winsock2="\ +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +#endif +/* includes end */" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5 +$as_echo_n "checking for windows.h... " >&6; } +if ${curl_cv_header_windows_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINDOWS_H shall not be defined. +#else + int dummy=2*WINVER; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_windows_h="yes" + +else + + curl_cv_header_windows_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5 +$as_echo "$curl_cv_header_windows_h" >&6; } + case "$curl_cv_header_windows_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock.h" >&5 +$as_echo_n "checking for winsock.h... " >&6; } +if ${curl_cv_header_winsock_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINSOCK_H shall not be defined. +#else + int dummy=WSACleanup(); +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winsock_h="yes" + +else + + curl_cv_header_winsock_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock_h" >&5 +$as_echo "$curl_cv_header_winsock_h" >&6; } + case "$curl_cv_header_winsock_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5 +$as_echo_n "checking for winsock2.h... " >&6; } +if ${curl_cv_header_winsock2_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WINSOCK2_H shall not be defined. +#else + int dummy=2*IPPROTO_ESP; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winsock2_h="yes" + +else + + curl_cv_header_winsock2_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5 +$as_echo "$curl_cv_header_winsock2_h" >&6; } + case "$curl_cv_header_winsock2_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + + ;; + esac + + + +curl_includes_bsdsocket="\ +/* includes start */ +#ifdef HAVE_PROTO_BSDSOCKET_H +# include + struct Library *SocketBase = NULL; +#endif +/* includes end */" + for ac_header in proto/bsdsocket.h +do : + ac_fn_c_check_header_compile "$LINENO" "proto/bsdsocket.h" "ac_cv_header_proto_bsdsocket_h" " $curl_includes_bsdsocket +" +if test "x$ac_cv_header_proto_bsdsocket_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PROTO_BSDSOCKET_H 1 +_ACEOF + +fi + +done + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in libraries" >&5 +$as_echo_n "checking for connect in libraries... " >&6; } + tst_connect_save_LIBS="$LIBS" + tst_connect_need_LIBS="unknown" + for tst_lib in '' '-lsocket' ; do + if test "$tst_connect_need_LIBS" = "unknown"; then + LIBS="$tst_lib $tst_connect_save_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + #if !defined(HAVE_WINDOWS_H) && !defined(HAVE_PROTO_BSDSOCKET_H) + int connect(int, void*, int); + #endif + +int main (void) +{ + + if(0 != connect(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_connect_need_LIBS="$tst_lib" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + done + LIBS="$tst_connect_save_LIBS" + # + case X-"$tst_connect_need_LIBS" in + X-unknown) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find connect" >&5 +$as_echo "cannot find connect" >&6; } + as_fn_error $? "cannot find connect function in libraries." "$LINENO" 5 + ;; + X-) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_connect_need_LIBS" >&5 +$as_echo "$tst_connect_need_LIBS" >&6; } + LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS" + ;; + esac + + +CURL_NETWORK_LIBS=$LIBS + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int main (void) +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + + + for ac_header in sys/types.h sys/time.h time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clock_gettime" >&5 +$as_echo_n "checking for monotonic clock_gettime... " >&6; } + # + if test "x$dontwant_rt" = "xno" ; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif + +int main (void) +{ + + struct timespec ts; + (void)clock_gettime(CLOCK_MONOTONIC, &ts); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_func_clock_gettime="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_func_clock_gettime="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + + # + if test "$curl_func_clock_gettime" = "yes"; then + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in libraries" >&5 +$as_echo_n "checking for clock_gettime in libraries... " >&6; } + # + curl_cv_save_LIBS="$LIBS" + curl_cv_gclk_LIBS="unknown" + # + for x_xlibs in '' '-lrt' '-lposix4' ; do + if test "$curl_cv_gclk_LIBS" = "unknown"; then + if test -z "$x_xlibs"; then + LIBS="$curl_cv_save_LIBS" + else + LIBS="$x_xlibs $curl_cv_save_LIBS" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif + +int main (void) +{ + + struct timespec ts; + (void)clock_gettime(CLOCK_MONOTONIC, &ts); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + curl_cv_gclk_LIBS="$x_xlibs" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + done + # + LIBS="$curl_cv_save_LIBS" + # + case X-"$curl_cv_gclk_LIBS" in + X-unknown) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find clock_gettime" >&5 +$as_echo "cannot find clock_gettime" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5 +$as_echo "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;} + curl_func_clock_gettime="no" + ;; + X-) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5 +$as_echo "no additional lib required" >&6; } + curl_func_clock_gettime="yes" + ;; + *) + if test -z "$curl_cv_save_LIBS"; then + LIBS="$curl_cv_gclk_LIBS" + else + LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_gclk_LIBS" >&5 +$as_echo "$curl_cv_gclk_LIBS" >&6; } + curl_func_clock_gettime="yes" + ;; + esac + # + if test "x$cross_compiling" != "xyes" && + test "$curl_func_clock_gettime" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if monotonic clock_gettime works" >&5 +$as_echo_n "checking if monotonic clock_gettime works... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif + +int main (void) +{ + + struct timespec ts; + if (0 == clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(0); + else + exit(1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&5 +$as_echo "$as_me: WARNING: HAVE_CLOCK_GETTIME_MONOTONIC will not be defined" >&2;} + curl_func_clock_gettime="no" + LIBS="$curl_cv_save_LIBS" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + case "$curl_func_clock_gettime" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 +_ACEOF + + ;; + esac + # + fi + # + + +CURL_NETWORK_AND_TIME_LIBS=$LIBS + + + +clean_CPPFLAGS=$CPPFLAGS +clean_LDFLAGS=$LDFLAGS +clean_LIBS=$LIBS +ZLIB_LIBS="" + +# Check whether --with-zlib was given. +if test "${with_zlib+set}" = set; then : + withval=$with_zlib; OPT_ZLIB="$withval" +fi + + +if test "$OPT_ZLIB" = "no" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5 +$as_echo "$as_me: WARNING: zlib disabled" >&2;} +else + if test "$OPT_ZLIB" = "yes" ; then + OPT_ZLIB="" + fi + + if test -z "$OPT_ZLIB" ; then + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib options with pkg-config" >&5 +$as_echo_n "checking for zlib options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists zlib >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS" + LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`" + CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`" + OPT_ZLIB="" + HAVE_LIBZ="1" + fi + + if test -z "$HAVE_LIBZ"; then + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5 +$as_echo_n "checking for inflateEnd in -lz... " >&6; } +if ${ac_cv_lib_z_inflateEnd+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char inflateEnd (); +int main (void) +{ +return inflateEnd (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_inflateEnd=yes +else + ac_cv_lib_z_inflateEnd=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5 +$as_echo "$ac_cv_lib_z_inflateEnd" >&6; } +if test "x$ac_cv_lib_z_inflateEnd" = xyes; then : + HAVE_LIBZ="1" + LIBS="-lz $LIBS" +else + OPT_ZLIB="/usr/local" +fi + + fi + fi + + if test -n "$OPT_ZLIB"; then + CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" + LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" + fi + + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = xyes; then : + + HAVE_ZLIB_H="1" + if test "$HAVE_LIBZ" != "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5 +$as_echo_n "checking for gzread in -lz... " >&6; } +if ${ac_cv_lib_z_gzread+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gzread (); +int main (void) +{ +return gzread (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_gzread=yes +else + ac_cv_lib_z_gzread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 +$as_echo "$ac_cv_lib_z_gzread" >&6; } +if test "x$ac_cv_lib_z_gzread" = xyes; then : + + HAVE_LIBZ="1" + LIBS="-lz $LIBS" + +else + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS +fi + + fi + +else + + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + +fi + + + + if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" + then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz lib, not the header file!" >&5 +$as_echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;} + HAVE_LIBZ="" + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + LIBS=$clean_LIBS + elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" + then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure found only the libz header file, not the lib!" >&5 +$as_echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;} + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + LIBS=$clean_LIBS + elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" + then + + +$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h + + +$as_echo "#define HAVE_LIBZ 1" >>confdefs.h + + + ZLIB_LIBS="-lz" + LIBS="-lz $clean_LIBS" + + AMFIXLIB="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: found both libz and libz.h header" >&5 +$as_echo "$as_me: found both libz and libz.h header" >&6;} + curl_zlib_msg="enabled" + fi +fi + + if test x"$AMFIXLIB" = x1; then + HAVE_LIBZ_TRUE= + HAVE_LIBZ_FALSE='#' +else + HAVE_LIBZ_TRUE='#' + HAVE_LIBZ_FALSE= +fi + + + + + +OPT_BROTLI=off + +# Check whether --with-brotli was given. +if test "${with_brotli+set}" = set; then : + withval=$with_brotli; OPT_BROTLI=$withval +fi + + +if test X"$OPT_BROTLI" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_BROTLI" in + yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbrotlidec options with pkg-config" >&5 +$as_echo_n "checking for libbrotlidec options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libbrotlidec >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec` + LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec` + CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec` + version=`$PKGCONFIG --modversion libbrotlidec` + DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'` + fi + + ;; + off) + ;; + *) + PREFIX_BROTLI=$OPT_BROTLI + ;; + esac + + if test -n "$PREFIX_BROTLI"; then + LIB_BROTLI="-lbrotlidec" + LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff + CPP_BROTLI=-I${PREFIX_BROTLI}/include + DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_BROTLI" + CPPFLAGS="$CPPFLAGS $CPP_BROTLI" + LIBS="$LIB_BROTLI $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BrotliDecoderDecompress in -lbrotlidec" >&5 +$as_echo_n "checking for BrotliDecoderDecompress in -lbrotlidec... " >&6; } +if ${ac_cv_lib_brotlidec_BrotliDecoderDecompress+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbrotlidec $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char BrotliDecoderDecompress (); +int main (void) +{ +return BrotliDecoderDecompress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_brotlidec_BrotliDecoderDecompress=yes +else + ac_cv_lib_brotlidec_BrotliDecoderDecompress=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_brotlidec_BrotliDecoderDecompress" >&5 +$as_echo "$ac_cv_lib_brotlidec_BrotliDecoderDecompress" >&6; } +if test "x$ac_cv_lib_brotlidec_BrotliDecoderDecompress" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBROTLIDEC 1 +_ACEOF + + LIBS="-lbrotlidec $LIBS" + +fi + + + for ac_header in brotli/decode.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "brotli/decode.h" "ac_cv_header_brotli_decode_h" "$ac_includes_default" +if test "x$ac_cv_header_brotli_decode_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BROTLI_DECODE_H 1 +_ACEOF + curl_brotli_msg="enabled (libbrotlidec)" + HAVE_BROTLI=1 + +$as_echo "#define HAVE_BROTLI 1" >>confdefs.h + + HAVE_BROTLI=1 + + +fi + +done + + + if test X"$OPT_BROTLI" != Xoff && + test "$HAVE_BROTLI" != "1"; then + as_fn_error $? "BROTLI libs and/or directories were not found where specified!" "$LINENO" 5 + fi + + if test "$HAVE_BROTLI" = "1"; then + if test -n "$DIR_BROTLI"; then + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_BROTLI to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_BROTLI to CURL_LIBRARY_PATH" >&6;} + fi + fi + else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +fi + + +OPT_ZSTD=off + +# Check whether --with-zstd was given. +if test "${with_zstd+set}" = set; then : + withval=$with_zstd; OPT_ZSTD=$withval +fi + + +if test X"$OPT_ZSTD" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_ZSTD" in + yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd options with pkg-config" >&5 +$as_echo_n "checking for libzstd options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libzstd >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd` + LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd` + CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd` + version=`$PKGCONFIG --modversion libzstd` + DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'` + fi + + ;; + off) + ;; + *) + PREFIX_ZSTD=$OPT_ZSTD + ;; + esac + + if test -n "$PREFIX_ZSTD"; then + LIB_ZSTD="-lzstd" + LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff + CPP_ZSTD=-I${PREFIX_ZSTD}/include + DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_ZSTD" + CPPFLAGS="$CPPFLAGS $CPP_ZSTD" + LIBS="$LIB_ZSTD $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_createDStream in -lzstd" >&5 +$as_echo_n "checking for ZSTD_createDStream in -lzstd... " >&6; } +if ${ac_cv_lib_zstd_ZSTD_createDStream+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lzstd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ZSTD_createDStream (); +int main (void) +{ +return ZSTD_createDStream (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_zstd_ZSTD_createDStream=yes +else + ac_cv_lib_zstd_ZSTD_createDStream=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_createDStream" >&5 +$as_echo "$ac_cv_lib_zstd_ZSTD_createDStream" >&6; } +if test "x$ac_cv_lib_zstd_ZSTD_createDStream" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZSTD 1 +_ACEOF + + LIBS="-lzstd $LIBS" + +fi + + + for ac_header in zstd.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default" +if test "x$ac_cv_header_zstd_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ZSTD_H 1 +_ACEOF + curl_zstd_msg="enabled (libzstd)" + HAVE_ZSTD=1 + +$as_echo "#define HAVE_ZSTD 1" >>confdefs.h + + HAVE_ZSTD=1 + + +fi + +done + + + if test X"$OPT_ZSTD" != Xoff && + test "$HAVE_ZSTD" != "1"; then + as_fn_error $? "libzstd was not found where specified!" "$LINENO" 5 + fi + + if test "$HAVE_ZSTD" = "1"; then + if test -n "$DIR_ZSTD"; then + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_ZSTD to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_ZSTD to CURL_LIBRARY_PATH" >&6;} + fi + fi + else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +fi + + +LDAPLIBNAME="" + +# Check whether --with-ldap-lib was given. +if test "${with_ldap_lib+set}" = set; then : + withval=$with_ldap_lib; LDAPLIBNAME="$withval" +fi + + +LBERLIBNAME="" + +# Check whether --with-lber-lib was given. +if test "${with_lber_lib+set}" = set; then : + withval=$with_lber_lib; LBERLIBNAME="$withval" +fi + + +if test x$CURL_DISABLE_LDAP != x1 ; then + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lber.h" >&5 +$as_echo_n "checking for lber.h... " >&6; } +if ${curl_cv_header_lber_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#include + +int main (void) +{ + + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_lber_h="yes" + +else + + curl_cv_header_lber_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_lber_h" >&5 +$as_echo "$curl_cv_header_lber_h" >&6; } + if test "$curl_cv_header_lber_h" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_LBER_H 1 +_ACEOF + + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#include + +int main (void) +{ + + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_need_header_lber_h="no" + +else + + curl_cv_need_header_lber_h="yes" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # + case "$curl_cv_need_header_lber_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define NEED_LBER_H 1 +_ACEOF + + ;; + esac + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap.h" >&5 +$as_echo_n "checking for ldap.h... " >&6; } +if ${curl_cv_header_ldap_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#include + +int main (void) +{ + + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + int res = ldap_unbind(ldp); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_ldap_h="yes" + +else + + curl_cv_header_ldap_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldap_h" >&5 +$as_echo "$curl_cv_header_ldap_h" >&6; } + case "$curl_cv_header_ldap_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_LDAP_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldapssl.h" >&5 +$as_echo_n "checking for ldapssl.h... " >&6; } +if ${curl_cv_header_ldapssl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#ifdef HAVE_LDAP_H +#include +#endif +#include + +int main (void) +{ + + char *cert_label = NULL; + LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_ldapssl_h="yes" + +else + + curl_cv_header_ldapssl_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldapssl_h" >&5 +$as_echo "$curl_cv_header_ldapssl_h" >&6; } + case "$curl_cv_header_ldapssl_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_LDAPSSL_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_ssl.h" >&5 +$as_echo_n "checking for ldap_ssl.h... " >&6; } +if ${curl_cv_header_ldap_ssl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#ifdef HAVE_LDAP_H +#include +#endif +#include + +int main (void) +{ + + LDAP *ldp = ldapssl_init("dummy", LDAPS_PORT, 1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_ldap_ssl_h="yes" + +else + + curl_cv_header_ldap_ssl_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ldap_ssl_h" >&5 +$as_echo "$curl_cv_header_ldap_ssl_h" >&6; } + case "$curl_cv_header_ldap_ssl_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_LDAP_SSL_H 1 +_ACEOF + + ;; + esac + + + if test -z "$LDAPLIBNAME" ; then + if test "$curl_cv_native_windows" = "yes"; then + LDAPLIBNAME="wldap32" + LBERLIBNAME="no" + fi + fi + + if test "$LDAPLIBNAME" ; then + as_ac_Lib=`$as_echo "ac_cv_lib_"$LDAPLIBNAME"''_ldap_init" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_init in -l\"$LDAPLIBNAME\"" >&5 +$as_echo_n "checking for ldap_init in -l\"$LDAPLIBNAME\"... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l"$LDAPLIBNAME" $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ldap_init (); +int main (void) +{ +return ldap_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_LIB"$LDAPLIBNAME"" | $as_tr_cpp` 1 +_ACEOF + + LIBS="-l"$LDAPLIBNAME" $LIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&5 +$as_echo "$as_me: WARNING: \"$LDAPLIBNAME\" is not an LDAP library: LDAP disabled" >&2;} + +$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h + + CURL_DISABLE_LDAP=1 + + +$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h + + CURL_DISABLE_LDAPS=1 + +fi + + else + + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDAP libraries" >&5 +$as_echo_n "checking for LDAP libraries... " >&6; } + # + u_libs="" + # + + # + curl_cv_save_LIBS="$LIBS" + curl_cv_ldap_LIBS="unknown" + # + for x_nlibs in '' "$u_libs" \ + '-lldap' \ + '-lldap -llber' \ + '-llber -lldap' \ + '-lldapssl -lldapx -lldapsdk' \ + '-lldapsdk -lldapx -lldapssl' \ + '-lldap -llber -lssl -lcrypto' ; do + + if test "$curl_cv_ldap_LIBS" = "unknown"; then + if test -z "$x_nlibs"; then + LIBS="$curl_cv_save_LIBS" + else + LIBS="$x_nlibs $curl_cv_save_LIBS" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#endif +#ifndef NULL +#define NULL (void *)0 +#endif +#ifndef LDAP_DEPRECATED +#define LDAP_DEPRECATED 1 +#endif +#ifdef NEED_LBER_H +#include +#endif +#ifdef HAVE_LDAP_H +#include +#endif + +int main (void) +{ + + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + LDAP *ldp = ldap_init("dummy", LDAP_PORT); + int res = ldap_unbind(ldp); + ber_free(bep, 1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + curl_cv_ldap_LIBS="$x_nlibs" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + done + # + LIBS="$curl_cv_save_LIBS" + # + case X-"$curl_cv_ldap_LIBS" in + X-unknown) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find LDAP libraries" >&5 +$as_echo "cannot find LDAP libraries" >&6; } + ;; + X-) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no additional lib required" >&5 +$as_echo "no additional lib required" >&6; } + ;; + *) + if test -z "$curl_cv_save_LIBS"; then + LIBS="$curl_cv_ldap_LIBS" + else + LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_ldap_LIBS" >&5 +$as_echo "$curl_cv_ldap_LIBS" >&6; } + ;; + esac + # + + case X-"$curl_cv_ldap_LIBS" in + X-unknown) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&5 +$as_echo "$as_me: WARNING: Cannot find libraries for LDAP support: LDAP disabled" >&2;} + +$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h + + CURL_DISABLE_LDAP=1 + + +$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h + + CURL_DISABLE_LDAPS=1 + + ;; + esac + fi +fi + +if test x$CURL_DISABLE_LDAP != x1 ; then + + if test "$LBERLIBNAME" ; then + if test "$LBERLIBNAME" != "no" ; then + as_ac_Lib=`$as_echo "ac_cv_lib_"$LBERLIBNAME"''_ber_free" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ber_free in -l\"$LBERLIBNAME\"" >&5 +$as_echo_n "checking for ber_free in -l\"$LBERLIBNAME\"... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l"$LBERLIBNAME" $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ber_free (); +int main (void) +{ +return ber_free (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_LIB"$LBERLIBNAME"" | $as_tr_cpp` 1 +_ACEOF + + LIBS="-l"$LBERLIBNAME" $LIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$LBERLIBNAME\" is not an LBER library: LDAP disabled" >&5 +$as_echo "$as_me: WARNING: \"$LBERLIBNAME\" is not an LBER library: LDAP disabled" >&2;} + +$as_echo "#define CURL_DISABLE_LDAP 1" >>confdefs.h + + CURL_DISABLE_LDAP=1 + + +$as_echo "#define CURL_DISABLE_LDAPS 1" >>confdefs.h + + CURL_DISABLE_LDAPS=1 + +fi + + fi + fi +fi + +if test x$CURL_DISABLE_LDAP != x1 ; then + for ac_func in ldap_url_parse ldap_init_fd +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + if test "$LDAPLIBNAME" = "wldap32"; then + curl_ldap_msg="enabled (winldap)" + +$as_echo "#define USE_WIN32_LDAP 1" >>confdefs.h + + else + curl_ldap_msg="enabled (OpenLDAP)" + if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then + +$as_echo "#define USE_OPENLDAP 1" >>confdefs.h + + USE_OPENLDAP=1 + + fi + fi +fi + +if test x$CURL_DISABLE_LDAPS != x1 ; then + curl_ldaps_msg="enabled" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6" >&5 +$as_echo_n "checking whether to enable IPv6... " >&6; } +# Check whether --enable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then : + enableval=$enable_ipv6; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ipv6=no + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ipv6=yes + ;; + esac +else + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ipv6=yes + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + /* are AF_INET6 and sockaddr_in6 available? */ +#include +#ifdef HAVE_WINSOCK2_H +#include +#include +#else +#include +#include +#if defined (__TANDEM) +# include +#endif +#endif +#include /* for exit() */ +main() +{ + struct sockaddr_in6 s; + (void)s; + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ipv6=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ipv6=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + + +if test "$ipv6" = yes; then + curl_ipv6_msg="enabled" + +$as_echo "#define ENABLE_IPV6 1" >>confdefs.h + + IPV6_ENABLED=1 + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct sockaddr_in6 has sin6_scope_id member" >&5 +$as_echo_n "checking if struct sockaddr_in6 has sin6_scope_id member... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HAVE_WINSOCK2_H +#include +#include +#else +#include +#if defined (__TANDEM) +# include +#endif +#endif +int main (void) +{ +struct sockaddr_in6 s; s.sin6_scope_id = 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + have_sin6_scope_id=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$have_sin6_scope_id" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if argv can be written to" >&5 +$as_echo_n "checking if argv can be written to... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + curl_cv_writable_argv=cross + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main(int argc, char **argv) +{ + (void)argc; + argv[0][0] = ' '; + return (argv[0][0] == ' ')?0:1; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + curl_cv_writable_argv=yes + +else + curl_cv_writable_argv=no + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + +case $curl_cv_writable_argv in +yes) + +$as_echo "#define HAVE_WRITABLE_ARGV 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; +no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the previous check could not be made default was used" >&5 +$as_echo "$as_me: WARNING: the previous check could not be made default was used" >&2;} + ;; +esac + + + +GSSAPI_ROOT="/usr" + +# Check whether --with-gssapi-includes was given. +if test "${with_gssapi_includes+set}" = set; then : + withval=$with_gssapi_includes; GSSAPI_INCS="-I$withval" + want_gss="yes" + +fi + + + +# Check whether --with-gssapi-libs was given. +if test "${with_gssapi_libs+set}" = set; then : + withval=$with_gssapi_libs; GSSAPI_LIB_DIR="-L$withval" + want_gss="yes" + +fi + + + +# Check whether --with-gssapi was given. +if test "${with_gssapi+set}" = set; then : + withval=$with_gssapi; + GSSAPI_ROOT="$withval" + if test x"$GSSAPI_ROOT" != xno; then + want_gss="yes" + if test x"$GSSAPI_ROOT" = xyes; then + GSSAPI_ROOT="/usr" + fi + fi + +fi + + +: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} + +save_CPPFLAGS="$CPPFLAGS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GSS-API support is requested" >&5 +$as_echo_n "checking if GSS-API support is requested... " >&6; } +if test x"$want_gss" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + if test -z "$GSSAPI_INCS"; then + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` + elif test -f "$KRB5CONFIG"; then + GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` + elif test "$GSSAPI_ROOT" != "yes"; then + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi + fi + + CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" + + ac_fn_c_check_header_mongrel "$LINENO" "gss.h" "ac_cv_header_gss_h" "$ac_includes_default" +if test "x$ac_cv_header_gss_h" = xyes; then : + + +$as_echo "#define HAVE_GSSGNU 1" >>confdefs.h + + gnu_gss=yes + +else + + for ac_header in gssapi/gssapi.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" +if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GSSAPI_GSSAPI_H 1 +_ACEOF + +else + not_mit=1 +fi + +done + + for ac_header in gssapi/gssapi_generic.h gssapi/gssapi_krb5.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +$ac_includes_default +#ifdef HAVE_GSSAPI_GSSAPI_H +#include +#endif + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + not_mit=1 +fi + +done + + if test "x$not_mit" = "x1"; then + ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default" +if test "x$ac_cv_header_gssapi_h" = xyes; then : + + +$as_echo "#define HAVE_GSSHEIMDAL 1" >>confdefs.h + + +else + + want_gss=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling GSS-API support since no header files were found" >&5 +$as_echo "$as_me: WARNING: disabling GSS-API support since no header files were found" >&2;} + + +fi + + + else + +$as_echo "#define HAVE_GSSMIT 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE" >&5 +$as_echo_n "checking if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +#include +#include + +int main (void) +{ + + gss_import_name( + (OM_uint32 *)0, + (gss_buffer_t)0, + GSS_C_NT_HOSTBASED_SERVICE, + (gss_name_t *)0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define HAVE_OLD_GSSMIT 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + +fi + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +if test x"$want_gss" = xyes; then + +$as_echo "#define HAVE_GSSAPI 1" >>confdefs.h + + HAVE_GSSAPI=1 + curl_gss_msg="enabled (MIT Kerberos/Heimdal)" + + if test -n "$gnu_gss"; then + curl_gss_msg="enabled (GNU GSS)" + LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" + LIBS="-lgss $LIBS" + elif test -z "$GSSAPI_LIB_DIR"; then + case $host in + *-*-darwin*) + LIBS="-lgssapi_krb5 -lresolv $LIBS" + ;; + *) + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi` + LIBS="$gss_libs $LIBS" + elif test -f "$KRB5CONFIG"; then + gss_libs=`$KRB5CONFIG --libs gssapi` + LIBS="$gss_libs $LIBS" + else + case $host in + *-hp-hpux*) + gss_libname="gss" + ;; + *) + gss_libname="gssapi" + ;; + esac + + if test "$GSSAPI_ROOT" != "yes"; then + LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" + LIBS="-l$gss_libname $LIBS" + else + LIBS="-l$gss_libname $LIBS" + fi + fi + ;; + esac + else + LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" + case $host in + *-hp-hpux*) + LIBS="-lgss $LIBS" + ;; + *) + LIBS="-lgssapi $LIBS" + ;; + esac + fi +else + CPPFLAGS="$save_CPPFLAGS" +fi + +build_libstubgss=no +if test x"$want_gss" = "xyes"; then + build_libstubgss=yes +fi + + if test "x$build_libstubgss" = "xyes"; then + BUILD_STUB_GSS_TRUE= + BUILD_STUB_GSS_FALSE='#' +else + BUILD_STUB_GSS_TRUE='#' + BUILD_STUB_GSS_FALSE= +fi + + + +DEFAULT_SSL_BACKEND=no +VALID_DEFAULT_SSL_BACKEND= + +# Check whether --with-default-ssl-backend was given. +if test "${with_default_ssl_backend+set}" = set; then : + withval=$with_default_ssl_backend; DEFAULT_SSL_BACKEND=$withval +fi + +case "$DEFAULT_SSL_BACKEND" in + no) + ;; + default|yes) + as_fn_error $? "The name of the default SSL backend is required." "$LINENO" 5 + ;; + *) + + VALID_DEFAULT_SSL_BACKEND=no + ;; +esac + + + +OPT_SCHANNEL=no + +# Check whether --with-winssl was given. +if test "${with_winssl+set}" = set; then : + withval=$with_winssl; OPT_SCHANNEL=$withval +fi + + + +# Check whether --with-schannel was given. +if test "${with_schannel+set}" = set; then : + withval=$with_schannel; OPT_SCHANNEL=$withval +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native SSL/TLS (Windows native builds only)" >&5 +$as_echo_n "checking whether to enable Windows native SSL/TLS (Windows native builds only)... " >&6; } +if test -z "$ssl_backends" -o "x$OPT_SCHANNEL" != xno; then + ssl_msg= + if test "x$OPT_SCHANNEL" != "xno" && + test "x$curl_cv_native_windows" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define USE_SCHANNEL 1" >>confdefs.h + + USE_SCHANNEL=1 + + ssl_msg="Windows-native" + test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + SCHANNEL_ENABLED=1 + # --with-schannel implies --enable-sspi + +$as_echo "#define USE_WINDOWS_SSPI 1" >>confdefs.h + + USE_WINDOWS_SSPI=1 + + curl_sspi_msg="enabled" + LIBS="-lcrypt32 $LIBS" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +OPT_SECURETRANSPORT=no + +# Check whether --with-darwinssl was given. +if test "${with_darwinssl+set}" = set; then : + withval=$with_darwinssl; OPT_SECURETRANSPORT=$withval +fi + + + +# Check whether --with-secure-transport was given. +if test "${with_secure_transport+set}" = set; then : + withval=$with_secure_transport; OPT_SECURETRANSPORT=$withval +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Secure Transport" >&5 +$as_echo_n "checking whether to enable Secure Transport... " >&6; } +if test -z "$ssl_backends" -o "x$OPT_SECURETRANSPORT" != xno; then + if test "x$OPT_SECURETRANSPORT" != "xno" && + (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define USE_SECTRANSP 1" >>confdefs.h + + USE_SECTRANSP=1 + + ssl_msg="Secure Transport" + test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + SECURETRANSPORT_ENABLED=1 + LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +OPT_AMISSL=no + +# Check whether --with-amissl was given. +if test "${with_amissl+set}" = set; then : + withval=$with_amissl; OPT_AMISSL=$withval +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Amiga native SSL/TLS (AmiSSL)" >&5 +$as_echo_n "checking whether to enable Amiga native SSL/TLS (AmiSSL)... " >&6; } +if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then + if test -z "$ssl_backends" -o "x$OPT_AMISSL" != xno; then + ssl_msg= + if test "x$OPT_AMISSL" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ssl_msg="AmiSSL" + test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + AMISSL_ENABLED=1 + LIBS="-lamisslauto $LIBS" + +$as_echo "#define USE_AMISSL 1" >>confdefs.h + + +$as_echo "#define USE_OPENSSL 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +OPT_SSL=off +ca="no" + +# Check whether --with-ssl was given. +if test "${with_ssl+set}" = set; then : + withval=$with_ssl; OPT_SSL=$withval +fi + + +if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && + test X"$OPT_SSL" != Xno; then + ssl_msg= + + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case $host in + *-*-msys* | *-*-mingw*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdi32" >&5 +$as_echo_n "checking for gdi32... " >&6; } + my_ac_save_LIBS=$LIBS + LIBS="-lgdi32 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int main (void) +{ +GdiFlush(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + LIBS=$my_ac_save_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + esac + + case "$OPT_SSL" in + yes) + if test x$cross_compiling != xyes; then + PKGTEST="yes" + fi + PREFIX_OPENSSL=/usr/local/ssl + LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" + ;; + off) + if test x$cross_compiling != xyes; then + PKGTEST="yes" + fi + PREFIX_OPENSSL= + ;; + *) + PKGTEST="no" + PREFIX_OPENSSL=$OPT_SSL + + OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig" + if test -f "$OPENSSL_PCDIR/openssl.pc"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5 +$as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;} + PKGTEST="yes" + elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then + as_fn_error $? "$PREFIX_OPENSSL is a bad --with-ssl prefix!" "$LINENO" 5 + fi + + LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" + if test "$PREFIX_OPENSSL" != "/usr" ; then + SSL_LDFLAGS="-L$LIB_OPENSSL" + SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include" + fi + SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl" + ;; + esac + + if test "$PKGTEST" = "yes"; then + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl options with pkg-config" >&5 +$as_echo_n "checking for openssl options with pkg-config... " >&6; } + itexists=` + if test -n "$OPENSSL_PCDIR"; then + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists openssl >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + SSL_LIBS=` + if test -n "$OPENSSL_PCDIR"; then + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null` + + SSL_LDFLAGS=` + if test -n "$OPENSSL_PCDIR"; then + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-L openssl 2>/dev/null` + + SSL_CPPFLAGS=` + if test -n "$OPENSSL_PCDIR"; then + PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I openssl 2>/dev/null` + + + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&5 +$as_echo "$as_me: pkg-config: SSL_LIBS: \"$SSL_LIBS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: SSL_LDFLAGS: \"$SSL_LDFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: SSL_CPPFLAGS: \"$SSL_CPPFLAGS\"" >&6;} + + LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'` + + LIBS="$SSL_LIBS $LIBS" + fi + fi + + CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" + LDFLAGS="$LDFLAGS $SSL_LDFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5 +$as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_HMAC_Update+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char HMAC_Update (); +int main (void) +{ +return HMAC_Update (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_HMAC_Update=yes +else + ac_cv_lib_crypto_HMAC_Update=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Update" >&5 +$as_echo "$ac_cv_lib_crypto_HMAC_Update" >&6; } +if test "x$ac_cv_lib_crypto_HMAC_Update" = xyes; then : + + HAVECRYPTO="yes" + LIBS="-lcrypto $LIBS" + +else + + LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" + if test "$PKGCONFIG" = "no" ; then + # only set this if pkg-config wasn't used + CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" + fi + # Linking previously failed, try extra paths from --with-ssl or pkg-config. + # Use a different function name to avoid reusing the earlier cached result. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5 +$as_echo_n "checking for HMAC_Init_ex in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_HMAC_Init_ex+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char HMAC_Init_ex (); +int main (void) +{ +return HMAC_Init_ex (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_HMAC_Init_ex=yes +else + ac_cv_lib_crypto_HMAC_Init_ex=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_HMAC_Init_ex" >&5 +$as_echo "$ac_cv_lib_crypto_HMAC_Init_ex" >&6; } +if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes; then : + + HAVECRYPTO="yes" + LIBS="-lcrypto $LIBS" +else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl" >&5 +$as_echo_n "checking OpenSSL linking with -ldl... " >&6; } + LIBS="$CLEANLIBS -lcrypto -ldl" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int main (void) +{ + + ERR_clear_error(); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVECRYPTO="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL linking with -ldl and -lpthread" >&5 +$as_echo_n "checking OpenSSL linking with -ldl and -lpthread... " >&6; } + LIBS="$CLEANLIBS -lcrypto -ldl -lpthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int main (void) +{ + + ERR_clear_error(); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + HAVECRYPTO="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LDFLAGS="$CLEANLDFLAGS" + CPPFLAGS="$CLEANCPPFLAGS" + LIBS="$CLEANLIBS" + + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi + + +fi + + + if test X"$HAVECRYPTO" = X"yes"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5 +$as_echo_n "checking for SSL_connect in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_connect+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char SSL_connect (); +int main (void) +{ +return SSL_connect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_connect=yes +else + ac_cv_lib_ssl_SSL_connect=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; } +if test "x$ac_cv_lib_ssl_SSL_connect" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + +fi + + + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl with RSAglue/rsaref libs in use" >&5 +$as_echo_n "checking for ssl with RSAglue/rsaref libs in use... " >&6; }; + OLIBS=$LIBS + LIBS="-lRSAglue -lrsaref $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl" >&5 +$as_echo_n "checking for SSL_connect in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_connect+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char SSL_connect (); +int main (void) +{ +return SSL_connect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_connect=yes +else + ac_cv_lib_ssl_SSL_connect=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_connect" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_connect" >&6; } +if test "x$ac_cv_lib_ssl_SSL_connect" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + +fi + + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBS=$OLIBS + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + else + + for ac_header in openssl/x509.h openssl/rsa.h openssl/crypto.h \ + openssl/pem.h openssl/ssl.h openssl/err.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + ssl_msg="OpenSSL" + test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + OPENSSL_ENABLED=1 + +$as_echo "#define USE_OPENSSL 1" >>confdefs.h + +fi + +done + + + if test $ac_cv_header_openssl_x509_h = no; then + for ac_header in x509.h rsa.h crypto.h pem.h ssl.h err.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + if test $ac_cv_header_x509_h = yes && + test $ac_cv_header_crypto_h = yes && + test $ac_cv_header_ssl_h = yes; then + ssl_msg="OpenSSL" + OPENSSL_ENABLED=1 + fi + fi + fi + + if test X"$OPENSSL_ENABLED" != X"1"; then + LIBS="$CLEANLIBS" + fi + + if test X"$OPT_SSL" != Xoff && + test "$OPENSSL_ENABLED" != "1"; then + as_fn_error $? "OpenSSL libs and/or directories were not found where specified!" "$LINENO" 5 + fi + fi + + if test X"$OPENSSL_ENABLED" = X"1"; then + + for ac_func in RAND_egd \ + SSLv2_client_method \ + OpenSSL_version +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BoringSSL" >&5 +$as_echo_n "checking for BoringSSL... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + +int main (void) +{ + + #ifndef OPENSSL_IS_BORINGSSL + #error not boringssl + #endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_BORINGSSL 1 +_ACEOF + + ssl_msg="BoringSSL" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libressl" >&5 +$as_echo_n "checking for libressl... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + int dummy = LIBRESSL_VERSION_NUMBER; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESSL 1 +_ACEOF + + ssl_msg="libressl" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL >= v3" >&5 +$as_echo_n "checking for OpenSSL >= v3... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + return 0; + #else + #error older than 3 + #endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL3 1 +_ACEOF + + CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED" + ssl_msg="OpenSSL v3+" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + if test "$OPENSSL_ENABLED" = "1"; then + if test -n "$LIB_OPENSSL"; then + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&6;} + fi + fi + + # + + # + tst_api="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers version" >&5 +$as_echo_n "checking for OpenSSL headers version... " >&6; } + + OLDCPPFLAGS=$CPPFLAGS + # CPPPFLAG comes from CURL_CPP_P + CPPFLAGS="$CPPFLAGS $CPPPFLAG" + if test -z "$SED"; then + as_fn_error $? "SED not set. Cannot continue without SED being set." "$LINENO" 5 + fi + if test -z "$GREP"; then + as_fn_error $? "GREP not set. Cannot continue without GREP being set." "$LINENO" 5 + fi + + tmp_exp="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# ifdef USE_OPENSSL +# include +# else +# include +# endif + +#ifdef OPENSSL_VERSION_NUMBER +CURL_DEF_TOKEN OPENSSL_VERSION_NUMBER +#endif + + +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + + tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[ ][ ]*//' 2>/dev/null | \ + "$SED" 's/["][ ]*["]//g' 2>/dev/null` + if test -z "$tmp_exp" || test "$tmp_exp" = "OPENSSL_VERSION_NUMBER"; then + tmp_exp="" + fi + +fi +rm -f conftest.err conftest.i conftest.$ac_ext + if test -z "$tmp_exp"; then + curl_cv_have_def_OPENSSL_VERSION_NUMBER=no + + else + curl_cv_have_def_OPENSSL_VERSION_NUMBER=yes + curl_cv_def_OPENSSL_VERSION_NUMBER=$tmp_exp + + fi + CPPFLAGS=$OLDCPPFLAGS + + if test "$curl_cv_have_def_OPENSSL_VERSION_NUMBER" = "yes"; then + tst_verlen=`expr "$curl_cv_def_OPENSSL_VERSION_NUMBER" : '.*'` + case "x$tst_verlen" in + x6) + tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3` + tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 4` + tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5` + tst_api=0x$tst_vermaj$tst_vermin$tst_verfix + ;; + x11|x10) + tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3` + tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5` + tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7` + tst_api=0x$tst_vermaj$tst_vermin$tst_verfix + ;; + *) + tst_api="unknown" + ;; + esac + case $tst_api in + 0x111) tst_show="1.1.1" ;; + 0x110) tst_show="1.1.0" ;; + 0x102) tst_show="1.0.2" ;; + 0x101) tst_show="1.0.1" ;; + 0x100) tst_show="1.0.0" ;; + 0x099) tst_show="0.9.9" ;; + 0x098) tst_show="0.9.8" ;; + 0x097) tst_show="0.9.7" ;; + 0x096) tst_show="0.9.6" ;; + 0x095) tst_show="0.9.5" ;; + 0x094) tst_show="0.9.4" ;; + 0x093) tst_show="0.9.3" ;; + 0x092) tst_show="0.9.2" ;; + 0x091) tst_show="0.9.1" ;; + *) tst_show="unknown" ;; + esac + tst_show="$tst_show - $curl_cv_def_OPENSSL_VERSION_NUMBER" + else + tst_show="unknown" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5 +$as_echo "$tst_show" >&6; } + # + curl_openssl_api_headers=$tst_api + + + # + tst_api="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL library version" >&5 +$as_echo_n "checking for OpenSSL library version... " >&6; } + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define ERR_clear_last_mark innocuous_ERR_clear_last_mark +#ifdef __STDC__ +# include +#else +# include +#endif +#undef ERR_clear_last_mark +#ifdef __cplusplus +extern "C" +#endif +char ERR_clear_last_mark (); +#if defined __stub_ERR_clear_last_mark || defined __stub___ERR_clear_last_mark +choke me +#endif + +int main (void) +{ +return ERR_clear_last_mark (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x111" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + case $host in + *-*-vms*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_CTX_set_not_resumbl_sess_cb innocuous_SSL_CTX_set_not_resumbl_sess_cb +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_CTX_set_not_resumbl_sess_cb +#ifdef __cplusplus +extern "C" +#endif +char SSL_CTX_set_not_resumbl_sess_cb (); +#if defined __stub_SSL_CTX_set_not_resumbl_sess_cb || defined __stub___SSL_CTX_set_not_resumbl_sess_cb +choke me +#endif + +int main (void) +{ +return SSL_CTX_set_not_resumbl_sess_cb (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x110" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + *) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_CTX_set_not_resumable_session_callback innocuous_SSL_CTX_set_not_resumable_session_callback +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_CTX_set_not_resumable_session_callback +#ifdef __cplusplus +extern "C" +#endif +char SSL_CTX_set_not_resumable_session_callback (); +#if defined __stub_SSL_CTX_set_not_resumable_session_callback || defined __stub___SSL_CTX_set_not_resumable_session_callback +choke me +#endif + +int main (void) +{ +return SSL_CTX_set_not_resumable_session_callback (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x110" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + esac + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_CONF_CTX_new innocuous_SSL_CONF_CTX_new +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_CONF_CTX_new +#ifdef __cplusplus +extern "C" +#endif +char SSL_CONF_CTX_new (); +#if defined __stub_SSL_CONF_CTX_new || defined __stub___SSL_CONF_CTX_new +choke me +#endif + +int main (void) +{ +return SSL_CONF_CTX_new (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x102" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_renegotiate_abbreviated innocuous_SSL_renegotiate_abbreviated +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_renegotiate_abbreviated +#ifdef __cplusplus +extern "C" +#endif +char SSL_renegotiate_abbreviated (); +#if defined __stub_SSL_renegotiate_abbreviated || defined __stub___SSL_renegotiate_abbreviated +choke me +#endif + +int main (void) +{ +return SSL_renegotiate_abbreviated (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x101" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define OBJ_add_sigid innocuous_OBJ_add_sigid +#ifdef __STDC__ +# include +#else +# include +#endif +#undef OBJ_add_sigid +#ifdef __cplusplus +extern "C" +#endif +char OBJ_add_sigid (); +#if defined __stub_OBJ_add_sigid || defined __stub___OBJ_add_sigid +choke me +#endif + +int main (void) +{ +return OBJ_add_sigid (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x100" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define ERR_set_mark innocuous_ERR_set_mark +#ifdef __STDC__ +# include +#else +# include +#endif +#undef ERR_set_mark +#ifdef __cplusplus +extern "C" +#endif +char ERR_set_mark (); +#if defined __stub_ERR_set_mark || defined __stub___ERR_set_mark +choke me +#endif + +int main (void) +{ +return ERR_set_mark (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x098" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define ERR_peek_last_error innocuous_ERR_peek_last_error +#ifdef __STDC__ +# include +#else +# include +#endif +#undef ERR_peek_last_error +#ifdef __cplusplus +extern "C" +#endif +char ERR_peek_last_error (); +#if defined __stub_ERR_peek_last_error || defined __stub___ERR_peek_last_error +choke me +#endif + +int main (void) +{ +return ERR_peek_last_error (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x097" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define c2i_ASN1_OBJECT innocuous_c2i_ASN1_OBJECT +#ifdef __STDC__ +# include +#else +# include +#endif +#undef c2i_ASN1_OBJECT +#ifdef __cplusplus +extern "C" +#endif +char c2i_ASN1_OBJECT (); +#if defined __stub_c2i_ASN1_OBJECT || defined __stub___c2i_ASN1_OBJECT +choke me +#endif + +int main (void) +{ +return c2i_ASN1_OBJECT (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x096" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_CTX_set_purpose innocuous_SSL_CTX_set_purpose +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_CTX_set_purpose +#ifdef __cplusplus +extern "C" +#endif +char SSL_CTX_set_purpose (); +#if defined __stub_SSL_CTX_set_purpose || defined __stub___SSL_CTX_set_purpose +choke me +#endif + +int main (void) +{ +return SSL_CTX_set_purpose (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x095" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define OBJ_obj2txt innocuous_OBJ_obj2txt +#ifdef __STDC__ +# include +#else +# include +#endif +#undef OBJ_obj2txt +#ifdef __cplusplus +extern "C" +#endif +char OBJ_obj2txt (); +#if defined __stub_OBJ_obj2txt || defined __stub___OBJ_obj2txt +choke me +#endif + +int main (void) +{ +return OBJ_obj2txt (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x094" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_get_verify_depth innocuous_SSL_get_verify_depth +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_get_verify_depth +#ifdef __cplusplus +extern "C" +#endif +char SSL_get_verify_depth (); +#if defined __stub_SSL_get_verify_depth || defined __stub___SSL_get_verify_depth +choke me +#endif + +int main (void) +{ +return SSL_get_verify_depth (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x093" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_library_init innocuous_SSL_library_init +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_library_init +#ifdef __cplusplus +extern "C" +#endif +char SSL_library_init (); +#if defined __stub_SSL_library_init || defined __stub___SSL_library_init +choke me +#endif + +int main (void) +{ +return SSL_library_init (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x092" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$tst_api" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define SSL_CTX_set_cipher_list innocuous_SSL_CTX_set_cipher_list +#ifdef __STDC__ +# include +#else +# include +#endif +#undef SSL_CTX_set_cipher_list +#ifdef __cplusplus +extern "C" +#endif +char SSL_CTX_set_cipher_list (); +#if defined __stub_SSL_CTX_set_cipher_list || defined __stub___SSL_CTX_set_cipher_list +choke me +#endif + +int main (void) +{ +return SSL_CTX_set_cipher_list (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + tst_api="0x091" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + case $tst_api in + 0x111) tst_show="1.1.1" ;; + 0x110) tst_show="1.1.0" ;; + 0x102) tst_show="1.0.2" ;; + 0x101) tst_show="1.0.1" ;; + 0x100) tst_show="1.0.0" ;; + 0x099) tst_show="0.9.9" ;; + 0x098) tst_show="0.9.8" ;; + 0x097) tst_show="0.9.7" ;; + 0x096) tst_show="0.9.6" ;; + 0x095) tst_show="0.9.5" ;; + 0x094) tst_show="0.9.4" ;; + 0x093) tst_show="0.9.3" ;; + 0x092) tst_show="0.9.2" ;; + 0x091) tst_show="0.9.1" ;; + *) tst_show="unknown" ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_show" >&5 +$as_echo "$tst_show" >&6; } + # + curl_openssl_api_library=$tst_api + + # + tst_match="yes" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL headers and library versions matching" >&5 +$as_echo_n "checking for OpenSSL headers and library versions matching... " >&6; } + if test "$curl_openssl_api_headers" = "unknown" || + test "$curl_openssl_api_library" = "unknown"; then + tst_match="fail" + tst_warns="Can not compare OpenSSL headers and library versions." + elif test "$curl_openssl_api_headers" != "$curl_openssl_api_library"; then + tst_match="no" + tst_warns="OpenSSL headers and library versions do not match." + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_match" >&5 +$as_echo "$tst_match" >&6; } + if test "$tst_match" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $tst_warns" >&5 +$as_echo "$as_me: WARNING: $tst_warns" >&2;} + fi + + check_for_ca_bundle=1 + fi + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +if test X"$OPT_SSL" != Xoff && + test X"$OPT_SSL" != Xno && + test "$OPENSSL_ENABLED" != "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: OPT_SSL: $OPT_SSL" >&5 +$as_echo "$as_me: OPT_SSL: $OPT_SSL" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: OPENSSL_ENABLED: $OPENSSL_ENABLED" >&5 +$as_echo "$as_me: OPENSSL_ENABLED: $OPENSSL_ENABLED" >&6;} + as_fn_error $? "--with-ssl was given but OpenSSL could not be detected" "$LINENO" 5 +fi + + +if test X"$OPENSSL_ENABLED" = X"1"; then + +# Check whether --with-egd-socket was given. +if test "${with_egd_socket+set}" = set; then : + withval=$with_egd_socket; EGD_SOCKET="$withval" + +fi + + if test -n "$EGD_SOCKET" ; then + +cat >>confdefs.h <<_ACEOF +#define EGD_SOCKET "$EGD_SOCKET" +_ACEOF + + fi + + +# Check whether --with-random was given. +if test "${with_random+set}" = set; then : + withval=$with_random; RANDOM_FILE="$withval" +else + + if test x$cross_compiling != xyes; then + as_ac_File=`$as_echo "ac_cv_file_"/dev/urandom"" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/urandom\"" >&5 +$as_echo_n "checking for \"/dev/urandom\"... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r ""/dev/urandom""; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + RANDOM_FILE="/dev/urandom" +fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipped the /dev/urandom detection when cross-compiling" >&5 +$as_echo "$as_me: WARNING: skipped the /dev/urandom detection when cross-compiling" >&2;} + fi + + +fi + + if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then + + +cat >>confdefs.h <<_ACEOF +#define RANDOM_FILE "$RANDOM_FILE" +_ACEOF + + fi +fi + +if test "$OPENSSL_ENABLED" = "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SRP_Calc_client_key in -lcrypto" >&5 +$as_echo_n "checking for SRP_Calc_client_key in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_SRP_Calc_client_key+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char SRP_Calc_client_key (); +int main (void) +{ +return SRP_Calc_client_key (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_SRP_Calc_client_key=yes +else + ac_cv_lib_crypto_SRP_Calc_client_key=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SRP_Calc_client_key" >&5 +$as_echo "$ac_cv_lib_crypto_SRP_Calc_client_key" >&6; } +if test "x$ac_cv_lib_crypto_SRP_Calc_client_key" = xyes; then : + + +$as_echo "#define HAVE_OPENSSL_SRP 1" >>confdefs.h + + HAVE_OPENSSL_SRP=1 + + +fi + +fi + +if test X"$OPENSSL_ENABLED" = X"1"; then +# Check whether --enable-openssl-auto-load-config was given. +if test "${enable_openssl_auto_load_config+set}" = set; then : + enableval=$enable_openssl_auto_load_config; if test X"$enableval" = X"no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: automatic loading of OpenSSL configuration disabled" >&5 +$as_echo "$as_me: automatic loading of OpenSSL configuration disabled" >&6;} + +$as_echo "#define CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG 1" >>confdefs.h + + fi + +fi + +fi + + +OPT_GNUTLS=no + + +# Check whether --with-gnutls was given. +if test "${with_gnutls+set}" = set; then : + withval=$with_gnutls; OPT_GNUTLS=$withval +fi + + +if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then + ssl_msg= + + if test X"$OPT_GNUTLS" != Xno; then + + addld="" + addlib="" + gtlslib="" + version="" + addcflags="" + + if test "x$OPT_GNUTLS" = "xyes"; then + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls options with pkg-config" >&5 +$as_echo_n "checking for gnutls options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists gnutls >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + addlib=`$PKGCONFIG --libs-only-l gnutls` + addld=`$PKGCONFIG --libs-only-L gnutls` + addcflags=`$PKGCONFIG --cflags-only-I gnutls` + version=`$PKGCONFIG --modversion gnutls` + gtlslib=`echo $addld | $SED -e 's/^-L//'` + else + check=`libgnutls-config --version 2>/dev/null` + if test -n "$check"; then + addlib=`libgnutls-config --libs` + addcflags=`libgnutls-config --cflags` + version=`libgnutls-config --version` + gtlslib=`libgnutls-config --prefix`/lib$libsuff + fi + fi + else + cfg=$OPT_GNUTLS/bin/libgnutls-config + check=`$cfg --version 2>/dev/null` + if test -n "$check"; then + addlib=`$cfg --libs` + addcflags=`$cfg --cflags` + version=`$cfg --version` + gtlslib=`$cfg --prefix`/lib$libsuff + else + addlib=-lgnutls + addld=-L$OPT_GNUTLS/lib$libsuff + addcflags=-I$OPT_GNUTLS/include + version="" # we just don't know + gtlslib=$OPT_GNUTLS/lib$libsuff + fi + fi + + if test -z "$version"; then + version="unknown" + fi + + if test -n "$addlib"; then + + CLEANLIBS="$LIBS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLDFLAGS="$LDFLAGS" + + LIBS="$addlib $LIBS" + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_x509_crt_get_dn2 in -lgnutls" >&5 +$as_echo_n "checking for gnutls_x509_crt_get_dn2 in -lgnutls... " >&6; } +if ${ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnutls $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gnutls_x509_crt_get_dn2 (); +int main (void) +{ +return gnutls_x509_crt_get_dn2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2=yes +else + ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2" >&5 +$as_echo "$ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2" >&6; } +if test "x$ac_cv_lib_gnutls_gnutls_x509_crt_get_dn2" = xyes; then : + + +$as_echo "#define USE_GNUTLS 1" >>confdefs.h + + USE_GNUTLS=1 + + GNUTLS_ENABLED=1 + USE_GNUTLS="yes" + ssl_msg="GnuTLS" + test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +else + + LIBS="$CLEANLIBS" + CPPFLAGS="$CLEANCPPFLAGS" + +fi + + + if test "x$USE_GNUTLS" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: detected GnuTLS version $version" >&5 +$as_echo "$as_me: detected GnuTLS version $version" >&6;} + check_for_ca_bundle=1 + if test -n "$gtlslib"; then + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $gtlslib to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $gtlslib to CURL_LIBRARY_PATH" >&6;} + fi + fi + fi + + fi + + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + + +if test "$GNUTLS_ENABLED" = "1"; then + USE_GNUTLS_NETTLE= + # First check if we can detect either crypto library via transitive linking + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lgnutls" >&5 +$as_echo_n "checking for nettle_MD5Init in -lgnutls... " >&6; } +if ${ac_cv_lib_gnutls_nettle_MD5Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnutls $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char nettle_MD5Init (); +int main (void) +{ +return nettle_MD5Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gnutls_nettle_MD5Init=yes +else + ac_cv_lib_gnutls_nettle_MD5Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_nettle_MD5Init" >&5 +$as_echo "$ac_cv_lib_gnutls_nettle_MD5Init" >&6; } +if test "x$ac_cv_lib_gnutls_nettle_MD5Init" = xyes; then : + USE_GNUTLS_NETTLE=1 +fi + + if test "$USE_GNUTLS_NETTLE" = ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgnutls" >&5 +$as_echo_n "checking for gcry_control in -lgnutls... " >&6; } +if ${ac_cv_lib_gnutls_gcry_control+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnutls $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gcry_control (); +int main (void) +{ +return gcry_control (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gnutls_gcry_control=yes +else + ac_cv_lib_gnutls_gcry_control=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gcry_control" >&5 +$as_echo "$ac_cv_lib_gnutls_gcry_control" >&6; } +if test "x$ac_cv_lib_gnutls_gcry_control" = xyes; then : + USE_GNUTLS_NETTLE=0 +fi + + fi + # If not, try linking directly to both of them to see if they are available + if test "$USE_GNUTLS_NETTLE" = ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_MD5Init in -lnettle" >&5 +$as_echo_n "checking for nettle_MD5Init in -lnettle... " >&6; } +if ${ac_cv_lib_nettle_nettle_MD5Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnettle $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char nettle_MD5Init (); +int main (void) +{ +return nettle_MD5Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nettle_nettle_MD5Init=yes +else + ac_cv_lib_nettle_nettle_MD5Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_MD5Init" >&5 +$as_echo "$ac_cv_lib_nettle_nettle_MD5Init" >&6; } +if test "x$ac_cv_lib_nettle_nettle_MD5Init" = xyes; then : + USE_GNUTLS_NETTLE=1 +fi + + fi + if test "$USE_GNUTLS_NETTLE" = ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5 +$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; } +if ${ac_cv_lib_gcrypt_gcry_control+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcrypt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gcry_control (); +int main (void) +{ +return gcry_control (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gcrypt_gcry_control=yes +else + ac_cv_lib_gcrypt_gcry_control=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_control" >&5 +$as_echo "$ac_cv_lib_gcrypt_gcry_control" >&6; } +if test "x$ac_cv_lib_gcrypt_gcry_control" = xyes; then : + USE_GNUTLS_NETTLE=0 +fi + + fi + if test "$USE_GNUTLS_NETTLE" = ""; then + as_fn_error $? "GnuTLS found, but neither gcrypt nor nettle found" "$LINENO" 5 + fi + if test "$USE_GNUTLS_NETTLE" = "1"; then + +$as_echo "#define USE_GNUTLS_NETTLE 1" >>confdefs.h + + USE_GNUTLS_NETTLE=1 + + LIBS="-lnettle $LIBS" + else + LIBS="-lgcrypt $LIBS" + fi +fi + +if test "$GNUTLS_ENABLED" = "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_srp_verifier in -lgnutls" >&5 +$as_echo_n "checking for gnutls_srp_verifier in -lgnutls... " >&6; } +if ${ac_cv_lib_gnutls_gnutls_srp_verifier+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgnutls $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char gnutls_srp_verifier (); +int main (void) +{ +return gnutls_srp_verifier (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gnutls_gnutls_srp_verifier=yes +else + ac_cv_lib_gnutls_gnutls_srp_verifier=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_srp_verifier" >&5 +$as_echo "$ac_cv_lib_gnutls_gnutls_srp_verifier" >&6; } +if test "x$ac_cv_lib_gnutls_gnutls_srp_verifier" = xyes; then : + + +$as_echo "#define HAVE_GNUTLS_SRP 1" >>confdefs.h + + HAVE_GNUTLS_SRP=1 + + +fi + +fi + + +OPT_MBEDTLS=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + +# Check whether --with-mbedtls was given. +if test "${with_mbedtls+set}" = set; then : + withval=$with_mbedtls; OPT_MBEDTLS=$withval +fi + + +if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then + ssl_msg= + + if test X"$OPT_MBEDTLS" != Xno; then + + if test "$OPT_MBEDTLS" = "yes"; then + OPT_MBEDTLS="" + fi + + if test -z "$OPT_MBEDTLS" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbedtls_havege_init in -lmbedtls" >&5 +$as_echo_n "checking for mbedtls_havege_init in -lmbedtls... " >&6; } +if ${ac_cv_lib_mbedtls_mbedtls_havege_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char mbedtls_havege_init (); +int main (void) +{ +return mbedtls_havege_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mbedtls_mbedtls_havege_init=yes +else + ac_cv_lib_mbedtls_mbedtls_havege_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mbedtls_mbedtls_havege_init" >&5 +$as_echo "$ac_cv_lib_mbedtls_mbedtls_havege_init" >&6; } +if test "x$ac_cv_lib_mbedtls_mbedtls_havege_init" = xyes; then : + + +$as_echo "#define USE_MBEDTLS 1" >>confdefs.h + + USE_MBEDTLS=1 + + MBEDTLS_ENABLED=1 + USE_MBEDTLS="yes" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +fi + + fi + + addld="" + addlib="" + addcflags="" + mbedtlslib="" + + if test "x$USE_MBEDTLS" != "xyes"; then + addld=-L$OPT_MBEDTLS/lib$libsuff + addcflags=-I$OPT_MBEDTLS/include + mbedtlslib=$OPT_MBEDTLS/lib$libsuff + + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbedtls_ssl_init in -lmbedtls" >&5 +$as_echo_n "checking for mbedtls_ssl_init in -lmbedtls... " >&6; } +if ${ac_cv_lib_mbedtls_mbedtls_ssl_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char mbedtls_ssl_init (); +int main (void) +{ +return mbedtls_ssl_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mbedtls_mbedtls_ssl_init=yes +else + ac_cv_lib_mbedtls_mbedtls_ssl_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mbedtls_mbedtls_ssl_init" >&5 +$as_echo "$ac_cv_lib_mbedtls_mbedtls_ssl_init" >&6; } +if test "x$ac_cv_lib_mbedtls_mbedtls_ssl_init" = xyes; then : + + +$as_echo "#define USE_MBEDTLS 1" >>confdefs.h + + USE_MBEDTLS=1 + + MBEDTLS_ENABLED=1 + USE_MBEDTLS="yes" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +else + + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + +fi + + fi + + if test "x$USE_MBEDTLS" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: detected mbedTLS" >&5 +$as_echo "$as_me: detected mbedTLS" >&6;} + check_for_ca_bundle=1 + + LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS" + + if test -n "$mbedtlslib"; then + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $mbedtlslib to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $mbedtlslib to CURL_LIBRARY_PATH" >&6;} + fi + fi + fi + + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + + +OPT_WOLFSSL=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + + +# Check whether --with-wolfssl was given. +if test "${with_wolfssl+set}" = set; then : + withval=$with_wolfssl; OPT_WOLFSSL=$withval +fi + + +case "$OPT_WOLFSSL" in + yes|no) + wolfpkg="" + ;; + *) + wolfpkg="$withval/lib/pkgconfig" + ;; +esac + +if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then + ssl_msg= + + if test X"$OPT_WOLFSSL" != Xno; then + + if test "$OPT_WOLFSSL" = "yes"; then + OPT_WOLFSSL="" + fi + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wolfssl options with pkg-config" >&5 +$as_echo_n "checking for wolfssl options with pkg-config... " >&6; } + itexists=` + if test -n "$wolfpkg"; then + PKG_CONFIG_LIBDIR="$wolfpkg" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists wolfssl >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: Check dir $wolfpkg" >&5 +$as_echo "$as_me: Check dir $wolfpkg" >&6;} + + addld="" + addlib="" + addcflags="" + if test "$PKGCONFIG" != "no" ; then + addlib=` + if test -n "$wolfpkg"; then + PKG_CONFIG_LIBDIR="$wolfpkg" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l wolfssl` + addld=` + if test -n "$wolfpkg"; then + PKG_CONFIG_LIBDIR="$wolfpkg" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L wolfssl` + addcflags=` + if test -n "$wolfpkg"; then + PKG_CONFIG_LIBDIR="$wolfpkg" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --cflags-only-I wolfssl` + version=` + if test -n "$wolfpkg"; then + PKG_CONFIG_LIBDIR="$wolfpkg" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --modversion wolfssl` + wolfssllibpath=`echo $addld | $SED -e 's/^-L//'` + else + addlib=-lwolfssl + if test -n "$OPT_WOLFSSL"; then + addld=-L$OPT_WOLFSSL/lib$libsuff + addcflags=-I$OPT_WOLFSSL/include + wolfssllibpath=$OPT_WOLFSSL/lib$libsuff + fi + fi + + if test "x$USE_WOLFSSL" != "xyes"; then + + LDFLAGS="$LDFLAGS $addld" + { $as_echo "$as_me:${as_lineno-$LINENO}: Add $addld to LDFLAGS" >&5 +$as_echo "$as_me: Add $addld to LDFLAGS" >&6;} + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + { $as_echo "$as_me:${as_lineno-$LINENO}: Add $addcflags to CPPFLAGS" >&5 +$as_echo "$as_me: Add $addcflags to CPPFLAGS" >&6;} + fi + + my_ac_save_LIBS="$LIBS" + LIBS="$addlib $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: Add $addlib to LIBS" >&5 +$as_echo "$as_me: Add $addlib to LIBS" >&6;} + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wolfSSL_Init in -lwolfssl" >&5 +$as_echo_n "checking for wolfSSL_Init in -lwolfssl... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +/* These aren't needed for detection and confuse WolfSSL. + They are set up properly later if it is detected. */ +#undef SIZEOF_LONG +#undef SIZEOF_LONG_LONG +#include + +int main (void) +{ + + return wolfSSL_Init(); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define USE_WOLFSSL 1" >>confdefs.h + + USE_WOLFSSL=1 + + WOLFSSL_ENABLED=1 + USE_WOLFSSL="yes" + ssl_msg="WolfSSL" + test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + wolfssllibpath="" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$my_ac_save_LIBS" + fi + + if test "x$USE_WOLFSSL" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: detected wolfSSL" >&5 +$as_echo "$as_me: detected wolfSSL" >&6;} + check_for_ca_bundle=1 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (long long) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_long_long=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_long_long != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_long_long = x ; then + as_fn_error $? "cannot determine a size for long long" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + + + LIBS="$addlib -lm $LIBS" + + for ac_func in wolfSSLv3_client_method \ + wolfSSL_get_peer_certificate \ + wolfSSL_UseALPN +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + ac_fn_c_check_func "$LINENO" "wolfSSL_DES_ecb_encrypt" "ac_cv_func_wolfSSL_DES_ecb_encrypt" +if test "x$ac_cv_func_wolfSSL_DES_ecb_encrypt" = xyes; then : + + +$as_echo "#define HAVE_WOLFSSL_DES_ECB_ENCRYPT 1" >>confdefs.h + + if test -n "$addcflags"; then + for f in $addcflags; do + CPPFLAGS="$f/wolfssl $CPPFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: Add $f/wolfssl to CPPFLAGS" >&5 +$as_echo "$as_me: Add $f/wolfssl to CPPFLAGS" >&6;} + break + done + else + CPPFLAGS="-I$includedir/wolfssl $CPPFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: Add $includedir/wolfssl to CPPFLAGS" >&5 +$as_echo "$as_me: Add $includedir/wolfssl to CPPFLAGS" >&6;} + fi + WOLFSSL_NTLM=1 + + +fi + + + if test -n "$wolfssllibpath"; then + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $wolfssllibpath to CURL_LIBRARY_PATH" >&6;} + fi + fi + + fi + + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + + +OPT_MESALINK=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + +# Check whether --with-mesalink was given. +if test "${with_mesalink+set}" = set; then : + withval=$with_mesalink; OPT_MESALINK=$withval +fi + + +if test -z "$ssl_backends" -o "x$OPT_MESALINK" != xno; then + ssl_msg= + + if test X"$OPT_MESALINK" != Xno; then + + if test "$OPT_MESALINK" = "yes"; then + OPT_MESALINK="" + fi + + if test -z "$OPT_MESALINK" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mesalink_library_init in -lmesalink" >&5 +$as_echo_n "checking for mesalink_library_init in -lmesalink... " >&6; } +if ${ac_cv_lib_mesalink_mesalink_library_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmesalink $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char mesalink_library_init (); +int main (void) +{ +return mesalink_library_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mesalink_mesalink_library_init=yes +else + ac_cv_lib_mesalink_mesalink_library_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mesalink_mesalink_library_init" >&5 +$as_echo "$ac_cv_lib_mesalink_mesalink_library_init" >&6; } +if test "x$ac_cv_lib_mesalink_mesalink_library_init" = xyes; then : + + +$as_echo "#define USE_MESALINK 1" >>confdefs.h + + USE_MESALINK=1 + + MESALINK_ENABLED=1 + USE_MESALINK="yes" + ssl_msg="MesaLink" + test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +fi + + fi + + addld="" + addlib="" + addcflags="" + mesalinklib="" + + if test "x$USE_MESALINK" != "xyes"; then + addld=-L$OPT_MESALINK/lib$libsuff + addcflags=-I$OPT_MESALINK/include + mesalinklib=$OPT_MESALINK/lib$libsuff + + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mesalink_library_init in -lmesalink" >&5 +$as_echo_n "checking for mesalink_library_init in -lmesalink... " >&6; } +if ${ac_cv_lib_mesalink_mesalink_library_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmesalink $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char mesalink_library_init (); +int main (void) +{ +return mesalink_library_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mesalink_mesalink_library_init=yes +else + ac_cv_lib_mesalink_mesalink_library_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mesalink_mesalink_library_init" >&5 +$as_echo "$ac_cv_lib_mesalink_mesalink_library_init" >&6; } +if test "x$ac_cv_lib_mesalink_mesalink_library_init" = xyes; then : + + +$as_echo "#define USE_MESALINK 1" >>confdefs.h + + USE_MESALINK=1 + + MESALINK_ENABLED=1 + USE_MESALINK="yes" + ssl_msg="MesaLink" + test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +else + + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + +fi + + fi + + if test "x$USE_MESALINK" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: detected MesaLink" >&5 +$as_echo "$as_me: detected MesaLink" >&6;} + + LIBS="-lmesalink $LIBS" + + if test -n "$mesalinklib"; then + if test "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib" + export LD_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $mesalinklib to LD_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $mesalinklib to LD_LIBRARY_PATH" >&6;} + fi + fi + fi + + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + + +OPT_BEARSSL=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + +# Check whether --with-bearssl was given. +if test "${with_bearssl+set}" = set; then : + withval=$with_bearssl; OPT_BEARSSL=$withval +fi + + +if test -z "$ssl_backends" -o "x$OPT_BEARSSL" != xno; then + ssl_msg= + + if test X"$OPT_BEARSSL" != Xno; then + + if test "$OPT_BEARSSL" = "yes"; then + OPT_BEARSSL="" + fi + + if test -z "$OPT_BEARSSL" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for br_ssl_client_init_full in -lbearssl" >&5 +$as_echo_n "checking for br_ssl_client_init_full in -lbearssl... " >&6; } +if ${ac_cv_lib_bearssl_br_ssl_client_init_full+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbearssl -lbearssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char br_ssl_client_init_full (); +int main (void) +{ +return br_ssl_client_init_full (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bearssl_br_ssl_client_init_full=yes +else + ac_cv_lib_bearssl_br_ssl_client_init_full=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bearssl_br_ssl_client_init_full" >&5 +$as_echo "$ac_cv_lib_bearssl_br_ssl_client_init_full" >&6; } +if test "x$ac_cv_lib_bearssl_br_ssl_client_init_full" = xyes; then : + + +$as_echo "#define USE_BEARSSL 1" >>confdefs.h + + USE_BEARSSL=1 + + BEARSSL_ENABLED=1 + USE_BEARSSL="yes" + ssl_msg="BearSSL" + test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +fi + + fi + + addld="" + addlib="" + addcflags="" + bearssllib="" + + if test "x$USE_BEARSSL" != "xyes"; then + addld=-L$OPT_BEARSSL/lib$libsuff + addcflags=-I$OPT_BEARSSL/include + bearssllib=$OPT_BEARSSL/lib$libsuff + + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for br_ssl_client_init_full in -lbearssl" >&5 +$as_echo_n "checking for br_ssl_client_init_full in -lbearssl... " >&6; } +if ${ac_cv_lib_bearssl_br_ssl_client_init_full+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbearssl -lbearssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char br_ssl_client_init_full (); +int main (void) +{ +return br_ssl_client_init_full (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bearssl_br_ssl_client_init_full=yes +else + ac_cv_lib_bearssl_br_ssl_client_init_full=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bearssl_br_ssl_client_init_full" >&5 +$as_echo "$ac_cv_lib_bearssl_br_ssl_client_init_full" >&6; } +if test "x$ac_cv_lib_bearssl_br_ssl_client_init_full" = xyes; then : + + +$as_echo "#define USE_BEARSSL 1" >>confdefs.h + + USE_BEARSSL=1 + + BEARSSL_ENABLED=1 + USE_BEARSSL="yes" + ssl_msg="BearSSL" + test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +else + + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + +fi + + fi + + if test "x$USE_BEARSSL" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: detected BearSSL" >&5 +$as_echo "$as_me: detected BearSSL" >&6;} + check_for_ca_bundle=1 + + LIBS="-lbearssl $LIBS" + + if test -n "$bearssllib"; then + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$bearssllib" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $bearssllib to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $bearssllib to CURL_LIBRARY_PATH" >&6;} + fi + fi + fi + + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + + +OPT_NSS=no + + +# Check whether --with-nss was given. +if test "${with_nss+set}" = set; then : + withval=$with_nss; OPT_NSS=$withval +fi + + +if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then + ssl_msg= + + if test X"$OPT_NSS" != Xno; then + + addld="" + addlib="" + addcflags="" + nssprefix="" + version="" + + if test "x$OPT_NSS" = "xyes"; then + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5 +$as_echo_n "checking for nss options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + addlib=`$PKGCONFIG --libs nss` + addcflags=`$PKGCONFIG --cflags nss` + version=`$PKGCONFIG --modversion nss` + nssprefix=`$PKGCONFIG --variable=prefix nss` + else + + check=`nss-config --version 2>/dev/null` + if test -n "$check"; then + addlib=`nss-config --libs` + addcflags=`nss-config --cflags` + version=`nss-config --version` + nssprefix=`nss-config --prefix` + else + addlib="-lnss3" + addcflags="" + version="unknown" + fi + fi + else + NSS_PCDIR="$OPT_NSS/lib/pkgconfig" + if test -f "$NSS_PCDIR/nss.pc"; then + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss options with pkg-config" >&5 +$as_echo_n "checking for nss options with pkg-config... " >&6; } + itexists=` + if test -n "$NSS_PCDIR"; then + PKG_CONFIG_LIBDIR="$NSS_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists nss >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + if test "$PKGCONFIG" != "no" ; then + addld=` + if test -n "$NSS_PCDIR"; then + PKG_CONFIG_LIBDIR="$NSS_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-L nss` + addlib=` + if test -n "$NSS_PCDIR"; then + PKG_CONFIG_LIBDIR="$NSS_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-l nss` + addcflags=` + if test -n "$NSS_PCDIR"; then + PKG_CONFIG_LIBDIR="$NSS_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags nss` + version=` + if test -n "$NSS_PCDIR"; then + PKG_CONFIG_LIBDIR="$NSS_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --modversion nss` + nssprefix=` + if test -n "$NSS_PCDIR"; then + PKG_CONFIG_LIBDIR="$NSS_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --variable=prefix nss` + fi + fi + fi + + if test -z "$addlib"; then + # Without pkg-config, we'll kludge in some defaults + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5 +$as_echo "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;} + addld="-L$OPT_NSS/lib" + addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4" + addcflags="-I$OPT_NSS/include" + version="unknown" + nssprefix=$OPT_NSS + fi + + CLEANLDFLAGS="$LDFLAGS" + CLEANLIBS="$LIBS" + CLEANCPPFLAGS="$CPPFLAGS" + + LDFLAGS="$addld $LDFLAGS" + LIBS="$addlib $LIBS" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_VersionRangeSet in -lnss3" >&5 +$as_echo_n "checking for SSL_VersionRangeSet in -lnss3... " >&6; } +if ${ac_cv_lib_nss3_SSL_VersionRangeSet+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnss3 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char SSL_VersionRangeSet (); +int main (void) +{ +return SSL_VersionRangeSet (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nss3_SSL_VersionRangeSet=yes +else + ac_cv_lib_nss3_SSL_VersionRangeSet=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_SSL_VersionRangeSet" >&5 +$as_echo "$ac_cv_lib_nss3_SSL_VersionRangeSet" >&6; } +if test "x$ac_cv_lib_nss3_SSL_VersionRangeSet" = xyes; then : + + +$as_echo "#define USE_NSS 1" >>confdefs.h + + USE_NSS=1 + + USE_NSS="yes" + NSS_ENABLED=1 + ssl_msg="NSS" + test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + +else + + LDFLAGS="$CLEANLDFLAGS" + LIBS="$CLEANLIBS" + CPPFLAGS="$CLEANCPPFLAGS" + +fi + + + if test "x$USE_NSS" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: detected NSS version $version" >&5 +$as_echo "$as_me: detected NSS version $version" >&6;} + + ac_fn_c_check_func "$LINENO" "PK11_CreateManagedGenericObject" "ac_cv_func_PK11_CreateManagedGenericObject" +if test "x$ac_cv_func_PK11_CreateManagedGenericObject" = xyes; then : + + +$as_echo "#define HAVE_PK11_CREATEMANAGEDGENERICOBJECT 1" >>confdefs.h + + +fi + + + NSS_LIBS=$addlib + + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&6;} + fi + + fi + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED" in +x) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&5 +$as_echo "$as_me: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this." >&5 +$as_echo "$as_me: WARNING: Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this." >&2;} + ;; +x1) + # one SSL backend is enabled + + SSL_ENABLED="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: built with one SSL backend" >&5 +$as_echo "$as_me: built with one SSL backend" >&6;} + ;; +*) + # more than one SSL backend is enabled + + SSL_ENABLED="1" + + CURL_WITH_MULTI_SSL="1" + +$as_echo "#define CURL_WITH_MULTI_SSL 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: built with multiple SSL backends" >&5 +$as_echo "$as_me: built with multiple SSL backends" >&6;} + ;; +esac + +if test -n "$ssl_backends"; then + curl_ssl_msg="enabled ($ssl_backends)" +fi + +if test no = "$VALID_DEFAULT_SSL_BACKEND" +then + if test -n "$SSL_ENABLED" + then + as_fn_error $? "Default SSL backend $DEFAULT_SSL_BACKEND not enabled!" "$LINENO" 5 + else + as_fn_error $? "Default SSL backend requires SSL!" "$LINENO" 5 + fi +elif test yes = "$VALID_DEFAULT_SSL_BACKEND" +then + +cat >>confdefs.h <<_ACEOF +#define CURL_DEFAULT_SSL_BACKEND "$DEFAULT_SSL_BACKEND" +_ACEOF + +fi + + +if test -n "$check_for_ca_bundle"; then + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking default CA cert bundle/path" >&5 +$as_echo_n "checking default CA cert bundle/path... " >&6; } + + +# Check whether --with-ca-bundle was given. +if test "${with_ca_bundle+set}" = set; then : + withval=$with_ca_bundle; + want_ca="$withval" + if test "x$want_ca" = "xyes"; then + as_fn_error $? "--with-ca-bundle=FILE requires a path to the CA bundle" "$LINENO" 5 + fi + +else + want_ca="unset" +fi + + +# Check whether --with-ca-path was given. +if test "${with_ca_path+set}" = set; then : + withval=$with_ca_path; + want_capath="$withval" + if test "x$want_capath" = "xyes"; then + as_fn_error $? "--with-ca-path=DIRECTORY requires a path to the CA path directory" "$LINENO" 5 + fi + +else + want_capath="unset" +fi + + + ca_warning=" (warning: certs not found)" + capath_warning=" (warning: certs not found)" + check_capath="" + + if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \ + "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then + ca="$want_ca" + capath="$want_capath" + elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then + ca="$want_ca" + capath="no" + elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then + if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$MBEDTLS_ENABLED" != "x1"; then + as_fn_error $? "--with-ca-path only works with OpenSSL, GnuTLS or mbedTLS" "$LINENO" 5 + fi + capath="$want_capath" + ca="no" + else + ca="no" + capath="no" + if test "x$cross_compiling" != "xyes"; then + if test "x$want_ca" = "xunset"; then + if test "x$prefix" != xNONE; then + cac="${prefix}/share/curl/curl-ca-bundle.crt" + else + cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt" + fi + + for a in /etc/ssl/certs/ca-certificates.crt \ + /etc/pki/tls/certs/ca-bundle.crt \ + /usr/share/ssl/certs/ca-bundle.crt \ + /usr/local/share/certs/ca-root-nss.crt \ + /etc/ssl/cert.pem \ + "$cac"; do + if test -f "$a"; then + ca="$a" + break + fi + done + fi + if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \ + "x$OPENSSL_ENABLED" = "x1"; then + check_capath="/etc/ssl/certs/" + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipped the ca-cert path detection when cross-compiling" >&5 +$as_echo "$as_me: WARNING: skipped the ca-cert path detection when cross-compiling" >&2;} + fi + fi + + if test "x$ca" = "xno" || test -f "$ca"; then + ca_warning="" + fi + + if test "x$capath" != "xno"; then + check_capath="$capath" + fi + + if test ! -z "$check_capath"; then + for a in "$check_capath"; do + if test -d "$a" && ls "$a"/[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].0 >/dev/null 2>/dev/null; then + if test "x$capath" = "xno"; then + capath="$a" + fi + capath_warning="" + break + fi + done + fi + + if test "x$capath" = "xno"; then + capath_warning="" + fi + + if test "x$ca" != "xno"; then + CURL_CA_BUNDLE='"'$ca'"' + +cat >>confdefs.h <<_ACEOF +#define CURL_CA_BUNDLE "$ca" +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ca" >&5 +$as_echo "$ca" >&6; } + fi + if test "x$capath" != "xno"; then + CURL_CA_PATH="\"$capath\"" + +cat >>confdefs.h <<_ACEOF +#define CURL_CA_PATH "$capath" +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $capath (capath)" >&5 +$as_echo "$capath (capath)" >&6; } + fi + if test "x$ca" = "xno" && test "x$capath" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use builtin CA store of SSL library" >&5 +$as_echo_n "checking whether to use builtin CA store of SSL library... " >&6; } + +# Check whether --with-ca-fallback was given. +if test "${with_ca_fallback+set}" = set; then : + withval=$with_ca_fallback; + if test "x$with_ca_fallback" != "xyes" -a "x$with_ca_fallback" != "xno"; then + as_fn_error $? "--with-ca-fallback only allows yes or no as parameter" "$LINENO" 5 + fi + +else + with_ca_fallback="no" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ca_fallback" >&5 +$as_echo "$with_ca_fallback" >&6; } + if test "x$with_ca_fallback" = "xyes"; then + if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1"; then + as_fn_error $? "--with-ca-fallback only works with OpenSSL or GnuTLS" "$LINENO" 5 + fi + +cat >>confdefs.h <<_ACEOF +#define CURL_CA_FALLBACK 1 +_ACEOF + + fi + +fi + + + +# Check whether --with-libpsl was given. +if test "${with_libpsl+set}" = set; then : + withval=$with_libpsl; with_libpsl=$withval +else + with_libpsl=yes +fi + +if test $with_libpsl != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing psl_builtin" >&5 +$as_echo_n "checking for library containing psl_builtin... " >&6; } +if ${ac_cv_search_psl_builtin+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char psl_builtin (); +int main (void) +{ +return psl_builtin (); + ; + return 0; +} +_ACEOF +for ac_lib in '' psl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_psl_builtin=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_psl_builtin+:} false; then : + break +fi +done +if ${ac_cv_search_psl_builtin+:} false; then : + +else + ac_cv_search_psl_builtin=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_psl_builtin" >&5 +$as_echo "$ac_cv_search_psl_builtin" >&6; } +ac_res=$ac_cv_search_psl_builtin +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + curl_psl_msg="enabled"; + +$as_echo "#define USE_LIBPSL 1" >>confdefs.h + + +else + curl_psl_msg="no (libpsl not found)"; + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libpsl was not found" >&5 +$as_echo "$as_me: WARNING: libpsl was not found" >&2;} + + +fi + +fi + if test "$curl_psl_msg" = "enabled"; then + USE_LIBPSL_TRUE= + USE_LIBPSL_FALSE='#' +else + USE_LIBPSL_TRUE='#' + USE_LIBPSL_FALSE= +fi + + + +OPT_LIBMETALINK=no + + +# Check whether --with-libmetalink was given. +if test "${with_libmetalink+set}" = set; then : + withval=$with_libmetalink; OPT_LIBMETALINK=$withval +fi + + +if test X"$OPT_LIBMETALINK" != Xno; then + + addld="" + addlib="" + addcflags="" + version="" + libmetalinklib="" + + PKGTEST="no" + if test "x$OPT_LIBMETALINK" = "xyes"; then + PKGTEST="yes" + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmetalink options with pkg-config" >&5 +$as_echo_n "checking for libmetalink options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libmetalink >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + else + LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig" + { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$LIBMETALINK_PCDIR\"" >&5 +$as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$LIBMETALINK_PCDIR\"" >&6;} + if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then + PKGTEST="yes" + fi + if test "$PKGTEST" = "yes"; then + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmetalink options with pkg-config" >&5 +$as_echo_n "checking for libmetalink options with pkg-config... " >&6; } + itexists=` + if test -n "$LIBMETALINK_PCDIR"; then + PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libmetalink >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + fi + fi + if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then + addlib=` + if test -n "$LIBMETALINK_PCDIR"; then + PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-l libmetalink` + addld=` + if test -n "$LIBMETALINK_PCDIR"; then + PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-L libmetalink` + addcflags=` + if test -n "$LIBMETALINK_PCDIR"; then + PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libmetalink` + version=` + if test -n "$LIBMETALINK_PCDIR"; then + PKG_CONFIG_LIBDIR="$LIBMETALINK_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --modversion libmetalink` + libmetalinklib=`echo $addld | $SED -e 's/^-L//'` + fi + if test -n "$addlib"; then + + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + CPPFLAGS="$clean_CPPFLAGS $addcflags" + LDFLAGS="$clean_LDFLAGS $addld" + LIBS="$addlib $clean_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmetalink is recent enough" >&5 +$as_echo_n "checking if libmetalink is recent enough... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +# include + +int main (void) +{ + + if(0 != metalink_strerror(0)) /* added in 0.1.0 */ + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($version)" >&5 +$as_echo "yes ($version)" >&6; } + want_metalink="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no ($version)" >&5 +$as_echo "no ($version)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: libmetalink library defective or too old" >&5 +$as_echo "$as_me: libmetalink library defective or too old" >&6;} + want_metalink="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "x$OPENSSL_ENABLED" != "x1" -a "x$USE_WINDOWS_SSPI" != "x1" \ + -a "x$GNUTLS_ENABLED" != "x1" -a "x$NSS_ENABLED" != "x1" \ + -a "x$SECURETRANSPORT_ENABLED" != "x1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: metalink support requires a compatible SSL/TLS backend" >&5 +$as_echo "$as_me: WARNING: metalink support requires a compatible SSL/TLS backend" >&2;} + want_metalink="no" + fi + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + if test "$want_metalink" = "yes"; then + +$as_echo "#define USE_METALINK 1" >>confdefs.h + + LIBMETALINK_LIBS=$addlib + LIBMETALINK_LDFLAGS=$addld + LIBMETALINK_CPPFLAGS=$addcflags + + + + curl_mtlnk_msg="enabled" + fi + + fi +fi + + +OPT_LIBSSH2=off + +# Check whether --with-libssh2 was given. +if test "${with_libssh2+set}" = set; then : + withval=$with_libssh2; OPT_LIBSSH2=$withval +else + OPT_LIBSSH2=no +fi + + + +OPT_LIBSSH=off + +# Check whether --with-libssh was given. +if test "${with_libssh+set}" = set; then : + withval=$with_libssh; OPT_LIBSSH=$withval +else + OPT_LIBSSH=no +fi + + +OPT_WOLFSSH=off + +# Check whether --with-wolfssh was given. +if test "${with_wolfssh+set}" = set; then : + withval=$with_wolfssh; OPT_WOLFSSH=$withval +else + OPT_WOLFSSH=no +fi + + +if test X"$OPT_LIBSSH2" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBSSH2" in + yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2 options with pkg-config" >&5 +$as_echo_n "checking for libssh2 options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libssh2 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_SSH2=`$PKGCONFIG --libs libssh2` + LD_SSH2=`$PKGCONFIG --libs-only-L libssh2` + CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2` + version=`$PKGCONFIG --modversion libssh2` + DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'` + fi + + ;; + off) + ;; + *) + PREFIX_SSH2=$OPT_LIBSSH2 + ;; + esac + + if test -n "$PREFIX_SSH2"; then + LIB_SSH2="-lssh2" + LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff + CPP_SSH2=-I${PREFIX_SSH2}/include + DIR_SSH2=${PREFIX_SSH2}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_SSH2" + CPPFLAGS="$CPPFLAGS $CPP_SSH2" + LIBS="$LIB_SSH2 $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh2_channel_open_ex in -lssh2" >&5 +$as_echo_n "checking for libssh2_channel_open_ex in -lssh2... " >&6; } +if ${ac_cv_lib_ssh2_libssh2_channel_open_ex+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssh2 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char libssh2_channel_open_ex (); +int main (void) +{ +return libssh2_channel_open_ex (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssh2_libssh2_channel_open_ex=yes +else + ac_cv_lib_ssh2_libssh2_channel_open_ex=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_channel_open_ex" >&5 +$as_echo "$ac_cv_lib_ssh2_libssh2_channel_open_ex" >&6; } +if test "x$ac_cv_lib_ssh2_libssh2_channel_open_ex" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSH2 1 +_ACEOF + + LIBS="-lssh2 $LIBS" + +fi + + + for ac_header in libssh2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libssh2.h" "ac_cv_header_libssh2_h" "$ac_includes_default" +if test "x$ac_cv_header_libssh2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSH2_H 1 +_ACEOF + curl_ssh_msg="enabled (libSSH2)" + LIBSSH2_ENABLED=1 + +$as_echo "#define USE_LIBSSH2 1" >>confdefs.h + + USE_LIBSSH2=1 + + +fi + +done + + + if test X"$OPT_LIBSSH2" != Xoff && + test "$LIBSSH2_ENABLED" != "1"; then + as_fn_error $? "libSSH2 libs and/or directories were not found where specified!" "$LINENO" 5 + fi + + if test "$LIBSSH2_ENABLED" = "1"; then + if test -n "$DIR_SSH2"; then + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_SSH2 to CURL_LIBRARY_PATH" >&6;} + fi + fi + else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +elif test X"$OPT_LIBSSH" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBSSH" in + yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssh options with pkg-config" >&5 +$as_echo_n "checking for libssh options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libssh >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_SSH=`$PKGCONFIG --libs-only-l libssh` + LD_SSH=`$PKGCONFIG --libs-only-L libssh` + CPP_SSH=`$PKGCONFIG --cflags-only-I libssh` + version=`$PKGCONFIG --modversion libssh` + DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'` + fi + + ;; + off) + ;; + *) + PREFIX_SSH=$OPT_LIBSSH + ;; + esac + + if test -n "$PREFIX_SSH"; then + LIB_SSH="-lssh" + LD_SSH=-L${PREFIX_SSH}/lib$libsuff + CPP_SSH=-I${PREFIX_SSH}/include + DIR_SSH=${PREFIX_SSH}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_SSH" + CPPFLAGS="$CPPFLAGS $CPP_SSH" + LIBS="$LIB_SSH $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssh_new in -lssh" >&5 +$as_echo_n "checking for ssh_new in -lssh... " >&6; } +if ${ac_cv_lib_ssh_ssh_new+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssh $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ssh_new (); +int main (void) +{ +return ssh_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssh_ssh_new=yes +else + ac_cv_lib_ssh_ssh_new=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh_ssh_new" >&5 +$as_echo "$ac_cv_lib_ssh_ssh_new" >&6; } +if test "x$ac_cv_lib_ssh_ssh_new" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSH 1 +_ACEOF + + LIBS="-lssh $LIBS" + +fi + + + for ac_header in libssh/libssh.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libssh/libssh.h" "ac_cv_header_libssh_libssh_h" "$ac_includes_default" +if test "x$ac_cv_header_libssh_libssh_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSH_LIBSSH_H 1 +_ACEOF + curl_ssh_msg="enabled (libSSH)" + LIBSSH_ENABLED=1 + +$as_echo "#define USE_LIBSSH 1" >>confdefs.h + + USE_LIBSSH=1 + + +fi + +done + + + if test X"$OPT_LIBSSH" != Xoff && + test "$LIBSSH_ENABLED" != "1"; then + as_fn_error $? "libSSH libs and/or directories were not found where specified!" "$LINENO" 5 + fi + + if test "$LIBSSH_ENABLED" = "1"; then + if test -n "$DIR_SSH"; then + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_SSH to CURL_LIBRARY_PATH" >&6;} + fi + fi + else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +elif test X"$OPT_WOLFSSH" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test "$OPT_WOLFSSH" != yes; then + WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config" + LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`" + CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wolfSSH_Init in -lwolfssh" >&5 +$as_echo_n "checking for wolfSSH_Init in -lwolfssh... " >&6; } +if ${ac_cv_lib_wolfssh_wolfSSH_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwolfssh $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char wolfSSH_Init (); +int main (void) +{ +return wolfSSH_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_wolfssh_wolfSSH_Init=yes +else + ac_cv_lib_wolfssh_wolfSSH_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wolfssh_wolfSSH_Init" >&5 +$as_echo "$ac_cv_lib_wolfssh_wolfSSH_Init" >&6; } +if test "x$ac_cv_lib_wolfssh_wolfSSH_Init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWOLFSSH 1 +_ACEOF + + LIBS="-lwolfssh $LIBS" + +fi + + + for ac_header in wolfssh/ssh.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "wolfssh/ssh.h" "ac_cv_header_wolfssh_ssh_h" "$ac_includes_default" +if test "x$ac_cv_header_wolfssh_ssh_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WOLFSSH_SSH_H 1 +_ACEOF + curl_ssh_msg="enabled (wolfSSH)" + WOLFSSH_ENABLED=1 + +$as_echo "#define USE_WOLFSSH 1" >>confdefs.h + + USE_WOLFSSH=1 + + +fi + +done + + +fi + + +OPT_LIBRTMP=off + +# Check whether --with-librtmp was given. +if test "${with_librtmp+set}" = set; then : + withval=$with_librtmp; OPT_LIBRTMP=$withval +fi + + +if test X"$OPT_LIBRTMP" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBRTMP" in + yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librtmp options with pkg-config" >&5 +$as_echo_n "checking for librtmp options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists librtmp >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp` + LD_RTMP=`$PKGCONFIG --libs-only-L librtmp` + CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp` + version=`$PKGCONFIG --modversion librtmp` + DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'` + else + as_fn_error $? "--librtmp was specified but could not find librtmp pkgconfig file." "$LINENO" 5 + fi + + ;; + off) + LIB_RTMP="-lrtmp" + ;; + *) + LIB_RTMP="-lrtmp" + PREFIX_RTMP=$OPT_LIBRTMP + ;; + esac + + if test -n "$PREFIX_RTMP"; then + LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff + CPP_RTMP=-I${PREFIX_RTMP}/include + DIR_RTMP=${PREFIX_RTMP}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_RTMP" + CPPFLAGS="$CPPFLAGS $CPP_RTMP" + LIBS="$LIB_RTMP $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTMP_Init in -lrtmp" >&5 +$as_echo_n "checking for RTMP_Init in -lrtmp... " >&6; } +if ${ac_cv_lib_rtmp_RTMP_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrtmp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char RTMP_Init (); +int main (void) +{ +return RTMP_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rtmp_RTMP_Init=yes +else + ac_cv_lib_rtmp_RTMP_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rtmp_RTMP_Init" >&5 +$as_echo "$ac_cv_lib_rtmp_RTMP_Init" >&6; } +if test "x$ac_cv_lib_rtmp_RTMP_Init" = xyes; then : + + for ac_header in librtmp/rtmp.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "librtmp/rtmp.h" "ac_cv_header_librtmp_rtmp_h" "$ac_includes_default" +if test "x$ac_cv_header_librtmp_rtmp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRTMP_RTMP_H 1 +_ACEOF + curl_rtmp_msg="enabled (librtmp)" + LIBRTMP_ENABLED=1 + +$as_echo "#define USE_LIBRTMP 1" >>confdefs.h + + USE_LIBRTMP=1 + + +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + + if test X"$OPT_LIBRTMP" != Xoff && + test "$LIBRTMP_ENABLED" != "1"; then + as_fn_error $? "librtmp libs and/or directories were not found where specified!" "$LINENO" 5 + fi + +fi + + +versioned_symbols_flavour= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether versioned symbols are wanted" >&5 +$as_echo_n "checking whether versioned symbols are wanted... " >&6; } +# Check whether --enable-versioned-symbols was given. +if test "${enable_versioned_symbols+set}" = set; then : + enableval=$enable_versioned_symbols; case "$enableval" in + yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5 +$as_echo_n "checking if libraries can be versioned... " >&6; } + GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` + if test -z "$GLD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need an ld version supporting the --version-script option" >&5 +$as_echo "$as_me: WARNING: You need an ld version supporting the --version-script option" >&2;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + versioned_symbols_flavour="MULTISSL_" + elif test "x$OPENSSL_ENABLED" = "x1"; then + versioned_symbols_flavour="OPENSSL_" + elif test "x$GNUTLS_ENABLED" = "x1"; then + versioned_symbols_flavour="GNUTLS_" + elif test "x$NSS_ENABLED" = "x1"; then + versioned_symbols_flavour="NSS_" + elif test "x$WOLFSSL_ENABLED" = "x1"; then + versioned_symbols_flavour="WOLFSSL_" + elif test "x$SCHANNEL_ENABLED" = "x1"; then + versioned_symbols_flavour="SCHANNEL_" + elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then + versioned_symbols_flavour="SECURE_TRANSPORT_" + else + versioned_symbols_flavour="" + fi + versioned_symbols="yes" + fi + ;; + + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac + +else + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + +fi + + +CURL_LT_SHLIB_VERSIONED_FLAVOUR="$versioned_symbols_flavour" + + if test "x$versioned_symbols" = 'xyes'; then + CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE= + CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE='#' +else + CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE='#' + CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE= +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Windows native IDN (Windows native builds only)" >&5 +$as_echo_n "checking whether to enable Windows native IDN (Windows native builds only)... " >&6; } +OPT_WINIDN="default" + +# Check whether --with-winidn was given. +if test "${with_winidn+set}" = set; then : + withval=$with_winidn; OPT_WINIDN=$withval +fi + +case "$OPT_WINIDN" in + no|default) + want_winidn="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + yes) + want_winidn="yes" + want_winidn_path="default" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + want_winidn="yes" + want_winidn_path="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5 +$as_echo "yes ($withval)" >&6; } + ;; +esac + +if test "$want_winidn" = "yes"; then + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + WINIDN_LIBS="-lnormaliz" + WINIDN_CPPFLAGS="-DWINVER=0x0600" + # + if test "$want_winidn_path" != "default"; then + WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff" + WINIDN_CPPFLAGS="-I$want_winidn_path/include" + WINIDN_DIR="$want_winidn_path/lib$libsuff" + fi + # + CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS" + LIBS="$WINIDN_LIBS $LIBS" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IdnToUnicode can be linked" >&5 +$as_echo_n "checking if IdnToUnicode can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + +int main (void) +{ + + IdnToUnicode(0, NULL, 0, NULL, 0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_winidn="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_winidn="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_winidn" = "yes"; then + +$as_echo "#define USE_WIN32_IDN 1" >>confdefs.h + + +$as_echo "#define WANT_IDN_PROTOTYPES 1" >>confdefs.h + + IDN_ENABLED=1 + + curl_idn_msg="enabled (Windows-native)" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5 +$as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;} + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + fi +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libidn2" >&5 +$as_echo_n "checking whether to build with libidn2... " >&6; } +OPT_IDN="default" + +# Check whether --with-libidn2 was given. +if test "${with_libidn2+set}" = set; then : + withval=$with_libidn2; OPT_IDN=$withval +fi + +case "$OPT_IDN" in + no) + want_idn="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + default) + want_idn="yes" + want_idn_path="default" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5 +$as_echo "(assumed) yes" >&6; } + ;; + yes) + want_idn="yes" + want_idn_path="default" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + *) + want_idn="yes" + want_idn_path="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($withval)" >&5 +$as_echo "yes ($withval)" >&6; } + ;; +esac + +if test "$want_idn" = "yes"; then + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + PKGCONFIG="no" + # + if test "$want_idn_path" != "default"; then + IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig" + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn2 options with pkg-config" >&5 +$as_echo_n "checking for libidn2 options with pkg-config... " >&6; } + itexists=` + if test -n "$IDN_PCDIR"; then + PKG_CONFIG_LIBDIR="$IDN_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libidn2 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + if test "$PKGCONFIG" != "no"; then + IDN_LIBS=` + if test -n "$IDN_PCDIR"; then + PKG_CONFIG_LIBDIR="$IDN_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-l libidn2 2>/dev/null` + IDN_LDFLAGS=` + if test -n "$IDN_PCDIR"; then + PKG_CONFIG_LIBDIR="$IDN_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --libs-only-L libidn2 2>/dev/null` + IDN_CPPFLAGS=` + if test -n "$IDN_PCDIR"; then + PKG_CONFIG_LIBDIR="$IDN_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libidn2 2>/dev/null` + IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'` + else + IDN_LIBS="-lidn2" + IDN_LDFLAGS="-L$want_idn_path/lib$libsuff" + IDN_CPPFLAGS="-I$want_idn_path/include" + IDN_DIR="$want_idn_path/lib$libsuff" + fi + else + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidn2 options with pkg-config" >&5 +$as_echo_n "checking for libidn2 options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libidn2 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + if test "$PKGCONFIG" != "no"; then + IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null` + IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null` + IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null` + IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'` + else + IDN_LIBS="-lidn2" + fi + fi + # + if test "$PKGCONFIG" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_LIBS: \"$IDN_LIBS\"" >&5 +$as_echo "$as_me: pkg-config: IDN_LIBS: \"$IDN_LIBS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: IDN_DIR: \"$IDN_DIR\"" >&5 +$as_echo "$as_me: pkg-config: IDN_DIR: \"$IDN_DIR\"" >&6;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_LIBS: \"$IDN_LIBS\"" >&5 +$as_echo "$as_me: IDN_LIBS: \"$IDN_LIBS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&5 +$as_echo "$as_me: IDN_LDFLAGS: \"$IDN_LDFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&5 +$as_echo "$as_me: IDN_CPPFLAGS: \"$IDN_CPPFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: IDN_DIR: \"$IDN_DIR\"" >&5 +$as_echo "$as_me: IDN_DIR: \"$IDN_DIR\"" >&6;} + fi + # + CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $IDN_LDFLAGS" + LIBS="$IDN_LIBS $LIBS" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if idn2_lookup_ul can be linked" >&5 +$as_echo_n "checking if idn2_lookup_ul can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define idn2_lookup_ul innocuous_idn2_lookup_ul +#ifdef __STDC__ +# include +#else +# include +#endif +#undef idn2_lookup_ul +#ifdef __cplusplus +extern "C" +#endif +char idn2_lookup_ul (); +#if defined __stub_idn2_lookup_ul || defined __stub___idn2_lookup_ul +choke me +#endif + +int main (void) +{ +return idn2_lookup_ul (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_libidn="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_libidn="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + for ac_header in idn2.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + if test "$tst_links_libidn" = "yes"; then + +$as_echo "#define HAVE_LIBIDN2 1" >>confdefs.h + + + IDN_ENABLED=1 + + curl_idn_msg="enabled (libidn2)" + if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $IDN_DIR to CURL_LIBRARY_PATH" >&6;} + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5 +$as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;} + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + fi +fi + + + + + +OPT_H2="yes" + +if test "x$disable_http" = "xyes"; then + # without HTTP, nghttp2 is no use + OPT_H2="no" +fi + + +# Check whether --with-nghttp2 was given. +if test "${with_nghttp2+set}" = set; then : + withval=$with_nghttp2; OPT_H2=$withval +fi + +case "$OPT_H2" in + no) + want_h2="no" + ;; + yes) + want_h2="default" + want_h2_path="" + ;; + *) + want_h2="yes" + want_h2_path="$withval/lib/pkgconfig" + ;; +esac + +curl_h2_msg="no (--with-nghttp2)" +if test X"$want_h2" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp2 options with pkg-config" >&5 +$as_echo_n "checking for libnghttp2 options with pkg-config... " >&6; } + itexists=` + if test -n "$want_h2_path"; then + PKG_CONFIG_LIBDIR="$want_h2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libnghttp2 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_H2=` + if test -n "$want_h2_path"; then + PKG_CONFIG_LIBDIR="$want_h2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l libnghttp2` + { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_H2" >&5 +$as_echo "$as_me: -l is $LIB_H2" >&6;} + + CPP_H2=` + if test -n "$want_h2_path"; then + PKG_CONFIG_LIBDIR="$want_h2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libnghttp2` + { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_H2" >&5 +$as_echo "$as_me: -I is $CPP_H2" >&6;} + + LD_H2=` + if test -n "$want_h2_path"; then + PKG_CONFIG_LIBDIR="$want_h2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L libnghttp2` + { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_H2" >&5 +$as_echo "$as_me: -L is $LD_H2" >&6;} + + LDFLAGS="$LDFLAGS $LD_H2" + CPPFLAGS="$CPPFLAGS $CPP_H2" + LIBS="$LIB_H2 $LIBS" + + # use nghttp2_session_set_local_window_size to require nghttp2 + # >= 1.12.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nghttp2_session_set_local_window_size in -lnghttp2" >&5 +$as_echo_n "checking for nghttp2_session_set_local_window_size in -lnghttp2... " >&6; } +if ${ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnghttp2 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char nghttp2_session_set_local_window_size (); +int main (void) +{ +return nghttp2_session_set_local_window_size (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=yes +else + ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&5 +$as_echo "$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" >&6; } +if test "x$ac_cv_lib_nghttp2_nghttp2_session_set_local_window_size" = xyes; then : + + for ac_header in nghttp2/nghttp2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default" +if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NGHTTP2_NGHTTP2_H 1 +_ACEOF + curl_h2_msg="enabled (nghttp2)" + NGHTTP2_ENABLED=1 + +$as_echo "#define USE_NGHTTP2 1" >>confdefs.h + + USE_NGHTTP2=1 + + +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + + else + if test X"$want_h2" != Xdefault; then + as_fn_error $? "--with-nghttp2 was specified but could not find libnghttp2 pkg-config file." "$LINENO" 5 + fi + fi + +fi + + +OPT_TCP2="yes" +curl_h3_msg="no (--with-ngtcp2, --with-quiche)" + +if test "x$disable_http" = "xyes"; then + # without HTTP, ngtcp2 is no use + OPT_TCP2="no" +fi + + +# Check whether --with-ngtcp2 was given. +if test "${with_ngtcp2+set}" = set; then : + withval=$with_ngtcp2; OPT_TCP2=$withval +fi + +case "$OPT_TCP2" in + no) + want_tcp2="no" + ;; + yes) + want_tcp2="default" + want_tcp2_path="" + ;; + *) + want_tcp2="yes" + want_tcp2_path="$withval/lib/pkgconfig" + ;; +esac + +curl_tcp2_msg="no (--with-ngtcp2)" +if test X"$want_tcp2" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libngtcp2 options with pkg-config" >&5 +$as_echo_n "checking for libngtcp2 options with pkg-config... " >&6; } + itexists=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libngtcp2 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_TCP2=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l libngtcp2` + { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_TCP2" >&5 +$as_echo "$as_me: -l is $LIB_TCP2" >&6;} + + CPP_TCP2=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libngtcp2` + { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_TCP2" >&5 +$as_echo "$as_me: -I is $CPP_TCP2" >&6;} + + LD_TCP2=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L libngtcp2` + { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_TCP2" >&5 +$as_echo "$as_me: -L is $LD_TCP2" >&6;} + + LDFLAGS="$LDFLAGS $LD_TCP2" + CPPFLAGS="$CPPFLAGS $CPP_TCP2" + LIBS="$LIB_TCP2 $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_conn_client_new in -lngtcp2" >&5 +$as_echo_n "checking for ngtcp2_conn_client_new in -lngtcp2... " >&6; } +if ${ac_cv_lib_ngtcp2_ngtcp2_conn_client_new+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lngtcp2 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ngtcp2_conn_client_new (); +int main (void) +{ +return ngtcp2_conn_client_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ngtcp2_ngtcp2_conn_client_new=yes +else + ac_cv_lib_ngtcp2_ngtcp2_conn_client_new=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_ngtcp2_conn_client_new" >&5 +$as_echo "$ac_cv_lib_ngtcp2_ngtcp2_conn_client_new" >&6; } +if test "x$ac_cv_lib_ngtcp2_ngtcp2_conn_client_new" = xyes; then : + + for ac_header in ngtcp2/ngtcp2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ngtcp2/ngtcp2.h" "ac_cv_header_ngtcp2_ngtcp2_h" "$ac_includes_default" +if test "x$ac_cv_header_ngtcp2_ngtcp2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NGTCP2_NGTCP2_H 1 +_ACEOF + NGTCP2_ENABLED=1 + +$as_echo "#define USE_NGTCP2 1" >>confdefs.h + + USE_NGTCP2=1 + + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_TCP2 to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_TCP2 to CURL_LIBRARY_PATH" >&6;} + +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + + else + if test X"$want_tcp2" != Xdefault; then + as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file." "$LINENO" 5 + fi + fi + +fi + +if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_openssl options with pkg-config" >&5 +$as_echo_n "checking for libngtcp2_crypto_openssl options with pkg-config... " >&6; } + itexists=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libngtcp2_crypto_openssl >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_NGTCP2_CRYPTO_OPENSSL=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l libngtcp2_crypto_openssl` + { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_OPENSSL" >&5 +$as_echo "$as_me: -l is $LIB_NGTCP2_CRYPTO_OPENSSL" >&6;} + + CPP_NGTCP2_CRYPTO_OPENSSL=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl` + { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_OPENSSL" >&5 +$as_echo "$as_me: -I is $CPP_NGTCP2_CRYPTO_OPENSSL" >&6;} + + LD_NGTCP2_CRYPTO_OPENSSL=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl` + { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_OPENSSL" >&5 +$as_echo "$as_me: -L is $LD_NGTCP2_CRYPTO_OPENSSL" >&6;} + + LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL" + CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL" + LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/^-L//'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_openssl" >&5 +$as_echo_n "checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_openssl... " >&6; } +if ${ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lngtcp2_crypto_openssl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ngtcp2_crypto_ctx_initial (); +int main (void) +{ +return ngtcp2_crypto_ctx_initial (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial=yes +else + ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" >&5 +$as_echo "$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" >&6; } +if test "x$ac_cv_lib_ngtcp2_crypto_openssl_ngtcp2_crypto_ctx_initial" = xyes; then : + + for ac_header in ngtcp2/ngtcp2_crypto.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ngtcp2/ngtcp2_crypto.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_h" "$ac_includes_default" +if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1 +_ACEOF + NGTCP2_ENABLED=1 + +$as_echo "#define USE_NGTCP2_CRYPTO_OPENSSL 1" >>confdefs.h + + USE_NGTCP2_CRYPTO_OPENSSL=1 + + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH" >&6;} + +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + + else + if test X"$want_tcp2" != Xdefault; then + as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_openssl pkg-config file." "$LINENO" 5 + fi + fi +fi + +if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libngtcp2_crypto_gnutls options with pkg-config" >&5 +$as_echo_n "checking for libngtcp2_crypto_gnutls options with pkg-config... " >&6; } + itexists=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libngtcp2_crypto_gnutls >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_NGTCP2_CRYPTO_GNUTLS=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls` + { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&5 +$as_echo "$as_me: -l is $LIB_NGTCP2_CRYPTO_GNUTLS" >&6;} + + CPP_NGTCP2_CRYPTO_GNUTLS=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls` + { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&5 +$as_echo "$as_me: -I is $CPP_NGTCP2_CRYPTO_GNUTLS" >&6;} + + LD_NGTCP2_CRYPTO_GNUTLS=` + if test -n "$want_tcp2_path"; then + PKG_CONFIG_LIBDIR="$want_tcp2_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls` + { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&5 +$as_echo "$as_me: -L is $LD_NGTCP2_CRYPTO_GNUTLS" >&6;} + + LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS" + CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS" + LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_gnutls" >&5 +$as_echo_n "checking for ngtcp2_crypto_ctx_initial in -lngtcp2_crypto_gnutls... " >&6; } +if ${ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lngtcp2_crypto_gnutls $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char ngtcp2_crypto_ctx_initial (); +int main (void) +{ +return ngtcp2_crypto_ctx_initial (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial=yes +else + ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" >&5 +$as_echo "$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" >&6; } +if test "x$ac_cv_lib_ngtcp2_crypto_gnutls_ngtcp2_crypto_ctx_initial" = xyes; then : + + for ac_header in ngtcp2/ngtcp2_crypto.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ngtcp2/ngtcp2_crypto.h" "ac_cv_header_ngtcp2_ngtcp2_crypto_h" "$ac_includes_default" +if test "x$ac_cv_header_ngtcp2_ngtcp2_crypto_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NGTCP2_NGTCP2_CRYPTO_H 1 +_ACEOF + NGTCP2_ENABLED=1 + +$as_echo "#define USE_NGTCP2_CRYPTO_GNUTLS 1" >>confdefs.h + + USE_NGTCP2_CRYPTO_GNUTLS=1 + + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH" >&6;} + +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + + else + if test X"$want_tcp2" != Xdefault; then + as_fn_error $? "--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file." "$LINENO" 5 + fi + fi +fi + + +OPT_NGHTTP3="yes" + +if test "x$NGTCP2_ENABLED" = "x"; then + # without ngtcp2, nghttp3 is of no use for us + OPT_NGHTTP3="no" +fi + + +# Check whether --with-nghttp3 was given. +if test "${with_nghttp3+set}" = set; then : + withval=$with_nghttp3; OPT_NGHTTP3=$withval +fi + +case "$OPT_NGHTTP3" in + no) + want_nghttp3="no" + ;; + yes) + want_nghttp3="default" + want_nghttp3_path="" + ;; + *) + want_nghttp3="yes" + want_nghttp3_path="$withval/lib/pkgconfig" + ;; +esac + +curl_http3_msg="no (--with-nghttp3)" +if test X"$want_nghttp3" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnghttp3 options with pkg-config" >&5 +$as_echo_n "checking for libnghttp3 options with pkg-config... " >&6; } + itexists=` + if test -n "$want_nghttp3_path"; then + PKG_CONFIG_LIBDIR="$want_nghttp3_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libnghttp3 >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_NGHTTP3=` + if test -n "$want_nghttp3_path"; then + PKG_CONFIG_LIBDIR="$want_nghttp3_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l libnghttp3` + { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_NGHTTP3" >&5 +$as_echo "$as_me: -l is $LIB_NGHTTP3" >&6;} + + CPP_NGHTTP3=` + if test -n "$want_nghttp3_path"; then + PKG_CONFIG_LIBDIR="$want_nghttp3_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I libnghttp3` + { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_NGHTTP3" >&5 +$as_echo "$as_me: -I is $CPP_NGHTTP3" >&6;} + + LD_NGHTTP3=` + if test -n "$want_nghttp3_path"; then + PKG_CONFIG_LIBDIR="$want_nghttp3_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L libnghttp3` + { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_NGHTTP3" >&5 +$as_echo "$as_me: -L is $LD_NGHTTP3" >&6;} + + LDFLAGS="$LDFLAGS $LD_NGHTTP3" + CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3" + LIBS="$LIB_NGHTTP3 $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nghttp3_conn_client_new in -lnghttp3" >&5 +$as_echo_n "checking for nghttp3_conn_client_new in -lnghttp3... " >&6; } +if ${ac_cv_lib_nghttp3_nghttp3_conn_client_new+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnghttp3 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char nghttp3_conn_client_new (); +int main (void) +{ +return nghttp3_conn_client_new (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nghttp3_nghttp3_conn_client_new=yes +else + ac_cv_lib_nghttp3_nghttp3_conn_client_new=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nghttp3_nghttp3_conn_client_new" >&5 +$as_echo "$ac_cv_lib_nghttp3_nghttp3_conn_client_new" >&6; } +if test "x$ac_cv_lib_nghttp3_nghttp3_conn_client_new" = xyes; then : + + for ac_header in nghttp3/nghttp3.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "nghttp3/nghttp3.h" "ac_cv_header_nghttp3_nghttp3_h" "$ac_includes_default" +if test "x$ac_cv_header_nghttp3_nghttp3_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NGHTTP3_NGHTTP3_H 1 +_ACEOF + curl_h3_msg="enabled (ngtcp2 + nghttp3)" + NGHTTP3_ENABLED=1 + +$as_echo "#define USE_NGHTTP3 1" >>confdefs.h + + USE_NGHTTP3=1 + + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH" >&6;} + experimental="$experimental HTTP3" + +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + + else + if test X"$want_nghttp3" != Xdefault; then + as_fn_error $? "--with-nghttp3 was specified but could not find nghttp3 pkg-config file." "$LINENO" 5 + fi + fi + +fi + + +OPT_QUICHE="yes" + +if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then + # without HTTP or with ngtcp2, quiche is no use + OPT_QUICHE="no" +fi + + +# Check whether --with-quiche was given. +if test "${with_quiche+set}" = set; then : + withval=$with_quiche; OPT_QUICHE=$withval +fi + +case "$OPT_QUICHE" in + no) + want_quiche="no" + ;; + yes) + want_quiche="default" + want_quiche_path="" + ;; + *) + want_quiche="yes" + want_quiche_path="$withval" + ;; +esac + +if test X"$want_quiche" != Xno; then + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiche options with pkg-config" >&5 +$as_echo_n "checking for quiche options with pkg-config... " >&6; } + itexists=` + if test -n "$want_quiche_path"; then + PKG_CONFIG_LIBDIR="$want_quiche_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists quiche >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + + if test "$PKGCONFIG" != "no" ; then + LIB_QUICHE=` + if test -n "$want_quiche_path"; then + PKG_CONFIG_LIBDIR="$want_quiche_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l quiche` + { $as_echo "$as_me:${as_lineno-$LINENO}: -l is $LIB_QUICHE" >&5 +$as_echo "$as_me: -l is $LIB_QUICHE" >&6;} + + CPP_QUICHE=` + if test -n "$want_quiche_path"; then + PKG_CONFIG_LIBDIR="$want_quiche_path" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --cflags-only-I quiche` + { $as_echo "$as_me:${as_lineno-$LINENO}: -I is $CPP_QUICHE" >&5 +$as_echo "$as_me: -I is $CPP_QUICHE" >&6;} + + LD_QUICHE=` + if test -n "$want_quiche_path"; then + PKG_CONFIG_LIBDIR="$want_quiche_path" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L quiche` + { $as_echo "$as_me:${as_lineno-$LINENO}: -L is $LD_QUICHE" >&5 +$as_echo "$as_me: -L is $LD_QUICHE" >&6;} + + LDFLAGS="$LDFLAGS $LD_QUICHE" + CPPFLAGS="$CPPFLAGS $CPP_QUICHE" + LIBS="$LIB_QUICHE $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'` + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quiche_connect in -lquiche" >&5 +$as_echo_n "checking for quiche_connect in -lquiche... " >&6; } +if ${ac_cv_lib_quiche_quiche_connect+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lquiche $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char quiche_connect (); +int main (void) +{ +return quiche_connect (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_quiche_quiche_connect=yes +else + ac_cv_lib_quiche_quiche_connect=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_quiche_quiche_connect" >&5 +$as_echo "$ac_cv_lib_quiche_quiche_connect" >&6; } +if test "x$ac_cv_lib_quiche_quiche_connect" = xyes; then : + + for ac_header in quiche.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "quiche.h" "ac_cv_header_quiche_h" "$ac_includes_default" +if test "x$ac_cv_header_quiche_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_QUICHE_H 1 +_ACEOF + experimental="$experimental HTTP3" + { $as_echo "$as_me:${as_lineno-$LINENO}: HTTP3 support is experimental" >&5 +$as_echo "$as_me: HTTP3 support is experimental" >&6;} + curl_h3_msg="enabled (quiche)" + QUICHE_ENABLED=1 + +$as_echo "#define USE_QUICHE 1" >>confdefs.h + + USE_QUICHE=1 + + for ac_func in quiche_conn_set_qlog_fd +do : + ac_fn_c_check_func "$LINENO" "quiche_conn_set_qlog_fd" "ac_cv_func_quiche_conn_set_qlog_fd" +if test "x$ac_cv_func_quiche_conn_set_qlog_fd" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_QUICHE_CONN_SET_QLOG_FD 1 +_ACEOF + +fi +done + + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE" + export CURL_LIBRARY_PATH + { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_QUICHE to CURL_LIBRARY_PATH" >&5 +$as_echo "$as_me: Added $DIR_QUICHE to CURL_LIBRARY_PATH" >&6;} +fi + +done + + +else + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + +fi + + else + if test X"$want_quiche" != Xdefault; then + as_fn_error $? "--with-quiche was specified but could not find quiche pkg-config file." "$LINENO" 5 + fi + fi +fi + + +OPT_ZSH_FPATH=default + +# Check whether --with-zsh-functions-dir was given. +if test "${with_zsh_functions_dir+set}" = set; then : + withval=$with_zsh_functions_dir; OPT_ZSH_FPATH=$withval +fi + +case "$OPT_ZSH_FPATH" in + no) + ;; + default|yes) + ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions" + + ;; + *) + ZSH_FUNCTIONS_DIR="$withval" + + ;; +esac + + +OPT_FISH_FPATH=default + +# Check whether --with-fish-functions-dir was given. +if test "${with_fish_functions_dir+set}" = set; then : + withval=$with_fish_functions_dir; OPT_FISH_FPATH=$withval +fi + +case "$OPT_FISH_FPATH" in + no) + ;; + default|yes) + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fish options with pkg-config" >&5 +$as_echo_n "checking for fish options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists fish >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + if test "$PKGCONFIG" != "no" ; then + FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)" + else + FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d" + fi + + ;; + *) + FISH_FUNCTIONS_DIR="$withval" + + ;; +esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc.h" >&5 +$as_echo_n "checking for malloc.h... " >&6; } +if ${curl_cv_header_malloc_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_malloc_h="yes" + +else + + curl_cv_header_malloc_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_malloc_h" >&5 +$as_echo "$curl_cv_header_malloc_h" >&6; } + if test "$curl_cv_header_malloc_h" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_MALLOC_H 1 +_ACEOF + + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_need_header_malloc_h="no" + +else + + curl_cv_need_header_malloc_h="yes" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # + case "$curl_cv_need_header_malloc_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define NEED_MALLOC_H 1 +_ACEOF + + ;; + esac + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory.h" >&5 +$as_echo_n "checking for memory.h... " >&6; } +if ${curl_cv_header_memory_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_memory_h="yes" + +else + + curl_cv_header_memory_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_memory_h" >&5 +$as_echo "$curl_cv_header_memory_h" >&6; } + if test "$curl_cv_header_memory_h" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_MEMORY_H 1 +_ACEOF + + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int main (void) +{ + + void *p = malloc(10); + void *q = calloc(10,10); + free(p); + free(q); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_need_header_memory_h="no" + +else + + curl_cv_need_header_memory_h="yes" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # + case "$curl_cv_need_header_memory_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define NEED_MEMORY_H 1 +_ACEOF + + ;; + esac + fi + + +for ac_header in sys/types.h \ + sys/time.h \ + sys/select.h \ + sys/socket.h \ + sys/ioctl.h \ + sys/uio.h \ + assert.h \ + unistd.h \ + stdlib.h \ + arpa/inet.h \ + net/if.h \ + netinet/in.h \ + netinet/in6.h \ + sys/un.h \ + linux/tcp.h \ + netinet/tcp.h \ + netdb.h \ + sys/sockio.h \ + sys/stat.h \ + sys/param.h \ + termios.h \ + termio.h \ + sgtty.h \ + fcntl.h \ + alloca.h \ + time.h \ + io.h \ + pwd.h \ + utime.h \ + sys/utime.h \ + sys/poll.h \ + poll.h \ + socket.h \ + sys/resource.h \ + libgen.h \ + locale.h \ + errno.h \ + stdbool.h \ + arpa/tftp.h \ + sys/filio.h \ + sys/wait.h \ + setjmp.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#elif defined(HAVE_UNISTD_H) +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif +#ifdef HAVE_SYS_UN_H +#include +#endif + + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main (void) +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of C99 variadic macro style" >&5 +$as_echo_n "checking for compiler support of C99 variadic macro style... " >&6; } +if ${curl_cv_variadic_macros_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__) +#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__) + int fun3(int arg1, int arg2, int arg3); + int fun2(int arg1, int arg2); + int fun3(int arg1, int arg2, int arg3) + { return arg1 + arg2 + arg3; } + int fun2(int arg1, int arg2) + { return arg1 + arg2; } + +int main (void) +{ + + int res3 = c99_vmacro3(1, 2, 3); + int res2 = c99_vmacro2(1, 2); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_variadic_macros_c99="yes" + +else + + curl_cv_variadic_macros_c99="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_c99" >&5 +$as_echo "$curl_cv_variadic_macros_c99" >&6; } + case "$curl_cv_variadic_macros_c99" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_VARIADIC_MACROS_C99 1 +_ACEOF + + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of old gcc variadic macro style" >&5 +$as_echo_n "checking for compiler support of old gcc variadic macro style... " >&6; } +if ${curl_cv_variadic_macros_gcc+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gcc_vmacro3(first, args...) fun3(first, args) +#define gcc_vmacro2(first, args...) fun2(first, args) + int fun3(int arg1, int arg2, int arg3); + int fun2(int arg1, int arg2); + int fun3(int arg1, int arg2, int arg3) + { return arg1 + arg2 + arg3; } + int fun2(int arg1, int arg2) + { return arg1 + arg2; } + +int main (void) +{ + + int res3 = gcc_vmacro3(1, 2, 3); + int res2 = gcc_vmacro2(1, 2); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_variadic_macros_gcc="yes" + +else + + curl_cv_variadic_macros_gcc="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_variadic_macros_gcc" >&5 +$as_echo "$curl_cv_variadic_macros_gcc" >&6; } + case "$curl_cv_variadic_macros_gcc" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_VARIADIC_MACROS_GCC 1 +_ACEOF + + ;; + esac + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int main (void) +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + + + for ac_header in sys/types.h sys/time.h time.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 +$as_echo_n "checking for struct timeval... " >&6; } +if ${curl_cv_struct_timeval+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +int main (void) +{ + + struct timeval ts; + ts.tv_sec = 0; + ts.tv_usec = 0; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_struct_timeval="yes" + +else + + curl_cv_struct_timeval="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_struct_timeval" >&5 +$as_echo "$curl_cv_struct_timeval" >&6; } + case "$curl_cv_struct_timeval" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TIMEVAL 1 +_ACEOF + + ;; + esac + + + + if test "x$cross_compiling" != xyes; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking run-time libs availability" >&5 +$as_echo_n "checking run-time libs availability... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main() +{ + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: fine" >&5 +$as_echo "fine" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } + as_fn_error $? "one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS" "$LINENO" 5 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if ${ac_cv_sizeof_size_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (size_t) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_size_t=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_size_t != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_size_t = x ; then + as_fn_error $? "cannot determine a size for size_t" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (long) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_long=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_long != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_long = x ; then + as_fn_error $? "cannot determine a size for long" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (int) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_int=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_int != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_int = x ; then + as_fn_error $? "cannot determine a size for int" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (short) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_short=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_short != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_short = x ; then + as_fn_error $? "cannot determine a size for short" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if ${ac_cv_sizeof_time_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (time_t) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_time_t=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_time_t != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_time_t = x ; then + as_fn_error $? "cannot determine a size for time_t" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if ${ac_cv_sizeof_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (off_t) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_off_t=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_off_t != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_off_t = x ; then + as_fn_error $? "cannot determine a size for off_t" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF + + + +o=$CPPFLAGS +CPPFLAGS="-I$srcdir/include $CPPFLAGS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of curl_off_t" >&5 +$as_echo_n "checking size of curl_off_t... " >&6; } +if ${ac_cv_sizeof_curl_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +#include + + +int main (void) +{ +switch (0) case 0: case (sizeof (curl_off_t) == $ac_size):; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sizeof_curl_off_t=$ac_size +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_curl_off_t != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_curl_off_t = x ; then + as_fn_error $? "cannot determine a size for curl_off_t" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_curl_off_t" >&5 +$as_echo "$ac_cv_sizeof_curl_off_t" >&6; } + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CURL_OFF_T $ac_cv_sizeof_curl_off_t +_ACEOF + + +CPPFLAGS=$o + +ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" +if test "x$ac_cv_type_long_long" = xyes; then : + +$as_echo "#define HAVE_LONGLONG 1" >>confdefs.h + + longlong="yes" + +fi + + +if test "xyes" = "x$longlong"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if numberLL works" >&5 +$as_echo_n "checking if numberLL works... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + long long val = 1000LL; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LL 1" >>confdefs.h + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + +# check for ssize_t +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +$as_echo "#define ssize_t int" >>confdefs.h + +fi + + +# check for bool type +ac_fn_c_check_type "$LINENO" "bool" "ac_cv_type_bool" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDBOOL_H +#include +#endif + +" +if test "x$ac_cv_type_bool" = xyes; then : + + +$as_echo "#define HAVE_BOOL_T 1" >>confdefs.h + + +fi + + +# check for sa_family_t +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +" +if test "x$ac_cv_type_sa_family_t" = xyes; then : + +$as_echo "#define CURL_SA_FAMILY_T sa_family_t" >>confdefs.h + +else + + # The windows name? + ac_fn_c_check_type "$LINENO" "ADDRESS_FAMILY" "ac_cv_type_ADDRESS_FAMILY" " +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + +" +if test "x$ac_cv_type_ADDRESS_FAMILY" = xyes; then : + +$as_echo "#define CURL_SA_FAMILY_T ADDRESS_FAMILY" >>confdefs.h + +else + +$as_echo "#define CURL_SA_FAMILY_T unsigned short" >>confdefs.h + +fi + + +fi + + +# check for suseconds_t +ac_fn_c_check_type "$LINENO" "suseconds_t" "ac_cv_type_suseconds_t" " +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif + +" +if test "x$ac_cv_type_suseconds_t" = xyes; then : + + +$as_echo "#define HAVE_SUSECONDS_T 1" >>confdefs.h + + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t is unsigned" >&5 +$as_echo_n "checking if time_t is unsigned... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + time_t t = -1; + return (t > 0); + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_TIME_T_UNSIGNED 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + + +curl_includes_poll="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_POLL_H +# include +#endif +#ifdef HAVE_SYS_POLL_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h poll.h sys/poll.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_poll +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_poll_events_macro_defined="unknown" + # + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_poll + +int main (void) +{ + +#if defined(events) || defined(revents) + return 0; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_poll_events_macro_defined="yes" + +else + + tst_poll_events_macro_defined="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # + if test "$tst_poll_events_macro_defined" = "yes"; then + if test "x$ac_cv_header_sys_poll_h" = "xyes"; then + +cat >>confdefs.h <<_EOF +#define CURL_PULL_SYS_POLL_H 1 +_EOF + + fi + fi + # + + + + ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" " +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#endif + +" +if test "x$ac_cv_type_in_addr_t" = xyes; then : + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_addr_t equivalent" >&5 +$as_echo_n "checking for in_addr_t equivalent... " >&6; } +if ${curl_cv_in_addr_t_equiv+:} false; then : + $as_echo_n "(cached) " >&6 +else + + curl_cv_in_addr_t_equiv="unknown" + for t in "unsigned long" int size_t unsigned long; do + if test "$curl_cv_in_addr_t_equiv" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#endif + +int main (void) +{ + + $t data = inet_addr ("1.2.3.4"); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + curl_cv_in_addr_t_equiv="$t" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_in_addr_t_equiv" >&5 +$as_echo "$curl_cv_in_addr_t_equiv" >&6; } + case "$curl_cv_in_addr_t_equiv" in + unknown) + as_fn_error $? "Cannot find a type to use in place of in_addr_t" "$LINENO" 5 + ;; + *) + +cat >>confdefs.h <<_ACEOF +#define in_addr_t $curl_cv_in_addr_t_equiv +_ACEOF + + ;; + esac + +fi + + + + + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#endif +#else +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#endif + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : + +$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h + +fi + + + + + for ac_header in signal.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNAL_H 1 +_ACEOF + +fi + +done + + ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" " +#ifdef HAVE_SIGNAL_H +#include +#endif + +" +if test "x$ac_cv_type_sig_atomic_t" = xyes; then : + + +$as_echo "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h + + +fi + + case "$ac_cv_type_sig_atomic_t" in + yes) + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_atomic_t is already defined as volatile" >&5 +$as_echo_n "checking if sig_atomic_t is already defined as volatile... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef HAVE_SIGNAL_H +#include +#endif + +int main (void) +{ + + static volatile sig_atomic_t dummy = 0; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_sig_atomic_t_volatile="no" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_cv_sig_atomic_t_volatile="yes" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$curl_cv_sig_atomic_t_volatile" = "yes"; then + +$as_echo "#define HAVE_SIG_ATOMIC_T_VOLATILE 1" >>confdefs.h + + fi + ;; + esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int main (void) +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int +else + ac_cv_type_signal=void +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + + + for ac_header in sys/select.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for select" >&5 +$as_echo_n "checking for select... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif +#ifndef HAVE_WINDOWS_H +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#elif defined(HAVE_UNISTD_H) +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + +int main (void) +{ + + select(0, 0, 0, 0, 0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_cv_select="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_select="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$curl_cv_select" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for select" >&5 +$as_echo_n "checking types of args and return type for select... " >&6; } +if ${curl_cv_func_select_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + + curl_cv_func_select_args="unknown" + for sel_retv in 'int' 'ssize_t'; do + for sel_arg1 in 'int' 'ssize_t' 'size_t' 'unsigned long int' 'unsigned int'; do + for sel_arg234 in 'fd_set *' 'int *' 'void *'; do + for sel_arg5 in 'struct timeval *' 'const struct timeval *'; do + if test "$curl_cv_func_select_args" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#define SELECTCALLCONV PASCAL +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#ifdef TIME_WITH_SYS_TIME +#include +#endif +#else +#ifdef HAVE_TIME_H +#include +#endif +#endif +#ifndef HAVE_WINDOWS_H +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#elif defined(HAVE_UNISTD_H) +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#define SELECTCALLCONV +#endif +#ifndef HAVE_STRUCT_TIMEVAL + struct timeval { + long tv_sec; + long tv_usec; + }; +#endif +#ifndef HAVE_PROTO_BSDSOCKET_H + extern $sel_retv SELECTCALLCONV + select($sel_arg1, + $sel_arg234, + $sel_arg234, + $sel_arg234, + $sel_arg5); +#endif + +int main (void) +{ + + $sel_arg1 nfds=0; + $sel_arg234 rfds=0; + $sel_arg234 wfds=0; + $sel_arg234 efds=0; + $sel_retv res = select(nfds, rfds, wfds, efds, 0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_func_select_args="$sel_arg1,$sel_arg234,$sel_arg5,$sel_retv" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + done + done + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_select_args" >&5 +$as_echo "$curl_cv_func_select_args" >&6; } # AC-CACHE-CHECK + if test "$curl_cv_func_select_args" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for select args" >&5 +$as_echo "$as_me: WARNING: Cannot find proper types to use for select args" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HAVE_SELECT will not be defined" >&5 +$as_echo "$as_me: WARNING: HAVE_SELECT will not be defined" >&2;} + else + select_prev_IFS=$IFS; IFS=',' + set dummy `echo "$curl_cv_func_select_args" | sed 's/\*/\*/g'` + IFS=$select_prev_IFS + shift + # + sel_qual_type_arg5=$3 + # + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG1 $1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG234 $2 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_RETV $4 +_ACEOF + + # + prev_sh_opts=$- + # + case $prev_sh_opts in + *f*) + ;; + *) + set -f + ;; + esac + # + case "$sel_qual_type_arg5" in + const*) + sel_qual_arg5=const + sel_type_arg5=`echo $sel_qual_type_arg5 | sed 's/^const //'` + ;; + *) + sel_qual_arg5= + sel_type_arg5=$sel_qual_type_arg5 + ;; + esac + # + +cat >>confdefs.h <<_ACEOF +#define SELECT_QUAL_ARG5 $sel_qual_arg5 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG5 $sel_type_arg5 +_ACEOF + + # + case $prev_sh_opts in + *f*) + ;; + *) + set +f + ;; + esac + # + +cat >>confdefs.h <<_ACEOF +#define HAVE_SELECT 1 +_ACEOF + + curl_cv_func_select="yes" + fi + fi + + + + for ac_header in sys/types.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recv" >&5 +$as_echo_n "checking for recv... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + +int main (void) +{ + + recv(0, 0, 0, 0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_cv_recv="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_recv="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$curl_cv_recv" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for recv" >&5 +$as_echo_n "checking types of args and return type for recv... " >&6; } +if ${curl_cv_func_recv_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + + curl_cv_func_recv_args="unknown" + for recv_retv in 'int' 'ssize_t'; do + for recv_arg1 in 'int' 'ssize_t' 'SOCKET'; do + for recv_arg2 in 'char *' 'void *'; do + for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do + for recv_arg4 in 'int' 'unsigned int'; do + if test "$curl_cv_func_recv_args" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#define RECVCALLCONV PASCAL +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#define RECVCALLCONV +#endif +#ifndef HAVE_PROTO_BSDSOCKET_H + extern $recv_retv RECVCALLCONV + recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4); +#endif + +int main (void) +{ + + $recv_arg1 s=0; + $recv_arg2 buf=0; + $recv_arg3 len=0; + $recv_arg4 flags=0; + $recv_retv res = recv(s, buf, len, flags); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + done + done + done + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_recv_args" >&5 +$as_echo "$curl_cv_func_recv_args" >&6; } # AC-CACHE-CHECK + if test "$curl_cv_func_recv_args" = "unknown"; then + as_fn_error $? "Cannot find proper types to use for recv args" "$LINENO" 5 + else + recv_prev_IFS=$IFS; IFS=',' + set dummy `echo "$curl_cv_func_recv_args" | sed 's/\*/\*/g'` + IFS=$recv_prev_IFS + shift + # + +cat >>confdefs.h <<_ACEOF +#define RECV_TYPE_ARG1 $1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define RECV_TYPE_ARG2 $2 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define RECV_TYPE_ARG3 $3 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define RECV_TYPE_ARG4 $4 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define RECV_TYPE_RETV $5 +_ACEOF + + # + +cat >>confdefs.h <<_ACEOF +#define HAVE_RECV 1 +_ACEOF + + curl_cv_func_recv="yes" + fi + else + as_fn_error $? "Unable to link function recv" "$LINENO" 5 + fi + + + for ac_header in sys/types.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for send" >&5 +$as_echo_n "checking for send... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + +int main (void) +{ + + send(0, 0, 0, 0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_cv_send="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_send="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$curl_cv_send" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of args and return type for send" >&5 +$as_echo_n "checking types of args and return type for send... " >&6; } +if ${curl_cv_func_send_args+:} false; then : + $as_echo_n "(cached) " >&6 +else + + curl_cv_func_send_args="unknown" + for send_retv in 'int' 'ssize_t'; do + for send_arg1 in 'int' 'ssize_t' 'SOCKET'; do + for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do + for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do + for send_arg4 in 'int' 'unsigned int'; do + if test "$curl_cv_func_send_args" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#define SENDCALLCONV PASCAL +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#define SENDCALLCONV +#endif +#ifndef HAVE_PROTO_BSDSOCKET_H + extern $send_retv SENDCALLCONV + send($send_arg1, $send_arg2, $send_arg3, $send_arg4); +#endif + +int main (void) +{ + + $send_arg1 s=0; + $send_arg3 len=0; + $send_arg4 flags=0; + $send_retv res = send(s, 0, len, flags); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + done + done + done + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_func_send_args" >&5 +$as_echo "$curl_cv_func_send_args" >&6; } # AC-CACHE-CHECK + if test "$curl_cv_func_send_args" = "unknown"; then + as_fn_error $? "Cannot find proper types to use for send args" "$LINENO" 5 + else + send_prev_IFS=$IFS; IFS=',' + set dummy `echo "$curl_cv_func_send_args" | sed 's/\*/\*/g'` + IFS=$send_prev_IFS + shift + # + send_qual_type_arg2=$2 + # + +cat >>confdefs.h <<_ACEOF +#define SEND_TYPE_ARG1 $1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SEND_TYPE_ARG3 $3 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SEND_TYPE_ARG4 $4 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SEND_TYPE_RETV $5 +_ACEOF + + # + prev_sh_opts=$- + # + case $prev_sh_opts in + *f*) + ;; + *) + set -f + ;; + esac + # + case "$send_qual_type_arg2" in + const*) + send_qual_arg2=const + send_type_arg2=`echo $send_qual_type_arg2 | sed 's/^const //'` + ;; + *) + send_qual_arg2= + send_type_arg2=$send_qual_type_arg2 + ;; + esac + # + +cat >>confdefs.h <<_ACEOF +#define SEND_QUAL_ARG2 $send_qual_arg2 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SEND_TYPE_ARG2 $send_type_arg2 +_ACEOF + + # + case $prev_sh_opts in + *f*) + ;; + *) + set +f + ;; + esac + # + +cat >>confdefs.h <<_ACEOF +#define HAVE_SEND 1 +_ACEOF + + curl_cv_func_send="yes" + fi + else + as_fn_error $? "Unable to link function send" "$LINENO" 5 + fi + + + for ac_header in sys/types.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5 +$as_echo_n "checking for MSG_NOSIGNAL... " >&6; } +if ${curl_cv_msg_nosignal+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else +#ifdef HAVE_PROTO_BSDSOCKET_H +#include +struct Library *SocketBase = NULL; +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#endif + +int main (void) +{ + + int flag=MSG_NOSIGNAL; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_msg_nosignal="yes" + +else + + curl_cv_msg_nosignal="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_msg_nosignal" >&5 +$as_echo "$curl_cv_msg_nosignal" >&6; } + case "$curl_cv_msg_nosignal" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_MSG_NOSIGNAL 1 +_ACEOF + + ;; + esac + + + +curl_includes_unistd="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_unistd +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_alarm="unknown" + tst_proto_alarm="unknown" + tst_compi_alarm="unknown" + tst_allow_alarm="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm can be linked" >&5 +$as_echo_n "checking if alarm can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define alarm innocuous_alarm +#ifdef __STDC__ +# include +#else +# include +#endif +#undef alarm +#ifdef __cplusplus +extern "C" +#endif +char alarm (); +#if defined __stub_alarm || defined __stub___alarm +choke me +#endif + +int main (void) +{ +return alarm (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_alarm="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_alarm="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_alarm" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm is prototyped" >&5 +$as_echo_n "checking if alarm is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_unistd + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "alarm" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_alarm="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_alarm="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_alarm" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm is compilable" >&5 +$as_echo_n "checking if alarm is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_unistd + +int main (void) +{ + + if(0 != alarm(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_alarm="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_alarm="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_alarm" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm usage allowed" >&5 +$as_echo_n "checking if alarm usage allowed... " >&6; } + if test "x$curl_disallow_alarm" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_alarm="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_alarm="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if alarm might be used" >&5 +$as_echo_n "checking if alarm might be used... " >&6; } + if test "$tst_links_alarm" = "yes" && + test "$tst_proto_alarm" = "yes" && + test "$tst_compi_alarm" = "yes" && + test "$tst_allow_alarm" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_ALARM 1 +_ACEOF + + curl_cv_func_alarm="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_alarm="no" + fi + + +curl_includes_string="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h string.h strings.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_string +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +curl_includes_libgen="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_LIBGEN_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h libgen.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_libgen +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_basename="unknown" + tst_proto_basename="unknown" + tst_compi_basename="unknown" + tst_allow_basename="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename can be linked" >&5 +$as_echo_n "checking if basename can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define basename innocuous_basename +#ifdef __STDC__ +# include +#else +# include +#endif +#undef basename +#ifdef __cplusplus +extern "C" +#endif +char basename (); +#if defined __stub_basename || defined __stub___basename +choke me +#endif + +int main (void) +{ +return basename (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_basename="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_basename="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_basename" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename is prototyped" >&5 +$as_echo_n "checking if basename is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + $curl_includes_libgen + $curl_includes_unistd + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "basename" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_basename="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_basename="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_basename" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename is compilable" >&5 +$as_echo_n "checking if basename is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + $curl_includes_libgen + $curl_includes_unistd + +int main (void) +{ + + if(0 != basename(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_basename="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_basename="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_basename" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename usage allowed" >&5 +$as_echo_n "checking if basename usage allowed... " >&6; } + if test "x$curl_disallow_basename" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_basename="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_basename="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if basename might be used" >&5 +$as_echo_n "checking if basename might be used... " >&6; } + if test "$tst_links_basename" = "yes" && + test "$tst_proto_basename" = "yes" && + test "$tst_compi_basename" = "yes" && + test "$tst_allow_basename" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_BASENAME 1 +_ACEOF + + curl_cv_func_basename="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_basename="no" + fi + + +curl_includes_socket="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SOCKET_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_socket +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_closesocket="unknown" + tst_proto_closesocket="unknown" + tst_compi_closesocket="unknown" + tst_allow_closesocket="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket can be linked" >&5 +$as_echo_n "checking if closesocket can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_socket + +int main (void) +{ + + if(0 != closesocket(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_closesocket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_closesocket="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_closesocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket is prototyped" >&5 +$as_echo_n "checking if closesocket is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "closesocket" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_closesocket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_closesocket="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_closesocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket is compilable" >&5 +$as_echo_n "checking if closesocket is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_socket + +int main (void) +{ + + if(0 != closesocket(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_closesocket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_closesocket="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_closesocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket usage allowed" >&5 +$as_echo_n "checking if closesocket usage allowed... " >&6; } + if test "x$curl_disallow_closesocket" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_closesocket="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_closesocket="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closesocket might be used" >&5 +$as_echo_n "checking if closesocket might be used... " >&6; } + if test "$tst_links_closesocket" = "yes" && + test "$tst_proto_closesocket" = "yes" && + test "$tst_compi_closesocket" = "yes" && + test "$tst_allow_closesocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_CLOSESOCKET 1 +_ACEOF + + curl_cv_func_closesocket="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_closesocket="no" + fi + + +curl_includes_sys_socket="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_sys_socket +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_closesocket_camel="unknown" + tst_proto_closesocket_camel="unknown" + tst_compi_closesocket_camel="unknown" + tst_allow_closesocket_camel="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket can be linked" >&5 +$as_echo_n "checking if CloseSocket can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != CloseSocket(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_closesocket_camel="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_closesocket_camel="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_closesocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket is prototyped" >&5 +$as_echo_n "checking if CloseSocket is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_sys_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "CloseSocket" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_closesocket_camel="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_closesocket_camel="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_closesocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket is compilable" >&5 +$as_echo_n "checking if CloseSocket is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != CloseSocket(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_closesocket_camel="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_closesocket_camel="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_closesocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket usage allowed" >&5 +$as_echo_n "checking if CloseSocket usage allowed... " >&6; } + if test "x$curl_disallow_closesocket_camel" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_closesocket_camel="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_closesocket_camel="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CloseSocket might be used" >&5 +$as_echo_n "checking if CloseSocket might be used... " >&6; } + if test "$tst_links_closesocket_camel" = "yes" && + test "$tst_proto_closesocket_camel" = "yes" && + test "$tst_compi_closesocket_camel" = "yes" && + test "$tst_allow_closesocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_CLOSESOCKET_CAMEL 1 +_ACEOF + + curl_cv_func_closesocket_camel="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_closesocket_camel="no" + fi + + + # + tst_links_connect="unknown" + tst_proto_connect="unknown" + tst_compi_connect="unknown" + tst_allow_connect="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect can be linked" >&5 +$as_echo_n "checking if connect can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + $curl_includes_socket + +int main (void) +{ + + if(0 != connect(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_connect="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_connect="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_connect" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect is prototyped" >&5 +$as_echo_n "checking if connect is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + $curl_includes_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "connect" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_connect="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_connect="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_connect" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect is compilable" >&5 +$as_echo_n "checking if connect is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + $curl_includes_socket + +int main (void) +{ + + if(0 != connect(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_connect="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_connect="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_connect" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect usage allowed" >&5 +$as_echo_n "checking if connect usage allowed... " >&6; } + if test "x$curl_disallow_connect" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_connect="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_connect="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if connect might be used" >&5 +$as_echo_n "checking if connect might be used... " >&6; } + if test "$tst_links_connect" = "yes" && + test "$tst_proto_connect" = "yes" && + test "$tst_compi_connect" = "yes" && + test "$tst_allow_connect" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_CONNECT 1 +_ACEOF + + curl_cv_func_connect="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_connect="no" + fi + + +curl_includes_fcntl="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h unistd.h fcntl.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_fcntl +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_fcntl="unknown" + tst_proto_fcntl="unknown" + tst_compi_fcntl="unknown" + tst_allow_fcntl="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl can be linked" >&5 +$as_echo_n "checking if fcntl can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define fcntl innocuous_fcntl +#ifdef __STDC__ +# include +#else +# include +#endif +#undef fcntl +#ifdef __cplusplus +extern "C" +#endif +char fcntl (); +#if defined __stub_fcntl || defined __stub___fcntl +choke me +#endif + +int main (void) +{ +return fcntl (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_fcntl="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_fcntl="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_fcntl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl is prototyped" >&5 +$as_echo_n "checking if fcntl is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_fcntl + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "fcntl" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_fcntl="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_fcntl="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_fcntl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl is compilable" >&5 +$as_echo_n "checking if fcntl is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_fcntl + +int main (void) +{ + + if(0 != fcntl(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_fcntl="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_fcntl="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_fcntl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl usage allowed" >&5 +$as_echo_n "checking if fcntl usage allowed... " >&6; } + if test "x$curl_disallow_fcntl" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_fcntl="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_fcntl="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl might be used" >&5 +$as_echo_n "checking if fcntl might be used... " >&6; } + if test "$tst_links_fcntl" = "yes" && + test "$tst_proto_fcntl" = "yes" && + test "$tst_compi_fcntl" = "yes" && + test "$tst_allow_fcntl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_FCNTL 1 +_ACEOF + + curl_cv_func_fcntl="yes" + + # + tst_compi_fcntl_o_nonblock="unknown" + tst_allow_fcntl_o_nonblock="unknown" + # + case $host_os in + sunos4* | aix3* | beos*) + curl_disallow_fcntl_o_nonblock="yes" + ;; + esac + # + if test "$curl_cv_func_fcntl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK is compilable" >&5 +$as_echo_n "checking if fcntl O_NONBLOCK is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_fcntl + +int main (void) +{ + + int flags = 0; + if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_fcntl_o_nonblock="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_fcntl_o_nonblock="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_fcntl_o_nonblock" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK usage allowed" >&5 +$as_echo_n "checking if fcntl O_NONBLOCK usage allowed... " >&6; } + if test "x$curl_disallow_fcntl_o_nonblock" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_fcntl_o_nonblock="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_fcntl_o_nonblock="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fcntl O_NONBLOCK might be used" >&5 +$as_echo_n "checking if fcntl O_NONBLOCK might be used... " >&6; } + if test "$tst_compi_fcntl_o_nonblock" = "yes" && + test "$tst_allow_fcntl_o_nonblock" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_FCNTL_O_NONBLOCK 1 +_ACEOF + + curl_cv_func_fcntl_o_nonblock="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_fcntl_o_nonblock="no" + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_fcntl="no" + fi + + +curl_includes_ws2tcpip="\ +/* includes start */ +#ifdef HAVE_WINDOWS_H +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# ifdef HAVE_WS2TCPIP_H +# include +# endif +# endif +#endif +/* includes end */" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5 +$as_echo_n "checking for windows.h... " >&6; } +if ${curl_cv_header_windows_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) + HAVE_WINDOWS_H shall not be defined. +#else + int dummy=2*WINVER; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_windows_h="yes" + +else + + curl_cv_header_windows_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_windows_h" >&5 +$as_echo "$curl_cv_header_windows_h" >&6; } + case "$curl_cv_header_windows_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINDOWS_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5 +$as_echo_n "checking for winsock2.h... " >&6; } +if ${curl_cv_header_winsock2_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WINSOCK2_H shall not be defined. +#else + int dummy=2*IPPROTO_ESP; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_winsock2_h="yes" + +else + + curl_cv_header_winsock2_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_winsock2_h" >&5 +$as_echo "$curl_cv_header_winsock2_h" >&6; } + case "$curl_cv_header_winsock2_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5 +$as_echo_n "checking for ws2tcpip.h... " >&6; } +if ${curl_cv_header_ws2tcpip_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#undef inline +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#include +#include + +int main (void) +{ + +#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) + HAVE_WS2TCPIP_H shall not be defined. +#else + int dummy=2*IP_PKTINFO; +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + curl_cv_header_ws2tcpip_h="yes" + +else + + curl_cv_header_ws2tcpip_h="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_header_ws2tcpip_h" >&5 +$as_echo "$curl_cv_header_ws2tcpip_h" >&6; } + case "$curl_cv_header_ws2tcpip_h" in + yes) + +cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + + ;; + esac + + + +curl_includes_netdb="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_NETDB_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h netdb.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_netdb +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_freeaddrinfo="unknown" + tst_proto_freeaddrinfo="unknown" + tst_compi_freeaddrinfo="unknown" + tst_allow_freeaddrinfo="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo can be linked" >&5 +$as_echo_n "checking if freeaddrinfo can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ws2tcpip + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ + + freeaddrinfo(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_freeaddrinfo="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_freeaddrinfo="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_freeaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo is prototyped" >&5 +$as_echo_n "checking if freeaddrinfo is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_ws2tcpip + $curl_includes_sys_socket + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "freeaddrinfo" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_freeaddrinfo="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_freeaddrinfo="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_freeaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo is compilable" >&5 +$as_echo_n "checking if freeaddrinfo is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ws2tcpip + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ + + freeaddrinfo(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_freeaddrinfo="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_freeaddrinfo="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_freeaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo usage allowed" >&5 +$as_echo_n "checking if freeaddrinfo usage allowed... " >&6; } + if test "x$curl_disallow_freeaddrinfo" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_freeaddrinfo="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_freeaddrinfo="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeaddrinfo might be used" >&5 +$as_echo_n "checking if freeaddrinfo might be used... " >&6; } + if test "$tst_links_freeaddrinfo" = "yes" && + test "$tst_proto_freeaddrinfo" = "yes" && + test "$tst_compi_freeaddrinfo" = "yes" && + test "$tst_allow_freeaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_FREEADDRINFO 1 +_ACEOF + + curl_cv_func_freeaddrinfo="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_freeaddrinfo="no" + fi + + +curl_includes_ifaddrs="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_IFADDRS_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h sys/socket.h netinet/in.h ifaddrs.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_ifaddrs +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_freeifaddrs="unknown" + tst_proto_freeifaddrs="unknown" + tst_compi_freeifaddrs="unknown" + tst_allow_freeifaddrs="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs can be linked" >&5 +$as_echo_n "checking if freeifaddrs can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define freeifaddrs innocuous_freeifaddrs +#ifdef __STDC__ +# include +#else +# include +#endif +#undef freeifaddrs +#ifdef __cplusplus +extern "C" +#endif +char freeifaddrs (); +#if defined __stub_freeifaddrs || defined __stub___freeifaddrs +choke me +#endif + +int main (void) +{ +return freeifaddrs (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_freeifaddrs="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_freeifaddrs="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_freeifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs is prototyped" >&5 +$as_echo_n "checking if freeifaddrs is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_ifaddrs + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "freeifaddrs" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_freeifaddrs="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_freeifaddrs="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_freeifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs is compilable" >&5 +$as_echo_n "checking if freeifaddrs is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ifaddrs + +int main (void) +{ + + freeifaddrs(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_freeifaddrs="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_freeifaddrs="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_freeifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs usage allowed" >&5 +$as_echo_n "checking if freeifaddrs usage allowed... " >&6; } + if test "x$curl_disallow_freeifaddrs" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_freeifaddrs="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_freeifaddrs="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if freeifaddrs might be used" >&5 +$as_echo_n "checking if freeifaddrs might be used... " >&6; } + if test "$tst_links_freeifaddrs" = "yes" && + test "$tst_proto_freeifaddrs" = "yes" && + test "$tst_compi_freeifaddrs" = "yes" && + test "$tst_allow_freeifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_FREEIFADDRS 1 +_ACEOF + + curl_cv_func_freeifaddrs="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_freeifaddrs="no" + fi + + +curl_includes_sys_xattr="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_XATTR_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h sys/xattr.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_sys_xattr +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_fsetxattr="unknown" + tst_proto_fsetxattr="unknown" + tst_compi_fsetxattr="unknown" + tst_allow_fsetxattr="unknown" + tst_nargs_fsetxattr="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr can be linked" >&5 +$as_echo_n "checking if fsetxattr can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define fsetxattr innocuous_fsetxattr +#ifdef __STDC__ +# include +#else +# include +#endif +#undef fsetxattr +#ifdef __cplusplus +extern "C" +#endif +char fsetxattr (); +#if defined __stub_fsetxattr || defined __stub___fsetxattr +choke me +#endif + +int main (void) +{ +return fsetxattr (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_fsetxattr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_fsetxattr="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_fsetxattr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr is prototyped" >&5 +$as_echo_n "checking if fsetxattr is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_sys_xattr + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "fsetxattr" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_fsetxattr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_fsetxattr="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_fsetxattr" = "yes"; then + if test "$tst_nargs_fsetxattr" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr takes 5 args." >&5 +$as_echo_n "checking if fsetxattr takes 5 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_xattr + +int main (void) +{ + + if(0 != fsetxattr(0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_fsetxattr="yes" + tst_nargs_fsetxattr="5" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_fsetxattr="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_fsetxattr" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr takes 6 args." >&5 +$as_echo_n "checking if fsetxattr takes 6 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_xattr + +int main (void) +{ + + if(0 != fsetxattr(0, 0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_fsetxattr="yes" + tst_nargs_fsetxattr="6" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_fsetxattr="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr is compilable" >&5 +$as_echo_n "checking if fsetxattr is compilable... " >&6; } + if test "$tst_compi_fsetxattr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + if test "$tst_compi_fsetxattr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr usage allowed" >&5 +$as_echo_n "checking if fsetxattr usage allowed... " >&6; } + if test "x$curl_disallow_fsetxattr" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_fsetxattr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_fsetxattr="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsetxattr might be used" >&5 +$as_echo_n "checking if fsetxattr might be used... " >&6; } + if test "$tst_links_fsetxattr" = "yes" && + test "$tst_proto_fsetxattr" = "yes" && + test "$tst_compi_fsetxattr" = "yes" && + test "$tst_allow_fsetxattr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_FSETXATTR 1 +_ACEOF + + # + if test "$tst_nargs_fsetxattr" -eq "5"; then + +$as_echo "#define HAVE_FSETXATTR_5 1" >>confdefs.h + + elif test "$tst_nargs_fsetxattr" -eq "6"; then + +$as_echo "#define HAVE_FSETXATTR_6 1" >>confdefs.h + + fi + # + curl_cv_func_fsetxattr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_fsetxattr="no" + fi + + + # + tst_links_ftruncate="unknown" + tst_proto_ftruncate="unknown" + tst_compi_ftruncate="unknown" + tst_allow_ftruncate="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate can be linked" >&5 +$as_echo_n "checking if ftruncate can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define ftruncate innocuous_ftruncate +#ifdef __STDC__ +# include +#else +# include +#endif +#undef ftruncate +#ifdef __cplusplus +extern "C" +#endif +char ftruncate (); +#if defined __stub_ftruncate || defined __stub___ftruncate +choke me +#endif + +int main (void) +{ +return ftruncate (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_ftruncate="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_ftruncate="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_ftruncate" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate is prototyped" >&5 +$as_echo_n "checking if ftruncate is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_unistd + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "ftruncate" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_ftruncate="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_ftruncate="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_ftruncate" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate is compilable" >&5 +$as_echo_n "checking if ftruncate is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_unistd + +int main (void) +{ + + if(0 != ftruncate(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ftruncate="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ftruncate="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ftruncate" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate usage allowed" >&5 +$as_echo_n "checking if ftruncate usage allowed... " >&6; } + if test "x$curl_disallow_ftruncate" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ftruncate="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ftruncate="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ftruncate might be used" >&5 +$as_echo_n "checking if ftruncate might be used... " >&6; } + if test "$tst_links_ftruncate" = "yes" && + test "$tst_proto_ftruncate" = "yes" && + test "$tst_compi_ftruncate" = "yes" && + test "$tst_allow_ftruncate" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_FTRUNCATE 1 +_ACEOF + + curl_cv_func_ftruncate="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ftruncate="no" + fi + + +curl_includes_stdlib="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h stdlib.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_stdlib +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_getaddrinfo="unknown" + tst_proto_getaddrinfo="unknown" + tst_compi_getaddrinfo="unknown" + tst_works_getaddrinfo="unknown" + tst_allow_getaddrinfo="unknown" + tst_tsafe_getaddrinfo="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo can be linked" >&5 +$as_echo_n "checking if getaddrinfo can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ws2tcpip + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ + + if(0 != getaddrinfo(0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_getaddrinfo="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_getaddrinfo="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_getaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is prototyped" >&5 +$as_echo_n "checking if getaddrinfo is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_ws2tcpip + $curl_includes_sys_socket + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getaddrinfo" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_getaddrinfo="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_getaddrinfo="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_getaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is compilable" >&5 +$as_echo_n "checking if getaddrinfo is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ws2tcpip + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ + + if(0 != getaddrinfo(0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getaddrinfo="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getaddrinfo="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_getaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5 +$as_echo_n "checking if getaddrinfo seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ws2tcpip + $curl_includes_stdlib + $curl_includes_string + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ + + struct addrinfo hints; + struct addrinfo *ai = 0; + int error; + + #ifdef HAVE_WINSOCK2_H + WSADATA wsa; + if (WSAStartup(MAKEWORD(2,2), &wsa)) + exit(2); + #endif + + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_NUMERICHOST; + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + error = getaddrinfo("127.0.0.1", 0, &hints, &ai); + if(error || !ai) + exit(1); /* fail */ + else + exit(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_getaddrinfo="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_getaddrinfo="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_getaddrinfo" = "yes" && + test "$tst_works_getaddrinfo" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo usage allowed" >&5 +$as_echo_n "checking if getaddrinfo usage allowed... " >&6; } + if test "x$curl_disallow_getaddrinfo" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_getaddrinfo="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_getaddrinfo="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo might be used" >&5 +$as_echo_n "checking if getaddrinfo might be used... " >&6; } + if test "$tst_links_getaddrinfo" = "yes" && + test "$tst_proto_getaddrinfo" = "yes" && + test "$tst_compi_getaddrinfo" = "yes" && + test "$tst_allow_getaddrinfo" = "yes" && + test "$tst_works_getaddrinfo" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF + + curl_cv_func_getaddrinfo="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_getaddrinfo="no" + curl_cv_func_getaddrinfo_threadsafe="no" + fi + # + if test "$curl_cv_func_getaddrinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo is threadsafe" >&5 +$as_echo_n "checking if getaddrinfo is threadsafe... " >&6; } + case $host_os in + aix[1234].* | aix5.[01].*) + tst_tsafe_getaddrinfo="no" + ;; + aix*) + tst_tsafe_getaddrinfo="yes" + ;; + darwin[12345].*) + tst_tsafe_getaddrinfo="no" + ;; + darwin*) + tst_tsafe_getaddrinfo="yes" + ;; + freebsd[1234].* | freebsd5.[1234]*) + tst_tsafe_getaddrinfo="no" + ;; + freebsd*) + tst_tsafe_getaddrinfo="yes" + ;; + hpux[123456789].* | hpux10.* | hpux11.0* | hpux11.10*) + tst_tsafe_getaddrinfo="no" + ;; + hpux*) + tst_tsafe_getaddrinfo="yes" + ;; + netbsd[123].*) + tst_tsafe_getaddrinfo="no" + ;; + netbsd*) + tst_tsafe_getaddrinfo="yes" + ;; + *bsd*) + tst_tsafe_getaddrinfo="no" + ;; + solaris2*) + tst_tsafe_getaddrinfo="yes" + ;; + esac + if test "$tst_tsafe_getaddrinfo" = "unknown" && + test "$curl_cv_native_windows" = "yes"; then + tst_tsafe_getaddrinfo="yes" + fi + if test "$tst_tsafe_getaddrinfo" = "unknown"; then + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ +#ifdef h_errno + return 0; +#else + force compilation error +#endif +} + + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_symbol_defined="yes" + +else + + tst_symbol_defined="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tst_symbol_defined" = "yes"; then + curl_cv_have_def_h_errno=yes + + else + curl_cv_have_def_h_errno=no + + fi + + if test "$curl_cv_have_def_h_errno" = "yes"; then + tst_h_errno_macro="yes" + else + tst_h_errno_macro="no" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_socket + $curl_includes_netdb + +int main (void) +{ + + h_errno = 2; + if(0 != h_errno) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_h_errno_modifiable_lvalue="yes" + +else + + tst_h_errno_modifiable_lvalue="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + +#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) + return 0; +#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700) + return 0; +#else + force compilation error +#endif + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_h_errno_sbs_issue_7="yes" + +else + + tst_h_errno_sbs_issue_7="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$tst_h_errno_macro" = "no" && + test "$tst_h_errno_modifiable_lvalue" = "no" && + test "$tst_h_errno_sbs_issue_7" = "no"; then + tst_tsafe_getaddrinfo="no" + else + tst_tsafe_getaddrinfo="yes" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_tsafe_getaddrinfo" >&5 +$as_echo "$tst_tsafe_getaddrinfo" >&6; } + if test "$tst_tsafe_getaddrinfo" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETADDRINFO_THREADSAFE 1 +_ACEOF + + curl_cv_func_getaddrinfo_threadsafe="yes" + else + curl_cv_func_getaddrinfo_threadsafe="no" + fi + fi + + + # + tst_links_gai_strerror="unknown" + tst_proto_gai_strerror="unknown" + tst_compi_gai_strerror="unknown" + tst_allow_gai_strerror="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror can be linked" >&5 +$as_echo_n "checking if gai_strerror can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +int main (void) +{ + + if(0 != gai_strerror(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gai_strerror="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gai_strerror="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gai_strerror" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror is prototyped" >&5 +$as_echo_n "checking if gai_strerror is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gai_strerror" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gai_strerror="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gai_strerror="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gai_strerror" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror is compilable" >&5 +$as_echo_n "checking if gai_strerror is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +int main (void) +{ + + if(0 != gai_strerror(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gai_strerror="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gai_strerror="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_gai_strerror" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror usage allowed" >&5 +$as_echo_n "checking if gai_strerror usage allowed... " >&6; } + if test "x$curl_disallow_gai_strerror" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gai_strerror="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gai_strerror="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gai_strerror might be used" >&5 +$as_echo_n "checking if gai_strerror might be used... " >&6; } + if test "$tst_links_gai_strerror" = "yes" && + test "$tst_proto_gai_strerror" = "yes" && + test "$tst_compi_gai_strerror" = "yes" && + test "$tst_allow_gai_strerror" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GAI_STRERROR 1 +_ACEOF + + curl_cv_func_gai_strerror="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gai_strerror="no" + fi + + + # + tst_links_gethostbyaddr="unknown" + tst_proto_gethostbyaddr="unknown" + tst_compi_gethostbyaddr="unknown" + tst_allow_gethostbyaddr="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr can be linked" >&5 +$as_echo_n "checking if gethostbyaddr can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyaddr(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gethostbyaddr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gethostbyaddr="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gethostbyaddr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is prototyped" >&5 +$as_echo_n "checking if gethostbyaddr is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyaddr" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gethostbyaddr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gethostbyaddr="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gethostbyaddr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is compilable" >&5 +$as_echo_n "checking if gethostbyaddr is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyaddr(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyaddr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyaddr="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_gethostbyaddr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr usage allowed" >&5 +$as_echo_n "checking if gethostbyaddr usage allowed... " >&6; } + if test "x$curl_disallow_gethostbyaddr" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gethostbyaddr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gethostbyaddr="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr might be used" >&5 +$as_echo_n "checking if gethostbyaddr might be used... " >&6; } + if test "$tst_links_gethostbyaddr" = "yes" && + test "$tst_proto_gethostbyaddr" = "yes" && + test "$tst_compi_gethostbyaddr" = "yes" && + test "$tst_allow_gethostbyaddr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTBYADDR 1 +_ACEOF + + curl_cv_func_gethostbyaddr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gethostbyaddr="no" + fi + + + # + tst_links_gethostbyaddr_r="unknown" + tst_proto_gethostbyaddr_r="unknown" + tst_compi_gethostbyaddr_r="unknown" + tst_allow_gethostbyaddr_r="unknown" + tst_nargs_gethostbyaddr_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r can be linked" >&5 +$as_echo_n "checking if gethostbyaddr_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gethostbyaddr_r innocuous_gethostbyaddr_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gethostbyaddr_r +#ifdef __cplusplus +extern "C" +#endif +char gethostbyaddr_r (); +#if defined __stub_gethostbyaddr_r || defined __stub___gethostbyaddr_r +choke me +#endif + +int main (void) +{ +return gethostbyaddr_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gethostbyaddr_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gethostbyaddr_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gethostbyaddr_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r is prototyped" >&5 +$as_echo_n "checking if gethostbyaddr_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gethostbyaddr_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gethostbyaddr_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gethostbyaddr_r" = "yes"; then + if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 5 args." >&5 +$as_echo_n "checking if gethostbyaddr_r takes 5 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyaddr_r(0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyaddr_r="yes" + tst_nargs_gethostbyaddr_r="5" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyaddr_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 7 args." >&5 +$as_echo_n "checking if gethostbyaddr_r takes 7 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyaddr_r="yes" + tst_nargs_gethostbyaddr_r="7" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyaddr_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r takes 8 args." >&5 +$as_echo_n "checking if gethostbyaddr_r takes 8 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyaddr_r="yes" + tst_nargs_gethostbyaddr_r="8" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyaddr_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r is compilable" >&5 +$as_echo_n "checking if gethostbyaddr_r is compilable... " >&6; } + if test "$tst_compi_gethostbyaddr_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + if test "$tst_compi_gethostbyaddr_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r usage allowed" >&5 +$as_echo_n "checking if gethostbyaddr_r usage allowed... " >&6; } + if test "x$curl_disallow_gethostbyaddr_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gethostbyaddr_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gethostbyaddr_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr_r might be used" >&5 +$as_echo_n "checking if gethostbyaddr_r might be used... " >&6; } + if test "$tst_links_gethostbyaddr_r" = "yes" && + test "$tst_proto_gethostbyaddr_r" = "yes" && + test "$tst_compi_gethostbyaddr_r" = "yes" && + test "$tst_allow_gethostbyaddr_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTBYADDR_R 1 +_ACEOF + + # + if test "$tst_nargs_gethostbyaddr_r" -eq "5"; then + +$as_echo "#define HAVE_GETHOSTBYADDR_R_5 1" >>confdefs.h + + elif test "$tst_nargs_gethostbyaddr_r" -eq "7"; then + +$as_echo "#define HAVE_GETHOSTBYADDR_R_7 1" >>confdefs.h + + elif test "$tst_nargs_gethostbyaddr_r" -eq "8"; then + +$as_echo "#define HAVE_GETHOSTBYADDR_R_8 1" >>confdefs.h + + fi + # + curl_cv_func_gethostbyaddr_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gethostbyaddr_r="no" + fi + + + # + tst_links_gethostbyname="unknown" + tst_proto_gethostbyname="unknown" + tst_compi_gethostbyname="unknown" + tst_allow_gethostbyname="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname can be linked" >&5 +$as_echo_n "checking if gethostbyname can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyname(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gethostbyname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gethostbyname="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gethostbyname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is prototyped" >&5 +$as_echo_n "checking if gethostbyname is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyname" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gethostbyname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gethostbyname="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gethostbyname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is compilable" >&5 +$as_echo_n "checking if gethostbyname is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyname(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyname="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_gethostbyname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname usage allowed" >&5 +$as_echo_n "checking if gethostbyname usage allowed... " >&6; } + if test "x$curl_disallow_gethostbyname" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gethostbyname="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gethostbyname="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname might be used" >&5 +$as_echo_n "checking if gethostbyname might be used... " >&6; } + if test "$tst_links_gethostbyname" = "yes" && + test "$tst_proto_gethostbyname" = "yes" && + test "$tst_compi_gethostbyname" = "yes" && + test "$tst_allow_gethostbyname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTBYNAME 1 +_ACEOF + + curl_cv_func_gethostbyname="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gethostbyname="no" + fi + + + # + tst_links_gethostbyname_r="unknown" + tst_proto_gethostbyname_r="unknown" + tst_compi_gethostbyname_r="unknown" + tst_allow_gethostbyname_r="unknown" + tst_nargs_gethostbyname_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r can be linked" >&5 +$as_echo_n "checking if gethostbyname_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gethostbyname_r innocuous_gethostbyname_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gethostbyname_r +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname_r (); +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r +choke me +#endif + +int main (void) +{ +return gethostbyname_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gethostbyname_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gethostbyname_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gethostbyname_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r is prototyped" >&5 +$as_echo_n "checking if gethostbyname_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostbyname_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gethostbyname_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gethostbyname_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gethostbyname_r" = "yes"; then + if test "$tst_nargs_gethostbyname_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 3 args." >&5 +$as_echo_n "checking if gethostbyname_r takes 3 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyname_r(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyname_r="yes" + tst_nargs_gethostbyname_r="3" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyname_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_gethostbyname_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 5 args." >&5 +$as_echo_n "checking if gethostbyname_r takes 5 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyname_r(0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyname_r="yes" + tst_nargs_gethostbyname_r="5" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyname_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_gethostbyname_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r takes 6 args." >&5 +$as_echo_n "checking if gethostbyname_r takes 6 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != gethostbyname_r(0, 0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostbyname_r="yes" + tst_nargs_gethostbyname_r="6" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostbyname_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r is compilable" >&5 +$as_echo_n "checking if gethostbyname_r is compilable... " >&6; } + if test "$tst_compi_gethostbyname_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + if test "$tst_compi_gethostbyname_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r usage allowed" >&5 +$as_echo_n "checking if gethostbyname_r usage allowed... " >&6; } + if test "x$curl_disallow_gethostbyname_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gethostbyname_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gethostbyname_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname_r might be used" >&5 +$as_echo_n "checking if gethostbyname_r might be used... " >&6; } + if test "$tst_links_gethostbyname_r" = "yes" && + test "$tst_proto_gethostbyname_r" = "yes" && + test "$tst_compi_gethostbyname_r" = "yes" && + test "$tst_allow_gethostbyname_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTBYNAME_R 1 +_ACEOF + + # + if test "$tst_nargs_gethostbyname_r" -eq "3"; then + +$as_echo "#define HAVE_GETHOSTBYNAME_R_3 1" >>confdefs.h + + elif test "$tst_nargs_gethostbyname_r" -eq "5"; then + +$as_echo "#define HAVE_GETHOSTBYNAME_R_5 1" >>confdefs.h + + elif test "$tst_nargs_gethostbyname_r" -eq "6"; then + +$as_echo "#define HAVE_GETHOSTBYNAME_R_6 1" >>confdefs.h + + fi + # + curl_cv_func_gethostbyname_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gethostbyname_r="no" + fi + + +curl_preprocess_callconv="\ +/* preprocess start */ +#ifdef HAVE_WINDOWS_H +# define FUNCALLCONV __stdcall +#else +# define FUNCALLCONV +#endif +/* preprocess end */" + + + # + tst_links_gethostname="unknown" + tst_proto_gethostname="unknown" + tst_compi_gethostname="unknown" + tst_allow_gethostname="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname can be linked" >&5 +$as_echo_n "checking if gethostname can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_unistd + +int main (void) +{ + + if(0 != gethostname(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gethostname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gethostname="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gethostname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname is prototyped" >&5 +$as_echo_n "checking if gethostname is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_unistd + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gethostname" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gethostname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gethostname="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gethostname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname is compilable" >&5 +$as_echo_n "checking if gethostname is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_unistd + +int main (void) +{ + + if(0 != gethostname(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gethostname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gethostname="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_gethostname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname arg 2 data type" >&5 +$as_echo_n "checking for gethostname arg 2 data type... " >&6; } + tst_gethostname_type_arg2="unknown" + for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do + for tst_arg2 in 'int' 'unsigned int' 'size_t'; do + if test "$tst_gethostname_type_arg2" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_unistd + $curl_preprocess_callconv + extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2); + +int main (void) +{ + + if(0 != gethostname(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_gethostname_type_arg2="$tst_arg2" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_gethostname_type_arg2" >&5 +$as_echo "$tst_gethostname_type_arg2" >&6; } + if test "$tst_gethostname_type_arg2" != "unknown"; then + +cat >>confdefs.h <<_ACEOF +#define GETHOSTNAME_TYPE_ARG2 $tst_gethostname_type_arg2 +_ACEOF + + fi + fi + # + if test "$tst_compi_gethostname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname usage allowed" >&5 +$as_echo_n "checking if gethostname usage allowed... " >&6; } + if test "x$curl_disallow_gethostname" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gethostname="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gethostname="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname might be used" >&5 +$as_echo_n "checking if gethostname might be used... " >&6; } + if test "$tst_links_gethostname" = "yes" && + test "$tst_proto_gethostname" = "yes" && + test "$tst_compi_gethostname" = "yes" && + test "$tst_allow_gethostname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTNAME 1 +_ACEOF + + curl_cv_func_gethostname="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gethostname="no" + fi + + + # + tst_links_getpeername="unknown" + tst_proto_getpeername="unknown" + tst_compi_getpeername="unknown" + tst_allow_getpeername="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpeername can be linked" >&5 +$as_echo_n "checking if getpeername can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != getpeername(0, (void *)0, (void *)0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_getpeername="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_getpeername="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_getpeername" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpeername is prototyped" >&5 +$as_echo_n "checking if getpeername is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getpeername" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_getpeername="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_getpeername="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_getpeername" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpeername is compilable" >&5 +$as_echo_n "checking if getpeername is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != getpeername(0, (void *)0, (void *)0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getpeername="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getpeername="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_getpeername" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpeername usage allowed" >&5 +$as_echo_n "checking if getpeername usage allowed... " >&6; } + if test "x$curl_disallow_getpeername" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_getpeername="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_getpeername="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpeername might be used" >&5 +$as_echo_n "checking if getpeername might be used... " >&6; } + if test "$tst_links_getpeername" = "yes" && + test "$tst_proto_getpeername" = "yes" && + test "$tst_compi_getpeername" = "yes" && + test "$tst_allow_getpeername" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETPEERNAME 1 +_ACEOF + + curl_cv_func_getpeername="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_getpeername="no" + fi + + + # + tst_links_getsockname="unknown" + tst_proto_getsockname="unknown" + tst_compi_getsockname="unknown" + tst_allow_getsockname="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getsockname can be linked" >&5 +$as_echo_n "checking if getsockname can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != getsockname(0, (void *)0, (void *)0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_getsockname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_getsockname="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_getsockname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getsockname is prototyped" >&5 +$as_echo_n "checking if getsockname is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getsockname" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_getsockname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_getsockname="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_getsockname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getsockname is compilable" >&5 +$as_echo_n "checking if getsockname is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != getsockname(0, (void *)0, (void *)0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getsockname="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getsockname="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_getsockname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getsockname usage allowed" >&5 +$as_echo_n "checking if getsockname usage allowed... " >&6; } + if test "x$curl_disallow_getsockname" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_getsockname="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_getsockname="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getsockname might be used" >&5 +$as_echo_n "checking if getsockname might be used... " >&6; } + if test "$tst_links_getsockname" = "yes" && + test "$tst_proto_getsockname" = "yes" && + test "$tst_compi_getsockname" = "yes" && + test "$tst_allow_getsockname" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETSOCKNAME 1 +_ACEOF + + curl_cv_func_getsockname="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_getsockname="no" + fi + + +curl_includes_netif="\ +/* includes start */ +#ifdef HAVE_NET_IF_H +# include +#endif +/* includes end */" + for ac_header in net/if.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$curl_includes_netif +" +if test "x$ac_cv_header_net_if_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF + +fi + +done + + + + # + tst_links_if_nametoindex="unknown" + tst_proto_if_nametoindex="unknown" + tst_compi_if_nametoindex="unknown" + tst_allow_if_nametoindex="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex can be linked" >&5 +$as_echo_n "checking if if_nametoindex can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + #include + +int main (void) +{ + + if(0 != if_nametoindex("")) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_if_nametoindex="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_if_nametoindex="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_if_nametoindex" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex is prototyped" >&5 +$as_echo_n "checking if if_nametoindex is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_netif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "if_nametoindex" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_if_nametoindex="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_if_nametoindex="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_if_nametoindex" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex is compilable" >&5 +$as_echo_n "checking if if_nametoindex is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_netif + +int main (void) +{ + + if(0 != if_nametoindex("")) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_if_nametoindex="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_if_nametoindex="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_if_nametoindex" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex usage allowed" >&5 +$as_echo_n "checking if if_nametoindex usage allowed... " >&6; } + if test "x$curl_disallow_if_nametoindex" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_if_nametoindex="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_if_nametoindex="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if if_nametoindex might be used" >&5 +$as_echo_n "checking if if_nametoindex might be used... " >&6; } + if test "$tst_links_if_nametoindex" = "yes" && + test "$tst_proto_if_nametoindex" = "yes" && + test "$tst_compi_if_nametoindex" = "yes" && + test "$tst_allow_if_nametoindex" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IF_NAMETOINDEX 1 +_ACEOF + + curl_cv_func_if_nametoindex="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_if_nametoindex="no" + fi + + + # + tst_links_getifaddrs="unknown" + tst_proto_getifaddrs="unknown" + tst_compi_getifaddrs="unknown" + tst_works_getifaddrs="unknown" + tst_allow_getifaddrs="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs can be linked" >&5 +$as_echo_n "checking if getifaddrs can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define getifaddrs innocuous_getifaddrs +#ifdef __STDC__ +# include +#else +# include +#endif +#undef getifaddrs +#ifdef __cplusplus +extern "C" +#endif +char getifaddrs (); +#if defined __stub_getifaddrs || defined __stub___getifaddrs +choke me +#endif + +int main (void) +{ +return getifaddrs (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_getifaddrs="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_getifaddrs="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_getifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs is prototyped" >&5 +$as_echo_n "checking if getifaddrs is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_ifaddrs + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getifaddrs" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_getifaddrs="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_getifaddrs="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_getifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs is compilable" >&5 +$as_echo_n "checking if getifaddrs is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_ifaddrs + +int main (void) +{ + + if(0 != getifaddrs(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getifaddrs="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getifaddrs="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_getifaddrs" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs seems to work" >&5 +$as_echo_n "checking if getifaddrs seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_ifaddrs + +int main (void) +{ + + struct ifaddrs *ifa = 0; + int error; + + error = getifaddrs(&ifa); + if(error || !ifa) + exit(1); /* fail */ + else + exit(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_getifaddrs="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_getifaddrs="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_getifaddrs" = "yes" && + test "$tst_works_getifaddrs" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs usage allowed" >&5 +$as_echo_n "checking if getifaddrs usage allowed... " >&6; } + if test "x$curl_disallow_getifaddrs" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_getifaddrs="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_getifaddrs="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getifaddrs might be used" >&5 +$as_echo_n "checking if getifaddrs might be used... " >&6; } + if test "$tst_links_getifaddrs" = "yes" && + test "$tst_proto_getifaddrs" = "yes" && + test "$tst_compi_getifaddrs" = "yes" && + test "$tst_allow_getifaddrs" = "yes" && + test "$tst_works_getifaddrs" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETIFADDRS 1 +_ACEOF + + curl_cv_func_getifaddrs="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_getifaddrs="no" + fi + + + # + tst_links_getservbyport_r="unknown" + tst_proto_getservbyport_r="unknown" + tst_compi_getservbyport_r="unknown" + tst_allow_getservbyport_r="unknown" + tst_nargs_getservbyport_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r can be linked" >&5 +$as_echo_n "checking if getservbyport_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define getservbyport_r innocuous_getservbyport_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef getservbyport_r +#ifdef __cplusplus +extern "C" +#endif +char getservbyport_r (); +#if defined __stub_getservbyport_r || defined __stub___getservbyport_r +choke me +#endif + +int main (void) +{ +return getservbyport_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_getservbyport_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_getservbyport_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_getservbyport_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r is prototyped" >&5 +$as_echo_n "checking if getservbyport_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_netdb + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getservbyport_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_getservbyport_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_getservbyport_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_getservbyport_r" = "yes"; then + if test "$tst_nargs_getservbyport_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 4 args." >&5 +$as_echo_n "checking if getservbyport_r takes 4 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != getservbyport_r(0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getservbyport_r="yes" + tst_nargs_getservbyport_r="4" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getservbyport_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_getservbyport_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 5 args." >&5 +$as_echo_n "checking if getservbyport_r takes 5 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != getservbyport_r(0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getservbyport_r="yes" + tst_nargs_getservbyport_r="5" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getservbyport_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_getservbyport_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r takes 6 args." >&5 +$as_echo_n "checking if getservbyport_r takes 6 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_netdb + +int main (void) +{ + + if(0 != getservbyport_r(0, 0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_getservbyport_r="yes" + tst_nargs_getservbyport_r="6" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_getservbyport_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r is compilable" >&5 +$as_echo_n "checking if getservbyport_r is compilable... " >&6; } + if test "$tst_compi_getservbyport_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + if test "$tst_compi_getservbyport_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r usage allowed" >&5 +$as_echo_n "checking if getservbyport_r usage allowed... " >&6; } + if test "x$curl_disallow_getservbyport_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_getservbyport_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_getservbyport_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyport_r might be used" >&5 +$as_echo_n "checking if getservbyport_r might be used... " >&6; } + if test "$tst_links_getservbyport_r" = "yes" && + test "$tst_proto_getservbyport_r" = "yes" && + test "$tst_compi_getservbyport_r" = "yes" && + test "$tst_allow_getservbyport_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETSERVBYPORT_R 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define GETSERVBYPORT_R_ARGS $tst_nargs_getservbyport_r +_ACEOF + + if test "$tst_nargs_getservbyport_r" -eq "4"; then + +$as_echo "#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data)" >>confdefs.h + + else + +$as_echo "#define GETSERVBYPORT_R_BUFSIZE 4096" >>confdefs.h + + fi + curl_cv_func_getservbyport_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_getservbyport_r="no" + fi + + +curl_includes_time="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +# ifdef TIME_WITH_SYS_TIME +# include +# endif +#else +# ifdef HAVE_TIME_H +# include +# endif +#endif +/* includes end */" + for ac_header in sys/types.h sys/time.h time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_time +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_gmtime_r="unknown" + tst_proto_gmtime_r="unknown" + tst_compi_gmtime_r="unknown" + tst_works_gmtime_r="unknown" + tst_allow_gmtime_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r can be linked" >&5 +$as_echo_n "checking if gmtime_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define gmtime_r innocuous_gmtime_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gmtime_r +#ifdef __cplusplus +extern "C" +#endif +char gmtime_r (); +#if defined __stub_gmtime_r || defined __stub___gmtime_r +choke me +#endif + +int main (void) +{ +return gmtime_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_gmtime_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_gmtime_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_gmtime_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r is prototyped" >&5 +$as_echo_n "checking if gmtime_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_time + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gmtime_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_gmtime_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_gmtime_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_gmtime_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r is compilable" >&5 +$as_echo_n "checking if gmtime_r is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_time + +int main (void) +{ + + if(0 != gmtime_r(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_gmtime_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_gmtime_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_gmtime_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r seems to work" >&5 +$as_echo_n "checking if gmtime_r seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_time + +int main (void) +{ + + time_t local = 1170352587; + struct tm *gmt = 0; + struct tm result; + gmt = gmtime_r(&local, &result); + if(gmt) + exit(0); + else + exit(1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_gmtime_r="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_gmtime_r="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_gmtime_r" = "yes" && + test "$tst_works_gmtime_r" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r usage allowed" >&5 +$as_echo_n "checking if gmtime_r usage allowed... " >&6; } + if test "x$curl_disallow_gmtime_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_gmtime_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_gmtime_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gmtime_r might be used" >&5 +$as_echo_n "checking if gmtime_r might be used... " >&6; } + if test "$tst_links_gmtime_r" = "yes" && + test "$tst_proto_gmtime_r" = "yes" && + test "$tst_compi_gmtime_r" = "yes" && + test "$tst_allow_gmtime_r" = "yes" && + test "$tst_works_gmtime_r" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_GMTIME_R 1 +_ACEOF + + curl_cv_func_gmtime_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_gmtime_r="no" + fi + + +curl_includes_arpa_inet="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_ARPA_INET_H +# include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#include +#endif +/* includes end */" + for ac_header in sys/types.h sys/socket.h netinet/in.h arpa/inet.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_arpa_inet +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_inet_ntoa_r="unknown" + tst_proto_inet_ntoa_r="unknown" + tst_compi_inet_ntoa_r="unknown" + tst_allow_inet_ntoa_r="unknown" + tst_nargs_inet_ntoa_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r can be linked" >&5 +$as_echo_n "checking if inet_ntoa_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define inet_ntoa_r innocuous_inet_ntoa_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef inet_ntoa_r +#ifdef __cplusplus +extern "C" +#endif +char inet_ntoa_r (); +#if defined __stub_inet_ntoa_r || defined __stub___inet_ntoa_r +choke me +#endif + +int main (void) +{ +return inet_ntoa_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_inet_ntoa_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_inet_ntoa_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_inet_ntoa_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is prototyped" >&5 +$as_echo_n "checking if inet_ntoa_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_arpa_inet + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_ntoa_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_inet_ntoa_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_inet_ntoa_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_inet_ntoa_r" = "yes"; then + if test "$tst_nargs_inet_ntoa_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 2 args." >&5 +$as_echo_n "checking if inet_ntoa_r takes 2 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_arpa_inet + +int main (void) +{ + + struct in_addr addr; + if(0 != inet_ntoa_r(addr, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_inet_ntoa_r="yes" + tst_nargs_inet_ntoa_r="2" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_inet_ntoa_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test "$tst_nargs_inet_ntoa_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r takes 3 args." >&5 +$as_echo_n "checking if inet_ntoa_r takes 3 args.... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_arpa_inet + +int main (void) +{ + + struct in_addr addr; + if(0 != inet_ntoa_r(addr, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_inet_ntoa_r="yes" + tst_nargs_inet_ntoa_r="3" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_inet_ntoa_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r is compilable" >&5 +$as_echo_n "checking if inet_ntoa_r is compilable... " >&6; } + if test "$tst_compi_inet_ntoa_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + # + if test "$tst_compi_inet_ntoa_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r usage allowed" >&5 +$as_echo_n "checking if inet_ntoa_r usage allowed... " >&6; } + if test "x$curl_disallow_inet_ntoa_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_inet_ntoa_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_inet_ntoa_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntoa_r might be used" >&5 +$as_echo_n "checking if inet_ntoa_r might be used... " >&6; } + if test "$tst_links_inet_ntoa_r" = "yes" && + test "$tst_proto_inet_ntoa_r" = "yes" && + test "$tst_compi_inet_ntoa_r" = "yes" && + test "$tst_allow_inet_ntoa_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_INET_NTOA_R 1 +_ACEOF + + # + if test "$tst_nargs_inet_ntoa_r" -eq "2"; then + +$as_echo "#define HAVE_INET_NTOA_R_2 1" >>confdefs.h + + elif test "$tst_nargs_inet_ntoa_r" -eq "3"; then + +$as_echo "#define HAVE_INET_NTOA_R_3 1" >>confdefs.h + + fi + # + curl_cv_func_inet_ntoa_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_inet_ntoa_r="no" + fi + + + # + tst_links_inet_ntop="unknown" + tst_proto_inet_ntop="unknown" + tst_compi_inet_ntop="unknown" + tst_works_inet_ntop="unknown" + tst_allow_inet_ntop="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop can be linked" >&5 +$as_echo_n "checking if inet_ntop can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define inet_ntop innocuous_inet_ntop +#ifdef __STDC__ +# include +#else +# include +#endif +#undef inet_ntop +#ifdef __cplusplus +extern "C" +#endif +char inet_ntop (); +#if defined __stub_inet_ntop || defined __stub___inet_ntop +choke me +#endif + +int main (void) +{ +return inet_ntop (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_inet_ntop="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_inet_ntop="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_inet_ntop" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop is prototyped" >&5 +$as_echo_n "checking if inet_ntop is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_arpa_inet + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_ntop" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_inet_ntop="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_inet_ntop="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_inet_ntop" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop is compilable" >&5 +$as_echo_n "checking if inet_ntop is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_arpa_inet + +int main (void) +{ + + if(0 != inet_ntop(0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_inet_ntop="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_inet_ntop="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_inet_ntop" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop seems to work" >&5 +$as_echo_n "checking if inet_ntop seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_arpa_inet + $curl_includes_string + +int main (void) +{ + + char ipv6res[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; + char ipv4res[sizeof "255.255.255.255"]; + unsigned char ipv6a[26]; + unsigned char ipv4a[5]; + char *ipv6ptr = 0; + char *ipv4ptr = 0; + /* - */ + ipv4res[0] = '\0'; + ipv4a[0] = 0xc0; + ipv4a[1] = 0xa8; + ipv4a[2] = 0x64; + ipv4a[3] = 0x01; + ipv4a[4] = 0x01; + /* - */ + ipv4ptr = inet_ntop(AF_INET, ipv4a, ipv4res, sizeof(ipv4res)); + if(!ipv4ptr) + exit(1); /* fail */ + if(ipv4ptr != ipv4res) + exit(1); /* fail */ + if(!ipv4ptr[0]) + exit(1); /* fail */ + if(memcmp(ipv4res, "192.168.100.1", 13) != 0) + exit(1); /* fail */ + /* - */ + ipv6res[0] = '\0'; + memset(ipv6a, 0, sizeof(ipv6a)); + ipv6a[0] = 0xfe; + ipv6a[1] = 0x80; + ipv6a[8] = 0x02; + ipv6a[9] = 0x14; + ipv6a[10] = 0x4f; + ipv6a[11] = 0xff; + ipv6a[12] = 0xfe; + ipv6a[13] = 0x0b; + ipv6a[14] = 0x76; + ipv6a[15] = 0xc8; + ipv6a[25] = 0x01; + /* - */ + ipv6ptr = inet_ntop(AF_INET6, ipv6a, ipv6res, sizeof(ipv6res)); + if(!ipv6ptr) + exit(1); /* fail */ + if(ipv6ptr != ipv6res) + exit(1); /* fail */ + if(!ipv6ptr[0]) + exit(1); /* fail */ + if(memcmp(ipv6res, "fe80::214:4fff:fe0b:76c8", 24) != 0) + exit(1); /* fail */ + /* - */ + exit(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_inet_ntop="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_inet_ntop="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_inet_ntop" = "yes" && + test "$tst_works_inet_ntop" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop usage allowed" >&5 +$as_echo_n "checking if inet_ntop usage allowed... " >&6; } + if test "x$curl_disallow_inet_ntop" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_inet_ntop="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_inet_ntop="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_ntop might be used" >&5 +$as_echo_n "checking if inet_ntop might be used... " >&6; } + if test "$tst_links_inet_ntop" = "yes" && + test "$tst_proto_inet_ntop" = "yes" && + test "$tst_compi_inet_ntop" = "yes" && + test "$tst_allow_inet_ntop" = "yes" && + test "$tst_works_inet_ntop" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_INET_NTOP 1 +_ACEOF + + curl_cv_func_inet_ntop="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_inet_ntop="no" + fi + + + # + tst_links_inet_pton="unknown" + tst_proto_inet_pton="unknown" + tst_compi_inet_pton="unknown" + tst_works_inet_pton="unknown" + tst_allow_inet_pton="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton can be linked" >&5 +$as_echo_n "checking if inet_pton can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define inet_pton innocuous_inet_pton +#ifdef __STDC__ +# include +#else +# include +#endif +#undef inet_pton +#ifdef __cplusplus +extern "C" +#endif +char inet_pton (); +#if defined __stub_inet_pton || defined __stub___inet_pton +choke me +#endif + +int main (void) +{ +return inet_pton (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_inet_pton="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_inet_pton="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_inet_pton" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton is prototyped" >&5 +$as_echo_n "checking if inet_pton is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_arpa_inet + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_pton" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_inet_pton="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_inet_pton="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_inet_pton" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton is compilable" >&5 +$as_echo_n "checking if inet_pton is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_arpa_inet + +int main (void) +{ + + if(0 != inet_pton(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_inet_pton="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_inet_pton="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_inet_pton" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton seems to work" >&5 +$as_echo_n "checking if inet_pton seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_arpa_inet + $curl_includes_string + +int main (void) +{ + + unsigned char ipv6a[16+1]; + unsigned char ipv4a[4+1]; + const char *ipv6src = "fe80::214:4fff:fe0b:76c8"; + const char *ipv4src = "192.168.100.1"; + /* - */ + memset(ipv4a, 1, sizeof(ipv4a)); + if(1 != inet_pton(AF_INET, ipv4src, ipv4a)) + exit(1); /* fail */ + /* - */ + if( (ipv4a[0] != 0xc0) || + (ipv4a[1] != 0xa8) || + (ipv4a[2] != 0x64) || + (ipv4a[3] != 0x01) || + (ipv4a[4] != 0x01) ) + exit(1); /* fail */ + /* - */ + memset(ipv6a, 1, sizeof(ipv6a)); + if(1 != inet_pton(AF_INET6, ipv6src, ipv6a)) + exit(1); /* fail */ + /* - */ + if( (ipv6a[0] != 0xfe) || + (ipv6a[1] != 0x80) || + (ipv6a[8] != 0x02) || + (ipv6a[9] != 0x14) || + (ipv6a[10] != 0x4f) || + (ipv6a[11] != 0xff) || + (ipv6a[12] != 0xfe) || + (ipv6a[13] != 0x0b) || + (ipv6a[14] != 0x76) || + (ipv6a[15] != 0xc8) || + (ipv6a[16] != 0x01) ) + exit(1); /* fail */ + /* - */ + if( (ipv6a[2] != 0x0) || + (ipv6a[3] != 0x0) || + (ipv6a[4] != 0x0) || + (ipv6a[5] != 0x0) || + (ipv6a[6] != 0x0) || + (ipv6a[7] != 0x0) ) + exit(1); /* fail */ + /* - */ + exit(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_inet_pton="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_inet_pton="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_inet_pton" = "yes" && + test "$tst_works_inet_pton" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton usage allowed" >&5 +$as_echo_n "checking if inet_pton usage allowed... " >&6; } + if test "x$curl_disallow_inet_pton" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_inet_pton="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_inet_pton="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_pton might be used" >&5 +$as_echo_n "checking if inet_pton might be used... " >&6; } + if test "$tst_links_inet_pton" = "yes" && + test "$tst_proto_inet_pton" = "yes" && + test "$tst_compi_inet_pton" = "yes" && + test "$tst_allow_inet_pton" = "yes" && + test "$tst_works_inet_pton" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_INET_PTON 1 +_ACEOF + + curl_cv_func_inet_pton="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_inet_pton="no" + fi + + +curl_includes_stropts="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +#ifdef HAVE_SYS_IOCTL_H +# include +#endif +#ifdef HAVE_STROPTS_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h unistd.h sys/socket.h sys/ioctl.h stropts.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_stropts +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_ioctl="unknown" + tst_proto_ioctl="unknown" + tst_compi_ioctl="unknown" + tst_allow_ioctl="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl can be linked" >&5 +$as_echo_n "checking if ioctl can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define ioctl innocuous_ioctl +#ifdef __STDC__ +# include +#else +# include +#endif +#undef ioctl +#ifdef __cplusplus +extern "C" +#endif +char ioctl (); +#if defined __stub_ioctl || defined __stub___ioctl +choke me +#endif + +int main (void) +{ +return ioctl (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_ioctl="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_ioctl="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_ioctl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl is prototyped" >&5 +$as_echo_n "checking if ioctl is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_stropts + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "ioctl" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_ioctl="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_ioctl="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_ioctl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl is compilable" >&5 +$as_echo_n "checking if ioctl is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stropts + +int main (void) +{ + + if(0 != ioctl(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctl="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctl="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl usage allowed" >&5 +$as_echo_n "checking if ioctl usage allowed... " >&6; } + if test "x$curl_disallow_ioctl" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctl="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctl="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl might be used" >&5 +$as_echo_n "checking if ioctl might be used... " >&6; } + if test "$tst_links_ioctl" = "yes" && + test "$tst_proto_ioctl" = "yes" && + test "$tst_compi_ioctl" = "yes" && + test "$tst_allow_ioctl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTL 1 +_ACEOF + + curl_cv_func_ioctl="yes" + + # + tst_compi_ioctl_fionbio="unknown" + tst_allow_ioctl_fionbio="unknown" + # + if test "$curl_cv_func_ioctl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO is compilable" >&5 +$as_echo_n "checking if ioctl FIONBIO is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stropts + +int main (void) +{ + + int flags = 0; + if(0 != ioctl(0, FIONBIO, &flags)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctl_fionbio="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctl_fionbio="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctl_fionbio" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO usage allowed" >&5 +$as_echo_n "checking if ioctl FIONBIO usage allowed... " >&6; } + if test "x$curl_disallow_ioctl_fionbio" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctl_fionbio="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctl_fionbio="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl FIONBIO might be used" >&5 +$as_echo_n "checking if ioctl FIONBIO might be used... " >&6; } + if test "$tst_compi_ioctl_fionbio" = "yes" && + test "$tst_allow_ioctl_fionbio" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTL_FIONBIO 1 +_ACEOF + + curl_cv_func_ioctl_fionbio="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctl_fionbio="no" + fi + + + # + tst_compi_ioctl_siocgifaddr="unknown" + tst_allow_ioctl_siocgifaddr="unknown" + # + if test "$curl_cv_func_ioctl" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR is compilable" >&5 +$as_echo_n "checking if ioctl SIOCGIFADDR is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stropts + #include + +int main (void) +{ + + struct ifreq ifr; + if(0 != ioctl(0, SIOCGIFADDR, &ifr)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctl_siocgifaddr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctl_siocgifaddr="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctl_siocgifaddr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR usage allowed" >&5 +$as_echo_n "checking if ioctl SIOCGIFADDR usage allowed... " >&6; } + if test "x$curl_disallow_ioctl_siocgifaddr" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctl_siocgifaddr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctl_siocgifaddr="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctl SIOCGIFADDR might be used" >&5 +$as_echo_n "checking if ioctl SIOCGIFADDR might be used... " >&6; } + if test "$tst_compi_ioctl_siocgifaddr" = "yes" && + test "$tst_allow_ioctl_siocgifaddr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTL_SIOCGIFADDR 1 +_ACEOF + + curl_cv_func_ioctl_siocgifaddr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctl_siocgifaddr="no" + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctl="no" + fi + + + # + tst_links_ioctlsocket="unknown" + tst_proto_ioctlsocket="unknown" + tst_compi_ioctlsocket="unknown" + tst_allow_ioctlsocket="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket can be linked" >&5 +$as_echo_n "checking if ioctlsocket can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + +int main (void) +{ + + if(0 != ioctlsocket(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_ioctlsocket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_ioctlsocket="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_ioctlsocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket is prototyped" >&5 +$as_echo_n "checking if ioctlsocket is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "ioctlsocket" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_ioctlsocket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_ioctlsocket="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_ioctlsocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket is compilable" >&5 +$as_echo_n "checking if ioctlsocket is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + +int main (void) +{ + + if(0 != ioctlsocket(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctlsocket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctlsocket="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctlsocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket usage allowed" >&5 +$as_echo_n "checking if ioctlsocket usage allowed... " >&6; } + if test "x$curl_disallow_ioctlsocket" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctlsocket="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctlsocket="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket might be used" >&5 +$as_echo_n "checking if ioctlsocket might be used... " >&6; } + if test "$tst_links_ioctlsocket" = "yes" && + test "$tst_proto_ioctlsocket" = "yes" && + test "$tst_compi_ioctlsocket" = "yes" && + test "$tst_allow_ioctlsocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTLSOCKET 1 +_ACEOF + + curl_cv_func_ioctlsocket="yes" + + # + tst_compi_ioctlsocket_fionbio="unknown" + tst_allow_ioctlsocket_fionbio="unknown" + # + if test "$curl_cv_func_ioctlsocket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO is compilable" >&5 +$as_echo_n "checking if ioctlsocket FIONBIO is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + +int main (void) +{ + + int flags = 0; + if(0 != ioctlsocket(0, FIONBIO, &flags)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctlsocket_fionbio="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctlsocket_fionbio="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctlsocket_fionbio" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO usage allowed" >&5 +$as_echo_n "checking if ioctlsocket FIONBIO usage allowed... " >&6; } + if test "x$curl_disallow_ioctlsocket_fionbio" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctlsocket_fionbio="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctlsocket_fionbio="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ioctlsocket FIONBIO might be used" >&5 +$as_echo_n "checking if ioctlsocket FIONBIO might be used... " >&6; } + if test "$tst_compi_ioctlsocket_fionbio" = "yes" && + test "$tst_allow_ioctlsocket_fionbio" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTLSOCKET_FIONBIO 1 +_ACEOF + + curl_cv_func_ioctlsocket_fionbio="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctlsocket_fionbio="no" + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctlsocket="no" + fi + + + # + tst_links_ioctlsocket_camel="unknown" + tst_proto_ioctlsocket_camel="unknown" + tst_compi_ioctlsocket_camel="unknown" + tst_allow_ioctlsocket_camel="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket can be linked" >&5 +$as_echo_n "checking if IoctlSocket can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define IoctlSocket innocuous_IoctlSocket +#ifdef __STDC__ +# include +#else +# include +#endif +#undef IoctlSocket +#ifdef __cplusplus +extern "C" +#endif +char IoctlSocket (); +#if defined __stub_IoctlSocket || defined __stub___IoctlSocket +choke me +#endif + +int main (void) +{ +return IoctlSocket (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_ioctlsocket_camel="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_ioctlsocket_camel="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_ioctlsocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket is prototyped" >&5 +$as_echo_n "checking if IoctlSocket is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_stropts + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "IoctlSocket" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_ioctlsocket_camel="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_ioctlsocket_camel="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_ioctlsocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket is compilable" >&5 +$as_echo_n "checking if IoctlSocket is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stropts + +int main (void) +{ + + if(0 != IoctlSocket(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctlsocket_camel="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctlsocket_camel="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctlsocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket usage allowed" >&5 +$as_echo_n "checking if IoctlSocket usage allowed... " >&6; } + if test "x$curl_disallow_ioctlsocket_camel" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctlsocket_camel="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctlsocket_camel="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket might be used" >&5 +$as_echo_n "checking if IoctlSocket might be used... " >&6; } + if test "$tst_links_ioctlsocket_camel" = "yes" && + test "$tst_proto_ioctlsocket_camel" = "yes" && + test "$tst_compi_ioctlsocket_camel" = "yes" && + test "$tst_allow_ioctlsocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTLSOCKET_CAMEL 1 +_ACEOF + + curl_cv_func_ioctlsocket_camel="yes" + + # + tst_compi_ioctlsocket_camel_fionbio="unknown" + tst_allow_ioctlsocket_camel_fionbio="unknown" + # + if test "$curl_cv_func_ioctlsocket_camel" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO is compilable" >&5 +$as_echo_n "checking if IoctlSocket FIONBIO is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stropts + +int main (void) +{ + + long flags = 0; + if(0 != ioctlsocket(0, FIONBIO, &flags)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_ioctlsocket_camel_fionbio="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_ioctlsocket_camel_fionbio="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO usage allowed" >&5 +$as_echo_n "checking if IoctlSocket FIONBIO usage allowed... " >&6; } + if test "x$curl_disallow_ioctlsocket_camel_fionbio" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_ioctlsocket_camel_fionbio="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_ioctlsocket_camel_fionbio="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if IoctlSocket FIONBIO might be used" >&5 +$as_echo_n "checking if IoctlSocket FIONBIO might be used... " >&6; } + if test "$tst_compi_ioctlsocket_camel_fionbio" = "yes" && + test "$tst_allow_ioctlsocket_camel_fionbio" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1 +_ACEOF + + curl_cv_func_ioctlsocket_camel_fionbio="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctlsocket_camel_fionbio="no" + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_ioctlsocket_camel="no" + fi + + + # + tst_links_localtime_r="unknown" + tst_proto_localtime_r="unknown" + tst_compi_localtime_r="unknown" + tst_works_localtime_r="unknown" + tst_allow_localtime_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r can be linked" >&5 +$as_echo_n "checking if localtime_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define localtime_r innocuous_localtime_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef localtime_r +#ifdef __cplusplus +extern "C" +#endif +char localtime_r (); +#if defined __stub_localtime_r || defined __stub___localtime_r +choke me +#endif + +int main (void) +{ +return localtime_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_localtime_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_localtime_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_localtime_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r is prototyped" >&5 +$as_echo_n "checking if localtime_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_time + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "localtime_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_localtime_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_localtime_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_localtime_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r is compilable" >&5 +$as_echo_n "checking if localtime_r is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_time + +int main (void) +{ + + if(0 != localtime_r(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_localtime_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_localtime_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_localtime_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r seems to work" >&5 +$as_echo_n "checking if localtime_r seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_time + +int main (void) +{ + + time_t clock = 1170352587; + struct tm *tmp = 0; + struct tm result; + tmp = localtime_r(&clock, &result); + if(tmp) + exit(0); + else + exit(1); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_localtime_r="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_localtime_r="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_localtime_r" = "yes" && + test "$tst_works_localtime_r" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r usage allowed" >&5 +$as_echo_n "checking if localtime_r usage allowed... " >&6; } + if test "x$curl_disallow_localtime_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_localtime_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_localtime_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if localtime_r might be used" >&5 +$as_echo_n "checking if localtime_r might be used... " >&6; } + if test "$tst_links_localtime_r" = "yes" && + test "$tst_proto_localtime_r" = "yes" && + test "$tst_compi_localtime_r" = "yes" && + test "$tst_allow_localtime_r" = "yes" && + test "$tst_works_localtime_r" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALTIME_R 1 +_ACEOF + + curl_cv_func_localtime_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_localtime_r="no" + fi + + + # + tst_links_memrchr="unknown" + tst_macro_memrchr="unknown" + tst_proto_memrchr="unknown" + tst_compi_memrchr="unknown" + tst_allow_memrchr="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr can be linked" >&5 +$as_echo_n "checking if memrchr can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define memrchr innocuous_memrchr +#ifdef __STDC__ +# include +#else +# include +#endif +#undef memrchr +#ifdef __cplusplus +extern "C" +#endif +char memrchr (); +#if defined __stub_memrchr || defined __stub___memrchr +choke me +#endif + +int main (void) +{ +return memrchr (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_memrchr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_memrchr="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_memrchr" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr seems a macro" >&5 +$as_echo_n "checking if memrchr seems a macro... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != memrchr(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_macro_memrchr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_macro_memrchr="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + # + if test "$tst_links_memrchr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr is prototyped" >&5 +$as_echo_n "checking if memrchr is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memrchr" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_memrchr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_memrchr="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_memrchr" = "yes" || + test "$tst_macro_memrchr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr is compilable" >&5 +$as_echo_n "checking if memrchr is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != memrchr(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_memrchr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_memrchr="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_memrchr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr usage allowed" >&5 +$as_echo_n "checking if memrchr usage allowed... " >&6; } + if test "x$curl_disallow_memrchr" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_memrchr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_memrchr="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if memrchr might be used" >&5 +$as_echo_n "checking if memrchr might be used... " >&6; } + if (test "$tst_proto_memrchr" = "yes" || + test "$tst_macro_memrchr" = "yes") && + test "$tst_compi_memrchr" = "yes" && + test "$tst_allow_memrchr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_MEMRCHR 1 +_ACEOF + + curl_cv_func_memrchr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_memrchr="no" + fi + + + # + tst_links_poll="unknown" + tst_proto_poll="unknown" + tst_compi_poll="unknown" + tst_works_poll="unknown" + tst_allow_poll="unknown" + # + case $host_os in + darwin*|interix*) + curl_disallow_poll="yes" + tst_compi_poll="no" + ;; + esac + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll can be linked" >&5 +$as_echo_n "checking if poll can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_poll + +int main (void) +{ + + if(0 != poll(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_poll="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_poll="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_poll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll is prototyped" >&5 +$as_echo_n "checking if poll is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_poll + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "poll" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_poll="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_poll="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_poll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll is compilable" >&5 +$as_echo_n "checking if poll is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_poll + +int main (void) +{ + + if(0 != poll(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_poll="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_poll="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_compi_poll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll seems to work" >&5 +$as_echo_n "checking if poll seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_poll + $curl_includes_time + +int main (void) +{ + + /* detect the original poll() breakage */ + if(0 != poll(0, 0, 10)) + exit(1); /* fail */ + else { + /* detect the 10.12 poll() breakage */ + struct timeval before, after; + int rc; + size_t us; + + gettimeofday(&before, NULL); + rc = poll(NULL, 0, 500); + gettimeofday(&after, NULL); + + us = (after.tv_sec - before.tv_sec) * 1000000 + + (after.tv_usec - before.tv_usec); + + if(us < 400000) + exit(1); + } + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_poll="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_poll="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_poll" = "yes" && + test "$tst_works_poll" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll usage allowed" >&5 +$as_echo_n "checking if poll usage allowed... " >&6; } + if test "x$curl_disallow_poll" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_poll="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_poll="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll might be used" >&5 +$as_echo_n "checking if poll might be used... " >&6; } + if test "$tst_links_poll" = "yes" && + test "$tst_proto_poll" = "yes" && + test "$tst_compi_poll" = "yes" && + test "$tst_allow_poll" = "yes" && + test "$tst_works_poll" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_POLL 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_POLL_FINE 1 +_ACEOF + + curl_cv_func_poll="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_poll="no" + fi + + + # + tst_links_setsockopt="unknown" + tst_proto_setsockopt="unknown" + tst_compi_setsockopt="unknown" + tst_allow_setsockopt="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt can be linked" >&5 +$as_echo_n "checking if setsockopt can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != setsockopt(0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_setsockopt="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_setsockopt="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_setsockopt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt is prototyped" >&5 +$as_echo_n "checking if setsockopt is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "setsockopt" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_setsockopt="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_setsockopt="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_setsockopt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt is compilable" >&5 +$as_echo_n "checking if setsockopt is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != setsockopt(0, 0, 0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_setsockopt="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_setsockopt="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_setsockopt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt usage allowed" >&5 +$as_echo_n "checking if setsockopt usage allowed... " >&6; } + if test "x$curl_disallow_setsockopt" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_setsockopt="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_setsockopt="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt might be used" >&5 +$as_echo_n "checking if setsockopt might be used... " >&6; } + if test "$tst_links_setsockopt" = "yes" && + test "$tst_proto_setsockopt" = "yes" && + test "$tst_compi_setsockopt" = "yes" && + test "$tst_allow_setsockopt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SETSOCKOPT 1 +_ACEOF + + curl_cv_func_setsockopt="yes" + + # + tst_compi_setsockopt_so_nonblock="unknown" + tst_allow_setsockopt_so_nonblock="unknown" + # + if test "$curl_cv_func_setsockopt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK is compilable" >&5 +$as_echo_n "checking if setsockopt SO_NONBLOCK is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + +int main (void) +{ + + if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_setsockopt_so_nonblock="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_setsockopt_so_nonblock="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_setsockopt_so_nonblock" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK usage allowed" >&5 +$as_echo_n "checking if setsockopt SO_NONBLOCK usage allowed... " >&6; } + if test "x$curl_disallow_setsockopt_so_nonblock" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_setsockopt_so_nonblock="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_setsockopt_so_nonblock="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setsockopt SO_NONBLOCK might be used" >&5 +$as_echo_n "checking if setsockopt SO_NONBLOCK might be used... " >&6; } + if test "$tst_compi_setsockopt_so_nonblock" = "yes" && + test "$tst_allow_setsockopt_so_nonblock" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SETSOCKOPT_SO_NONBLOCK 1 +_ACEOF + + curl_cv_func_setsockopt_so_nonblock="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_setsockopt_so_nonblock="no" + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_setsockopt="no" + fi + + +curl_includes_signal="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SIGNAL_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h signal.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_signal +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_sigaction="unknown" + tst_proto_sigaction="unknown" + tst_compi_sigaction="unknown" + tst_allow_sigaction="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction can be linked" >&5 +$as_echo_n "checking if sigaction can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define sigaction innocuous_sigaction +#ifdef __STDC__ +# include +#else +# include +#endif +#undef sigaction +#ifdef __cplusplus +extern "C" +#endif +char sigaction (); +#if defined __stub_sigaction || defined __stub___sigaction +choke me +#endif + +int main (void) +{ +return sigaction (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_sigaction="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_sigaction="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_sigaction" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is prototyped" >&5 +$as_echo_n "checking if sigaction is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_signal + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sigaction" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_sigaction="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_sigaction="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_sigaction" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction is compilable" >&5 +$as_echo_n "checking if sigaction is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_signal + +int main (void) +{ + + if(0 != sigaction(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_sigaction="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_sigaction="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_sigaction" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction usage allowed" >&5 +$as_echo_n "checking if sigaction usage allowed... " >&6; } + if test "x$curl_disallow_sigaction" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_sigaction="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_sigaction="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaction might be used" >&5 +$as_echo_n "checking if sigaction might be used... " >&6; } + if test "$tst_links_sigaction" = "yes" && + test "$tst_proto_sigaction" = "yes" && + test "$tst_compi_sigaction" = "yes" && + test "$tst_allow_sigaction" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGACTION 1 +_ACEOF + + curl_cv_func_sigaction="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_sigaction="no" + fi + + + # + tst_links_siginterrupt="unknown" + tst_proto_siginterrupt="unknown" + tst_compi_siginterrupt="unknown" + tst_allow_siginterrupt="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt can be linked" >&5 +$as_echo_n "checking if siginterrupt can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define siginterrupt innocuous_siginterrupt +#ifdef __STDC__ +# include +#else +# include +#endif +#undef siginterrupt +#ifdef __cplusplus +extern "C" +#endif +char siginterrupt (); +#if defined __stub_siginterrupt || defined __stub___siginterrupt +choke me +#endif + +int main (void) +{ +return siginterrupt (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_siginterrupt="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_siginterrupt="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_siginterrupt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt is prototyped" >&5 +$as_echo_n "checking if siginterrupt is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_signal + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "siginterrupt" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_siginterrupt="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_siginterrupt="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_siginterrupt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt is compilable" >&5 +$as_echo_n "checking if siginterrupt is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_signal + +int main (void) +{ + + if(0 != siginterrupt(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_siginterrupt="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_siginterrupt="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_siginterrupt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt usage allowed" >&5 +$as_echo_n "checking if siginterrupt usage allowed... " >&6; } + if test "x$curl_disallow_siginterrupt" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_siginterrupt="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_siginterrupt="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if siginterrupt might be used" >&5 +$as_echo_n "checking if siginterrupt might be used... " >&6; } + if test "$tst_links_siginterrupt" = "yes" && + test "$tst_proto_siginterrupt" = "yes" && + test "$tst_compi_siginterrupt" = "yes" && + test "$tst_allow_siginterrupt" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINTERRUPT 1 +_ACEOF + + curl_cv_func_siginterrupt="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_siginterrupt="no" + fi + + + # + tst_links_signal="unknown" + tst_proto_signal="unknown" + tst_compi_signal="unknown" + tst_allow_signal="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal can be linked" >&5 +$as_echo_n "checking if signal can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define signal innocuous_signal +#ifdef __STDC__ +# include +#else +# include +#endif +#undef signal +#ifdef __cplusplus +extern "C" +#endif +char signal (); +#if defined __stub_signal || defined __stub___signal +choke me +#endif + +int main (void) +{ +return signal (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_signal="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_signal="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_signal" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal is prototyped" >&5 +$as_echo_n "checking if signal is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_signal + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "signal" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_signal="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_signal="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_signal" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal is compilable" >&5 +$as_echo_n "checking if signal is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_signal + +int main (void) +{ + + if(0 != signal(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_signal="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_signal="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_signal" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal usage allowed" >&5 +$as_echo_n "checking if signal usage allowed... " >&6; } + if test "x$curl_disallow_signal" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_signal="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_signal="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal might be used" >&5 +$as_echo_n "checking if signal might be used... " >&6; } + if test "$tst_links_signal" = "yes" && + test "$tst_proto_signal" = "yes" && + test "$tst_compi_signal" = "yes" && + test "$tst_allow_signal" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNAL 1 +_ACEOF + + curl_cv_func_signal="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_signal="no" + fi + + +curl_includes_setjmp="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SETJMP_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h setjmp.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_setjmp +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_sigsetjmp="unknown" + tst_macro_sigsetjmp="unknown" + tst_proto_sigsetjmp="unknown" + tst_compi_sigsetjmp="unknown" + tst_allow_sigsetjmp="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp can be linked" >&5 +$as_echo_n "checking if sigsetjmp can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define sigsetjmp innocuous_sigsetjmp +#ifdef __STDC__ +# include +#else +# include +#endif +#undef sigsetjmp +#ifdef __cplusplus +extern "C" +#endif +char sigsetjmp (); +#if defined __stub_sigsetjmp || defined __stub___sigsetjmp +choke me +#endif + +int main (void) +{ +return sigsetjmp (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_sigsetjmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_sigsetjmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_sigsetjmp" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp seems a macro" >&5 +$as_echo_n "checking if sigsetjmp seems a macro... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_setjmp + +int main (void) +{ + + sigjmp_buf env; + if(0 != sigsetjmp(env, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_macro_sigsetjmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_macro_sigsetjmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + # + if test "$tst_links_sigsetjmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp is prototyped" >&5 +$as_echo_n "checking if sigsetjmp is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_setjmp + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sigsetjmp" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_sigsetjmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_sigsetjmp="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_sigsetjmp" = "yes" || + test "$tst_macro_sigsetjmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp is compilable" >&5 +$as_echo_n "checking if sigsetjmp is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_setjmp + +int main (void) +{ + + sigjmp_buf env; + if(0 != sigsetjmp(env, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_sigsetjmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_sigsetjmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_sigsetjmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp usage allowed" >&5 +$as_echo_n "checking if sigsetjmp usage allowed... " >&6; } + if test "x$curl_disallow_sigsetjmp" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_sigsetjmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_sigsetjmp="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigsetjmp might be used" >&5 +$as_echo_n "checking if sigsetjmp might be used... " >&6; } + if (test "$tst_proto_sigsetjmp" = "yes" || + test "$tst_macro_sigsetjmp" = "yes") && + test "$tst_compi_sigsetjmp" = "yes" && + test "$tst_allow_sigsetjmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGSETJMP 1 +_ACEOF + + curl_cv_func_sigsetjmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_sigsetjmp="no" + fi + + + # + tst_links_socket="unknown" + tst_proto_socket="unknown" + tst_compi_socket="unknown" + tst_allow_socket="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket can be linked" >&5 +$as_echo_n "checking if socket can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + $curl_includes_socket + +int main (void) +{ + + if(0 != socket(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_socket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_socket="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_socket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket is prototyped" >&5 +$as_echo_n "checking if socket is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + $curl_includes_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "socket" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_socket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_socket="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_socket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket is compilable" >&5 +$as_echo_n "checking if socket is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_winsock2 + $curl_includes_bsdsocket + $curl_includes_sys_socket + $curl_includes_socket + +int main (void) +{ + + if(0 != socket(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_socket="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_socket="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_socket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket usage allowed" >&5 +$as_echo_n "checking if socket usage allowed... " >&6; } + if test "x$curl_disallow_socket" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_socket="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_socket="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socket might be used" >&5 +$as_echo_n "checking if socket might be used... " >&6; } + if test "$tst_links_socket" = "yes" && + test "$tst_proto_socket" = "yes" && + test "$tst_compi_socket" = "yes" && + test "$tst_allow_socket" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKET 1 +_ACEOF + + curl_cv_func_socket="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_socket="no" + fi + + + # + tst_links_socketpair="unknown" + tst_proto_socketpair="unknown" + tst_compi_socketpair="unknown" + tst_allow_socketpair="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair can be linked" >&5 +$as_echo_n "checking if socketpair can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define socketpair innocuous_socketpair +#ifdef __STDC__ +# include +#else +# include +#endif +#undef socketpair +#ifdef __cplusplus +extern "C" +#endif +char socketpair (); +#if defined __stub_socketpair || defined __stub___socketpair +choke me +#endif + +int main (void) +{ +return socketpair (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_socketpair="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_socketpair="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_socketpair" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair is prototyped" >&5 +$as_echo_n "checking if socketpair is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_sys_socket + $curl_includes_socket + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "socketpair" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_socketpair="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_socketpair="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_socketpair" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair is compilable" >&5 +$as_echo_n "checking if socketpair is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_socket + $curl_includes_socket + +int main (void) +{ + + int sv[2]; + if(0 != socketpair(0, 0, 0, sv)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_socketpair="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_socketpair="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_socketpair" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair usage allowed" >&5 +$as_echo_n "checking if socketpair usage allowed... " >&6; } + if test "x$curl_disallow_socketpair" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_socketpair="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_socketpair="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if socketpair might be used" >&5 +$as_echo_n "checking if socketpair might be used... " >&6; } + if test "$tst_links_socketpair" = "yes" && + test "$tst_proto_socketpair" = "yes" && + test "$tst_compi_socketpair" = "yes" && + test "$tst_allow_socketpair" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKETPAIR 1 +_ACEOF + + curl_cv_func_socketpair="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_socketpair="no" + fi + + + # + tst_links_strcasecmp="unknown" + tst_proto_strcasecmp="unknown" + tst_compi_strcasecmp="unknown" + tst_allow_strcasecmp="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp can be linked" >&5 +$as_echo_n "checking if strcasecmp can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strcasecmp innocuous_strcasecmp +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strcasecmp +#ifdef __cplusplus +extern "C" +#endif +char strcasecmp (); +#if defined __stub_strcasecmp || defined __stub___strcasecmp +choke me +#endif + +int main (void) +{ +return strcasecmp (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strcasecmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strcasecmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strcasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is prototyped" >&5 +$as_echo_n "checking if strcasecmp is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strcasecmp" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strcasecmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strcasecmp="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strcasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp is compilable" >&5 +$as_echo_n "checking if strcasecmp is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strcasecmp(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strcasecmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strcasecmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strcasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp usage allowed" >&5 +$as_echo_n "checking if strcasecmp usage allowed... " >&6; } + if test "x$curl_disallow_strcasecmp" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strcasecmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strcasecmp="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcasecmp might be used" >&5 +$as_echo_n "checking if strcasecmp might be used... " >&6; } + if test "$tst_links_strcasecmp" = "yes" && + test "$tst_proto_strcasecmp" = "yes" && + test "$tst_compi_strcasecmp" = "yes" && + test "$tst_allow_strcasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRCASECMP 1 +_ACEOF + + curl_cv_func_strcasecmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strcasecmp="no" + fi + + + # + tst_links_strcmpi="unknown" + tst_proto_strcmpi="unknown" + tst_compi_strcmpi="unknown" + tst_allow_strcmpi="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi can be linked" >&5 +$as_echo_n "checking if strcmpi can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strcmpi innocuous_strcmpi +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strcmpi +#ifdef __cplusplus +extern "C" +#endif +char strcmpi (); +#if defined __stub_strcmpi || defined __stub___strcmpi +choke me +#endif + +int main (void) +{ +return strcmpi (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strcmpi="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strcmpi="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strcmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi is prototyped" >&5 +$as_echo_n "checking if strcmpi is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strcmpi" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strcmpi="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strcmpi="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strcmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi is compilable" >&5 +$as_echo_n "checking if strcmpi is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strcmpi(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strcmpi="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strcmpi="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strcmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi usage allowed" >&5 +$as_echo_n "checking if strcmpi usage allowed... " >&6; } + if test "x$curl_disallow_strcmpi" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strcmpi="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strcmpi="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strcmpi might be used" >&5 +$as_echo_n "checking if strcmpi might be used... " >&6; } + if test "$tst_links_strcmpi" = "yes" && + test "$tst_proto_strcmpi" = "yes" && + test "$tst_compi_strcmpi" = "yes" && + test "$tst_allow_strcmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRCMPI 1 +_ACEOF + + curl_cv_func_strcmpi="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strcmpi="no" + fi + + + # + tst_links_strdup="unknown" + tst_proto_strdup="unknown" + tst_compi_strdup="unknown" + tst_allow_strdup="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup can be linked" >&5 +$as_echo_n "checking if strdup can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strdup innocuous_strdup +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strdup +#ifdef __cplusplus +extern "C" +#endif +char strdup (); +#if defined __stub_strdup || defined __stub___strdup +choke me +#endif + +int main (void) +{ +return strdup (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strdup="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strdup="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strdup" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup is prototyped" >&5 +$as_echo_n "checking if strdup is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strdup" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strdup="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strdup="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strdup" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup is compilable" >&5 +$as_echo_n "checking if strdup is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strdup(0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strdup="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strdup="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strdup" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup usage allowed" >&5 +$as_echo_n "checking if strdup usage allowed... " >&6; } + if test "x$curl_disallow_strdup" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strdup="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strdup="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strdup might be used" >&5 +$as_echo_n "checking if strdup might be used... " >&6; } + if test "$tst_links_strdup" = "yes" && + test "$tst_proto_strdup" = "yes" && + test "$tst_compi_strdup" = "yes" && + test "$tst_allow_strdup" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRDUP 1 +_ACEOF + + curl_cv_func_strdup="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strdup="no" + fi + + + # + tst_links_strerror_r="unknown" + tst_proto_strerror_r="unknown" + tst_compi_strerror_r="unknown" + tst_glibc_strerror_r="unknown" + tst_posix_strerror_r="unknown" + tst_allow_strerror_r="unknown" + tst_works_glibc_strerror_r="unknown" + tst_works_posix_strerror_r="unknown" + tst_glibc_strerror_r_type_arg3="unknown" + tst_posix_strerror_r_type_arg3="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r can be linked" >&5 +$as_echo_n "checking if strerror_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strerror_r innocuous_strerror_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strerror_r +#ifdef __cplusplus +extern "C" +#endif +char strerror_r (); +#if defined __stub_strerror_r || defined __stub___strerror_r +choke me +#endif + +int main (void) +{ +return strerror_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strerror_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strerror_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strerror_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is prototyped" >&5 +$as_echo_n "checking if strerror_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strerror_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strerror_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strerror_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strerror_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is compilable" >&5 +$as_echo_n "checking if strerror_r is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strerror_r(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strerror_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strerror_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strerror_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is glibc like" >&5 +$as_echo_n "checking if strerror_r is glibc like... " >&6; } + tst_glibc_strerror_r_type_arg3="unknown" + for arg3 in 'size_t' 'int' 'unsigned int'; do + if test "$tst_glibc_strerror_r_type_arg3" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + char *strerror_r(int errnum, char *workbuf, $arg3 bufsize); + +int main (void) +{ + + if(0 != strerror_r(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_glibc_strerror_r_type_arg3="$arg3" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + case "$tst_glibc_strerror_r_type_arg3" in + unknown) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_glibc_strerror_r="no" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_glibc_strerror_r="yes" + ;; + esac + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_glibc_strerror_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r seems to work" >&5 +$as_echo_n "checking if strerror_r seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_string +# include + +int main (void) +{ + + char buffer[1024]; + char *string = 0; + buffer[0] = '\0'; + string = strerror_r(EACCES, buffer, sizeof(buffer)); + if(!string) + exit(1); /* fail */ + if(!string[0]) + exit(1); /* fail */ + else + exit(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_glibc_strerror_r="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_glibc_strerror_r="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_compi_strerror_r" = "yes" && + test "$tst_works_glibc_strerror_r" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is POSIX like" >&5 +$as_echo_n "checking if strerror_r is POSIX like... " >&6; } + tst_posix_strerror_r_type_arg3="unknown" + for arg3 in 'size_t' 'int' 'unsigned int'; do + if test "$tst_posix_strerror_r_type_arg3" = "unknown"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + int strerror_r(int errnum, char *resultbuf, $arg3 bufsize); + +int main (void) +{ + + if(0 != strerror_r(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + tst_posix_strerror_r_type_arg3="$arg3" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + done + case "$tst_posix_strerror_r_type_arg3" in + unknown) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_posix_strerror_r="no" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_posix_strerror_r="yes" + ;; + esac + fi + # + if test "x$cross_compiling" != "xyes" && + test "$tst_posix_strerror_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r seems to work" >&5 +$as_echo_n "checking if strerror_r seems to work... " >&6; } + + old=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old + export LD_LIBRARY_PATH + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + $curl_includes_string +# include + +int main (void) +{ + + char buffer[1024]; + int error = 1; + buffer[0] = '\0'; + error = strerror_r(EACCES, buffer, sizeof(buffer)); + if(error) + exit(1); /* fail */ + if(buffer[0] == '\0') + exit(1); /* fail */ + else + exit(0); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_works_posix_strerror_r="yes" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_works_posix_strerror_r="no" + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LD_LIBRARY_PATH=$old # restore + + fi + # + if test "$tst_works_glibc_strerror_r" = "yes"; then + tst_posix_strerror_r="no" + fi + if test "$tst_works_posix_strerror_r" = "yes"; then + tst_glibc_strerror_r="no" + fi + if test "$tst_glibc_strerror_r" = "yes" && + test "$tst_works_glibc_strerror_r" != "no" && + test "$tst_posix_strerror_r" != "yes"; then + tst_allow_strerror_r="check" + fi + if test "$tst_posix_strerror_r" = "yes" && + test "$tst_works_posix_strerror_r" != "no" && + test "$tst_glibc_strerror_r" != "yes"; then + tst_allow_strerror_r="check" + fi + if test "$tst_allow_strerror_r" = "check"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r usage allowed" >&5 +$as_echo_n "checking if strerror_r usage allowed... " >&6; } + if test "x$curl_disallow_strerror_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strerror_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strerror_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r might be used" >&5 +$as_echo_n "checking if strerror_r might be used... " >&6; } + if test "$tst_links_strerror_r" = "yes" && + test "$tst_proto_strerror_r" = "yes" && + test "$tst_compi_strerror_r" = "yes" && + test "$tst_allow_strerror_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + if test "$tst_glibc_strerror_r" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR_R 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_GLIBC_STRERROR_R 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define STRERROR_R_TYPE_ARG3 $tst_glibc_strerror_r_type_arg3 +_ACEOF + + fi + if test "$tst_posix_strerror_r" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR_R 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_POSIX_STRERROR_R 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define STRERROR_R_TYPE_ARG3 $tst_posix_strerror_r_type_arg3 +_ACEOF + + fi + curl_cv_func_strerror_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strerror_r="no" + fi + # + if test "$tst_compi_strerror_r" = "yes" && + test "$tst_allow_strerror_r" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine strerror_r() style: edit lib/curl_config.h manually." >&5 +$as_echo "$as_me: WARNING: cannot determine strerror_r() style: edit lib/curl_config.h manually." >&2;} + fi + # + + + # + tst_links_stricmp="unknown" + tst_proto_stricmp="unknown" + tst_compi_stricmp="unknown" + tst_allow_stricmp="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp can be linked" >&5 +$as_echo_n "checking if stricmp can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define stricmp innocuous_stricmp +#ifdef __STDC__ +# include +#else +# include +#endif +#undef stricmp +#ifdef __cplusplus +extern "C" +#endif +char stricmp (); +#if defined __stub_stricmp || defined __stub___stricmp +choke me +#endif + +int main (void) +{ +return stricmp (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_stricmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_stricmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_stricmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp is prototyped" >&5 +$as_echo_n "checking if stricmp is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "stricmp" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_stricmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_stricmp="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_stricmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp is compilable" >&5 +$as_echo_n "checking if stricmp is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != stricmp(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_stricmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_stricmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_stricmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp usage allowed" >&5 +$as_echo_n "checking if stricmp usage allowed... " >&6; } + if test "x$curl_disallow_stricmp" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_stricmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_stricmp="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if stricmp might be used" >&5 +$as_echo_n "checking if stricmp might be used... " >&6; } + if test "$tst_links_stricmp" = "yes" && + test "$tst_proto_stricmp" = "yes" && + test "$tst_compi_stricmp" = "yes" && + test "$tst_allow_stricmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRICMP 1 +_ACEOF + + curl_cv_func_stricmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_stricmp="no" + fi + + + # + tst_links_strncasecmp="unknown" + tst_proto_strncasecmp="unknown" + tst_compi_strncasecmp="unknown" + tst_allow_strncasecmp="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp can be linked" >&5 +$as_echo_n "checking if strncasecmp can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strncasecmp innocuous_strncasecmp +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strncasecmp +#ifdef __cplusplus +extern "C" +#endif +char strncasecmp (); +#if defined __stub_strncasecmp || defined __stub___strncasecmp +choke me +#endif + +int main (void) +{ +return strncasecmp (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strncasecmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strncasecmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strncasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp is prototyped" >&5 +$as_echo_n "checking if strncasecmp is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strncasecmp" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strncasecmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strncasecmp="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strncasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp is compilable" >&5 +$as_echo_n "checking if strncasecmp is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strncasecmp(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strncasecmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strncasecmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strncasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp usage allowed" >&5 +$as_echo_n "checking if strncasecmp usage allowed... " >&6; } + if test "x$curl_disallow_strncasecmp" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strncasecmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strncasecmp="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncasecmp might be used" >&5 +$as_echo_n "checking if strncasecmp might be used... " >&6; } + if test "$tst_links_strncasecmp" = "yes" && + test "$tst_proto_strncasecmp" = "yes" && + test "$tst_compi_strncasecmp" = "yes" && + test "$tst_allow_strncasecmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRNCASECMP 1 +_ACEOF + + curl_cv_func_strncasecmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strncasecmp="no" + fi + + + # + tst_links_strncmpi="unknown" + tst_proto_strncmpi="unknown" + tst_compi_strncmpi="unknown" + tst_allow_strncmpi="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi can be linked" >&5 +$as_echo_n "checking if strncmpi can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strncmpi innocuous_strncmpi +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strncmpi +#ifdef __cplusplus +extern "C" +#endif +char strncmpi (); +#if defined __stub_strncmpi || defined __stub___strncmpi +choke me +#endif + +int main (void) +{ +return strncmpi (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strncmpi="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strncmpi="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strncmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi is prototyped" >&5 +$as_echo_n "checking if strncmpi is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strncmpi" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strncmpi="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strncmpi="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strncmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi is compilable" >&5 +$as_echo_n "checking if strncmpi is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strncmpi(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strncmpi="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strncmpi="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strncmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi usage allowed" >&5 +$as_echo_n "checking if strncmpi usage allowed... " >&6; } + if test "x$curl_disallow_strncmpi" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strncmpi="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strncmpi="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strncmpi might be used" >&5 +$as_echo_n "checking if strncmpi might be used... " >&6; } + if test "$tst_links_strncmpi" = "yes" && + test "$tst_proto_strncmpi" = "yes" && + test "$tst_compi_strncmpi" = "yes" && + test "$tst_allow_strncmpi" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRNCMPI 1 +_ACEOF + + curl_cv_func_strncmpi="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strncmpi="no" + fi + + + # + tst_links_strnicmp="unknown" + tst_proto_strnicmp="unknown" + tst_compi_strnicmp="unknown" + tst_allow_strnicmp="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp can be linked" >&5 +$as_echo_n "checking if strnicmp can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strnicmp innocuous_strnicmp +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strnicmp +#ifdef __cplusplus +extern "C" +#endif +char strnicmp (); +#if defined __stub_strnicmp || defined __stub___strnicmp +choke me +#endif + +int main (void) +{ +return strnicmp (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strnicmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strnicmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strnicmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp is prototyped" >&5 +$as_echo_n "checking if strnicmp is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strnicmp" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strnicmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strnicmp="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strnicmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp is compilable" >&5 +$as_echo_n "checking if strnicmp is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strnicmp(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strnicmp="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strnicmp="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strnicmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp usage allowed" >&5 +$as_echo_n "checking if strnicmp usage allowed... " >&6; } + if test "x$curl_disallow_strnicmp" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strnicmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strnicmp="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strnicmp might be used" >&5 +$as_echo_n "checking if strnicmp might be used... " >&6; } + if test "$tst_links_strnicmp" = "yes" && + test "$tst_proto_strnicmp" = "yes" && + test "$tst_compi_strnicmp" = "yes" && + test "$tst_allow_strnicmp" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRNICMP 1 +_ACEOF + + curl_cv_func_strnicmp="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strnicmp="no" + fi + + + # + tst_links_strstr="unknown" + tst_proto_strstr="unknown" + tst_compi_strstr="unknown" + tst_allow_strstr="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr can be linked" >&5 +$as_echo_n "checking if strstr can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strstr innocuous_strstr +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strstr +#ifdef __cplusplus +extern "C" +#endif +char strstr (); +#if defined __stub_strstr || defined __stub___strstr +choke me +#endif + +int main (void) +{ +return strstr (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strstr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strstr="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strstr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr is prototyped" >&5 +$as_echo_n "checking if strstr is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strstr" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strstr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strstr="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strstr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr is compilable" >&5 +$as_echo_n "checking if strstr is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strstr(0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strstr="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strstr="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strstr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr usage allowed" >&5 +$as_echo_n "checking if strstr usage allowed... " >&6; } + if test "x$curl_disallow_strstr" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strstr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strstr="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strstr might be used" >&5 +$as_echo_n "checking if strstr might be used... " >&6; } + if test "$tst_links_strstr" = "yes" && + test "$tst_proto_strstr" = "yes" && + test "$tst_compi_strstr" = "yes" && + test "$tst_allow_strstr" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRSTR 1 +_ACEOF + + curl_cv_func_strstr="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strstr="no" + fi + + + # + tst_links_strtok_r="unknown" + tst_proto_strtok_r="unknown" + tst_compi_strtok_r="unknown" + tst_allow_strtok_r="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r can be linked" >&5 +$as_echo_n "checking if strtok_r can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strtok_r innocuous_strtok_r +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strtok_r +#ifdef __cplusplus +extern "C" +#endif +char strtok_r (); +#if defined __stub_strtok_r || defined __stub___strtok_r +choke me +#endif + +int main (void) +{ +return strtok_r (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strtok_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strtok_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strtok_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r is prototyped" >&5 +$as_echo_n "checking if strtok_r is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_string + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtok_r" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strtok_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strtok_r="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strtok_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r is compilable" >&5 +$as_echo_n "checking if strtok_r is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_string + +int main (void) +{ + + if(0 != strtok_r(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strtok_r="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strtok_r="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strtok_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r usage allowed" >&5 +$as_echo_n "checking if strtok_r usage allowed... " >&6; } + if test "x$curl_disallow_strtok_r" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strtok_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strtok_r="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r might be used" >&5 +$as_echo_n "checking if strtok_r might be used... " >&6; } + if test "$tst_links_strtok_r" = "yes" && + test "$tst_proto_strtok_r" = "yes" && + test "$tst_compi_strtok_r" = "yes" && + test "$tst_allow_strtok_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOK_R 1 +_ACEOF + + curl_cv_func_strtok_r="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strtok_r="no" + fi + + + # + tst_links_strtoll="unknown" + tst_proto_strtoll="unknown" + tst_compi_strtoll="unknown" + tst_allow_strtoll="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll can be linked" >&5 +$as_echo_n "checking if strtoll can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define strtoll innocuous_strtoll +#ifdef __STDC__ +# include +#else +# include +#endif +#undef strtoll +#ifdef __cplusplus +extern "C" +#endif +char strtoll (); +#if defined __stub_strtoll || defined __stub___strtoll +choke me +#endif + +int main (void) +{ +return strtoll (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_strtoll="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_strtoll="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_strtoll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll is prototyped" >&5 +$as_echo_n "checking if strtoll is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_stdlib + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "strtoll" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_strtoll="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_strtoll="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_strtoll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll is compilable" >&5 +$as_echo_n "checking if strtoll is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_stdlib + +int main (void) +{ + + if(0 != strtoll(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_strtoll="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_strtoll="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_strtoll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll usage allowed" >&5 +$as_echo_n "checking if strtoll usage allowed... " >&6; } + if test "x$curl_disallow_strtoll" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_strtoll="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_strtoll="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtoll might be used" >&5 +$as_echo_n "checking if strtoll might be used... " >&6; } + if test "$tst_links_strtoll" = "yes" && + test "$tst_proto_strtoll" = "yes" && + test "$tst_compi_strtoll" = "yes" && + test "$tst_allow_strtoll" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOLL 1 +_ACEOF + + curl_cv_func_strtoll="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_strtoll="no" + fi + + +curl_includes_sys_uio="\ +/* includes start */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_UIO_H +# include +#endif +/* includes end */" + for ac_header in sys/types.h sys/uio.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$curl_includes_sys_uio +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + # + tst_links_writev="unknown" + tst_proto_writev="unknown" + tst_compi_writev="unknown" + tst_allow_writev="unknown" + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev can be linked" >&5 +$as_echo_n "checking if writev can be linked... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#define writev innocuous_writev +#ifdef __STDC__ +# include +#else +# include +#endif +#undef writev +#ifdef __cplusplus +extern "C" +#endif +char writev (); +#if defined __stub_writev || defined __stub___writev +choke me +#endif + +int main (void) +{ +return writev (); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_links_writev="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_links_writev="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # + if test "$tst_links_writev" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev is prototyped" >&5 +$as_echo_n "checking if writev is prototyped... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + $curl_includes_sys_uio + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "writev" >/dev/null 2>&1; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_proto_writev="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_proto_writev="no" + +fi +rm -f conftest* + + fi + # + if test "$tst_proto_writev" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev is compilable" >&5 +$as_echo_n "checking if writev is compilable... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + $curl_includes_sys_uio + +int main (void) +{ + + if(0 != writev(0, 0, 0)) + return 1; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_compi_writev="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_compi_writev="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + # + if test "$tst_compi_writev" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev usage allowed" >&5 +$as_echo_n "checking if writev usage allowed... " >&6; } + if test "x$curl_disallow_writev" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tst_allow_writev="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + tst_allow_writev="no" + fi + fi + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if writev might be used" >&5 +$as_echo_n "checking if writev might be used... " >&6; } + if test "$tst_links_writev" = "yes" && + test "$tst_proto_writev" = "yes" && + test "$tst_compi_writev" = "yes" && + test "$tst_allow_writev" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HAVE_WRITEV 1 +_ACEOF + + curl_cv_func_writev="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + curl_cv_func_writev="no" + fi + + +case $host in + *msdosdjgpp) + ac_cv_func_pipe=no + skipcheck_pipe=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: skip check for pipe on msdosdjgpp" >&5 +$as_echo "$as_me: skip check for pipe on msdosdjgpp" >&6;} + ;; +esac + +ac_fn_c_check_decl "$LINENO" "getpwuid_r" "ac_cv_have_decl_getpwuid_r" "#include + #include +" +if test "x$ac_cv_have_decl_getpwuid_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETPWUID_R $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + +$as_echo "#define HAVE_DECL_GETPWUID_R_MISSING 1" >>confdefs.h + +fi + + + +for ac_func in fnmatch \ + geteuid \ + getpass_r \ + getppid \ + getpwuid \ + getpwuid_r \ + getrlimit \ + gettimeofday \ + if_nametoindex \ + mach_absolute_time \ + pipe \ + setlocale \ + setmode \ + setrlimit \ + usleep \ + utime \ + utimes + +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + +else + + func="$ac_func" + eval skipcheck=\$skipcheck_$func + if test "x$skipcheck" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking deeper for $func" >&5 +$as_echo_n "checking deeper for $func... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + +int main (void) +{ + + $func (); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + eval "ac_cv_func_$func=yes" + +cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$func" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' | sed 's/^A-Z0-9_/_/g'` 1 +_ACEOF + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: but still no" >&5 +$as_echo "but still no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + +fi +done + + + + # + tst_method="unknown" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to set a socket into non-blocking mode" >&5 +$as_echo_n "checking how to set a socket into non-blocking mode... " >&6; } + if test "x$curl_cv_func_fcntl_o_nonblock" = "xyes"; then + tst_method="fcntl O_NONBLOCK" + elif test "x$curl_cv_func_ioctl_fionbio" = "xyes"; then + tst_method="ioctl FIONBIO" + elif test "x$curl_cv_func_ioctlsocket_fionbio" = "xyes"; then + tst_method="ioctlsocket FIONBIO" + elif test "x$curl_cv_func_ioctlsocket_camel_fionbio" = "xyes"; then + tst_method="IoctlSocket FIONBIO" + elif test "x$curl_cv_func_setsockopt_so_nonblock" = "xyes"; then + tst_method="setsockopt SO_NONBLOCK" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_method" >&5 +$as_echo "$tst_method" >&6; } + if test "$tst_method" = "unknown"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine non-blocking socket method." >&5 +$as_echo "$as_me: WARNING: cannot determine non-blocking socket method." >&2;} + fi + + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin " +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +for ac_prog in gnroff nroff +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NROFF+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $NROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin/:/usr/local/bin " +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +NROFF=$ac_cv_path_NROFF +if test -n "$NROFF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5 +$as_echo "$NROFF" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$NROFF" && break +done + + + +if test -n "$NROFF"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use *nroff to get plain text from man pages" >&5 +$as_echo_n "checking how to use *nroff to get plain text from man pages... " >&6; } + MANOPT="-man" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="-mandoc" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found no *nroff option to get plaintext from man pages" >&5 +$as_echo "$as_me: WARNING: found no *nroff option to get plaintext from man pages" >&2;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANOPT" >&5 +$as_echo "$MANOPT" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANOPT" >&5 +$as_echo "$MANOPT" >&6; } + fi + +fi + +if test -z "$MANOPT" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling built-in manual" >&5 +$as_echo "$as_me: WARNING: disabling built-in manual" >&2;} + USE_MANUAL="no"; +fi + + +if test "$USE_MANUAL" = "1"; then + +$as_echo "#define USE_MANUAL 1" >>confdefs.h + + curl_manual_msg="enabled" +fi + + if test x"$USE_MANUAL" = x1; then + USE_MANUAL_TRUE= + USE_MANUAL_FALSE='#' +else + USE_MANUAL_TRUE='#' + USE_MANUAL_FALSE= +fi + + + + + + # + if test "$want_ares" = "yes"; then + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + embedded_ares="unknown" + configure_runpath=`pwd` + embedded_ares_builddir="$configure_runpath/ares" + if test -n "$want_ares_path"; then + ARES_PCDIR="$want_ares_path/lib/pkgconfig" + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcares options with pkg-config" >&5 +$as_echo_n "checking for libcares options with pkg-config... " >&6; } + itexists=` + if test -n "$ARES_PCDIR"; then + PKG_CONFIG_LIBDIR="$ARES_PCDIR" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libcares >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + if test "$PKGCONFIG" != "no" ; then + ares_LIBS=` + if test -n "$ARES_PCDIR"; then + PKG_CONFIG_LIBDIR="$ARES_PCDIR" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-l libcares` + ares_LDFLAGS=` + if test -n "$ARES_PCDIR"; then + PKG_CONFIG_LIBDIR="$ARES_PCDIR" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --libs-only-L libcares` + ares_CPPFLAGS=` + if test -n "$ARES_PCDIR"; then + PKG_CONFIG_LIBDIR="$ARES_PCDIR" + export PKG_CONFIG_LIBDIR + fi + + $PKGCONFIG --cflags-only-I libcares` + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: ares LIBS: \"$ares_LIBS\"" >&5 +$as_echo "$as_me: pkg-config: ares LIBS: \"$ares_LIBS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: ares LDFLAGS: \"$ares_LDFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: ares LDFLAGS: \"$ares_LDFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: ares CPPFLAGS: \"$ares_CPPFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: ares CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;} + else + ares_CPPFLAGS="-I$want_ares_path/include" + ares_LDFLAGS="-L$want_ares_path/lib" + ares_LIBS="-lcares" + fi + else + if test -d "$srcdir/ares"; then + embedded_ares="yes" + subdirs="$subdirs ares" + + ares_CPPFLAGS="" + ares_LDFLAGS="-L$embedded_ares_builddir" + ares_LIBS="-lcares" + else + + if test -n "$PKG_CONFIG"; then + PKGCONFIG="$PKG_CONFIG" + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG +if test -n "$PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 +$as_echo "$PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKGCONFIG"; then + ac_pt_PKGCONFIG=$PKGCONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG +if test -n "$ac_pt_PKGCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5 +$as_echo "$ac_pt_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKGCONFIG" = x; then + PKGCONFIG="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKGCONFIG=$ac_pt_PKGCONFIG + fi +else + PKGCONFIG="$ac_cv_path_PKGCONFIG" +fi + + fi + + if test "x$PKGCONFIG" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcares options with pkg-config" >&5 +$as_echo_n "checking for libcares options with pkg-config... " >&6; } + itexists=` + if test -n ""; then + PKG_CONFIG_LIBDIR="" + export PKG_CONFIG_LIBDIR + fi + $PKGCONFIG --exists libcares >/dev/null 2>&1 && echo 1` + + if test -z "$itexists"; then + PKGCONFIG="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + fi + fi + + if test "$PKGCONFIG" != "no" ; then + ares_LIBS=`$PKGCONFIG --libs-only-l libcares` + ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares` + ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares` + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&5 +$as_echo "$as_me: pkg-config: ares_LIBS: \"$ares_LIBS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: ares_LDFLAGS: \"$ares_LDFLAGS\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&5 +$as_echo "$as_me: pkg-config: ares_CPPFLAGS: \"$ares_CPPFLAGS\"" >&6;} + else + ares_CPPFLAGS="" + ares_LDFLAGS="" + ares_LIBS="-lcares" + fi + fi + fi + # + CPPFLAGS="$clean_CPPFLAGS $ares_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS $ares_LDFLAGS" + LIBS="$ares_LIBS $clean_LIBS" + # + if test "$embedded_ares" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking that c-ares is good and recent enough" >&5 +$as_echo_n "checking that c-ares is good and recent enough... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + /* set of dummy functions in case c-ares was built with debug */ + void curl_dofree() { } + void curl_sclose() { } + void curl_domalloc() { } + void curl_docalloc() { } + void curl_socket() { } + +int main (void) +{ + + ares_channel channel; + ares_cancel(channel); /* added in 1.2.0 */ + ares_process_fd(channel, 0, 0); /* added in 1.4.0 */ + ares_dup(&channel, channel); /* added in 1.6.0 */ + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "c-ares library defective or too old" "$LINENO" 5 + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + # prevent usage + want_ares="no" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + if test "$want_ares" = "yes"; then + +$as_echo "#define USE_ARES 1" >>confdefs.h + + USE_ARES=1 + + curl_res_msg="c-ares" + fi + fi + + if test x$embedded_ares = xyes; then + USE_EMBEDDED_ARES_TRUE= + USE_EMBEDDED_ARES_FALSE='#' +else + USE_EMBEDDED_ARES_TRUE='#' + USE_EMBEDDED_ARES_FALSE= +fi + + +if test "x$curl_cv_native_windows" != "xyes" && + test "x$enable_shared" = "xyes"; then + build_libhostname=yes +else + build_libhostname=no +fi + if test x$build_libhostname = xyes; then + BUILD_LIBHOSTNAME_TRUE= + BUILD_LIBHOSTNAME_FALSE='#' +else + BUILD_LIBHOSTNAME_TRUE='#' + BUILD_LIBHOSTNAME_FALSE= +fi + + +if test "x$want_ares" != xyes; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the threaded resolver" >&5 +$as_echo_n "checking whether to enable the threaded resolver... " >&6; } + OPT_THRES="default" + # Check whether --enable-threaded_resolver was given. +if test "${enable_threaded_resolver+set}" = set; then : + enableval=$enable_threaded_resolver; OPT_THRES=$enableval +fi + + case "$OPT_THRES" in + no) + want_thres="no" + ;; + *) + want_thres="yes" + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_thres" >&5 +$as_echo "$want_thres" >&6; } + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use POSIX threads for threaded resolver" >&5 +$as_echo_n "checking whether to use POSIX threads for threaded resolver... " >&6; } +# Check whether --enable-pthreads was given. +if test "${enable_pthreads+set}" = set; then : + enableval=$enable_pthreads; case "$enableval" in + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + want_pthreads=no + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + want_pthreads=yes + ;; + esac +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5 +$as_echo "auto" >&6; } + want_pthreads=auto + + +fi + + +if test "$want_pthreads" != "no"; then + if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then + as_fn_error $? "options --enable-pthreads and --disable-rt are mutually exclusive" "$LINENO" 5 + fi + if test "$dontwant_rt" != "no"; then + if test "$want_pthreads" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-pthreads Ignored since librt is disabled." >&5 +$as_echo "$as_me: WARNING: --enable-pthreads Ignored since librt is disabled." >&2;} + fi + want_pthreads=no + fi +fi + +if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then + want_pthreads=no +fi + +if test "$want_pthreads" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : + +$as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h + + save_CFLAGS="$CFLAGS" + save_LIBS="$LIBS" + + LIBS= + ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" +if test "x$ac_cv_func_pthread_create" = xyes; then : + USE_THREADS_POSIX=1 +fi + + LIBS="$save_LIBS" + + case $host in + *-hp-hpux*) + USE_THREADS_POSIX="" + ;; + *) + ;; + esac + + if test "$USE_THREADS_POSIX" != "1" + then + CFLAGS="$CFLAGS -pthread" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (); +int main (void) +{ +return pthread_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_create=yes +else + ac_cv_lib_pthread_pthread_create=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : + USE_THREADS_POSIX=1 +else + CFLAGS="$save_CFLAGS" +fi + + fi + + if test "x$USE_THREADS_POSIX" = "x1" + then + +$as_echo "#define USE_THREADS_POSIX 1" >>confdefs.h + + curl_res_msg="POSIX threaded" + fi + +fi + + +fi + +if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then + if test "$want_pthreads" = "yes"; then + as_fn_error $? "--enable-pthreads but pthreads was not found" "$LINENO" 5 + fi + if test "$curl_cv_native_windows" = "yes"; then + USE_THREADS_WIN32=1 + +$as_echo "#define USE_THREADS_WIN32 1" >>confdefs.h + + curl_res_msg="Win32 threaded" + else + as_fn_error $? "Threaded resolver enabled but no thread library found" "$LINENO" 5 + fi +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking convert -I options to -isystem" >&5 +$as_echo_n "checking convert -I options to -isystem... " >&6; } + if test "$compiler_id" = "GNU_C" || + test "$compiler_id" = "CLANG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + tmp_has_include="no" + tmp_chg_FLAGS="$CFLAGS" + for word1 in $tmp_chg_FLAGS; do + case "$word1" in + -I*) + tmp_has_include="yes" + ;; + esac + done + if test "$tmp_has_include" = "yes"; then + tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'` + tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'` + CFLAGS="$tmp_chg_FLAGS" + squeeze CFLAGS + fi + tmp_has_include="no" + tmp_chg_FLAGS="$CPPFLAGS" + for word1 in $tmp_chg_FLAGS; do + case "$word1" in + -I*) + tmp_has_include="yes" + ;; + esac + done + if test "$tmp_has_include" = "yes"; then + tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'` + tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'` + CPPFLAGS="$tmp_chg_FLAGS" + squeeze CPPFLAGS + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable verbose strings" >&5 +$as_echo_n "checking whether to enable verbose strings... " >&6; } +# Check whether --enable-verbose was given. +if test "${enable_verbose+set}" = set; then : + enableval=$enable_verbose; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_VERBOSE_STRINGS 1" >>confdefs.h + + curl_verbose_msg="no" + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable SSPI support (Windows native builds only)" >&5 +$as_echo_n "checking whether to enable SSPI support (Windows native builds only)... " >&6; } +# Check whether --enable-sspi was given. +if test "${enable_sspi+set}" = set; then : + enableval=$enable_sspi; case "$enableval" in + yes) + if test "$curl_cv_native_windows" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define USE_WINDOWS_SSPI 1" >>confdefs.h + + USE_WINDOWS_SSPI=1 + + curl_sspi_msg="enabled" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-sspi Ignored. Only supported on native Windows builds." >&5 +$as_echo "$as_me: WARNING: --enable-sspi Ignored. Only supported on native Windows builds." >&2;} + fi + ;; + *) + if test "x$SCHANNEL_ENABLED" = "x1"; then + # --with-schannel implies --enable-sspi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + esac +else + if test "x$SCHANNEL_ENABLED" = "x1"; then + # --with-schannel implies --enable-sspi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable cryptographic authentication methods" >&5 +$as_echo_n "checking whether to enable cryptographic authentication methods... " >&6; } +# Check whether --enable-crypto-auth was given. +if test "${enable_crypto_auth+set}" = set; then : + enableval=$enable_crypto_auth; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_CRYPTO_AUTH 1" >>confdefs.h + + CURL_DISABLE_CRYPTO_AUTH=1 + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + + + OPT_NTLM_WB="default" + # Check whether --enable-ntlm-wb was given. +if test "${enable_ntlm_wb+set}" = set; then : + enableval=$enable_ntlm_wb; OPT_NTLM_WB=$enableval +fi + + want_ntlm_wb_file="/usr/bin/ntlm_auth" + case "$OPT_NTLM_WB" in + no) + want_ntlm_wb="no" + ;; + default) + want_ntlm_wb="yes" + ;; + *) + want_ntlm_wb="yes" + if test -n "$enableval" && test "$enableval" != "yes"; then + want_ntlm_wb_file="$enableval" + fi + ;; + esac + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable NTLM delegation to winbind's helper" >&5 +$as_echo_n "checking whether to enable NTLM delegation to winbind's helper... " >&6; } + if test "$curl_cv_native_windows" = "yes" || + test "x$SSL_ENABLED" = "x"; then + want_ntlm_wb_file="" + want_ntlm_wb="no" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_ntlm_wb" >&5 +$as_echo "$want_ntlm_wb" >&6; } + if test "$want_ntlm_wb" = "yes"; then + +$as_echo "#define NTLM_WB_ENABLED 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define NTLM_WB_FILE "$want_ntlm_wb_file" +_ACEOF + + NTLM_WB_ENABLED=1 + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable TLS-SRP authentication" >&5 +$as_echo_n "checking whether to enable TLS-SRP authentication... " >&6; } +# Check whether --enable-tls-srp was given. +if test "${enable_tls_srp+set}" = set; then : + enableval=$enable_tls_srp; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + want_tls_srp=no + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + want_tls_srp=yes + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + want_tls_srp=yes + +fi + + +if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then + +$as_echo "#define USE_TLS_SRP 1" >>confdefs.h + + USE_TLS_SRP=1 + curl_tls_srp_msg="enabled" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Unix domain sockets" >&5 +$as_echo_n "checking whether to enable Unix domain sockets... " >&6; } +# Check whether --enable-unix-sockets was given. +if test "${enable_unix_sockets+set}" = set; then : + enableval=$enable_unix_sockets; case "$enableval" in + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + want_unix_sockets=no + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + want_unix_sockets=yes + ;; + esac +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto" >&5 +$as_echo "auto" >&6; } + want_unix_sockets=auto + + +fi + +if test "x$want_unix_sockets" != "xno"; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_path" "ac_cv_member_struct_sockaddr_un_sun_path" " + #include + +" +if test "x$ac_cv_member_struct_sockaddr_un_sun_path" = xyes; then : + + +$as_echo "#define USE_UNIX_SOCKETS 1" >>confdefs.h + + USE_UNIX_SOCKETS=1 + + curl_unix_sockets_msg="enabled" + +else + + if test "x$want_unix_sockets" = "xyes"; then + as_fn_error $? "--enable-unix-sockets is not available on this platform!" "$LINENO" 5 + fi + +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support cookies" >&5 +$as_echo_n "checking whether to support cookies... " >&6; } +# Check whether --enable-cookies was given. +if test "${enable_cookies+set}" = set; then : + enableval=$enable_cookies; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_COOKIES 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support socketpair" >&5 +$as_echo_n "checking whether to support socketpair... " >&6; } +# Check whether --enable-socketpair was given. +if test "${enable_socketpair+set}" = set; then : + enableval=$enable_socketpair; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_SOCKETPAIR 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support HTTP authentication" >&5 +$as_echo_n "checking whether to support HTTP authentication... " >&6; } +# Check whether --enable-http-auth was given. +if test "${enable_http_auth+set}" = set; then : + enableval=$enable_http_auth; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_HTTP_AUTH 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support DoH" >&5 +$as_echo_n "checking whether to support DoH... " >&6; } +# Check whether --enable-doh was given. +if test "${enable_doh+set}" = set; then : + enableval=$enable_doh; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_DOH 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support the MIME API" >&5 +$as_echo_n "checking whether to support the MIME API... " >&6; } +# Check whether --enable-mime was given. +if test "${enable_mime+set}" = set; then : + enableval=$enable_mime; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_MIME 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support date parsing" >&5 +$as_echo_n "checking whether to support date parsing... " >&6; } +# Check whether --enable-dateparse was given. +if test "${enable_dateparse+set}" = set; then : + enableval=$enable_dateparse; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_PARSEDATE 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support netrc parsing" >&5 +$as_echo_n "checking whether to support netrc parsing... " >&6; } +# Check whether --enable-netrc was given. +if test "${enable_netrc+set}" = set; then : + enableval=$enable_netrc; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_NETRC 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support progress-meter" >&5 +$as_echo_n "checking whether to support progress-meter... " >&6; } +# Check whether --enable-progress-meter was given. +if test "${enable_progress_meter+set}" = set; then : + enableval=$enable_progress_meter; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_PROGRESS_METER 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support DNS shuffling" >&5 +$as_echo_n "checking whether to support DNS shuffling... " >&6; } +# Check whether --enable-dnsshuffle was given. +if test "${enable_dnsshuffle+set}" = set; then : + enableval=$enable_dnsshuffle; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_SHUFFLE_DNS 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support curl_easy_option*" >&5 +$as_echo_n "checking whether to support curl_easy_option*... " >&6; } +# Check whether --enable-get-easy-option was given. +if test "${enable_get_easy_option+set}" = set; then : + enableval=$enable_get_easy_option; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define CURL_DISABLE_GETOPTIONS 1" >>confdefs.h + + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + +curl_altsvc_msg="no (--enable-alt-svc)"; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support alt-svc" >&5 +$as_echo_n "checking whether to support alt-svc... " >&6; } +# Check whether --enable-alt-svc was given. +if test "${enable_alt_svc+set}" = set; then : + enableval=$enable_alt_svc; case "$enableval" in + no) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + curl_altsvc_msg="enabled"; + enable_altsvc="yes" + ;; + esac +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + + +if test "$enable_altsvc" = "yes"; then + +$as_echo "#define USE_ALTSVC 1" >>confdefs.h + + experimental="$experimental alt-svc" +fi + +if test "x$want_ech" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ECH support is available" >&5 +$as_echo_n "checking whether ECH support is available... " >&6; } + + ECH_ENABLED=0 + ECH_SUPPORT='' + + if test "x$OPENSSL_ENABLED" = "x1"; then + for ac_func in SSL_get_ech_status +do : + ac_fn_c_check_func "$LINENO" "SSL_get_ech_status" "ac_cv_func_SSL_get_ech_status" +if test "x$ac_cv_func_SSL_get_ech_status" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SSL_GET_ECH_STATUS 1 +_ACEOF + ECH_SUPPORT="ECH support available (OpenSSL with SSL_get_ech_status)" + ECH_ENABLED=1 +fi +done + + + fi + + if test "x$ECH_ENABLED" = "x1"; then + +$as_echo "#define USE_ECH 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECH_SUPPORT" >&5 +$as_echo "$ECH_SUPPORT" >&6; } + experimental="$experimental ECH" + else + as_fn_error $? "--enable-ech ignored: No ECH support found" "$LINENO" 5 + fi +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hiding of library internal symbols will actually happen" >&5 +$as_echo_n "checking whether hiding of library internal symbols will actually happen... " >&6; } + CFLAG_CURL_SYMBOL_HIDING="" + doing_symbol_hiding="no" + if test x"$curl_cv_native_windows" != "xyes" && + test "$want_symbol_hiding" = "yes" && + test "$supports_symbol_hiding" = "yes"; then + doing_symbol_hiding="yes" + CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS" + +cat >>confdefs.h <<_ACEOF +#define CURL_EXTERN_SYMBOL $symbol_hiding_EXTERN +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + if test x$doing_symbol_hiding = xyes; then + DOING_CURL_SYMBOL_HIDING_TRUE= + DOING_CURL_SYMBOL_HIDING_FALSE='#' +else + DOING_CURL_SYMBOL_HIDING_TRUE='#' + DOING_CURL_SYMBOL_HIDING_FALSE= +fi + + + + +LIBCURL_LIBS=$LIBS + + + + + +BLANK_AT_MAKETIME= + + + if test x$cross_compiling = xyes; then + CROSSCOMPILING_TRUE= + CROSSCOMPILING_FALSE='#' +else + CROSSCOMPILING_TRUE='#' + CROSSCOMPILING_FALSE= +fi + + +ENABLE_SHARED="$enable_shared" + + +ENABLE_STATIC="$enable_static" + + +if test "x$enable_shared" = "xno"; then + LIBCURL_NO_SHARED=$LIBCURL_LIBS +else + LIBCURL_NO_SHARED= +fi + + + +if test "x$OPENSSL_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" +elif test -n "$SSL_ENABLED"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" +fi +if test "x$IPV6_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" +fi +if test "x$USE_UNIX_SOCKETS" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets" +fi +if test "x$HAVE_LIBZ" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES libz" +fi +if test "x$HAVE_BROTLI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES brotli" +fi +if test "x$HAVE_ZSTD" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES zstd" +fi +if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \ + -o "x$USE_THREADS_WIN32" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" +fi +if test "x$IDN_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES IDN" +fi +if test "x$USE_WINDOWS_SSPI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" +fi + +if test "x$HAVE_GSSAPI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" +fi + +if test "x$curl_psl_msg" = "xenabled"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES PSL" +fi + +if test "x$enable_altsvc" = "xyes"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc" +fi + +if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ + \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then + SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" +fi + +if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ + \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then + SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos" +fi + +if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then + if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ + -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ + -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \ + -o "x$WOLFSSL_NTLM" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" + + if test "x$CURL_DISABLE_HTTP" != "x1" -a \ + "x$NTLM_WB_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB" + fi + fi +fi + +if test "x$USE_TLS_SRP" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP" +fi + +if test "x$USE_NGHTTP2" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2" +fi + +if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3" +fi + +if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL" +fi + +if test "x$https_proxy" != "xno"; then + if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \ + -o "x$NSS_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" + fi +fi + +if test "x$ECH_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES ECH" +fi + +SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '` + + +if test "x$CURL_DISABLE_HTTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS" + fi +fi +if test "x$CURL_DISABLE_FTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS" + fi +fi +if test "x$CURL_DISABLE_FILE" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE" +fi +if test "x$CURL_DISABLE_TELNET" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET" +fi +if test "x$CURL_DISABLE_LDAP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP" + if test "x$CURL_DISABLE_LDAPS" != "x1"; then + if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") || + (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS" + fi + fi +fi +if test "x$CURL_DISABLE_DICT" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT" +fi +if test "x$CURL_DISABLE_TFTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP" +fi +if test "x$CURL_DISABLE_GOPHER" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER" +fi +if test "x$CURL_DISABLE_MQTT" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT" +fi +if test "x$CURL_DISABLE_POP3" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S" + fi +fi +if test "x$CURL_DISABLE_IMAP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS" + fi +fi +if test "x$CURL_DISABLE_SMB" != "x1" \ + -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \ + -a \( "x$OPENSSL_ENABLED" = "x1" \ + -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ + -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \ + -o "x$WOLFSSL_NTLM" = "x1" \); then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS" + fi +fi +if test "x$CURL_DISABLE_SMTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS" + fi +fi +if test "x$USE_LIBSSH2" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi +if test "x$USE_LIBSSH" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi +if test "x$USE_WOLFSSH" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi +if test "x$CURL_DISABLE_RTSP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP" +fi +if test "x$USE_LIBRTMP" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP" +fi + +SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '` + + + + +squeeze CFLAGS +squeeze CPPFLAGS +squeeze DEFS +squeeze LDFLAGS +squeeze LIBS + +squeeze LIBCURL_LIBS +squeeze CURL_NETWORK_LIBS +squeeze CURL_NETWORK_AND_TIME_LIBS + +squeeze SUPPORT_FEATURES +squeeze SUPPORT_PROTOCOLS + + + + xc_bad_var_libs=no + for xc_word in $LIBS; do + case "$xc_word" in + -l* | --library=*) + : + ;; + *) + xc_bad_var_libs=yes + ;; + esac + done + if test $xc_bad_var_libs = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LIBS: $LIBS" >&5 +$as_echo "$as_me: using LIBS: $LIBS" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS note: LIBS should only be used to specify libraries (-lname)." >&5 +$as_echo "$as_me: LIBS note: LIBS should only be used to specify libraries (-lname)." >&6;} + fi + + + xc_bad_var_ldflags=no + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_ldflags=yes + ;; + -U*) + xc_bad_var_ldflags=yes + ;; + -I*) + xc_bad_var_ldflags=yes + ;; + -l* | --library=*) + xc_bad_var_ldflags=yes + ;; + esac + done + if test $xc_bad_var_ldflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS: $LDFLAGS" >&5 +$as_echo "$as_me: using LDFLAGS: $LDFLAGS" >&6;} + xc_bad_var_msg="LDFLAGS note: LDFLAGS should only be used to specify linker flags, not" + for xc_word in $LDFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + + xc_bad_var_cppflags=no + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + xc_bad_var_cppflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cppflags=yes + ;; + -l* | --library=*) + xc_bad_var_cppflags=yes + ;; + esac + done + if test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS: $CPPFLAGS" >&5 +$as_echo "$as_me: using CPPFLAGS: $CPPFLAGS" >&6;} + xc_bad_var_msg="CPPFLAGS note: CPPFLAGS should only be used to specify C preprocessor flags, not" + for xc_word in $CPPFLAGS; do + case "$xc_word" in + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + + xc_bad_var_cflags=no + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + xc_bad_var_cflags=yes + ;; + -U*) + xc_bad_var_cflags=yes + ;; + -I*) + xc_bad_var_cflags=yes + ;; + -rpath*) + xc_bad_var_cflags=yes + ;; + -L* | --library-path=*) + xc_bad_var_cflags=yes + ;; + -l* | --library=*) + xc_bad_var_cflags=yes + ;; + esac + done + if test $xc_bad_var_cflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5 +$as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;} + xc_bad_var_msg="CFLAGS note: CFLAGS should only be used to specify C compiler flags, not" + for xc_word in $CFLAGS; do + case "$xc_word" in + -D*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -U*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -I*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word" >&6;} + ;; + -rpath*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -L* | --library-path=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word" >&6;} + ;; + -l* | --library=*) + { $as_echo "$as_me:${as_lineno-$LINENO}: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&5 +$as_echo "$as_me: $xc_bad_var_msg libraries. Use LIBS for: $xc_word" >&6;} + ;; + esac + done + fi + + if test $xc_bad_var_libs = yes || + test $xc_bad_var_cflags = yes || + test $xc_bad_var_ldflags = yes || + test $xc_bad_var_cppflags = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Continuing even with errors mentioned immediately above this line." >&5 +$as_echo "$as_me: WARNING: Continuing even with errors mentioned immediately above this line." >&2;} + fi + + +SSL_BACKENDS=${ssl_backends} + + +if test "x$want_curldebug_assumed" = "xyes" && + test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then + ac_configure_args="$ac_configure_args --enable-curldebug" +fi + +ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile docs/libcurl/opts/Makefile docs/cmdline-opts/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile scripts/Makefile lib/libcurl.vers tests/Makefile tests/certs/Makefile tests/certs/scripts/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile tests/unit/Makefile packages/Makefile packages/vms/Makefile curl-config libcurl.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${CURL_LT_SHLIB_USE_VERSION_INFO_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSION_INFO_FALSE}"; then + as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSION_INFO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CURL_LT_SHLIB_USE_NO_UNDEFINED_TRUE}" && test -z "${CURL_LT_SHLIB_USE_NO_UNDEFINED_FALSE}"; then + as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_NO_UNDEFINED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CURL_LT_SHLIB_USE_MIMPURE_TEXT_TRUE}" && test -z "${CURL_LT_SHLIB_USE_MIMPURE_TEXT_FALSE}"; then + as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_MIMPURE_TEXT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_CPPFLAG_CURL_STATICLIB_TRUE}" && test -z "${USE_CPPFLAG_CURL_STATICLIB_FALSE}"; then + as_fn_error $? "conditional \"USE_CPPFLAG_CURL_STATICLIB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_EXPLICIT_LIB_DEPS_TRUE}" && test -z "${USE_EXPLICIT_LIB_DEPS_FALSE}"; then + as_fn_error $? "conditional \"USE_EXPLICIT_LIB_DEPS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CURLDEBUG_TRUE}" && test -z "${CURLDEBUG_FALSE}"; then + as_fn_error $? "conditional \"CURLDEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_UNITTESTS_TRUE}" && test -z "${BUILD_UNITTESTS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_UNITTESTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DOING_NATIVE_WINDOWS_TRUE}" && test -z "${DOING_NATIVE_WINDOWS_FALSE}"; then + as_fn_error $? "conditional \"DOING_NATIVE_WINDOWS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBZ\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_STUB_GSS_TRUE}" && test -z "${BUILD_STUB_GSS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_STUB_GSS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_LIBPSL_TRUE}" && test -z "${USE_LIBPSL_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBPSL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_TRUE}" && test -z "${CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS_FALSE}"; then + as_fn_error $? "conditional \"CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_MANUAL_TRUE}" && test -z "${USE_MANUAL_FALSE}"; then + as_fn_error $? "conditional \"USE_MANUAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_EMBEDDED_ARES_TRUE}" && test -z "${USE_EMBEDDED_ARES_FALSE}"; then + as_fn_error $? "conditional \"USE_EMBEDDED_ARES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_LIBHOSTNAME_TRUE}" && test -z "${BUILD_LIBHOSTNAME_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LIBHOSTNAME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DOING_CURL_SYMBOL_HIDING_TRUE}" && test -z "${DOING_CURL_SYMBOL_HIDING_FALSE}"; then + as_fn_error $? "conditional \"DOING_CURL_SYMBOL_HIDING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CROSSCOMPILING_TRUE}" && test -z "${CROSSCOMPILING_FALSE}"; then + as_fn_error $? "conditional \"CROSSCOMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by curl $as_me -, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +curl config.status - +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ +nm_file_list_spec \ +lt_cv_truncate_bin \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' + +# See if we are running on zsh, and set the options that allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "lib/curl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/curl_config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/examples/Makefile") CONFIG_FILES="$CONFIG_FILES docs/examples/Makefile" ;; + "docs/libcurl/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/Makefile" ;; + "docs/libcurl/opts/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libcurl/opts/Makefile" ;; + "docs/cmdline-opts/Makefile") CONFIG_FILES="$CONFIG_FILES docs/cmdline-opts/Makefile" ;; + "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/curl/Makefile") CONFIG_FILES="$CONFIG_FILES include/curl/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "lib/libcurl.vers") CONFIG_FILES="$CONFIG_FILES lib/libcurl.vers" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/certs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/Makefile" ;; + "tests/certs/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES tests/certs/scripts/Makefile" ;; + "tests/data/Makefile") CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;; + "tests/server/Makefile") CONFIG_FILES="$CONFIG_FILES tests/server/Makefile" ;; + "tests/libtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libtest/Makefile" ;; + "tests/unit/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit/Makefile" ;; + "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;; + "packages/vms/Makefile") CONFIG_FILES="$CONFIG_FILES packages/vms/Makefile" ;; + "curl-config") CONFIG_FILES="$CONFIG_FILES curl-config" ;; + "libcurl.pc") CONFIG_FILES="$CONFIG_FILES libcurl.pc" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac + shift + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf + do + # Strip MF so we end up with the name of the file. + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? + done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options that allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}"; then + setopt NO_GLOB_SUBST + fi + + cfgfile=${ofile}T + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL +# Generated automatically by $as_me ($PACKAGE) $VERSION +# NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# The names of the tagged configurations supported by this script. +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Assembler program. +AS=$lt_AS + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Object dumper program. +OBJDUMP=$lt_OBJDUMP + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test set != "${COLLECT_NAMES+set}"; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain=$ac_aux_dir/ltmain.sh + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + --disable-option-checking) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_sub_configure_args " '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ac_sub_configure_args="--silent $ac_sub_configure_args" + fi + + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d "$srcdir/$ac_dir" || continue + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + $as_echo "$ac_msg" >&6 + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + cd "$ac_dir" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "$ac_srcdir/configure.gnu"; then + ac_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ac_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ac_sub_configure=$ac_aux_dir/configure + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 + fi + + cd "$ac_popdir" + done +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + + + tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null` + if test -z "$tmp_cpp"; then + tmp_cpp='cpp' + fi + cat >./tests/configurehelp.pm <<_EOF +# This is a generated file. Do not edit. + +package configurehelp; + +use strict; +use warnings; +use Exporter; + +use vars qw( + @ISA + @EXPORT_OK + \$Cpreprocessor + ); + +@ISA = qw(Exporter); + +@EXPORT_OK = qw( + \$Cpreprocessor + ); + +\$Cpreprocessor = '$tmp_cpp'; + +1; +_EOF + + + +## ---------------------------------- ## +## Start of distclean amending code ## +## ---------------------------------- ## + +for xc_subdir in lib src tests/unit tests/server tests/libtest docs/examples +do + +if test ! -f "$xc_subdir/Makefile"; then + echo "$xc_msg_err $xc_subdir/Makefile file not found. $xc_msg_abrt" >&2 + exit 1 +fi + +# Fetch dependency tracking file list from Makefile include lines. + +xc_inc_lines=`grep '^include .*(DEPDIR)' "$xc_subdir/Makefile" 2>/dev/null` +xc_cnt_words=`echo "$xc_inc_lines" | wc -w | tr -d "$xc_space$xc_tab"` + +# --disable-dependency-tracking might have been used, consequently +# there is nothing to amend without a dependency tracking file list. + +if test $xc_cnt_words -gt 0; then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: amending $xc_subdir/Makefile" >&5 +$as_echo "$as_me: amending $xc_subdir/Makefile" >&6;} + +# Build Makefile specific patch hunk. + +xc_p="$xc_subdir/xc_patch.tmp" + +xc_rm_depfiles=`echo "$xc_inc_lines" \ + | $SED 's%include% -rm -f%' 2>/dev/null` + +xc_dep_subdirs=`echo "$xc_inc_lines" \ + | $SED 's%include[ ][ ]*%%' 2>/dev/null \ + | $SED 's%(DEPDIR)/.*%(DEPDIR)%' 2>/dev/null \ + | sort | uniq` + +echo "$xc_rm_depfiles" >$xc_p + +for xc_dep_dir in $xc_dep_subdirs; do + echo "${xc_tab}@xm_dep_cnt=\`ls $xc_dep_dir | wc -l 2>/dev/null\`; \\" >>$xc_p + echo "${xc_tab}if test \$\$xm_dep_cnt -eq 0 && test -d $xc_dep_dir; then \\" >>$xc_p + echo "${xc_tab} rm -rf $xc_dep_dir; \\" >>$xc_p + echo "${xc_tab}fi" >>$xc_p +done + +# Build Makefile patching sed scripts. + +xc_s1="$xc_subdir/xc_script_1.tmp" +xc_s2="$xc_subdir/xc_script_2.tmp" +xc_s3="$xc_subdir/xc_script_3.tmp" + +cat >$xc_s1 <<\_EOT +/^distclean[ ]*:/,/^[^ ][^ ]*:/{ + s/^.*(DEPDIR)/___xc_depdir_line___/ +} +/^maintainer-clean[ ]*:/,/^[^ ][^ ]*:/{ + s/^.*(DEPDIR)/___xc_depdir_line___/ +} +_EOT + +cat >$xc_s2 <<\_EOT +/___xc_depdir_line___$/{ + N + /___xc_depdir_line___$/D +} +_EOT + +cat >$xc_s3 <<_EOT +/^___xc_depdir_line___/{ + r $xc_p + d +} +_EOT + +# Apply patch to Makefile and cleanup. + +$SED -f "$xc_s1" "$xc_subdir/Makefile" >"$xc_subdir/Makefile.tmp1" +$SED -f "$xc_s2" "$xc_subdir/Makefile.tmp1" >"$xc_subdir/Makefile.tmp2" +$SED -f "$xc_s3" "$xc_subdir/Makefile.tmp2" >"$xc_subdir/Makefile.tmp3" + +if test -f "$xc_subdir/Makefile.tmp3"; then + mv -f "$xc_subdir/Makefile.tmp3" "$xc_subdir/Makefile" +fi + +test -f "$xc_subdir/Makefile.tmp1" && rm -f "$xc_subdir/Makefile.tmp1" +test -f "$xc_subdir/Makefile.tmp2" && rm -f "$xc_subdir/Makefile.tmp2" +test -f "$xc_subdir/Makefile.tmp3" && rm -f "$xc_subdir/Makefile.tmp3" + +test -f "$xc_p" && rm -f "$xc_p" +test -f "$xc_s1" && rm -f "$xc_s1" +test -f "$xc_s2" && rm -f "$xc_s2" +test -f "$xc_s3" && rm -f "$xc_s3" + +fi + +done + +## -------------------------------- ## +## End of distclean amending code ## +## -------------------------------- ## + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configured to build curl/libcurl: + + Host setup: ${host} + Install prefix: ${prefix} + Compiler: ${CC} + CFLAGS: ${CFLAGS} + CPPFLAGS: ${CPPFLAGS} + LDFLAGS: ${LDFLAGS} + LIBS: ${LIBS} + + curl version: ${CURLVERSION} + SSL: ${curl_ssl_msg} + SSH: ${curl_ssh_msg} + zlib: ${curl_zlib_msg} + brotli: ${curl_brotli_msg} + zstd: ${curl_zstd_msg} + GSS-API: ${curl_gss_msg} + TLS-SRP: ${curl_tls_srp_msg} + resolver: ${curl_res_msg} + IPv6: ${curl_ipv6_msg} + Unix sockets: ${curl_unix_sockets_msg} + IDN: ${curl_idn_msg} + Build libcurl: Shared=${enable_shared}, Static=${enable_static} + Built-in manual: ${curl_manual_msg} + --libcurl option: ${curl_libcurl_msg} + Verbose errors: ${curl_verbose_msg} + Code coverage: ${curl_coverage_msg} + SSPI: ${curl_sspi_msg} + ca cert bundle: ${ca}${ca_warning} + ca cert path: ${capath}${capath_warning} + ca fallback: ${with_ca_fallback} + LDAP: ${curl_ldap_msg} + LDAPS: ${curl_ldaps_msg} + RTSP: ${curl_rtsp_msg} + RTMP: ${curl_rtmp_msg} + Metalink: ${curl_mtlnk_msg} + PSL: ${curl_psl_msg} + Alt-svc: ${curl_altsvc_msg} + HTTP2: ${curl_h2_msg} + HTTP3: ${curl_h3_msg} + ECH: ${curl_ech_msg} + Protocols: ${SUPPORT_PROTOCOLS} + Features: ${SUPPORT_FEATURES} +" >&5 +$as_echo "$as_me: Configured to build curl/libcurl: + + Host setup: ${host} + Install prefix: ${prefix} + Compiler: ${CC} + CFLAGS: ${CFLAGS} + CPPFLAGS: ${CPPFLAGS} + LDFLAGS: ${LDFLAGS} + LIBS: ${LIBS} + + curl version: ${CURLVERSION} + SSL: ${curl_ssl_msg} + SSH: ${curl_ssh_msg} + zlib: ${curl_zlib_msg} + brotli: ${curl_brotli_msg} + zstd: ${curl_zstd_msg} + GSS-API: ${curl_gss_msg} + TLS-SRP: ${curl_tls_srp_msg} + resolver: ${curl_res_msg} + IPv6: ${curl_ipv6_msg} + Unix sockets: ${curl_unix_sockets_msg} + IDN: ${curl_idn_msg} + Build libcurl: Shared=${enable_shared}, Static=${enable_static} + Built-in manual: ${curl_manual_msg} + --libcurl option: ${curl_libcurl_msg} + Verbose errors: ${curl_verbose_msg} + Code coverage: ${curl_coverage_msg} + SSPI: ${curl_sspi_msg} + ca cert bundle: ${ca}${ca_warning} + ca cert path: ${capath}${capath_warning} + ca fallback: ${with_ca_fallback} + LDAP: ${curl_ldap_msg} + LDAPS: ${curl_ldaps_msg} + RTSP: ${curl_rtsp_msg} + RTMP: ${curl_rtmp_msg} + Metalink: ${curl_mtlnk_msg} + PSL: ${curl_psl_msg} + Alt-svc: ${curl_altsvc_msg} + HTTP2: ${curl_h2_msg} + HTTP3: ${curl_h3_msg} + ECH: ${curl_ech_msg} + Protocols: ${SUPPORT_PROTOCOLS} + Features: ${SUPPORT_FEATURES} +" >&6;} +if test -n "$experimental"; then + cat >&2 << _EOF + WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution! +_EOF +fi diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure.ac b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure.ac new file mode 100755 index 00000000..2304775b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/configure.ac @@ -0,0 +1,5248 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +#*************************************************************************** +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.57) + +dnl We don't know the version number "statically" so we use a dash here +AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.haxx.se/mail/]) + +XC_OVR_ZZ50 +XC_OVR_ZZ60 +CURL_OVERRIDE_AUTOCONF + +dnl configure script copyright +AC_COPYRIGHT([Copyright (c) 1998 - 2020 Daniel Stenberg, +This configure script may be copied, distributed and modified under the +terms of the curl license; see COPYING for more details]) + +AC_CONFIG_SRCDIR([lib/urldata.h]) +AC_CONFIG_HEADERS(lib/curl_config.h) +AC_CONFIG_MACRO_DIR([m4]) +AM_MAINTAINER_MODE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +CURL_CHECK_OPTION_DEBUG +CURL_CHECK_OPTION_OPTIMIZE +CURL_CHECK_OPTION_WARNINGS +CURL_CHECK_OPTION_WERROR +CURL_CHECK_OPTION_CURLDEBUG +CURL_CHECK_OPTION_SYMBOL_HIDING +CURL_CHECK_OPTION_ARES +CURL_CHECK_OPTION_RT +CURL_CHECK_OPTION_ECH + +XC_CHECK_PATH_SEPARATOR + +# +# save the configure arguments +# +CONFIGURE_OPTIONS="\"$ac_configure_args\"" +AC_SUBST(CONFIGURE_OPTIONS) + +dnl SED is mandatory for configure process and libtool. +dnl Set it now, allowing it to be changed later. +if test -z "$SED"; then + dnl allow it to be overridden + AC_PATH_PROG([SED], [sed], [not_found], + [$PATH:/usr/bin:/usr/local/bin]) + if test -z "$SED" || test "$SED" = "not_found"; then + AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.]) + fi +fi +AC_SUBST([SED]) + +dnl GREP is mandatory for configure process and libtool. +dnl Set it now, allowing it to be changed later. +if test -z "$GREP"; then + dnl allow it to be overridden + AC_PATH_PROG([GREP], [grep], [not_found], + [$PATH:/usr/bin:/usr/local/bin]) + if test -z "$GREP" || test "$GREP" = "not_found"; then + AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.]) + fi +fi +AC_SUBST([GREP]) + +dnl EGREP is mandatory for configure process and libtool. +dnl Set it now, allowing it to be changed later. +if test -z "$EGREP"; then + dnl allow it to be overridden + if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then + AC_MSG_CHECKING([for egrep]) + EGREP="$GREP -E" + AC_MSG_RESULT([$EGREP]) + else + AC_PATH_PROG([EGREP], [egrep], [not_found], + [$PATH:/usr/bin:/usr/local/bin]) + fi +fi +if test -z "$EGREP" || test "$EGREP" = "not_found"; then + AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.]) +fi +AC_SUBST([EGREP]) + +dnl AR is mandatory for configure process and libtool. +dnl This is target dependent, so check it as a tool. +if test -z "$AR"; then + dnl allow it to be overridden + AC_PATH_TOOL([AR], [ar], [not_found], + [$PATH:/usr/bin:/usr/local/bin]) + if test -z "$AR" || test "$AR" = "not_found"; then + AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.]) + fi +fi +AC_SUBST([AR]) + +AC_SUBST(libext) + +dnl figure out the libcurl version +CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h` +XC_CHECK_PROG_CC + +dnl for --enable-code-coverage +CURL_COVERAGE + +XC_AUTOMAKE +AC_MSG_CHECKING([curl version]) +AC_MSG_RESULT($CURLVERSION) + +AC_SUBST(CURLVERSION) + +dnl +dnl we extract the numerical version for curl-config only +VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h` +AC_SUBST(VERSIONNUM) + +dnl Solaris pkgadd support definitions +PKGADD_PKG="HAXXcurl" +PKGADD_NAME="curl - a client that groks URLs" +PKGADD_VENDOR="curl.haxx.se" +AC_SUBST(PKGADD_PKG) +AC_SUBST(PKGADD_NAME) +AC_SUBST(PKGADD_VENDOR) + +dnl +dnl initialize all the info variables + curl_ssl_msg="no (--with-{ssl,gnutls,nss,mbedtls,wolfssl,schannel,secure-transport,mesalink,amissl,bearssl} )" + curl_ssh_msg="no (--with-{libssh,libssh2})" + curl_zlib_msg="no (--with-zlib)" + curl_brotli_msg="no (--with-brotli)" + curl_zstd_msg="no (--with-zstd)" + curl_gss_msg="no (--with-gssapi)" +curl_tls_srp_msg="no (--enable-tls-srp)" + curl_res_msg="default (--enable-ares / --enable-threaded-resolver)" + curl_ipv6_msg="no (--enable-ipv6)" +curl_unix_sockets_msg="no (--enable-unix-sockets)" + curl_idn_msg="no (--with-{libidn2,winidn})" + curl_manual_msg="no (--enable-manual)" +curl_libcurl_msg="enabled (--disable-libcurl-option)" +curl_verbose_msg="enabled (--disable-verbose)" + curl_sspi_msg="no (--enable-sspi)" + curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)" + curl_ldaps_msg="no (--enable-ldaps)" + curl_rtsp_msg="no (--enable-rtsp)" + curl_rtmp_msg="no (--with-librtmp)" + curl_mtlnk_msg="no (--with-libmetalink)" + curl_psl_msg="no (--with-libpsl)" + + ssl_backends= + +dnl +dnl Save some initial values the user might have provided +dnl +INITIAL_LDFLAGS=$LDFLAGS +INITIAL_LIBS=$LIBS + +dnl +dnl Detect the canonical host and target build environment +dnl + +AC_CANONICAL_HOST +dnl Get system canonical name +AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) + +# Silence warning: ar: 'u' modifier ignored since 'D' is the default +AC_SUBST(AR_FLAGS, [cr]) + +dnl This defines _ALL_SOURCE for AIX +CURL_CHECK_AIX_ALL_SOURCE + +dnl Our configure and build reentrant settings +CURL_CONFIGURE_THREAD_SAFE +CURL_CONFIGURE_REENTRANT + +dnl check for how to do large files +AC_SYS_LARGEFILE + +XC_LIBTOOL + +# +# Automake conditionals based on libtool related checks +# + +AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO], + [test "x$xc_lt_shlib_use_version_info" = 'xyes']) +AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED], + [test "x$xc_lt_shlib_use_no_undefined" = 'xyes']) +AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT], + [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes']) + +# +# Due to libtool and automake machinery limitations of not allowing +# specifying separate CPPFLAGS or CFLAGS when compiling objects for +# inclusion of these in shared or static libraries, we are forced to +# build using separate configure runs for shared and static libraries +# on systems where different CPPFLAGS or CFLAGS are mandatory in order +# to compile objects for each kind of library. Notice that relying on +# the '-DPIC' CFLAG that libtool provides is not valid given that the +# user might for example choose to build static libraries with PIC. +# + +# +# Make our Makefile.am files use the staticlib CPPFLAG only when strictly +# targeting a static library and not building its shared counterpart. +# + +AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB], + [test "x$xc_lt_build_static_only" = 'xyes']) + +# +# Make staticlib CPPFLAG variable and its definition visible in output +# files unconditionally, providing an empty definition unless strictly +# targeting a static library and not building its shared counterpart. +# + +CPPFLAG_CURL_STATICLIB= +if test "x$xc_lt_build_static_only" = 'xyes'; then + CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB' +fi +AC_SUBST([CPPFLAG_CURL_STATICLIB]) + + +# Determine whether all dependent libraries must be specified when linking +if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" +then + REQUIRE_LIB_DEPS=no +else + REQUIRE_LIB_DEPS=yes +fi +AC_SUBST(REQUIRE_LIB_DEPS) +AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes) + +dnl check if there's a way to force code inline +AC_C_INLINE + +dnl ********************************************************************** +dnl platform/compiler/architecture specific checks/flags +dnl ********************************************************************** + +CURL_CHECK_COMPILER +CURL_SET_COMPILER_BASIC_OPTS +CURL_SET_COMPILER_DEBUG_OPTS +CURL_SET_COMPILER_OPTIMIZE_OPTS +CURL_SET_COMPILER_WARNING_OPTS + +if test "$compiler_id" = "INTEL_UNIX_C"; then + # + if test "$compiler_num" -ge "1000"; then + dnl icc 10.X or later + CFLAGS="$CFLAGS -shared-intel" + elif test "$compiler_num" -ge "900"; then + dnl icc 9.X specific + CFLAGS="$CFLAGS -i-dynamic" + fi + # +fi + +CURL_CFLAG_EXTRAS="" +if test X"$want_werror" = Xyes; then + CURL_CFLAG_EXTRAS="-Werror" + if test "$compiler_id" = "GNU_C"; then + dnl enable -pedantic-errors for GCC 5 and later, + dnl as before that it was the same as -Werror=pedantic + if test "$compiler_num" -ge "500"; then + CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors" + fi + fi +fi +AC_SUBST(CURL_CFLAG_EXTRAS) + +CURL_CHECK_COMPILER_HALT_ON_ERROR +CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE +CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH +CURL_CHECK_COMPILER_SYMBOL_HIDING + +CURL_CHECK_CURLDEBUG +AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes) + +supports_unittests=yes +# cross-compilation of unit tests static library/programs fails when +# libcurl shared library is built. This might be due to a libtool or +# automake issue. In this case we disable unit tests. +if test "x$cross_compiling" != "xno" && + test "x$enable_shared" != "xno"; then + supports_unittests=no +fi + +# IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to +# a problem related with OpenSSL headers and library versions not matching. +# Disable unit tests while time to further investigate this is found. +case $host in + mips-sgi-irix6.5) + if test "$compiler_id" = "GNU_C"; then + supports_unittests=no + fi + ;; +esac + +# All AIX autobuilds fails unit tests linking against unittests library +# due to unittests library being built with no symbols or members. Libtool ? +# Disable unit tests while time to further investigate this is found. +case $host_os in + aix*) + supports_unittests=no + ;; +esac + +dnl Build unit tests when option --enable-debug is given. +if test "x$want_debug" = "xyes" && + test "x$supports_unittests" = "xyes"; then + want_unittests=yes +else + want_unittests=no +fi +AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes) + +dnl ********************************************************************** +dnl Compilation based checks should not be done before this point. +dnl ********************************************************************** + +dnl ********************************************************************** +dnl Make sure that our checks for headers windows.h winsock.h winsock2.h +dnl and ws2tcpip.h take precedence over any other further checks which +dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for +dnl this specific header files. And do them before its results are used. +dnl ********************************************************************** + +CURL_CHECK_HEADER_WINDOWS +CURL_CHECK_NATIVE_WINDOWS +case X-"$curl_cv_native_windows" in + X-yes) + CURL_CHECK_HEADER_WINSOCK + CURL_CHECK_HEADER_WINSOCK2 + CURL_CHECK_HEADER_WS2TCPIP + CURL_CHECK_HEADER_WINLDAP + CURL_CHECK_HEADER_WINBER + ;; + *) + curl_cv_header_winsock_h="no" + curl_cv_header_winsock2_h="no" + curl_cv_header_ws2tcpip_h="no" + curl_cv_header_winldap_h="no" + curl_cv_header_winber_h="no" + ;; +esac +CURL_CHECK_WIN32_LARGEFILE + +CURL_MAC_CFLAGS +CURL_SUPPORTS_BUILTIN_AVAILABLE + + +dnl ************************************************************ +dnl switch off particular protocols +dnl +AC_MSG_CHECKING([whether to support http]) +AC_ARG_ENABLE(http, +AC_HELP_STRING([--enable-http],[Enable HTTP support]) +AC_HELP_STRING([--disable-http],[Disable HTTP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) + disable_http="yes" + AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP]) + AC_SUBST(CURL_DISABLE_HTTP, [1]) + AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) + AC_SUBST(CURL_DISABLE_RTSP, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support ftp]) +AC_ARG_ENABLE(ftp, +AC_HELP_STRING([--enable-ftp],[Enable FTP support]) +AC_HELP_STRING([--disable-ftp],[Disable FTP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP]) + AC_SUBST(CURL_DISABLE_FTP, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support file]) +AC_ARG_ENABLE(file, +AC_HELP_STRING([--enable-file],[Enable FILE support]) +AC_HELP_STRING([--disable-file],[Disable FILE support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE]) + AC_SUBST(CURL_DISABLE_FILE, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support ldap]) +AC_ARG_ENABLE(ldap, +AC_HELP_STRING([--enable-ldap],[Enable LDAP support]) +AC_HELP_STRING([--disable-ldap],[Disable LDAP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) + AC_SUBST(CURL_DISABLE_LDAP, [1]) + ;; + *) + AC_MSG_RESULT(yes) + ;; + esac ],[ + AC_MSG_RESULT(yes) ] +) +AC_MSG_CHECKING([whether to support ldaps]) +AC_ARG_ENABLE(ldaps, +AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support]) +AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) + AC_SUBST(CURL_DISABLE_LDAPS, [1]) + ;; + *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then + AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS) + AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) + AC_SUBST(CURL_DISABLE_LDAPS, [1]) + else + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) + AC_SUBST(HAVE_LDAP_SSL, [1]) + fi + ;; + esac ],[ + if test "x$CURL_DISABLE_LDAP" = "x1" ; then + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) + AC_SUBST(CURL_DISABLE_LDAPS, [1]) + else + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) + AC_SUBST(HAVE_LDAP_SSL, [1]) + fi ] +) + +AC_MSG_CHECKING([whether to support rtsp]) +AC_ARG_ENABLE(rtsp, +AC_HELP_STRING([--enable-rtsp],[Enable RTSP support]) +AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP]) + AC_SUBST(CURL_DISABLE_RTSP, [1]) + ;; + *) if test x$CURL_DISABLE_HTTP = x1 ; then + AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!) + else + AC_MSG_RESULT(yes) + curl_rtsp_msg="enabled" + fi + ;; + esac ], + if test "x$CURL_DISABLE_HTTP" != "x1"; then + AC_MSG_RESULT(yes) + curl_rtsp_msg="enabled" + else + AC_MSG_RESULT(no) + fi +) + +AC_MSG_CHECKING([whether to support proxies]) +AC_ARG_ENABLE(proxy, +AC_HELP_STRING([--enable-proxy],[Enable proxy support]) +AC_HELP_STRING([--disable-proxy],[Disable proxy support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies]) + AC_SUBST(CURL_DISABLE_PROXY, [1]) + https_proxy="no" + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +AC_MSG_CHECKING([whether to support dict]) +AC_ARG_ENABLE(dict, +AC_HELP_STRING([--enable-dict],[Enable DICT support]) +AC_HELP_STRING([--disable-dict],[Disable DICT support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT]) + AC_SUBST(CURL_DISABLE_DICT, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support telnet]) +AC_ARG_ENABLE(telnet, +AC_HELP_STRING([--enable-telnet],[Enable TELNET support]) +AC_HELP_STRING([--disable-telnet],[Disable TELNET support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET]) + AC_SUBST(CURL_DISABLE_TELNET, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support tftp]) +AC_ARG_ENABLE(tftp, +AC_HELP_STRING([--enable-tftp],[Enable TFTP support]) +AC_HELP_STRING([--disable-tftp],[Disable TFTP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP]) + AC_SUBST(CURL_DISABLE_TFTP, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +AC_MSG_CHECKING([whether to support pop3]) +AC_ARG_ENABLE(pop3, +AC_HELP_STRING([--enable-pop3],[Enable POP3 support]) +AC_HELP_STRING([--disable-pop3],[Disable POP3 support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3]) + AC_SUBST(CURL_DISABLE_POP3, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + + +AC_MSG_CHECKING([whether to support imap]) +AC_ARG_ENABLE(imap, +AC_HELP_STRING([--enable-imap],[Enable IMAP support]) +AC_HELP_STRING([--disable-imap],[Disable IMAP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP]) + AC_SUBST(CURL_DISABLE_IMAP, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + + +AC_MSG_CHECKING([whether to support smb]) +AC_ARG_ENABLE(smb, +AC_HELP_STRING([--enable-smb],[Enable SMB/CIFS support]) +AC_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS]) + AC_SUBST(CURL_DISABLE_SMB, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +AC_MSG_CHECKING([whether to support smtp]) +AC_ARG_ENABLE(smtp, +AC_HELP_STRING([--enable-smtp],[Enable SMTP support]) +AC_HELP_STRING([--disable-smtp],[Disable SMTP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP]) + AC_SUBST(CURL_DISABLE_SMTP, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +AC_MSG_CHECKING([whether to support gopher]) +AC_ARG_ENABLE(gopher, +AC_HELP_STRING([--enable-gopher],[Enable Gopher support]) +AC_HELP_STRING([--disable-gopher],[Disable Gopher support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher]) + AC_SUBST(CURL_DISABLE_GOPHER, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +AC_MSG_CHECKING([whether to support mqtt]) +AC_ARG_ENABLE(mqtt, +AC_HELP_STRING([--enable-mqtt],[Enable MQTT support]) +AC_HELP_STRING([--disable-mqtt],[Disable MQTT support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_MQTT, 1, [to disable MQTT]) + AC_SUBST(CURL_DISABLE_MQTT, [1]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(no) +) + +dnl ********************************************************************** +dnl Check for built-in manual +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to provide built-in manual]) +AC_ARG_ENABLE(manual, +AC_HELP_STRING([--enable-manual],[Enable built-in manual]) +AC_HELP_STRING([--disable-manual],[Disable built-in manual]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + USE_MANUAL="1" + ;; + esac ], + AC_MSG_RESULT(yes) + USE_MANUAL="1" +) +dnl The actual use of the USE_MANUAL variable is done much later in this +dnl script to allow other actions to disable it as well. + +dnl ************************************************************ +dnl disable C code generation support +dnl +AC_MSG_CHECKING([whether to enable generation of C code]) +AC_ARG_ENABLE(libcurl_option, +AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support]) +AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option]) + curl_libcurl_msg="no" + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ********************************************************************** +dnl Checks for libraries. +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to use libgcc]) +AC_ARG_ENABLE(libgcc, +AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), +[ case "$enableval" in + yes) + LIBS="-lgcc $LIBS" + AC_MSG_RESULT(yes) + ;; + *) AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + +CURL_CHECK_LIB_XNET + +dnl gethostbyname without lib or in the nsl lib? +AC_CHECK_FUNC(gethostbyname, + [HAVE_GETHOSTBYNAME="1" + ], + [ AC_CHECK_LIB(nsl, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="-lnsl $LIBS" + ]) + ]) + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl gethostbyname in the socket lib? + AC_CHECK_LIB(socket, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="-lsocket $LIBS" + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl gethostbyname in the watt lib? + AC_CHECK_LIB(watt, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + CPPFLAGS="-I/dev/env/WATT_ROOT/inc" + LDFLAGS="-L/dev/env/WATT_ROOT/lib" + LIBS="-lwatt $LIBS" + ]) +fi + +dnl At least one system has been identified to require BOTH nsl and socket +dnl libs at the same time to link properly. +if test "$HAVE_GETHOSTBYNAME" != "1" +then + AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs]) + my_ac_save_LIBS=$LIBS + LIBS="-lnsl -lsocket $LIBS" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ + gethostbyname(); + ]]) + ],[ + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1" + ],[ + AC_MSG_RESULT([no]) + LIBS=$my_ac_save_LIBS + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl This is for winsock systems + if test "$curl_cv_header_windows_h" = "yes"; then + if test "$curl_cv_header_winsock_h" = "yes"; then + case $host in + *-*-mingw32ce*) + winsock_LIB="-lwinsock" + ;; + *) + winsock_LIB="-lwsock32" + ;; + esac + fi + if test "$curl_cv_header_winsock2_h" = "yes"; then + winsock_LIB="-lws2_32" + fi + if test ! -z "$winsock_LIB"; then + my_ac_save_LIBS=$LIBS + LIBS="$winsock_LIB $LIBS" + AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#ifdef HAVE_WINDOWS_H +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#endif + ]],[[ + gethostbyname("www.dummysite.com"); + ]]) + ],[ + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1" + ],[ + AC_MSG_RESULT([no]) + winsock_LIB="" + LIBS=$my_ac_save_LIBS + ]) + fi + fi +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl This is for Minix 3.1 + AC_MSG_CHECKING([for gethostbyname for Minix 3]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +/* Older Minix versions may need here instead */ +#include + ]],[[ + gethostbyname("www.dummysite.com"); + ]]) + ],[ + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1" + ],[ + AC_MSG_RESULT([no]) + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl This is for eCos with a stubbed DNS implementation + AC_MSG_CHECKING([for gethostbyname for eCos]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#include +#include + ]],[[ + gethostbyname("www.dummysite.com"); + ]]) + ],[ + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1" + ],[ + AC_MSG_RESULT([no]) + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet + AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +#include +struct Library *SocketBase = NULL; + ]],[[ + gethostbyname("www.dummysite.com"); + ]]) + ],[ + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1" + HAVE_PROTO_BSDSOCKET_H="1" + AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use]) + AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1]) + ],[ + AC_MSG_RESULT([no]) + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl gethostbyname in the network lib - for Haiku OS + AC_CHECK_LIB(network, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="-lnetwork $LIBS" + ]) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl gethostbyname in the net lib - for BeOS + AC_CHECK_LIB(net, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="-lnet $LIBS" + ]) +fi + + +if test "$HAVE_GETHOSTBYNAME" != "1"; then + AC_MSG_ERROR([couldn't find libraries for gethostbyname()]) +fi + +CURL_CHECK_LIBS_CONNECT + +CURL_NETWORK_LIBS=$LIBS + +dnl ********************************************************************** +dnl In case that function clock_gettime with monotonic timer is available, +dnl check for additional required libraries. +dnl ********************************************************************** +CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC + +dnl ********************************************************************** +dnl The preceding library checks are all potentially useful for test +dnl servers and libtest cases which require networking and clock_gettime +dnl support. Save the list of required libraries at this point for use +dnl while linking those test servers and programs. +dnl ********************************************************************** +CURL_NETWORK_AND_TIME_LIBS=$LIBS + +dnl ********************************************************************** +dnl Check for the presence of ZLIB libraries and headers +dnl ********************************************************************** + +dnl Check for & handle argument to --with-zlib. + +clean_CPPFLAGS=$CPPFLAGS +clean_LDFLAGS=$LDFLAGS +clean_LIBS=$LIBS +ZLIB_LIBS="" +AC_ARG_WITH(zlib, +AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH]) +AC_HELP_STRING([--without-zlib],[disable use of zlib]), + [OPT_ZLIB="$withval"]) + +if test "$OPT_ZLIB" = "no" ; then + AC_MSG_WARN([zlib disabled]) +else + if test "$OPT_ZLIB" = "yes" ; then + OPT_ZLIB="" + fi + + if test -z "$OPT_ZLIB" ; then + CURL_CHECK_PKGCONFIG(zlib) + + if test "$PKGCONFIG" != "no" ; then + LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS" + LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`" + CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags-only-I zlib`" + OPT_ZLIB="" + HAVE_LIBZ="1" + fi + + if test -z "$HAVE_LIBZ"; then + + dnl Check for the lib without setting any new path, since many + dnl people have it in the default path + + AC_CHECK_LIB(z, inflateEnd, + dnl libz found, set the variable + [HAVE_LIBZ="1" + LIBS="-lz $LIBS"], + dnl if no lib found, try /usr/local + [OPT_ZLIB="/usr/local"]) + fi + fi + + dnl Add a nonempty path to the compiler flags + if test -n "$OPT_ZLIB"; then + CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" + LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" + fi + + AC_CHECK_HEADER(zlib.h, + [ + dnl zlib.h was found + HAVE_ZLIB_H="1" + dnl if the lib wasn't found already, try again with the new paths + if test "$HAVE_LIBZ" != "1"; then + AC_CHECK_LIB(z, gzread, + [ + dnl the lib was found! + HAVE_LIBZ="1" + LIBS="-lz $LIBS" + ], + [ CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS]) + fi + ], + [ + dnl zlib.h was not found, restore the flags + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS] + ) + + if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" + then + AC_MSG_WARN([configure found only the libz lib, not the header file!]) + HAVE_LIBZ="" + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + LIBS=$clean_LIBS + elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" + then + AC_MSG_WARN([configure found only the libz header file, not the lib!]) + CPPFLAGS=$clean_CPPFLAGS + LDFLAGS=$clean_LDFLAGS + LIBS=$clean_LIBS + elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" + then + dnl both header and lib were found! + AC_SUBST(HAVE_LIBZ) + AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file]) + AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available]) + + ZLIB_LIBS="-lz" + LIBS="-lz $clean_LIBS" + + dnl replace 'HAVE_LIBZ' in the automake makefile.ams + AMFIXLIB="1" + AC_MSG_NOTICE([found both libz and libz.h header]) + curl_zlib_msg="enabled" + fi +fi + +dnl set variable for use in automakefile(s) +AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1) +AC_SUBST(ZLIB_LIBS) + +dnl ********************************************************************** +dnl Check for the presence of BROTLI decoder libraries and headers +dnl ********************************************************************** + +dnl Brotli project home page: https://github.com/google/brotli + +dnl Default to compiler & linker defaults for BROTLI files & libraries. +OPT_BROTLI=off +AC_ARG_WITH(brotli,dnl +AC_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--without-brotli], [disable BROTLI]), + OPT_BROTLI=$withval) + +if test X"$OPT_BROTLI" != Xno; then + dnl backup the pre-brotli variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_BROTLI" in + yes) + dnl --with-brotli (without path) used + CURL_CHECK_PKGCONFIG(libbrotlidec) + + if test "$PKGCONFIG" != "no" ; then + LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec` + LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec` + CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec` + version=`$PKGCONFIG --modversion libbrotlidec` + DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'` + fi + + ;; + off) + dnl no --with-brotli option given, just check default places + ;; + *) + dnl use the given --with-brotli spot + PREFIX_BROTLI=$OPT_BROTLI + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_BROTLI"; then + LIB_BROTLI="-lbrotlidec" + LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff + CPP_BROTLI=-I${PREFIX_BROTLI}/include + DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_BROTLI" + CPPFLAGS="$CPPFLAGS $CPP_BROTLI" + LIBS="$LIB_BROTLI $LIBS" + + AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress) + + AC_CHECK_HEADERS(brotli/decode.h, + curl_brotli_msg="enabled (libbrotlidec)" + HAVE_BROTLI=1 + AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use]) + AC_SUBST(HAVE_BROTLI, [1]) + ) + + if test X"$OPT_BROTLI" != Xoff && + test "$HAVE_BROTLI" != "1"; then + AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!]) + fi + + if test "$HAVE_BROTLI" = "1"; then + if test -n "$DIR_BROTLI"; then + dnl when the brotli shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH + dnl to prevent further configure tests to fail due to this + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH]) + fi + fi + else + dnl no brotli, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +fi + +dnl ********************************************************************** +dnl Check for libzstd +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for libzstd +OPT_ZSTD=off +AC_ARG_WITH(zstd,dnl +AC_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--without-zstd], [disable libzstd]), + OPT_ZSTD=$withval) + +if test X"$OPT_ZSTD" != Xno; then + dnl backup the pre-zstd variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_ZSTD" in + yes) + dnl --with-zstd (without path) used + CURL_CHECK_PKGCONFIG(libzstd) + + if test "$PKGCONFIG" != "no" ; then + LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd` + LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd` + CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd` + version=`$PKGCONFIG --modversion libzstd` + DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'` + fi + + ;; + off) + dnl no --with-zstd option given, just check default places + ;; + *) + dnl use the given --with-zstd spot + PREFIX_ZSTD=$OPT_ZSTD + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_ZSTD"; then + LIB_ZSTD="-lzstd" + LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff + CPP_ZSTD=-I${PREFIX_ZSTD}/include + DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_ZSTD" + CPPFLAGS="$CPPFLAGS $CPP_ZSTD" + LIBS="$LIB_ZSTD $LIBS" + + AC_CHECK_LIB(zstd, ZSTD_createDStream) + + AC_CHECK_HEADERS(zstd.h, + curl_zstd_msg="enabled (libzstd)" + HAVE_ZSTD=1 + AC_DEFINE(HAVE_ZSTD, 1, [if libzstd is in use]) + AC_SUBST(HAVE_ZSTD, [1]) + ) + + if test X"$OPT_ZSTD" != Xoff && + test "$HAVE_ZSTD" != "1"; then + AC_MSG_ERROR([libzstd was not found where specified!]) + fi + + if test "$HAVE_ZSTD" = "1"; then + if test -n "$DIR_ZSTD"; then + dnl when the zstd shared lib were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl CURL_LIBRARY_PATH to prevent further configure tests to fail due to + dnl this + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH]) + fi + fi + else + dnl no zstd, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +fi + +dnl ********************************************************************** +dnl Check for LDAP +dnl ********************************************************************** + +LDAPLIBNAME="" +AC_ARG_WITH(ldap-lib, +AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]), + [LDAPLIBNAME="$withval"]) + +LBERLIBNAME="" +AC_ARG_WITH(lber-lib, +AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]), + [LBERLIBNAME="$withval"]) + +if test x$CURL_DISABLE_LDAP != x1 ; then + + CURL_CHECK_HEADER_LBER + CURL_CHECK_HEADER_LDAP + CURL_CHECK_HEADER_LDAPSSL + CURL_CHECK_HEADER_LDAP_SSL + + if test -z "$LDAPLIBNAME" ; then + if test "$curl_cv_native_windows" = "yes"; then + dnl Windows uses a single and unique LDAP library name + LDAPLIBNAME="wldap32" + LBERLIBNAME="no" + fi + fi + + if test "$LDAPLIBNAME" ; then + AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [ + AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled]) + AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) + AC_SUBST(CURL_DISABLE_LDAP, [1]) + AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) + AC_SUBST(CURL_DISABLE_LDAPS, [1])]) + else + dnl Try to find the right ldap libraries for this system + CURL_CHECK_LIBS_LDAP + case X-"$curl_cv_ldap_LIBS" in + X-unknown) + AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled]) + AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) + AC_SUBST(CURL_DISABLE_LDAP, [1]) + AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) + AC_SUBST(CURL_DISABLE_LDAPS, [1]) + ;; + esac + fi +fi + +if test x$CURL_DISABLE_LDAP != x1 ; then + + if test "$LBERLIBNAME" ; then + dnl If name is "no" then don't define this library at all + dnl (it's only needed if libldap.so's dependencies are broken). + if test "$LBERLIBNAME" != "no" ; then + AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [ + AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled]) + AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) + AC_SUBST(CURL_DISABLE_LDAP, [1]) + AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) + AC_SUBST(CURL_DISABLE_LDAPS, [1])]) + fi + fi +fi + +if test x$CURL_DISABLE_LDAP != x1 ; then + AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd]) + + if test "$LDAPLIBNAME" = "wldap32"; then + curl_ldap_msg="enabled (winldap)" + AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation]) + else + curl_ldap_msg="enabled (OpenLDAP)" + if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then + AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code]) + AC_SUBST(USE_OPENLDAP, [1]) + fi + fi +fi + +if test x$CURL_DISABLE_LDAPS != x1 ; then + curl_ldaps_msg="enabled" +fi + +dnl ********************************************************************** +dnl Checks for IPv6 +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to enable IPv6]) +AC_ARG_ENABLE(ipv6, +AC_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support]) +AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ipv6=no + ;; + *) AC_MSG_RESULT(yes) + ipv6=yes + ;; + esac ], + + AC_TRY_RUN([ /* are AF_INET6 and sockaddr_in6 available? */ +#include +#ifdef HAVE_WINSOCK2_H +#include +#include +#else +#include +#include +#if defined (__TANDEM) +# include +#endif +#endif +#include /* for exit() */ +main() +{ + struct sockaddr_in6 s; + (void)s; + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} +], + AC_MSG_RESULT(yes) + ipv6=yes, + AC_MSG_RESULT(no) + ipv6=no, + AC_MSG_RESULT(yes) + ipv6=yes +)) + +if test "$ipv6" = yes; then + curl_ipv6_msg="enabled" + AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support]) + IPV6_ENABLED=1 + AC_SUBST(IPV6_ENABLED) + + AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member]) + AC_TRY_COMPILE([ +#include +#ifdef HAVE_WINSOCK2_H +#include +#include +#else +#include +#if defined (__TANDEM) +# include +#endif +#endif] , + struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes) + if test "$have_sin6_scope_id" = yes; then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member]) + else + AC_MSG_RESULT([no]) + fi +fi + +dnl ********************************************************************** +dnl Check if the operating system allows programs to write to their own argv[] +dnl ********************************************************************** + +AC_MSG_CHECKING([if argv can be written to]) +CURL_RUN_IFELSE([[ +int main(int argc, char **argv) +{ + (void)argc; + argv[0][0] = ' '; + return (argv[0][0] == ' ')?0:1; +} +]],[ + curl_cv_writable_argv=yes +],[ + curl_cv_writable_argv=no +],[ + curl_cv_writable_argv=cross +]) +case $curl_cv_writable_argv in +yes) + AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) + AC_MSG_RESULT(yes) + ;; +no) + AC_MSG_RESULT(no) + ;; +*) + AC_MSG_RESULT(no) + AC_MSG_WARN([the previous check could not be made default was used]) + ;; +esac + +dnl ********************************************************************** +dnl Check for GSS-API libraries +dnl ********************************************************************** + +dnl check for GSS-API stuff in the /usr as default + +GSSAPI_ROOT="/usr" +AC_ARG_WITH(gssapi-includes, + AC_HELP_STRING([--with-gssapi-includes=DIR], + [Specify location of GSS-API headers]), + [ GSSAPI_INCS="-I$withval" + want_gss="yes" ] +) + +AC_ARG_WITH(gssapi-libs, + AC_HELP_STRING([--with-gssapi-libs=DIR], + [Specify location of GSS-API libs]), + [ GSSAPI_LIB_DIR="-L$withval" + want_gss="yes" ] +) + +AC_ARG_WITH(gssapi, + AC_HELP_STRING([--with-gssapi=DIR], + [Where to look for GSS-API]), [ + GSSAPI_ROOT="$withval" + if test x"$GSSAPI_ROOT" != xno; then + want_gss="yes" + if test x"$GSSAPI_ROOT" = xyes; then + dnl if yes, then use default root + GSSAPI_ROOT="/usr" + fi + fi +]) + +: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} + +save_CPPFLAGS="$CPPFLAGS" +AC_MSG_CHECKING([if GSS-API support is requested]) +if test x"$want_gss" = xyes; then + AC_MSG_RESULT(yes) + + if test -z "$GSSAPI_INCS"; then + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` + elif test -f "$KRB5CONFIG"; then + GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` + elif test "$GSSAPI_ROOT" != "yes"; then + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi + fi + + CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" + + AC_CHECK_HEADER(gss.h, + [ + dnl found in the given dirs + AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS]) + gnu_gss=yes + ], + [ + dnl not found, check Heimdal or MIT + AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1]) + AC_CHECK_HEADERS( + [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h], + [], + [not_mit=1], + [ +AC_INCLUDES_DEFAULT +#ifdef HAVE_GSSAPI_GSSAPI_H +#include +#endif + ]) + if test "x$not_mit" = "x1"; then + dnl MIT not found, check for Heimdal + AC_CHECK_HEADER(gssapi.h, + [ + dnl found + AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have Heimdal]) + ], + [ + dnl no header found, disabling GSS + want_gss=no + AC_MSG_WARN(disabling GSS-API support since no header files were found) + ] + ) + else + dnl MIT found + AC_DEFINE(HAVE_GSSMIT, 1, [if you have MIT Kerberos]) + dnl check if we have a really old MIT Kerberos version (<= 1.2) + AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include +#include +#include + ]],[[ + gss_import_name( + (OM_uint32 *)0, + (gss_buffer_t)0, + GSS_C_NT_HOSTBASED_SERVICE, + (gss_name_t *)0); + ]]) + ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_DEFINE(HAVE_OLD_GSSMIT, 1, + [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE]) + ]) + fi + ] + ) +else + AC_MSG_RESULT(no) +fi +if test x"$want_gss" = xyes; then + AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries]) + HAVE_GSSAPI=1 + curl_gss_msg="enabled (MIT Kerberos/Heimdal)" + + if test -n "$gnu_gss"; then + curl_gss_msg="enabled (GNU GSS)" + LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" + LIBS="-lgss $LIBS" + elif test -z "$GSSAPI_LIB_DIR"; then + case $host in + *-*-darwin*) + LIBS="-lgssapi_krb5 -lresolv $LIBS" + ;; + *) + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + dnl krb5-config doesn't have --libs-only-L or similar, put everything + dnl into LIBS + gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi` + LIBS="$gss_libs $LIBS" + elif test -f "$KRB5CONFIG"; then + dnl krb5-config doesn't have --libs-only-L or similar, put everything + dnl into LIBS + gss_libs=`$KRB5CONFIG --libs gssapi` + LIBS="$gss_libs $LIBS" + else + case $host in + *-hp-hpux*) + gss_libname="gss" + ;; + *) + gss_libname="gssapi" + ;; + esac + + if test "$GSSAPI_ROOT" != "yes"; then + LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" + LIBS="-l$gss_libname $LIBS" + else + LIBS="-l$gss_libname $LIBS" + fi + fi + ;; + esac + else + LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" + case $host in + *-hp-hpux*) + LIBS="-lgss $LIBS" + ;; + *) + LIBS="-lgssapi $LIBS" + ;; + esac + fi +else + CPPFLAGS="$save_CPPFLAGS" +fi + +build_libstubgss=no +if test x"$want_gss" = "xyes"; then + build_libstubgss=yes +fi + +AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes") + +dnl ------------------------------------------------------------- +dnl parse --with-default-ssl-backend so it can be validated below +dnl ------------------------------------------------------------- + +DEFAULT_SSL_BACKEND=no +VALID_DEFAULT_SSL_BACKEND= +AC_ARG_WITH(default-ssl-backend, +AC_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend]) +AC_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]), + [DEFAULT_SSL_BACKEND=$withval]) +case "$DEFAULT_SSL_BACKEND" in + no) + dnl --without-default-ssl-backend option used + ;; + default|yes) + dnl --with-default-ssl-backend option used without name + AC_MSG_ERROR([The name of the default SSL backend is required.]) + ;; + *) + dnl --with-default-ssl-backend option used with name + AC_SUBST(DEFAULT_SSL_BACKEND) + dnl needs to be validated below + VALID_DEFAULT_SSL_BACKEND=no + ;; +esac + +dnl ********************************************************************** + +dnl ------------------------------------------------- +dnl check winssl option before other SSL libraries +dnl ------------------------------------------------- + +OPT_SCHANNEL=no +AC_ARG_WITH(winssl,dnl +AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS]) +AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]), + OPT_SCHANNEL=$withval) + +AC_ARG_WITH(schannel,dnl +AC_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]) +AC_HELP_STRING([--without-schannel], [disable Windows native SSL/TLS]), + OPT_SCHANNEL=$withval) + +AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)]) +if test -z "$ssl_backends" -o "x$OPT_SCHANNEL" != xno; then + ssl_msg= + if test "x$OPT_SCHANNEL" != "xno" && + test "x$curl_cv_native_windows" = "xyes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support]) + AC_SUBST(USE_SCHANNEL, [1]) + ssl_msg="Windows-native" + test schannel != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + SCHANNEL_ENABLED=1 + # --with-schannel implies --enable-sspi + AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) + AC_SUBST(USE_WINDOWS_SSPI, [1]) + curl_sspi_msg="enabled" + LIBS="-lcrypt32 $LIBS" + else + AC_MSG_RESULT(no) + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +else + AC_MSG_RESULT(no) +fi + +OPT_SECURETRANSPORT=no +AC_ARG_WITH(darwinssl,dnl +AC_HELP_STRING([--with-darwinssl],[enable Apple OS native SSL/TLS]) +AC_HELP_STRING([--without-darwinssl], [disable Apple OS native SSL/TLS]), + OPT_SECURETRANSPORT=$withval) + +AC_ARG_WITH(secure-transport,dnl +AC_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]) +AC_HELP_STRING([--without-secure-transport], [disable Apple OS native SSL/TLS]), + OPT_SECURETRANSPORT=$withval) + +AC_MSG_CHECKING([whether to enable Secure Transport]) +if test -z "$ssl_backends" -o "x$OPT_SECURETRANSPORT" != xno; then + if test "x$OPT_SECURETRANSPORT" != "xno" && + (test "x$cross_compiling" != "xno" || test -d "/System/Library/Frameworks/Security.framework"); then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_SECTRANSP, 1, [enable Secure Transport]) + AC_SUBST(USE_SECTRANSP, [1]) + ssl_msg="Secure Transport" + test secure-transport != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + SECURETRANSPORT_ENABLED=1 + LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security" + else + AC_MSG_RESULT(no) + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +else + AC_MSG_RESULT(no) +fi + +OPT_AMISSL=no +AC_ARG_WITH(amissl,dnl +AC_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]) +AC_HELP_STRING([--without-amissl], [disable Amiga native SSL/TLS (AmiSSL)]), + OPT_AMISSL=$withval) + +AC_MSG_CHECKING([whether to enable Amiga native SSL/TLS (AmiSSL)]) +if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then + if test -z "$ssl_backends" -o "x$OPT_AMISSL" != xno; then + ssl_msg= + if test "x$OPT_AMISSL" != "xno"; then + AC_MSG_RESULT(yes) + ssl_msg="AmiSSL" + test amissl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + AMISSL_ENABLED=1 + LIBS="-lamisslauto $LIBS" + AC_DEFINE(USE_AMISSL, 1, [if AmiSSL is in use]) + AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]) + else + AC_MSG_RESULT(no) + fi + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" + else + AC_MSG_RESULT(no) + fi +else + AC_MSG_RESULT(no) +fi + +dnl ********************************************************************** +dnl Check for the presence of SSL libraries and headers +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for SSL files & libraries. +OPT_SSL=off +dnl Default to no CA bundle +ca="no" +AC_ARG_WITH(ssl,dnl +AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--without-ssl], [disable OpenSSL]), + OPT_SSL=$withval) + +if test -z "$ssl_backends" -o "x$OPT_SSL" != xno && + test X"$OPT_SSL" != Xno; then + ssl_msg= + + dnl backup the pre-ssl variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + dnl This is for Msys/Mingw + case $host in + *-*-msys* | *-*-mingw*) + AC_MSG_CHECKING([for gdi32]) + my_ac_save_LIBS=$LIBS + LIBS="-lgdi32 $LIBS" + AC_TRY_LINK([#include + #include ], + [GdiFlush();], + [ dnl worked! + AC_MSG_RESULT([yes])], + [ dnl failed, restore LIBS + LIBS=$my_ac_save_LIBS + AC_MSG_RESULT(no)] + ) + ;; + esac + + case "$OPT_SSL" in + yes) + dnl --with-ssl (without path) used + if test x$cross_compiling != xyes; then + dnl only do pkg-config magic when not cross-compiling + PKGTEST="yes" + fi + PREFIX_OPENSSL=/usr/local/ssl + LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" + ;; + off) + dnl no --with-ssl option given, just check default places + if test x$cross_compiling != xyes; then + dnl only do pkg-config magic when not cross-compiling + PKGTEST="yes" + fi + PREFIX_OPENSSL= + ;; + *) + dnl check the given --with-ssl spot + PKGTEST="no" + PREFIX_OPENSSL=$OPT_SSL + + dnl Try pkg-config even when cross-compiling. Since we + dnl specify PKG_CONFIG_LIBDIR we're only looking where + dnl the user told us to look + OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig" + if test -f "$OPENSSL_PCDIR/openssl.pc"; then + AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"]) + PKGTEST="yes" + elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then + AC_MSG_ERROR([$PREFIX_OPENSSL is a bad --with-ssl prefix!]) + fi + + dnl in case pkg-config comes up empty, use what we got + dnl via --with-ssl + LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" + if test "$PREFIX_OPENSSL" != "/usr" ; then + SSL_LDFLAGS="-L$LIB_OPENSSL" + SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include" + fi + SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl" + ;; + esac + + if test "$PKGTEST" = "yes"; then + + CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR]) + + if test "$PKGCONFIG" != "no" ; then + SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl + $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null` + + SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl + $PKGCONFIG --libs-only-L openssl 2>/dev/null` + + SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl + $PKGCONFIG --cflags-only-I openssl 2>/dev/null` + + AC_SUBST(SSL_LIBS) + AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"]) + AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"]) + AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"]) + + LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/^-L//'` + + dnl use the values pkg-config reported. This is here + dnl instead of below with CPPFLAGS and LDFLAGS because we only + dnl learn about this via pkg-config. If we only have + dnl the argument to --with-ssl we don't know what + dnl additional libs may be necessary. Hope that we + dnl don't need any. + LIBS="$SSL_LIBS $LIBS" + fi + fi + + dnl finally, set flags to use SSL + CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" + LDFLAGS="$LDFLAGS $SSL_LDFLAGS" + + AC_CHECK_LIB(crypto, HMAC_Update,[ + HAVECRYPTO="yes" + LIBS="-lcrypto $LIBS" + ],[ + LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" + if test "$PKGCONFIG" = "no" ; then + # only set this if pkg-config wasn't used + CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" + fi + # Linking previously failed, try extra paths from --with-ssl or pkg-config. + # Use a different function name to avoid reusing the earlier cached result. + AC_CHECK_LIB(crypto, HMAC_Init_ex,[ + HAVECRYPTO="yes" + LIBS="-lcrypto $LIBS"], [ + + dnl still no, but what about with -ldl? + AC_MSG_CHECKING([OpenSSL linking with -ldl]) + LIBS="$CLEANLIBS -lcrypto -ldl" + AC_TRY_LINK( + [ + #include + ], + [ + ERR_clear_error(); + ], + [ + AC_MSG_RESULT(yes) + HAVECRYPTO="yes" + ], + [ + AC_MSG_RESULT(no) + dnl ok, so what about both -ldl and -lpthread? + dnl This may be necessary for static libraries. + + AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread]) + LIBS="$CLEANLIBS -lcrypto -ldl -lpthread" + AC_TRY_LINK( + [ + #include + ], + [ + ERR_clear_error(); + ], + [ + AC_MSG_RESULT(yes) + HAVECRYPTO="yes" + ], + [ + AC_MSG_RESULT(no) + LDFLAGS="$CLEANLDFLAGS" + CPPFLAGS="$CLEANCPPFLAGS" + LIBS="$CLEANLIBS" + + ]) + + ]) + + ]) + ]) + + if test X"$HAVECRYPTO" = X"yes"; then + dnl This is only reasonable to do if crypto actually is there: check for + dnl SSL libs NOTE: it is important to do this AFTER the crypto lib + + AC_CHECK_LIB(ssl, SSL_connect) + + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff + AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use); + OLIBS=$LIBS + LIBS="-lRSAglue -lrsaref $LIBS" + AC_CHECK_LIB(ssl, SSL_connect) + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + dnl still no SSL_connect + AC_MSG_RESULT(no) + LIBS=$OLIBS + else + AC_MSG_RESULT(yes) + fi + + else + + dnl Have the libraries--check for OpenSSL headers + AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ + openssl/pem.h openssl/ssl.h openssl/err.h, + ssl_msg="OpenSSL" + test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + OPENSSL_ENABLED=1 + AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])) + + if test $ac_cv_header_openssl_x509_h = no; then + dnl we don't use the "action" part of the AC_CHECK_HEADERS macro + dnl since 'err.h' might in fact find a krb4 header with the same + dnl name + AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h) + + if test $ac_cv_header_x509_h = yes && + test $ac_cv_header_crypto_h = yes && + test $ac_cv_header_ssl_h = yes; then + dnl three matches + ssl_msg="OpenSSL" + OPENSSL_ENABLED=1 + fi + fi + fi + + if test X"$OPENSSL_ENABLED" != X"1"; then + LIBS="$CLEANLIBS" + fi + + if test X"$OPT_SSL" != Xoff && + test "$OPENSSL_ENABLED" != "1"; then + AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!]) + fi + fi + + if test X"$OPENSSL_ENABLED" = X"1"; then + dnl These can only exist if OpenSSL exists + dnl OpenSSL_version is introduced in 3.0.0 + + AC_CHECK_FUNCS( RAND_egd \ + SSLv2_client_method \ + OpenSSL_version ) + + AC_MSG_CHECKING([for BoringSSL]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + #include + ]],[[ + #ifndef OPENSSL_IS_BORINGSSL + #error not boringssl + #endif + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1, + [Define to 1 if using BoringSSL.]) + ssl_msg="BoringSSL" + ],[ + AC_MSG_RESULT([no]) + ]) + + AC_MSG_CHECKING([for libressl]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + int dummy = LIBRESSL_VERSION_NUMBER; + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1, + [Define to 1 if using libressl.]) + ssl_msg="libressl" + ],[ + AC_MSG_RESULT([no]) + ]) + + AC_MSG_CHECKING([for OpenSSL >= v3]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#include + ]],[[ + #if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) + return 0; + #else + #error older than 3 + #endif + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE_UNQUOTED(HAVE_OPENSSL3, 1, + [Define to 1 if using OpenSSL 3 or later.]) + dnl OpenSSLv3 marks the DES functions deprecated but we have no + dnl replacements (yet) so tell the compiler to not warn for them + dnl + dnl Ask OpenSSL to suppress the warnings. + CPPFLAGS="$CPPFLAGS -DOPENSSL_SUPPRESS_DEPRECATED" + ssl_msg="OpenSSL v3+" + ],[ + AC_MSG_RESULT([no]) + ]) + fi + + if test "$OPENSSL_ENABLED" = "1"; then + if test -n "$LIB_OPENSSL"; then + dnl when the ssl shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH + dnl to prevent further configure tests to fail due to this + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH]) + fi + fi + CURL_CHECK_OPENSSL_API + check_for_ca_bundle=1 + fi + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +if test X"$OPT_SSL" != Xoff && + test X"$OPT_SSL" != Xno && + test "$OPENSSL_ENABLED" != "1"; then + AC_MSG_NOTICE([OPT_SSL: $OPT_SSL]) + AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED]) + AC_MSG_ERROR([--with-ssl was given but OpenSSL could not be detected]) +fi + +dnl ********************************************************************** +dnl Check for the random seed preferences +dnl ********************************************************************** + +if test X"$OPENSSL_ENABLED" = X"1"; then + AC_ARG_WITH(egd-socket, + AC_HELP_STRING([--with-egd-socket=FILE], + [Entropy Gathering Daemon socket pathname]), + [ EGD_SOCKET="$withval" ] + ) + if test -n "$EGD_SOCKET" ; then + AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET", + [your Entropy Gathering Daemon socket pathname] ) + fi + + dnl Check for user-specified random device + AC_ARG_WITH(random, + AC_HELP_STRING([--with-random=FILE], + [read randomness from FILE (default=/dev/urandom)]), + [ RANDOM_FILE="$withval" ], + [ + if test x$cross_compiling != xyes; then + dnl Check for random device + AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] ) + else + AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling]) + fi + ] + ) + if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then + AC_SUBST(RANDOM_FILE) + AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE", + [a suitable file to read random data from]) + fi +fi + +dnl --- +dnl We require OpenSSL with SRP support. +dnl --- +if test "$OPENSSL_ENABLED" = "1"; then + AC_CHECK_LIB(crypto, SRP_Calc_client_key, + [ + AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key]) + AC_SUBST(HAVE_OPENSSL_SRP, [1]) + ]) +fi + +dnl --- +dnl Whether the OpenSSL configuration will be loaded automatically +dnl --- +if test X"$OPENSSL_ENABLED" = X"1"; then +AC_ARG_ENABLE(openssl-auto-load-config, +AC_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration]) +AC_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]), +[ if test X"$enableval" = X"no"; then + AC_MSG_NOTICE([automatic loading of OpenSSL configuration disabled]) + AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration won't be loaded automatically]) + fi +]) +fi + +dnl ---------------------------------------------------- +dnl check for GnuTLS +dnl ---------------------------------------------------- + +dnl Default to compiler & linker defaults for GnuTLS files & libraries. +OPT_GNUTLS=no + +AC_ARG_WITH(gnutls,dnl +AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]) +AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]), + OPT_GNUTLS=$withval) + +if test -z "$ssl_backends" -o "x$OPT_GNUTLS" != xno; then + ssl_msg= + + if test X"$OPT_GNUTLS" != Xno; then + + addld="" + addlib="" + gtlslib="" + version="" + addcflags="" + + if test "x$OPT_GNUTLS" = "xyes"; then + dnl this is with no partiular path given + CURL_CHECK_PKGCONFIG(gnutls) + + if test "$PKGCONFIG" != "no" ; then + addlib=`$PKGCONFIG --libs-only-l gnutls` + addld=`$PKGCONFIG --libs-only-L gnutls` + addcflags=`$PKGCONFIG --cflags-only-I gnutls` + version=`$PKGCONFIG --modversion gnutls` + gtlslib=`echo $addld | $SED -e 's/^-L//'` + else + dnl without pkg-config, we try libgnutls-config as that was how it + dnl used to be done + check=`libgnutls-config --version 2>/dev/null` + if test -n "$check"; then + addlib=`libgnutls-config --libs` + addcflags=`libgnutls-config --cflags` + version=`libgnutls-config --version` + gtlslib=`libgnutls-config --prefix`/lib$libsuff + fi + fi + else + dnl this is with a given path, first check if there's a libgnutls-config + dnl there and if not, make an educated guess + cfg=$OPT_GNUTLS/bin/libgnutls-config + check=`$cfg --version 2>/dev/null` + if test -n "$check"; then + addlib=`$cfg --libs` + addcflags=`$cfg --cflags` + version=`$cfg --version` + gtlslib=`$cfg --prefix`/lib$libsuff + else + dnl without pkg-config and libgnutls-config, we guess a lot! + addlib=-lgnutls + addld=-L$OPT_GNUTLS/lib$libsuff + addcflags=-I$OPT_GNUTLS/include + version="" # we just don't know + gtlslib=$OPT_GNUTLS/lib$libsuff + fi + fi + + if test -z "$version"; then + dnl lots of efforts, still no go + version="unknown" + fi + + if test -n "$addlib"; then + + CLEANLIBS="$LIBS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLDFLAGS="$LDFLAGS" + + LIBS="$addlib $LIBS" + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + dnl this function is selected since it was introduced in 3.1.10 + AC_CHECK_LIB(gnutls, gnutls_x509_crt_get_dn2, + [ + AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled]) + AC_SUBST(USE_GNUTLS, [1]) + GNUTLS_ENABLED=1 + USE_GNUTLS="yes" + ssl_msg="GnuTLS" + test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], + [ + LIBS="$CLEANLIBS" + CPPFLAGS="$CLEANCPPFLAGS" + ]) + + if test "x$USE_GNUTLS" = "xyes"; then + AC_MSG_NOTICE([detected GnuTLS version $version]) + check_for_ca_bundle=1 + if test -n "$gtlslib"; then + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl CURL_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH]) + fi + fi + fi + + fi + + fi dnl GNUTLS not disabled + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +dnl --- +dnl Check which crypto backend GnuTLS uses +dnl --- + +if test "$GNUTLS_ENABLED" = "1"; then + USE_GNUTLS_NETTLE= + # First check if we can detect either crypto library via transitive linking + AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ]) + if test "$USE_GNUTLS_NETTLE" = ""; then + AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ]) + fi + # If not, try linking directly to both of them to see if they are available + if test "$USE_GNUTLS_NETTLE" = ""; then + AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ]) + fi + if test "$USE_GNUTLS_NETTLE" = ""; then + AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ]) + fi + if test "$USE_GNUTLS_NETTLE" = ""; then + AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found]) + fi + if test "$USE_GNUTLS_NETTLE" = "1"; then + AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend]) + AC_SUBST(USE_GNUTLS_NETTLE, [1]) + LIBS="-lnettle $LIBS" + else + LIBS="-lgcrypt $LIBS" + fi +fi + +dnl --- +dnl We require GnuTLS with SRP support. +dnl --- +if test "$GNUTLS_ENABLED" = "1"; then + AC_CHECK_LIB(gnutls, gnutls_srp_verifier, + [ + AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier]) + AC_SUBST(HAVE_GNUTLS_SRP, [1]) + ]) +fi + +dnl ---------------------------------------------------- +dnl check for mbedTLS +dnl ---------------------------------------------------- + +OPT_MBEDTLS=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS +AC_ARG_WITH(mbedtls,dnl +AC_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]) +AC_HELP_STRING([--without-mbedtls], [disable mbedTLS detection]), + OPT_MBEDTLS=$withval) + +if test -z "$ssl_backends" -o "x$OPT_MBEDTLS" != xno; then + ssl_msg= + + if test X"$OPT_MBEDTLS" != Xno; then + + if test "$OPT_MBEDTLS" = "yes"; then + OPT_MBEDTLS="" + fi + + if test -z "$OPT_MBEDTLS" ; then + dnl check for lib first without setting any new path + + AC_CHECK_LIB(mbedtls, mbedtls_havege_init, + dnl libmbedtls found, set the variable + [ + AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled]) + AC_SUBST(USE_MBEDTLS, [1]) + MBEDTLS_ENABLED=1 + USE_MBEDTLS="yes" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], [], -lmbedx509 -lmbedcrypto) + fi + + addld="" + addlib="" + addcflags="" + mbedtlslib="" + + if test "x$USE_MBEDTLS" != "xyes"; then + dnl add the path and test again + addld=-L$OPT_MBEDTLS/lib$libsuff + addcflags=-I$OPT_MBEDTLS/include + mbedtlslib=$OPT_MBEDTLS/lib$libsuff + + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + AC_CHECK_LIB(mbedtls, mbedtls_ssl_init, + [ + AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled]) + AC_SUBST(USE_MBEDTLS, [1]) + MBEDTLS_ENABLED=1 + USE_MBEDTLS="yes" + ssl_msg="mbedTLS" + test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], + [ + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + ], -lmbedx509 -lmbedcrypto) + fi + + if test "x$USE_MBEDTLS" = "xyes"; then + AC_MSG_NOTICE([detected mbedTLS]) + check_for_ca_bundle=1 + + LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS" + + if test -n "$mbedtlslib"; then + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl CURL_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH]) + fi + fi + fi + + fi dnl mbedTLS not disabled + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +dnl ---------------------------------------------------- +dnl check for wolfSSL +dnl ---------------------------------------------------- + +dnl Default to compiler & linker defaults for wolfSSL files & libraries. +OPT_WOLFSSL=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS + +AC_ARG_WITH(wolfssl,dnl +AC_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]) +AC_HELP_STRING([--without-wolfssl], [disable WolfSSL detection]), + OPT_WOLFSSL=$withval) + +case "$OPT_WOLFSSL" in + yes|no) + wolfpkg="" + ;; + *) + wolfpkg="$withval/lib/pkgconfig" + ;; +esac + +if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then + ssl_msg= + + if test X"$OPT_WOLFSSL" != Xno; then + + if test "$OPT_WOLFSSL" = "yes"; then + OPT_WOLFSSL="" + fi + + dnl try pkg-config magic + CURL_CHECK_PKGCONFIG(wolfssl, [$wolfpkg]) + AC_MSG_NOTICE([Check dir $wolfpkg]) + + addld="" + addlib="" + addcflags="" + if test "$PKGCONFIG" != "no" ; then + addlib=`CURL_EXPORT_PCDIR([$wolfpkg]) + $PKGCONFIG --libs-only-l wolfssl` + addld=`CURL_EXPORT_PCDIR([$wolfpkg]) + $PKGCONFIG --libs-only-L wolfssl` + addcflags=`CURL_EXPORT_PCDIR([$wolfpkg]) + $PKGCONFIG --cflags-only-I wolfssl` + version=`CURL_EXPORT_PCDIR([$wolfpkg]) + $PKGCONFIG --modversion wolfssl` + wolfssllibpath=`echo $addld | $SED -e 's/^-L//'` + else + addlib=-lwolfssl + dnl use system defaults if user does not supply a path + if test -n "$OPT_WOLFSSL"; then + addld=-L$OPT_WOLFSSL/lib$libsuff + addcflags=-I$OPT_WOLFSSL/include + wolfssllibpath=$OPT_WOLFSSL/lib$libsuff + fi + fi + + if test "x$USE_WOLFSSL" != "xyes"; then + + LDFLAGS="$LDFLAGS $addld" + AC_MSG_NOTICE([Add $addld to LDFLAGS]) + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + AC_MSG_NOTICE([Add $addcflags to CPPFLAGS]) + fi + + my_ac_save_LIBS="$LIBS" + LIBS="$addlib $LIBS" + AC_MSG_NOTICE([Add $addlib to LIBS]) + + AC_MSG_CHECKING([for wolfSSL_Init in -lwolfssl]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +/* These aren't needed for detection and confuse WolfSSL. + They are set up properly later if it is detected. */ +#undef SIZEOF_LONG +#undef SIZEOF_LONG_LONG +#include + ]],[[ + return wolfSSL_Init(); + ]]) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled]) + AC_SUBST(USE_WOLFSSL, [1]) + WOLFSSL_ENABLED=1 + USE_WOLFSSL="yes" + ssl_msg="WolfSSL" + test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], + [ + AC_MSG_RESULT(no) + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + wolfssllibpath="" + ]) + LIBS="$my_ac_save_LIBS" + fi + + if test "x$USE_WOLFSSL" = "xyes"; then + AC_MSG_NOTICE([detected wolfSSL]) + check_for_ca_bundle=1 + + dnl wolfssl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined! + AX_COMPILE_CHECK_SIZEOF(long long) + + LIBS="$addlib -lm $LIBS" + + dnl Recent WolfSSL versions build without SSLv3 by default + dnl WolfSSL needs configure --enable-opensslextra to have *get_peer* + dnl DES* is needed for NTLM support and lives in the OpenSSL compatibility + dnl layer + AC_CHECK_FUNCS(wolfSSLv3_client_method \ + wolfSSL_get_peer_certificate \ + wolfSSL_UseALPN ) + + dnl if this symbol is present, we want the include path to include the + dnl OpenSSL API root as well + AC_CHECK_FUNC(wolfSSL_DES_ecb_encrypt, + [ + AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1, + [if you have wolfSSL_DES_ecb_encrypt]) + if test -n "$addcflags"; then + dnl use a for loop to strip off whitespace + for f in $addcflags; do + CPPFLAGS="$f/wolfssl $CPPFLAGS" + AC_MSG_NOTICE([Add $f/wolfssl to CPPFLAGS]) + break + done + else + dnl user didn't give a path, so guess/hope they installed wolfssl + dnl headers to system default location + CPPFLAGS="-I$includedir/wolfssl $CPPFLAGS" + AC_MSG_NOTICE([Add $includedir/wolfssl to CPPFLAGS]) + fi + WOLFSSL_NTLM=1 + ] + ) + + if test -n "$wolfssllibpath"; then + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl CURL_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$wolfssllibpath" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH]) + fi + fi + + fi + + fi dnl wolfSSL not disabled + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +dnl ---------------------------------------------------- +dnl check for MesaLink +dnl ---------------------------------------------------- + +dnl Default to compiler & linker defaults for MesaLink files & libraries. +OPT_MESALINK=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS +AC_ARG_WITH(mesalink,dnl +AC_HELP_STRING([--with-mesalink=PATH],[where to look for MesaLink, PATH points to the installation root]) +AC_HELP_STRING([--without-mesalink], [disable MesaLink detection]), + OPT_MESALINK=$withval) + +if test -z "$ssl_backends" -o "x$OPT_MESALINK" != xno; then + ssl_msg= + + if test X"$OPT_MESALINK" != Xno; then + + if test "$OPT_MESALINK" = "yes"; then + OPT_MESALINK="" + fi + + if test -z "$OPT_MESALINK" ; then + dnl check for lib first without setting any new path + + AC_CHECK_LIB(mesalink, mesalink_library_init, + dnl libmesalink found, set the variable + [ + AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled]) + AC_SUBST(USE_MESALINK, [1]) + MESALINK_ENABLED=1 + USE_MESALINK="yes" + ssl_msg="MesaLink" + test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ]) + fi + + addld="" + addlib="" + addcflags="" + mesalinklib="" + + if test "x$USE_MESALINK" != "xyes"; then + dnl add the path and test again + addld=-L$OPT_MESALINK/lib$libsuff + addcflags=-I$OPT_MESALINK/include + mesalinklib=$OPT_MESALINK/lib$libsuff + + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + AC_CHECK_LIB(mesalink, mesalink_library_init, + [ + AC_DEFINE(USE_MESALINK, 1, [if MesaLink is enabled]) + AC_SUBST(USE_MESALINK, [1]) + MESALINK_ENABLED=1 + USE_MESALINK="yes" + ssl_msg="MesaLink" + test mesalink != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], + [ + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + ]) + fi + + if test "x$USE_MESALINK" = "xyes"; then + AC_MSG_NOTICE([detected MesaLink]) + + LIBS="-lmesalink $LIBS" + + if test -n "$mesalinklib"; then + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl LD_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + if test "x$cross_compiling" != "xyes"; then + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mesalinklib" + export LD_LIBRARY_PATH + AC_MSG_NOTICE([Added $mesalinklib to LD_LIBRARY_PATH]) + fi + fi + fi + + fi dnl MesaLink not disabled + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +dnl ---------------------------------------------------- +dnl check for BearSSL +dnl ---------------------------------------------------- + +OPT_BEARSSL=no + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS +AC_ARG_WITH(bearssl,dnl +AC_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]) +AC_HELP_STRING([--without-bearssl], [disable BearSSL detection]), + OPT_BEARSSL=$withval) + +if test -z "$ssl_backends" -o "x$OPT_BEARSSL" != xno; then + ssl_msg= + + if test X"$OPT_BEARSSL" != Xno; then + + if test "$OPT_BEARSSL" = "yes"; then + OPT_BEARSSL="" + fi + + if test -z "$OPT_BEARSSL" ; then + dnl check for lib first without setting any new path + + AC_CHECK_LIB(bearssl, br_ssl_client_init_full, + dnl libbearssl found, set the variable + [ + AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled]) + AC_SUBST(USE_BEARSSL, [1]) + BEARSSL_ENABLED=1 + USE_BEARSSL="yes" + ssl_msg="BearSSL" + test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], [], -lbearssl) + fi + + addld="" + addlib="" + addcflags="" + bearssllib="" + + if test "x$USE_BEARSSL" != "xyes"; then + dnl add the path and test again + addld=-L$OPT_BEARSSL/lib$libsuff + addcflags=-I$OPT_BEARSSL/include + bearssllib=$OPT_BEARSSL/lib$libsuff + + LDFLAGS="$LDFLAGS $addld" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + AC_CHECK_LIB(bearssl, br_ssl_client_init_full, + [ + AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled]) + AC_SUBST(USE_BEARSSL, [1]) + BEARSSL_ENABLED=1 + USE_BEARSSL="yes" + ssl_msg="BearSSL" + test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], + [ + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + ], -lbearssl) + fi + + if test "x$USE_BEARSSL" = "xyes"; then + AC_MSG_NOTICE([detected BearSSL]) + check_for_ca_bundle=1 + + LIBS="-lbearssl $LIBS" + + if test -n "$bearssllib"; then + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl CURL_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$bearssllib" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $bearssllib to CURL_LIBRARY_PATH]) + fi + fi + fi + + fi dnl BearSSL not disabled + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +dnl ---------------------------------------------------- +dnl NSS. Only check if GnuTLS and OpenSSL are not enabled +dnl ---------------------------------------------------- + +dnl Default to compiler & linker defaults for NSS files & libraries. +OPT_NSS=no + +AC_ARG_WITH(nss,dnl +AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root]) +AC_HELP_STRING([--without-nss], [disable NSS detection]), + OPT_NSS=$withval) + +if test -z "$ssl_backends" -o "x$OPT_NSS" != xno; then + ssl_msg= + + if test X"$OPT_NSS" != Xno; then + + addld="" + addlib="" + addcflags="" + nssprefix="" + version="" + + if test "x$OPT_NSS" = "xyes"; then + + CURL_CHECK_PKGCONFIG(nss) + + if test "$PKGCONFIG" != "no" ; then + addlib=`$PKGCONFIG --libs nss` + addcflags=`$PKGCONFIG --cflags nss` + version=`$PKGCONFIG --modversion nss` + nssprefix=`$PKGCONFIG --variable=prefix nss` + else + dnl Without pkg-config, we check for nss-config + + check=`nss-config --version 2>/dev/null` + if test -n "$check"; then + addlib=`nss-config --libs` + addcflags=`nss-config --cflags` + version=`nss-config --version` + nssprefix=`nss-config --prefix` + else + addlib="-lnss3" + addcflags="" + version="unknown" + fi + fi + else + NSS_PCDIR="$OPT_NSS/lib/pkgconfig" + if test -f "$NSS_PCDIR/nss.pc"; then + CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR]) + if test "$PKGCONFIG" != "no" ; then + addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss` + addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss` + addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss` + version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss` + nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss` + fi + fi + fi + + if test -z "$addlib"; then + # Without pkg-config, we'll kludge in some defaults + AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.]) + addld="-L$OPT_NSS/lib" + addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4" + addcflags="-I$OPT_NSS/include" + version="unknown" + nssprefix=$OPT_NSS + fi + + CLEANLDFLAGS="$LDFLAGS" + CLEANLIBS="$LIBS" + CLEANCPPFLAGS="$CPPFLAGS" + + LDFLAGS="$addld $LDFLAGS" + LIBS="$addlib $LIBS" + if test "$addcflags" != "-I/usr/include"; then + CPPFLAGS="$CPPFLAGS $addcflags" + fi + + dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0 + AC_CHECK_LIB(nss3, SSL_VersionRangeSet, + [ + AC_DEFINE(USE_NSS, 1, [if NSS is enabled]) + AC_SUBST(USE_NSS, [1]) + USE_NSS="yes" + NSS_ENABLED=1 + ssl_msg="NSS" + test nss != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes + ], + [ + LDFLAGS="$CLEANLDFLAGS" + LIBS="$CLEANLIBS" + CPPFLAGS="$CLEANCPPFLAGS" + ]) + + if test "x$USE_NSS" = "xyes"; then + AC_MSG_NOTICE([detected NSS version $version]) + + dnl PK11_CreateManagedGenericObject() was introduced in NSS 3.34 because + dnl PK11_DestroyGenericObject() does not release resources allocated by + dnl PK11_CreateGenericObject() early enough. + AC_CHECK_FUNC(PK11_CreateManagedGenericObject, + [ + AC_DEFINE(HAVE_PK11_CREATEMANAGEDGENERICOBJECT, 1, + [if you have the PK11_CreateManagedGenericObject function]) + ]) + + dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS + NSS_LIBS=$addlib + AC_SUBST([NSS_LIBS]) + + dnl when shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to + dnl CURL_LIBRARY_PATH to prevent further configure tests to fail + dnl due to this + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH]) + fi + + fi dnl NSS found + + fi dnl NSS not disabled + + test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" +fi + +case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$BEARSSL_ENABLED$AMISSL_ENABLED" in +x) + AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.]) + AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink, --with-amissl or --with-bearssl to address this.]) + ;; +x1) + # one SSL backend is enabled + AC_SUBST(SSL_ENABLED) + SSL_ENABLED="1" + AC_MSG_NOTICE([built with one SSL backend]) + ;; +*) + # more than one SSL backend is enabled + AC_SUBST(SSL_ENABLED) + SSL_ENABLED="1" + AC_SUBST(CURL_WITH_MULTI_SSL) + CURL_WITH_MULTI_SSL="1" + AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends]) + AC_MSG_NOTICE([built with multiple SSL backends]) + ;; +esac + +if test -n "$ssl_backends"; then + curl_ssl_msg="enabled ($ssl_backends)" +fi + +if test no = "$VALID_DEFAULT_SSL_BACKEND" +then + if test -n "$SSL_ENABLED" + then + AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!]) + else + AC_MSG_ERROR([Default SSL backend requires SSL!]) + fi +elif test yes = "$VALID_DEFAULT_SSL_BACKEND" +then + AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend]) +fi + +dnl ********************************************************************** +dnl Check for the CA bundle +dnl ********************************************************************** + +if test -n "$check_for_ca_bundle"; then + CURL_CHECK_CA_BUNDLE +fi + +dnl ********************************************************************** +dnl Check for libpsl +dnl ********************************************************************** + +AC_ARG_WITH(libpsl, + AS_HELP_STRING([--without-libpsl], + [disable support for libpsl cookie checking]), + with_libpsl=$withval, + with_libpsl=yes) +if test $with_libpsl != "no"; then + AC_SEARCH_LIBS(psl_builtin, psl, + [curl_psl_msg="enabled"; + AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled]) + ], + [curl_psl_msg="no (libpsl not found)"; + AC_MSG_WARN([libpsl was not found]) + ] + ) +fi +AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"]) + +dnl ********************************************************************** +dnl Check for libmetalink +dnl ********************************************************************** + +OPT_LIBMETALINK=no + +AC_ARG_WITH(libmetalink,dnl +AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root]) +AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]), + OPT_LIBMETALINK=$withval) + +if test X"$OPT_LIBMETALINK" != Xno; then + + addld="" + addlib="" + addcflags="" + version="" + libmetalinklib="" + + PKGTEST="no" + if test "x$OPT_LIBMETALINK" = "xyes"; then + dnl this is with no partiular path given + PKGTEST="yes" + CURL_CHECK_PKGCONFIG(libmetalink) + else + dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path. + LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig" + AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"]) + if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then + PKGTEST="yes" + fi + if test "$PKGTEST" = "yes"; then + CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR]) + fi + fi + if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then + addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl + $PKGCONFIG --libs-only-l libmetalink` + addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl + $PKGCONFIG --libs-only-L libmetalink` + addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl + $PKGCONFIG --cflags-only-I libmetalink` + version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl + $PKGCONFIG --modversion libmetalink` + libmetalinklib=`echo $addld | $SED -e 's/^-L//'` + fi + if test -n "$addlib"; then + + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + CPPFLAGS="$clean_CPPFLAGS $addcflags" + LDFLAGS="$clean_LDFLAGS $addld" + LIBS="$addlib $clean_LIBS" + AC_MSG_CHECKING([if libmetalink is recent enough]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +# include + ]],[[ + if(0 != metalink_strerror(0)) /* added in 0.1.0 */ + return 1; + ]]) + ],[ + AC_MSG_RESULT([yes ($version)]) + want_metalink="yes" + ],[ + AC_MSG_RESULT([no ($version)]) + AC_MSG_NOTICE([libmetalink library defective or too old]) + want_metalink="no" + ]) + if test "x$OPENSSL_ENABLED" != "x1" -a "x$USE_WINDOWS_SSPI" != "x1" \ + -a "x$GNUTLS_ENABLED" != "x1" -a "x$NSS_ENABLED" != "x1" \ + -a "x$SECURETRANSPORT_ENABLED" != "x1"; then + AC_MSG_WARN([metalink support requires a compatible SSL/TLS backend]) + want_metalink="no" + fi + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + if test "$want_metalink" = "yes"; then + dnl finally libmetalink will be used + AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support]) + LIBMETALINK_LIBS=$addlib + LIBMETALINK_LDFLAGS=$addld + LIBMETALINK_CPPFLAGS=$addcflags + AC_SUBST([LIBMETALINK_LIBS]) + AC_SUBST([LIBMETALINK_LDFLAGS]) + AC_SUBST([LIBMETALINK_CPPFLAGS]) + curl_mtlnk_msg="enabled" + fi + + fi +fi + +dnl ********************************************************************** +dnl Check for the presence of LIBSSH2 libraries and headers +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for LIBSSH2 files & libraries. +OPT_LIBSSH2=off +AC_ARG_WITH(libssh2,dnl +AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the libssh2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--with-libssh2], [enable libssh2]), + OPT_LIBSSH2=$withval, OPT_LIBSSH2=no) + + +OPT_LIBSSH=off +AC_ARG_WITH(libssh,dnl +AC_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--with-libssh], [enable libssh]), + OPT_LIBSSH=$withval, OPT_LIBSSH=no) + +OPT_WOLFSSH=off +AC_ARG_WITH(wolfssh,dnl +AC_HELP_STRING([--with-wolfssh=PATH],[Where to look for wolfssh, PATH points to the wolfSSH installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--with-wolfssh], [enable wolfssh]), + OPT_WOLFSSH=$withval, OPT_WOLFSSH=no) + +if test X"$OPT_LIBSSH2" != Xno; then + dnl backup the pre-libssh2 variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBSSH2" in + yes) + dnl --with-libssh2 (without path) used + CURL_CHECK_PKGCONFIG(libssh2) + + if test "$PKGCONFIG" != "no" ; then + LIB_SSH2=`$PKGCONFIG --libs libssh2` + LD_SSH2=`$PKGCONFIG --libs-only-L libssh2` + CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2` + version=`$PKGCONFIG --modversion libssh2` + DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'` + fi + + ;; + off) + dnl no --with-libssh2 option given, just check default places + ;; + *) + dnl use the given --with-libssh2 spot + PREFIX_SSH2=$OPT_LIBSSH2 + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_SSH2"; then + LIB_SSH2="-lssh2" + LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff + CPP_SSH2=-I${PREFIX_SSH2}/include + DIR_SSH2=${PREFIX_SSH2}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_SSH2" + CPPFLAGS="$CPPFLAGS $CPP_SSH2" + LIBS="$LIB_SSH2 $LIBS" + + AC_CHECK_LIB(ssh2, libssh2_channel_open_ex) + + AC_CHECK_HEADERS(libssh2.h, + curl_ssh_msg="enabled (libSSH2)" + LIBSSH2_ENABLED=1 + AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use]) + AC_SUBST(USE_LIBSSH2, [1]) + ) + + if test X"$OPT_LIBSSH2" != Xoff && + test "$LIBSSH2_ENABLED" != "1"; then + AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!]) + fi + + if test "$LIBSSH2_ENABLED" = "1"; then + if test -n "$DIR_SSH2"; then + dnl when the libssh2 shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH + dnl to prevent further configure tests to fail due to this + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH]) + fi + fi + else + dnl no libssh2, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +elif test X"$OPT_LIBSSH" != Xno; then + dnl backup the pre-libssh variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBSSH" in + yes) + dnl --with-libssh (without path) used + CURL_CHECK_PKGCONFIG(libssh) + + if test "$PKGCONFIG" != "no" ; then + LIB_SSH=`$PKGCONFIG --libs-only-l libssh` + LD_SSH=`$PKGCONFIG --libs-only-L libssh` + CPP_SSH=`$PKGCONFIG --cflags-only-I libssh` + version=`$PKGCONFIG --modversion libssh` + DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'` + fi + + ;; + off) + dnl no --with-libssh option given, just check default places + ;; + *) + dnl use the given --with-libssh spot + PREFIX_SSH=$OPT_LIBSSH + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_SSH"; then + LIB_SSH="-lssh" + LD_SSH=-L${PREFIX_SSH}/lib$libsuff + CPP_SSH=-I${PREFIX_SSH}/include + DIR_SSH=${PREFIX_SSH}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_SSH" + CPPFLAGS="$CPPFLAGS $CPP_SSH" + LIBS="$LIB_SSH $LIBS" + + AC_CHECK_LIB(ssh, ssh_new) + + AC_CHECK_HEADERS(libssh/libssh.h, + curl_ssh_msg="enabled (libSSH)" + LIBSSH_ENABLED=1 + AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use]) + AC_SUBST(USE_LIBSSH, [1]) + ) + + if test X"$OPT_LIBSSH" != Xoff && + test "$LIBSSH_ENABLED" != "1"; then + AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!]) + fi + + if test "$LIBSSH_ENABLED" = "1"; then + if test -n "$DIR_SSH"; then + dnl when the libssh shared libs were found in a path that the run-time + dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH + dnl to prevent further configure tests to fail due to this + + if test "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH]) + fi + fi + else + dnl no libssh, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + fi +elif test X"$OPT_WOLFSSH" != Xno; then + dnl backup the pre-wolfssh variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + + if test "$OPT_WOLFSSH" != yes; then + WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config" + LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`" + CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`" + fi + + AC_CHECK_LIB(wolfssh, wolfSSH_Init) + + AC_CHECK_HEADERS(wolfssh/ssh.h, + curl_ssh_msg="enabled (wolfSSH)" + WOLFSSH_ENABLED=1 + AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use]) + AC_SUBST(USE_WOLFSSH, [1]) + ) + +fi + +dnl ********************************************************************** +dnl Check for the presence of LIBRTMP libraries and headers +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for LIBRTMP files & libraries. +OPT_LIBRTMP=off +AC_ARG_WITH(librtmp,dnl +AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) +AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]), + OPT_LIBRTMP=$withval) + +if test X"$OPT_LIBRTMP" != Xno; then + dnl backup the pre-librtmp variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + case "$OPT_LIBRTMP" in + yes) + dnl --with-librtmp (without path) used + CURL_CHECK_PKGCONFIG(librtmp) + + if test "$PKGCONFIG" != "no" ; then + LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp` + LD_RTMP=`$PKGCONFIG --libs-only-L librtmp` + CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp` + version=`$PKGCONFIG --modversion librtmp` + DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'` + else + dnl To avoid link errors, we do not allow --librtmp without + dnl a pkgconfig file + AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.]) + fi + + ;; + off) + dnl no --with-librtmp option given, just check default places + LIB_RTMP="-lrtmp" + ;; + *) + dnl use the given --with-librtmp spot + LIB_RTMP="-lrtmp" + PREFIX_RTMP=$OPT_LIBRTMP + ;; + esac + + dnl if given with a prefix, we set -L and -I based on that + if test -n "$PREFIX_RTMP"; then + LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff + CPP_RTMP=-I${PREFIX_RTMP}/include + DIR_RTMP=${PREFIX_RTMP}/lib$libsuff + fi + + LDFLAGS="$LDFLAGS $LD_RTMP" + CPPFLAGS="$CPPFLAGS $CPP_RTMP" + LIBS="$LIB_RTMP $LIBS" + + AC_CHECK_LIB(rtmp, RTMP_Init, + [ + AC_CHECK_HEADERS(librtmp/rtmp.h, + curl_rtmp_msg="enabled (librtmp)" + LIBRTMP_ENABLED=1 + AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use]) + AC_SUBST(USE_LIBRTMP, [1]) + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + + if test X"$OPT_LIBRTMP" != Xoff && + test "$LIBRTMP_ENABLED" != "1"; then + AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!]) + fi + +fi + +dnl ********************************************************************** +dnl Check for linker switch for versioned symbols +dnl ********************************************************************** + +versioned_symbols_flavour= +AC_MSG_CHECKING([whether versioned symbols are wanted]) +AC_ARG_ENABLE(versioned-symbols, +AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library]) +AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]), +[ case "$enableval" in + yes) AC_MSG_RESULT(yes) + AC_MSG_CHECKING([if libraries can be versioned]) + GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` + if test -z "$GLD"; then + AC_MSG_RESULT(no) + AC_MSG_WARN([You need an ld version supporting the --version-script option]) + else + AC_MSG_RESULT(yes) + if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + versioned_symbols_flavour="MULTISSL_" + elif test "x$OPENSSL_ENABLED" = "x1"; then + versioned_symbols_flavour="OPENSSL_" + elif test "x$GNUTLS_ENABLED" = "x1"; then + versioned_symbols_flavour="GNUTLS_" + elif test "x$NSS_ENABLED" = "x1"; then + versioned_symbols_flavour="NSS_" + elif test "x$WOLFSSL_ENABLED" = "x1"; then + versioned_symbols_flavour="WOLFSSL_" + elif test "x$SCHANNEL_ENABLED" = "x1"; then + versioned_symbols_flavour="SCHANNEL_" + elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then + versioned_symbols_flavour="SECURE_TRANSPORT_" + else + versioned_symbols_flavour="" + fi + versioned_symbols="yes" + fi + ;; + + *) AC_MSG_RESULT(no) + ;; + esac +], [ +AC_MSG_RESULT(no) +] +) + +AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR], + ["$versioned_symbols_flavour"]) +AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS], + [test "x$versioned_symbols" = 'xyes']) + +dnl ------------------------------------------------- +dnl check winidn option before other IDN libraries +dnl ------------------------------------------------- + +AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)]) +OPT_WINIDN="default" +AC_ARG_WITH(winidn, +AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN]) +AC_HELP_STRING([--without-winidn], [disable Windows native IDN]), + OPT_WINIDN=$withval) +case "$OPT_WINIDN" in + no|default) + dnl --without-winidn option used or configure option not specified + want_winidn="no" + AC_MSG_RESULT([no]) + ;; + yes) + dnl --with-winidn option used without path + want_winidn="yes" + want_winidn_path="default" + AC_MSG_RESULT([yes]) + ;; + *) + dnl --with-winidn option used with path + want_winidn="yes" + want_winidn_path="$withval" + AC_MSG_RESULT([yes ($withval)]) + ;; +esac + +if test "$want_winidn" = "yes"; then + dnl winidn library support has been requested + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + WINIDN_LIBS="-lnormaliz" + WINIDN_CPPFLAGS="-DWINVER=0x0600" + # + if test "$want_winidn_path" != "default"; then + dnl path has been specified + dnl pkg-config not available or provides no info + WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff" + WINIDN_CPPFLAGS="-I$want_winidn_path/include" + WINIDN_DIR="$want_winidn_path/lib$libsuff" + fi + # + CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS" + LIBS="$WINIDN_LIBS $LIBS" + # + AC_MSG_CHECKING([if IdnToUnicode can be linked]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + #include + ]],[[ + IdnToUnicode(0, NULL, 0, NULL, 0); + ]]) + ],[ + AC_MSG_RESULT([yes]) + tst_links_winidn="yes" + ],[ + AC_MSG_RESULT([no]) + tst_links_winidn="no" + ]) + # + if test "$tst_links_winidn" = "yes"; then + AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).]) + AC_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.]) + AC_SUBST([IDN_ENABLED], [1]) + curl_idn_msg="enabled (Windows-native)" + else + AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled]) + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + fi +fi + +dnl ********************************************************************** +dnl Check for the presence of IDN libraries and headers +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to build with libidn2]) +OPT_IDN="default" +AC_ARG_WITH(libidn2, +AC_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage]) +AC_HELP_STRING([--without-libidn2],[Disable libidn2 usage]), + [OPT_IDN=$withval]) +case "$OPT_IDN" in + no) + dnl --without-libidn2 option used + want_idn="no" + AC_MSG_RESULT([no]) + ;; + default) + dnl configure option not specified + want_idn="yes" + want_idn_path="default" + AC_MSG_RESULT([(assumed) yes]) + ;; + yes) + dnl --with-libidn2 option used without path + want_idn="yes" + want_idn_path="default" + AC_MSG_RESULT([yes]) + ;; + *) + dnl --with-libidn2 option used with path + want_idn="yes" + want_idn_path="$withval" + AC_MSG_RESULT([yes ($withval)]) + ;; +esac + +if test "$want_idn" = "yes"; then + dnl idn library support has been requested + clean_CPPFLAGS="$CPPFLAGS" + clean_LDFLAGS="$LDFLAGS" + clean_LIBS="$LIBS" + PKGCONFIG="no" + # + if test "$want_idn_path" != "default"; then + dnl path has been specified + IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig" + CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR]) + if test "$PKGCONFIG" != "no"; then + IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl + $PKGCONFIG --libs-only-l libidn2 2>/dev/null` + IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl + $PKGCONFIG --libs-only-L libidn2 2>/dev/null` + IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl + $PKGCONFIG --cflags-only-I libidn2 2>/dev/null` + IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'` + else + dnl pkg-config not available or provides no info + IDN_LIBS="-lidn2" + IDN_LDFLAGS="-L$want_idn_path/lib$libsuff" + IDN_CPPFLAGS="-I$want_idn_path/include" + IDN_DIR="$want_idn_path/lib$libsuff" + fi + else + dnl path not specified + CURL_CHECK_PKGCONFIG(libidn2) + if test "$PKGCONFIG" != "no"; then + IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null` + IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null` + IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null` + IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'` + else + dnl pkg-config not available or provides no info + IDN_LIBS="-lidn2" + fi + fi + # + if test "$PKGCONFIG" != "no"; then + AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"]) + AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"]) + AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"]) + AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"]) + else + AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"]) + AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"]) + AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"]) + AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"]) + fi + # + CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS" + LDFLAGS="$LDFLAGS $IDN_LDFLAGS" + LIBS="$IDN_LIBS $LIBS" + # + AC_MSG_CHECKING([if idn2_lookup_ul can be linked]) + AC_LINK_IFELSE([ + AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul]) + ],[ + AC_MSG_RESULT([yes]) + tst_links_libidn="yes" + ],[ + AC_MSG_RESULT([no]) + tst_links_libidn="no" + ]) + # + AC_CHECK_HEADERS( idn2.h ) + + if test "$tst_links_libidn" = "yes"; then + AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).]) + dnl different versions of libidn have different setups of these: + + AC_SUBST([IDN_ENABLED], [1]) + curl_idn_msg="enabled (libidn2)" + if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH]) + fi + else + AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled]) + CPPFLAGS="$clean_CPPFLAGS" + LDFLAGS="$clean_LDFLAGS" + LIBS="$clean_LIBS" + fi +fi + + +dnl Let's hope this split URL remains working: +dnl https://www15.software.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \ +dnl genprogc/thread_quick_ref.htm + + +dnl ********************************************************************** +dnl Check for nghttp2 +dnl ********************************************************************** + +OPT_H2="yes" + +if test "x$disable_http" = "xyes"; then + # without HTTP, nghttp2 is no use + OPT_H2="no" +fi + +AC_ARG_WITH(nghttp2, +AC_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage]) +AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]), + [OPT_H2=$withval]) +case "$OPT_H2" in + no) + dnl --without-nghttp2 option used + want_h2="no" + ;; + yes) + dnl --with-nghttp2 option used without path + want_h2="default" + want_h2_path="" + ;; + *) + dnl --with-nghttp2 option used with path + want_h2="yes" + want_h2_path="$withval/lib/pkgconfig" + ;; +esac + +curl_h2_msg="no (--with-nghttp2)" +if test X"$want_h2" != Xno; then + dnl backup the pre-nghttp2 variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + CURL_CHECK_PKGCONFIG(libnghttp2, $want_h2_path) + + if test "$PKGCONFIG" != "no" ; then + LIB_H2=`CURL_EXPORT_PCDIR([$want_h2_path]) + $PKGCONFIG --libs-only-l libnghttp2` + AC_MSG_NOTICE([-l is $LIB_H2]) + + CPP_H2=`CURL_EXPORT_PCDIR([$want_h2_path]) dnl + $PKGCONFIG --cflags-only-I libnghttp2` + AC_MSG_NOTICE([-I is $CPP_H2]) + + LD_H2=`CURL_EXPORT_PCDIR([$want_h2_path]) + $PKGCONFIG --libs-only-L libnghttp2` + AC_MSG_NOTICE([-L is $LD_H2]) + + LDFLAGS="$LDFLAGS $LD_H2" + CPPFLAGS="$CPPFLAGS $CPP_H2" + LIBS="$LIB_H2 $LIBS" + + # use nghttp2_session_set_local_window_size to require nghttp2 + # >= 1.12.0 + AC_CHECK_LIB(nghttp2, nghttp2_session_set_local_window_size, + [ + AC_CHECK_HEADERS(nghttp2/nghttp2.h, + curl_h2_msg="enabled (nghttp2)" + NGHTTP2_ENABLED=1 + AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use]) + AC_SUBST(USE_NGHTTP2, [1]) + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + + else + dnl no nghttp2 pkg-config found, deal with it + if test X"$want_h2" != Xdefault; then + dnl To avoid link errors, we do not allow --with-nghttp2 without + dnl a pkgconfig file + AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.]) + fi + fi + +fi + +dnl ********************************************************************** +dnl Check for ngtcp2 (QUIC) +dnl ********************************************************************** + +OPT_TCP2="yes" +curl_h3_msg="no (--with-ngtcp2, --with-quiche)" + +if test "x$disable_http" = "xyes"; then + # without HTTP, ngtcp2 is no use + OPT_TCP2="no" +fi + +AC_ARG_WITH(ngtcp2, +AC_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage]) +AC_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]), + [OPT_TCP2=$withval]) +case "$OPT_TCP2" in + no) + dnl --without-ngtcp2 option used + want_tcp2="no" + ;; + yes) + dnl --with-ngtcp2 option used without path + want_tcp2="default" + want_tcp2_path="" + ;; + *) + dnl --with-ngtcp2 option used with path + want_tcp2="yes" + want_tcp2_path="$withval/lib/pkgconfig" + ;; +esac + +curl_tcp2_msg="no (--with-ngtcp2)" +if test X"$want_tcp2" != Xno; then + dnl backup the pre-ngtcp2 variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path) + + if test "$PKGCONFIG" != "no" ; then + LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) + $PKGCONFIG --libs-only-l libngtcp2` + AC_MSG_NOTICE([-l is $LIB_TCP2]) + + CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl + $PKGCONFIG --cflags-only-I libngtcp2` + AC_MSG_NOTICE([-I is $CPP_TCP2]) + + LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) + $PKGCONFIG --libs-only-L libngtcp2` + AC_MSG_NOTICE([-L is $LD_TCP2]) + + LDFLAGS="$LDFLAGS $LD_TCP2" + CPPFLAGS="$CPPFLAGS $CPP_TCP2" + LIBS="$LIB_TCP2 $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'` + fi + AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new, + [ + AC_CHECK_HEADERS(ngtcp2/ngtcp2.h, + NGTCP2_ENABLED=1 + AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use]) + AC_SUBST(USE_NGTCP2, [1]) + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH]) + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + + else + dnl no ngtcp2 pkg-config found, deal with it + if test X"$want_tcp2" != Xdefault; then + dnl To avoid link errors, we do not allow --with-ngtcp2 without + dnl a pkgconfig file + AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.]) + fi + fi + +fi + +if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1"; then + dnl backup the pre-ngtcp2_crypto_openssl variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + CURL_CHECK_PKGCONFIG(libngtcp2_crypto_openssl, $want_tcp2_path) + + if test "$PKGCONFIG" != "no" ; then + LIB_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) + $PKGCONFIG --libs-only-l libngtcp2_crypto_openssl` + AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_OPENSSL]) + + CPP_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl + $PKGCONFIG --cflags-only-I libngtcp2_crypto_openssl` + AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_OPENSSL]) + + LD_NGTCP2_CRYPTO_OPENSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) + $PKGCONFIG --libs-only-L libngtcp2_crypto_openssl` + AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_OPENSSL]) + + LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_OPENSSL" + CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_OPENSSL" + LIBS="$LIB_NGTCP2_CRYPTO_OPENSSL $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_NGTCP2_CRYPTO_OPENSSL=`echo $LD_NGTCP2_CRYPTO_OPENSSL | $SED -e 's/^-L//'` + fi + AC_CHECK_LIB(ngtcp2_crypto_openssl, ngtcp2_crypto_ctx_initial, + [ + AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, + NGTCP2_ENABLED=1 + AC_DEFINE(USE_NGTCP2_CRYPTO_OPENSSL, 1, [if ngtcp2_crypto_openssl is in use]) + AC_SUBST(USE_NGTCP2_CRYPTO_OPENSSL, [1]) + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_OPENSSL" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_OPENSSL to CURL_LIBRARY_PATH]) + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + + else + dnl no ngtcp2_crypto_openssl pkg-config found, deal with it + if test X"$want_tcp2" != Xdefault; then + dnl To avoid link errors, we do not allow --with-ngtcp2 without + dnl a pkgconfig file + AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_openssl pkg-config file.]) + fi + fi +fi + +if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then + dnl backup the pre-ngtcp2_crypto_gnutls variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path) + + if test "$PKGCONFIG" != "no" ; then + LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) + $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls` + AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS]) + + CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl + $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls` + AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS]) + + LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) + $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls` + AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS]) + + LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS" + CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS" + LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'` + fi + AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_ctx_initial, + [ + AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h, + NGTCP2_ENABLED=1 + AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use]) + AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1]) + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH]) + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + + else + dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it + if test X"$want_tcp2" != Xdefault; then + dnl To avoid link errors, we do not allow --with-ngtcp2 without + dnl a pkgconfig file + AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.]) + fi + fi +fi + +dnl ********************************************************************** +dnl Check for nghttp3 (HTTP/3 with ngtcp2) +dnl ********************************************************************** + +OPT_NGHTTP3="yes" + +if test "x$NGTCP2_ENABLED" = "x"; then + # without ngtcp2, nghttp3 is of no use for us + OPT_NGHTTP3="no" +fi + +AC_ARG_WITH(nghttp3, +AC_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage]) +AC_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]), + [OPT_NGHTTP3=$withval]) +case "$OPT_NGHTTP3" in + no) + dnl --without-nghttp3 option used + want_nghttp3="no" + ;; + yes) + dnl --with-nghttp3 option used without path + want_nghttp3="default" + want_nghttp3_path="" + ;; + *) + dnl --with-nghttp3 option used with path + want_nghttp3="yes" + want_nghttp3_path="$withval/lib/pkgconfig" + ;; +esac + +curl_http3_msg="no (--with-nghttp3)" +if test X"$want_nghttp3" != Xno; then + dnl backup the pre-nghttp3 variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path) + + if test "$PKGCONFIG" != "no" ; then + LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) + $PKGCONFIG --libs-only-l libnghttp3` + AC_MSG_NOTICE([-l is $LIB_NGHTTP3]) + + CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl + $PKGCONFIG --cflags-only-I libnghttp3` + AC_MSG_NOTICE([-I is $CPP_NGHTTP3]) + + LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) + $PKGCONFIG --libs-only-L libnghttp3` + AC_MSG_NOTICE([-L is $LD_NGHTTP3]) + + LDFLAGS="$LDFLAGS $LD_NGHTTP3" + CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3" + LIBS="$LIB_NGHTTP3 $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'` + fi + AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new, + [ + AC_CHECK_HEADERS(nghttp3/nghttp3.h, + curl_h3_msg="enabled (ngtcp2 + nghttp3)" + NGHTTP3_ENABLED=1 + AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use]) + AC_SUBST(USE_NGHTTP3, [1]) + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH]) + experimental="$experimental HTTP3" + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + + else + dnl no nghttp3 pkg-config found, deal with it + if test X"$want_nghttp3" != Xdefault; then + dnl To avoid link errors, we do not allow --with-nghttp3 without + dnl a pkgconfig file + AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.]) + fi + fi + +fi + +dnl ********************************************************************** +dnl Check for quiche (QUIC) +dnl ********************************************************************** + +OPT_QUICHE="yes" + +if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then + # without HTTP or with ngtcp2, quiche is no use + OPT_QUICHE="no" +fi + +AC_ARG_WITH(quiche, +AC_HELP_STRING([--with-quiche=PATH],[Enable quiche usage]) +AC_HELP_STRING([--without-quiche],[Disable quiche usage]), + [OPT_QUICHE=$withval]) +case "$OPT_QUICHE" in + no) + dnl --without-quiche option used + want_quiche="no" + ;; + yes) + dnl --with-quiche option used without path + want_quiche="default" + want_quiche_path="" + ;; + *) + dnl --with-quiche option used with path + want_quiche="yes" + want_quiche_path="$withval" + ;; +esac + +if test X"$want_quiche" != Xno; then + dnl backup the pre-quiche variables + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + CLEANLIBS="$LIBS" + + CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path) + + if test "$PKGCONFIG" != "no" ; then + LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) + $PKGCONFIG --libs-only-l quiche` + AC_MSG_NOTICE([-l is $LIB_QUICHE]) + + CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl + $PKGCONFIG --cflags-only-I quiche` + AC_MSG_NOTICE([-I is $CPP_QUICHE]) + + LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) + $PKGCONFIG --libs-only-L quiche` + AC_MSG_NOTICE([-L is $LD_QUICHE]) + + LDFLAGS="$LDFLAGS $LD_QUICHE" + CPPFLAGS="$CPPFLAGS $CPP_QUICHE" + LIBS="$LIB_QUICHE $LIBS" + + if test "x$cross_compiling" != "xyes"; then + DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'` + fi + AC_CHECK_LIB(quiche, quiche_connect, + [ + AC_CHECK_HEADERS(quiche.h, + experimental="$experimental HTTP3" + AC_MSG_NOTICE([HTTP3 support is experimental]) + curl_h3_msg="enabled (quiche)" + QUICHE_ENABLED=1 + AC_DEFINE(USE_QUICHE, 1, [if quiche is in use]) + AC_SUBST(USE_QUICHE, [1]) + AC_CHECK_FUNCS([quiche_conn_set_qlog_fd]) + CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE" + export CURL_LIBRARY_PATH + AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]), + ) + ], + dnl not found, revert back to clean variables + LDFLAGS=$CLEANLDFLAGS + CPPFLAGS=$CLEANCPPFLAGS + LIBS=$CLEANLIBS + ) + else + dnl no quiche pkg-config found, deal with it + if test X"$want_quiche" != Xdefault; then + dnl To avoid link errors, we do not allow --with-quiche without + dnl a pkgconfig file + AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.]) + fi + fi +fi + +dnl ********************************************************************** +dnl Check for zsh completion path +dnl ********************************************************************** + +OPT_ZSH_FPATH=default +AC_ARG_WITH(zsh-functions-dir, +AC_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH]) +AC_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]), + [OPT_ZSH_FPATH=$withval]) +case "$OPT_ZSH_FPATH" in + no) + dnl --without-zsh-functions-dir option used + ;; + default|yes) + dnl --with-zsh-functions-dir option used without path + ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions" + AC_SUBST(ZSH_FUNCTIONS_DIR) + ;; + *) + dnl --with-zsh-functions-dir option used with path + ZSH_FUNCTIONS_DIR="$withval" + AC_SUBST(ZSH_FUNCTIONS_DIR) + ;; +esac + +dnl ********************************************************************** +dnl Check for fish completion path +dnl ********************************************************************** + +OPT_FISH_FPATH=default +AC_ARG_WITH(fish-functions-dir, +AC_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH]) +AC_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]), + [OPT_FISH_FPATH=$withval]) +case "$OPT_FISH_FPATH" in + no) + dnl --without-fish-functions-dir option used + ;; + default|yes) + dnl --with-fish-functions-dir option used without path + CURL_CHECK_PKGCONFIG(fish) + if test "$PKGCONFIG" != "no" ; then + FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)" + else + FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d" + fi + AC_SUBST(FISH_FUNCTIONS_DIR) + ;; + *) + dnl --with-fish-functions-dir option used with path + FISH_FUNCTIONS_DIR="$withval" + AC_SUBST(FISH_FUNCTIONS_DIR) + ;; +esac + +dnl ********************************************************************** +dnl Back to "normal" configuring +dnl ********************************************************************** + +dnl Checks for header files. +AC_HEADER_STDC + +CURL_CHECK_HEADER_MALLOC +CURL_CHECK_HEADER_MEMORY + +dnl Now check for the very most basic headers. Then we can use these +dnl ones as default-headers when checking for the rest! +AC_CHECK_HEADERS( + sys/types.h \ + sys/time.h \ + sys/select.h \ + sys/socket.h \ + sys/ioctl.h \ + sys/uio.h \ + assert.h \ + unistd.h \ + stdlib.h \ + arpa/inet.h \ + net/if.h \ + netinet/in.h \ + netinet/in6.h \ + sys/un.h \ + linux/tcp.h \ + netinet/tcp.h \ + netdb.h \ + sys/sockio.h \ + sys/stat.h \ + sys/param.h \ + termios.h \ + termio.h \ + sgtty.h \ + fcntl.h \ + alloca.h \ + time.h \ + io.h \ + pwd.h \ + utime.h \ + sys/utime.h \ + sys/poll.h \ + poll.h \ + socket.h \ + sys/resource.h \ + libgen.h \ + locale.h \ + errno.h \ + stdbool.h \ + arpa/tftp.h \ + sys/filio.h \ + sys/wait.h \ + setjmp.h, +dnl to do if not found +[], +dnl to do if found +[], +dnl default includes +[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#elif defined(HAVE_UNISTD_H) +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET_IN6_H +#include +#endif +#ifdef HAVE_SYS_UN_H +#include +#endif +] +) + + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +CURL_CHECK_VARIADIC_MACROS +AC_TYPE_SIZE_T +AC_HEADER_TIME +CURL_CHECK_STRUCT_TIMEVAL +CURL_VERIFY_RUNTIMELIBS + +AX_COMPILE_CHECK_SIZEOF(size_t) +AX_COMPILE_CHECK_SIZEOF(long) +AX_COMPILE_CHECK_SIZEOF(int) +AX_COMPILE_CHECK_SIZEOF(short) +AX_COMPILE_CHECK_SIZEOF(time_t) +AX_COMPILE_CHECK_SIZEOF(off_t) + +o=$CPPFLAGS +CPPFLAGS="-I$srcdir/include $CPPFLAGS" +AX_COMPILE_CHECK_SIZEOF(curl_off_t, [ +#include +]) +CPPFLAGS=$o + +AC_CHECK_TYPE(long long, + [AC_DEFINE(HAVE_LONGLONG, 1, + [Define to 1 if the compiler supports the 'long long' data type.])] + longlong="yes" +) + +if test "xyes" = "x$longlong"; then + AC_MSG_CHECKING([if numberLL works]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ + long long val = 1000LL; + ]]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL]) + ],[ + AC_MSG_RESULT([no]) + ]) +fi + + +# check for ssize_t +AC_CHECK_TYPE(ssize_t, , + AC_DEFINE(ssize_t, int, [the signed version of size_t])) + +# check for bool type +AC_CHECK_TYPE([bool],[ + AC_DEFINE(HAVE_BOOL_T, 1, + [Define to 1 if bool is an available type.]) +], ,[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDBOOL_H +#include +#endif +]) + +# check for sa_family_t +AC_CHECK_TYPE(sa_family_t, + AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]), + [ + # The windows name? + AC_CHECK_TYPE(ADDRESS_FAMILY, + AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]), + AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]), + [ +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + ]) + ], +[ +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +]) + +# check for suseconds_t +AC_CHECK_TYPE([suseconds_t],[ + AC_DEFINE(HAVE_SUSECONDS_T, 1, + [Define to 1 if suseconds_t is an available type.]) +], ,[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +]) + +AC_MSG_CHECKING([if time_t is unsigned]) +CURL_RUN_IFELSE( + [ + #include + #include + time_t t = -1; + return (t > 0); + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned]) +],[ + AC_MSG_RESULT([no]) +],[ + dnl cross-compiling, most systems are unsigned + AC_MSG_RESULT([no]) +]) + +CURL_CONFIGURE_PULL_SYS_POLL + +TYPE_IN_ADDR_T + +TYPE_SOCKADDR_STORAGE + +TYPE_SIG_ATOMIC_T + +AC_TYPE_SIGNAL + +CURL_CHECK_FUNC_SELECT + +CURL_CHECK_FUNC_RECV +CURL_CHECK_FUNC_SEND +CURL_CHECK_MSG_NOSIGNAL + +CURL_CHECK_FUNC_ALARM +CURL_CHECK_FUNC_BASENAME +CURL_CHECK_FUNC_CLOSESOCKET +CURL_CHECK_FUNC_CLOSESOCKET_CAMEL +CURL_CHECK_FUNC_CONNECT +CURL_CHECK_FUNC_FCNTL +CURL_CHECK_FUNC_FREEADDRINFO +CURL_CHECK_FUNC_FREEIFADDRS +CURL_CHECK_FUNC_FSETXATTR +CURL_CHECK_FUNC_FTRUNCATE +CURL_CHECK_FUNC_GETADDRINFO +CURL_CHECK_FUNC_GAI_STRERROR +CURL_CHECK_FUNC_GETHOSTBYADDR +CURL_CHECK_FUNC_GETHOSTBYADDR_R +CURL_CHECK_FUNC_GETHOSTBYNAME +CURL_CHECK_FUNC_GETHOSTBYNAME_R +CURL_CHECK_FUNC_GETHOSTNAME +CURL_CHECK_FUNC_GETPEERNAME +CURL_CHECK_FUNC_GETSOCKNAME +CURL_CHECK_FUNC_IF_NAMETOINDEX +CURL_CHECK_FUNC_GETIFADDRS +CURL_CHECK_FUNC_GETSERVBYPORT_R +CURL_CHECK_FUNC_GMTIME_R +CURL_CHECK_FUNC_INET_NTOA_R +CURL_CHECK_FUNC_INET_NTOP +CURL_CHECK_FUNC_INET_PTON +CURL_CHECK_FUNC_IOCTL +CURL_CHECK_FUNC_IOCTLSOCKET +CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL +CURL_CHECK_FUNC_LOCALTIME_R +CURL_CHECK_FUNC_MEMRCHR +CURL_CHECK_FUNC_POLL +CURL_CHECK_FUNC_SETSOCKOPT +CURL_CHECK_FUNC_SIGACTION +CURL_CHECK_FUNC_SIGINTERRUPT +CURL_CHECK_FUNC_SIGNAL +CURL_CHECK_FUNC_SIGSETJMP +CURL_CHECK_FUNC_SOCKET +CURL_CHECK_FUNC_SOCKETPAIR +CURL_CHECK_FUNC_STRCASECMP +CURL_CHECK_FUNC_STRCMPI +CURL_CHECK_FUNC_STRDUP +CURL_CHECK_FUNC_STRERROR_R +CURL_CHECK_FUNC_STRICMP +CURL_CHECK_FUNC_STRNCASECMP +CURL_CHECK_FUNC_STRNCMPI +CURL_CHECK_FUNC_STRNICMP +CURL_CHECK_FUNC_STRSTR +CURL_CHECK_FUNC_STRTOK_R +CURL_CHECK_FUNC_STRTOLL +CURL_CHECK_FUNC_WRITEV + +case $host in + *msdosdjgpp) + ac_cv_func_pipe=no + skipcheck_pipe=yes + AC_MSG_NOTICE([skip check for pipe on msdosdjgpp]) + ;; +esac + +AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")], + [[#include + #include ]]) + + +AC_CHECK_FUNCS([fnmatch \ + geteuid \ + getpass_r \ + getppid \ + getpwuid \ + getpwuid_r \ + getrlimit \ + gettimeofday \ + if_nametoindex \ + mach_absolute_time \ + pipe \ + setlocale \ + setmode \ + setrlimit \ + usleep \ + utime \ + utimes +],[ +],[ + func="$ac_func" + eval skipcheck=\$skipcheck_$func + if test "x$skipcheck" != "xyes"; then + AC_MSG_CHECKING([deeper for $func]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ + ]],[[ + $func (); + ]]) + ],[ + AC_MSG_RESULT([yes]) + eval "ac_cv_func_$func=yes" + AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1], + [Define to 1 if you have the $func function.]) + ],[ + AC_MSG_RESULT([but still no]) + ]) + fi +]) + +CURL_CHECK_NONBLOCKING_SOCKET + +dnl ************************************************************ +dnl nroff tool stuff +dnl + +AC_PATH_PROG( PERL, perl, , + $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) +AC_SUBST(PERL) + +AC_PATH_PROGS( NROFF, gnroff nroff, , + $PATH:/usr/bin/:/usr/local/bin ) +AC_SUBST(NROFF) + +if test -n "$NROFF"; then + dnl only check for nroff options if an nroff command was found + + AC_MSG_CHECKING([how to use *nroff to get plain text from man pages]) + MANOPT="-man" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="-mandoc" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="" + AC_MSG_RESULT([failed]) + AC_MSG_WARN([found no *nroff option to get plaintext from man pages]) + else + AC_MSG_RESULT([$MANOPT]) + fi + else + AC_MSG_RESULT([$MANOPT]) + fi + AC_SUBST(MANOPT) +fi + +if test -z "$MANOPT" +then + dnl if no nroff tool was found, or no option that could convert man pages + dnl was found, then disable the built-in manual stuff + AC_MSG_WARN([disabling built-in manual]) + USE_MANUAL="no"; +fi + +dnl ************************************************************************* +dnl If the manual variable still is set, then we go with providing a built-in +dnl manual + +if test "$USE_MANUAL" = "1"; then + AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual]) + curl_manual_msg="enabled" +fi + +dnl set variable for use in automakefile(s) +AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) + +CURL_CHECK_LIB_ARES +AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes) + +if test "x$curl_cv_native_windows" != "xyes" && + test "x$enable_shared" = "xyes"; then + build_libhostname=yes +else + build_libhostname=no +fi +AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes) + +if test "x$want_ares" != xyes; then + CURL_CHECK_OPTION_THREADED_RESOLVER +fi + +dnl ************************************************************ +dnl disable POSIX threads +dnl +AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver]) +AC_ARG_ENABLE(pthreads, +AC_HELP_STRING([--enable-pthreads], + [Enable POSIX threads (default for threaded resolver)]) +AC_HELP_STRING([--disable-pthreads],[Disable POSIX threads]), +[ case "$enableval" in + no) AC_MSG_RESULT(no) + want_pthreads=no + ;; + *) AC_MSG_RESULT(yes) + want_pthreads=yes + ;; + esac ], [ + AC_MSG_RESULT(auto) + want_pthreads=auto + ] +) + +dnl turn off pthreads if rt is disabled +if test "$want_pthreads" != "no"; then + if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then + AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive]) + fi + if test "$dontwant_rt" != "no"; then + dnl if --enable-pthreads was explicit then warn it's being ignored + if test "$want_pthreads" = "yes"; then + AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.]) + fi + want_pthreads=no + fi +fi + +dnl turn off pthreads if no threaded resolver +if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then + want_pthreads=no +fi + +dnl detect pthreads +if test "$want_pthreads" != "no"; then + AC_CHECK_HEADER(pthread.h, + [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have ]) + save_CFLAGS="$CFLAGS" + dnl When statically linking against boringssl, -lpthread is added to LIBS. + dnl Make sure to that this does not pass the check below, we really want + dnl -pthread in CFLAGS as recommended for GCC. This also ensures that + dnl lib1541 and lib1565 tests are built with these options. Otherwise + dnl they fail the build since tests/libtest/Makefile.am clears LIBS. + save_LIBS="$LIBS" + + LIBS= + dnl Check for libc variants without a separate pthread lib like bionic + AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] ) + LIBS="$save_LIBS" + + dnl on HPUX, life is more complicated... + case $host in + *-hp-hpux*) + dnl it doesn't actually work without -lpthread + USE_THREADS_POSIX="" + ;; + *) + ;; + esac + + dnl if it wasn't found without lib, search for it in pthread lib + if test "$USE_THREADS_POSIX" != "1" + then + CFLAGS="$CFLAGS -pthread" + AC_CHECK_LIB(pthread, pthread_create, + [USE_THREADS_POSIX=1], + [ CFLAGS="$save_CFLAGS"]) + fi + + if test "x$USE_THREADS_POSIX" = "x1" + then + AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup]) + curl_res_msg="POSIX threaded" + fi + ]) +fi + +dnl threaded resolver check +if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then + if test "$want_pthreads" = "yes"; then + AC_MSG_ERROR([--enable-pthreads but pthreads was not found]) + fi + dnl If native Windows fallback on Win32 threads since no POSIX threads + if test "$curl_cv_native_windows" = "yes"; then + USE_THREADS_WIN32=1 + AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup]) + curl_res_msg="Win32 threaded" + else + AC_MSG_ERROR([Threaded resolver enabled but no thread library found]) + fi +fi + +CURL_CONVERT_INCLUDE_TO_ISYSTEM + +dnl ************************************************************ +dnl disable verbose text strings +dnl +AC_MSG_CHECKING([whether to enable verbose strings]) +AC_ARG_ENABLE(verbose, +AC_HELP_STRING([--enable-verbose],[Enable verbose strings]) +AC_HELP_STRING([--disable-verbose],[Disable verbose strings]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings]) + curl_verbose_msg="no" + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl enable SSPI support +dnl +AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)]) +AC_ARG_ENABLE(sspi, +AC_HELP_STRING([--enable-sspi],[Enable SSPI]) +AC_HELP_STRING([--disable-sspi],[Disable SSPI]), +[ case "$enableval" in + yes) + if test "$curl_cv_native_windows" = "yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) + AC_SUBST(USE_WINDOWS_SSPI, [1]) + curl_sspi_msg="enabled" + else + AC_MSG_RESULT(no) + AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.]) + fi + ;; + *) + if test "x$SCHANNEL_ENABLED" = "x1"; then + # --with-schannel implies --enable-sspi + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + ;; + esac ], + if test "x$SCHANNEL_ENABLED" = "x1"; then + # --with-schannel implies --enable-sspi + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi +) + +dnl ************************************************************ +dnl disable cryptographic authentication +dnl +AC_MSG_CHECKING([whether to enable cryptographic authentication methods]) +AC_ARG_ENABLE(crypto-auth, +AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication]) +AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication]) + CURL_DISABLE_CRYPTO_AUTH=1 + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +CURL_CHECK_OPTION_NTLM_WB + +CURL_CHECK_NTLM_WB + +dnl ************************************************************ +dnl disable TLS-SRP authentication +dnl +AC_MSG_CHECKING([whether to enable TLS-SRP authentication]) +AC_ARG_ENABLE(tls-srp, +AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication]) +AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + want_tls_srp=no + ;; + *) AC_MSG_RESULT(yes) + want_tls_srp=yes + ;; + esac ], + AC_MSG_RESULT(yes) + want_tls_srp=yes +) + +if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then + AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication]) + USE_TLS_SRP=1 + curl_tls_srp_msg="enabled" +fi + +dnl ************************************************************ +dnl disable Unix domain sockets support +dnl +AC_MSG_CHECKING([whether to enable Unix domain sockets]) +AC_ARG_ENABLE(unix-sockets, +AC_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets]) +AC_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]), +[ case "$enableval" in + no) AC_MSG_RESULT(no) + want_unix_sockets=no + ;; + *) AC_MSG_RESULT(yes) + want_unix_sockets=yes + ;; + esac ], [ + AC_MSG_RESULT(auto) + want_unix_sockets=auto + ] +) +if test "x$want_unix_sockets" != "xno"; then + AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [ + AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets]) + AC_SUBST(USE_UNIX_SOCKETS, [1]) + curl_unix_sockets_msg="enabled" + ], [ + if test "x$want_unix_sockets" = "xyes"; then + AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!]) + fi + ], [ + #include + ]) +fi + +dnl ************************************************************ +dnl disable cookies support +dnl +AC_MSG_CHECKING([whether to support cookies]) +AC_ARG_ENABLE(cookies, +AC_HELP_STRING([--enable-cookies],[Enable cookies support]) +AC_HELP_STRING([--disable-cookies],[Disable cookies support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable socketpair +dnl +AC_MSG_CHECKING([whether to support socketpair]) +AC_ARG_ENABLE(socketpair, +AC_HELP_STRING([--enable-socketpair],[Enable socketpair support]) +AC_HELP_STRING([--disable-socketpair],[Disable socketpair support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable HTTP authentication support +dnl +AC_MSG_CHECKING([whether to support HTTP authentication]) +AC_ARG_ENABLE(http-auth, +AC_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support]) +AC_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable DoH support +dnl +AC_MSG_CHECKING([whether to support DoH]) +AC_ARG_ENABLE(doh, +AC_HELP_STRING([--enable-doh],[Enable DoH support]) +AC_HELP_STRING([--disable-doh],[Disable DoH support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable mime API support +dnl +AC_MSG_CHECKING([whether to support the MIME API]) +AC_ARG_ENABLE(mime, +AC_HELP_STRING([--enable-mime],[Enable mime API support]) +AC_HELP_STRING([--disable-mime],[Disable mime API support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable date parsing +dnl +AC_MSG_CHECKING([whether to support date parsing]) +AC_ARG_ENABLE(dateparse, +AC_HELP_STRING([--enable-dateparse],[Enable date parsing]) +AC_HELP_STRING([--disable-dateparse],[Disable date parsing]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable netrc +dnl +AC_MSG_CHECKING([whether to support netrc parsing]) +AC_ARG_ENABLE(netrc, +AC_HELP_STRING([--enable-netrc],[Enable netrc parsing]) +AC_HELP_STRING([--disable-netrc],[Disable netrc parsing]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable progress-meter +dnl +AC_MSG_CHECKING([whether to support progress-meter]) +AC_ARG_ENABLE(progress-meter, +AC_HELP_STRING([--enable-progress-meter],[Enable progress-meter]) +AC_HELP_STRING([--disable-progress-meter],[Disable progress-meter]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable shuffle DNS support +dnl +AC_MSG_CHECKING([whether to support DNS shuffling]) +AC_ARG_ENABLE(dnsshuffle, +AC_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling]) +AC_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl disable the curl_easy_options API +dnl +AC_MSG_CHECKING([whether to support curl_easy_option*]) +AC_ARG_ENABLE(get-easy-option, +AC_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options]) +AC_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options]) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ************************************************************ +dnl switch on/off alt-svc +dnl +curl_altsvc_msg="no (--enable-alt-svc)"; +AC_MSG_CHECKING([whether to support alt-svc]) +AC_ARG_ENABLE(alt-svc, +AC_HELP_STRING([--enable-alt-svc],[Enable alt-svc support]) +AC_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + curl_altsvc_msg="enabled"; + enable_altsvc="yes" + ;; + esac ], + AC_MSG_RESULT(no) +) + +if test "$enable_altsvc" = "yes"; then + AC_DEFINE(USE_ALTSVC, 1, [to enable alt-svc]) + experimental="$experimental alt-svc" +fi + +dnl ************************************************************* +dnl check whether ECH support, if desired, is actually available +dnl +if test "x$want_ech" != "xno"; then + AC_MSG_CHECKING([whether ECH support is available]) + + dnl assume NOT and look for sufficient condition + ECH_ENABLED=0 + ECH_SUPPORT='' + + dnl OpenSSL with a chosen ECH function should be enough + dnl so more exhaustive checking seems unnecessary for now + if test "x$OPENSSL_ENABLED" = "x1"; then + AC_CHECK_FUNCS(SSL_get_ech_status, + ECH_SUPPORT="ECH support available (OpenSSL with SSL_get_ech_status)" + ECH_ENABLED=1) + + dnl add 'elif' chain here for additional implementations + fi + + dnl now deal with whatever we found + if test "x$ECH_ENABLED" = "x1"; then + AC_DEFINE(USE_ECH, 1, [if ECH support is available]) + AC_MSG_RESULT($ECH_SUPPORT) + experimental="$experimental ECH" + else + AC_MSG_ERROR([--enable-ech ignored: No ECH support found]) + fi +fi + +dnl ************************************************************ +dnl hiding of library internal symbols +dnl +CURL_CONFIGURE_SYMBOL_HIDING + +dnl +dnl All the library dependencies put into $LIB apply to libcurl only. +dnl +LIBCURL_LIBS=$LIBS + +AC_SUBST(LIBCURL_LIBS) +AC_SUBST(CURL_NETWORK_LIBS) +AC_SUBST(CURL_NETWORK_AND_TIME_LIBS) + +dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank +dnl LIBS variable used in generated makefile at makefile processing +dnl time. Doing this functionally prevents LIBS from being used for +dnl all link targets in given makefile. +BLANK_AT_MAKETIME= +AC_SUBST(BLANK_AT_MAKETIME) + +AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) + +dnl yes or no +ENABLE_SHARED="$enable_shared" +AC_SUBST(ENABLE_SHARED) + +dnl to let curl-config output the static libraries correctly +ENABLE_STATIC="$enable_static" +AC_SUBST(ENABLE_STATIC) + +dnl merge the pkg-config Libs.private field into Libs when static-only +if test "x$enable_shared" = "xno"; then + LIBCURL_NO_SHARED=$LIBCURL_LIBS +else + LIBCURL_NO_SHARED= +fi +AC_SUBST(LIBCURL_NO_SHARED) + +dnl +dnl For keeping supported features and protocols also in pkg-config file +dnl since it is more cross-compile friendly than curl-config +dnl + +if test "x$OPENSSL_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" +elif test -n "$SSL_ENABLED"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" +fi +if test "x$IPV6_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" +fi +if test "x$USE_UNIX_SOCKETS" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets" +fi +if test "x$HAVE_LIBZ" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES libz" +fi +if test "x$HAVE_BROTLI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES brotli" +fi +if test "x$HAVE_ZSTD" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES zstd" +fi +if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \ + -o "x$USE_THREADS_WIN32" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" +fi +if test "x$IDN_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES IDN" +fi +if test "x$USE_WINDOWS_SSPI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" +fi + +if test "x$HAVE_GSSAPI" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API" +fi + +if test "x$curl_psl_msg" = "xenabled"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES PSL" +fi + +if test "x$enable_altsvc" = "xyes"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc" +fi + +if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ + \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then + SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO" +fi + +if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \ + \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then + SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos" +fi + +if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then + if test "x$OPENSSL_ENABLED" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \ + -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ + -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \ + -o "x$WOLFSSL_NTLM" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" + + if test "x$CURL_DISABLE_HTTP" != "x1" -a \ + "x$NTLM_WB_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB" + fi + fi +fi + +if test "x$USE_TLS_SRP" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP" +fi + +if test "x$USE_NGHTTP2" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2" +fi + +if test "x$USE_NGTCP2" = "x1" -o "x$USE_QUICHE" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3" +fi + +if test "x$CURL_WITH_MULTI_SSL" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL" +fi + +dnl if not explictily turned off, HTTPS-proxy comes with some TLS backends +if test "x$https_proxy" != "xno"; then + if test "x$OPENSSL_ENABLED" = "x1" -o "x$GNUTLS_ENABLED" = "x1" \ + -o "x$NSS_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy" + fi +fi + +if test "x$ECH_ENABLED" = "x1"; then + SUPPORT_FEATURES="$SUPPORT_FEATURES ECH" +fi + +dnl replace spaces with newlines +dnl sort the lines +dnl replace the newlines back to spaces +SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '` +AC_SUBST(SUPPORT_FEATURES) + +dnl For supported protocols in pkg-config file +if test "x$CURL_DISABLE_HTTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS" + fi +fi +if test "x$CURL_DISABLE_FTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS" + fi +fi +if test "x$CURL_DISABLE_FILE" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE" +fi +if test "x$CURL_DISABLE_TELNET" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET" +fi +if test "x$CURL_DISABLE_LDAP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP" + if test "x$CURL_DISABLE_LDAPS" != "x1"; then + if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") || + (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS" + fi + fi +fi +if test "x$CURL_DISABLE_DICT" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT" +fi +if test "x$CURL_DISABLE_TFTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP" +fi +if test "x$CURL_DISABLE_GOPHER" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER" +fi +if test "x$CURL_DISABLE_MQTT" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT" +fi +if test "x$CURL_DISABLE_POP3" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S" + fi +fi +if test "x$CURL_DISABLE_IMAP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS" + fi +fi +if test "x$CURL_DISABLE_SMB" != "x1" \ + -a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \ + -a \( "x$OPENSSL_ENABLED" = "x1" \ + -o "x$GNUTLS_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \ + -o "x$NSS_ENABLED" = "x1" -o "x$SECURETRANSPORT_ENABLED" = "x1" \ + -o "x$WOLFSSL_NTLM" = "x1" \); then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS" + fi +fi +if test "x$CURL_DISABLE_SMTP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP" + if test "x$SSL_ENABLED" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS" + fi +fi +if test "x$USE_LIBSSH2" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi +if test "x$USE_LIBSSH" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi +if test "x$USE_WOLFSSH" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" +fi +if test "x$CURL_DISABLE_RTSP" != "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP" +fi +if test "x$USE_LIBRTMP" = "x1"; then + SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP" +fi + +dnl replace spaces with newlines +dnl sort the lines +dnl replace the newlines back to spaces +SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '` + +AC_SUBST(SUPPORT_PROTOCOLS) + +dnl squeeze whitespace out of some variables + +squeeze CFLAGS +squeeze CPPFLAGS +squeeze DEFS +squeeze LDFLAGS +squeeze LIBS + +squeeze LIBCURL_LIBS +squeeze CURL_NETWORK_LIBS +squeeze CURL_NETWORK_AND_TIME_LIBS + +squeeze SUPPORT_FEATURES +squeeze SUPPORT_PROTOCOLS + +XC_CHECK_BUILD_FLAGS + +SSL_BACKENDS=${ssl_backends} +AC_SUBST(SSL_BACKENDS) + +if test "x$want_curldebug_assumed" = "xyes" && + test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then + ac_configure_args="$ac_configure_args --enable-curldebug" +fi + +AC_CONFIG_FILES([Makefile \ + docs/Makefile \ + docs/examples/Makefile \ + docs/libcurl/Makefile \ + docs/libcurl/opts/Makefile \ + docs/cmdline-opts/Makefile \ + include/Makefile \ + include/curl/Makefile \ + src/Makefile \ + lib/Makefile \ + scripts/Makefile \ + lib/libcurl.vers \ + tests/Makefile \ + tests/certs/Makefile \ + tests/certs/scripts/Makefile \ + tests/data/Makefile \ + tests/server/Makefile \ + tests/libtest/Makefile \ + tests/unit/Makefile \ + packages/Makefile \ + packages/vms/Makefile \ + curl-config \ + libcurl.pc +]) +AC_OUTPUT + +CURL_GENERATE_CONFIGUREHELP_PM + +XC_AMEND_DISTCLEAN([lib src tests/unit tests/server tests/libtest docs/examples]) + +AC_MSG_NOTICE([Configured to build curl/libcurl: + + Host setup: ${host} + Install prefix: ${prefix} + Compiler: ${CC} + CFLAGS: ${CFLAGS} + CPPFLAGS: ${CPPFLAGS} + LDFLAGS: ${LDFLAGS} + LIBS: ${LIBS} + + curl version: ${CURLVERSION} + SSL: ${curl_ssl_msg} + SSH: ${curl_ssh_msg} + zlib: ${curl_zlib_msg} + brotli: ${curl_brotli_msg} + zstd: ${curl_zstd_msg} + GSS-API: ${curl_gss_msg} + TLS-SRP: ${curl_tls_srp_msg} + resolver: ${curl_res_msg} + IPv6: ${curl_ipv6_msg} + Unix sockets: ${curl_unix_sockets_msg} + IDN: ${curl_idn_msg} + Build libcurl: Shared=${enable_shared}, Static=${enable_static} + Built-in manual: ${curl_manual_msg} + --libcurl option: ${curl_libcurl_msg} + Verbose errors: ${curl_verbose_msg} + Code coverage: ${curl_coverage_msg} + SSPI: ${curl_sspi_msg} + ca cert bundle: ${ca}${ca_warning} + ca cert path: ${capath}${capath_warning} + ca fallback: ${with_ca_fallback} + LDAP: ${curl_ldap_msg} + LDAPS: ${curl_ldaps_msg} + RTSP: ${curl_rtsp_msg} + RTMP: ${curl_rtmp_msg} + Metalink: ${curl_mtlnk_msg} + PSL: ${curl_psl_msg} + Alt-svc: ${curl_altsvc_msg} + HTTP2: ${curl_h2_msg} + HTTP3: ${curl_h3_msg} + ECH: ${curl_ech_msg} + Protocols: ${SUPPORT_PROTOCOLS} + Features: ${SUPPORT_FEATURES} +]) +if test -n "$experimental"; then + cat >&2 << _EOF + WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution! +_EOF +fi diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/curl-config.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/curl-config.in new file mode 100644 index 00000000..18b1fc1e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/curl-config.in @@ -0,0 +1,194 @@ +#! /bin/sh +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 2001 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@ + +usage() +{ + cat <&2 + exit 1 + fi + ;; + + --configure) + echo @CONFIGURE_OPTIONS@ + ;; + + *) + echo "unknown option: $1" + usage 1 + ;; + esac + shift +done + +exit 0 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/depcomp b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/depcomp new file mode 100755 index 00000000..6b391623 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2020 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ALTSVC.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ALTSVC.md new file mode 100644 index 00000000..6a462bbb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ALTSVC.md @@ -0,0 +1,39 @@ +# Alt-Svc + +curl features **EXPERIMENTAL** support for the Alt-Svc: HTTP header. + +## Enable Alt-Svc in build + +`./configure --enable-alt-svc` + +## Standard + +[RFC 7838](https://tools.ietf.org/html/rfc7838) + +# Alt-Svc cache file format + +This a text based file with one line per entry and each line consists of nine +space separated fields. + +## Example + + h2 quic.tech 8443 h3-22 quic.tech 8443 "20190808 06:18:37" 0 0 + +## Fields + +1. The ALPN id for the source origin +2. The host name for the source origin +3. The port number for the source origin +4. The ALPN id for the destination host +5. The host name for the destination host +6. The host number for the destination host +7. The expiration date and time of this entry within double quotes. The date format is "YYYYMMDD HH:MM:SS" and the time zone is GMT. +8. Boolean (1 or 0) if "persist" was set for this entry +9. Integer priority value (not currently used) + +# TODO + +- handle multiple response headers, when one of them says `clear` (should + override them all) +- using `Age:` value for caching age as per spec +- `CURLALTSVC_IMMEDIATELY` support diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BINDINGS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BINDINGS.md new file mode 100644 index 00000000..d0e80b8a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BINDINGS.md @@ -0,0 +1,127 @@ +libcurl bindings +================ + + Creative people have written bindings or interfaces for various environments + and programming languages. Using one of these allows you to take advantage of + curl powers from within your favourite language or system. + + This is a list of all known interfaces as of this writing. + + The bindings listed below are not part of the curl/libcurl distribution + archives, but must be downloaded and installed separately. + +[Ada95](https://web.archive.org/web/20070403105909/www.almroth.com/adacurl/index.html) Written by Andreas Almroth + +[Basic](http://scriptbasic.com/) ScriptBasic bindings written by Peter Verhas + +C++: [curlpp](http://curlpp.org/) Written by Jean-Philippe Barrette-LaPierre, +[curlcpp](https://github.com/JosephP91/curlcpp) by Giuseppe Persico and [C++ +Requests](https://github.com/whoshuu/cpr) by Huu Nguyen + +[Ch](https://chcurl.sourceforge.io/) Written by Stephen Nestinger and Jonathan Rogado + +Cocoa: [BBHTTP](https://github.com/brunodecarvalho/BBHTTP) written by Bruno de Carvalho +[curlhandle](https://github.com/karelia/curlhandle) Written by Dan Wood + +Clojure: [clj-curl](https://github.com/lsevero/clj-curl) by Lucas Severo + +[D](https://dlang.org/library/std/net/curl.html) Written by Kenneth Bogert + +[Delphi](https://github.com/Mercury13/curl4delphi) Written by Mikhail Merkuryev + +[Dylan](https://dylanlibs.sourceforge.io/) Written by Chris Double + +[Eiffel](https://room.eiffel.com/library/curl) Written by Eiffel Software + +[Euphoria](https://web.archive.org/web/20050204080544/rays-web.com/eulibcurl.htm) Written by Ray Smith + +[Falcon](http://www.falconpl.org/index.ftd?page_id=prjs&prj_id=curl) + +[Ferite](https://web.archive.org/web/20150102192018/ferite.org/) Written by Paul Querna + +[Gambas](https://gambas.sourceforge.io/) + +[glib/GTK+](https://web.archive.org/web/20100526203452/atterer.net/glibcurl) Written by Richard Atterer + +Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang + +[Guile](http://www.lonelycactus.com/guile-curl.html) Written by Michael L. Gran + +[Harbour](https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl) Written by Viktor Szakáts + +[Haskell](https://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl) Written by Galois, Inc + +[Java](https://github.com/pjlegato/curl-java) + +[Julia](https://github.com/forio/Curl.jl) Written by Paul Howe + +[Kapito](https://github.com/puzza007/katipo) is an Erlang HTTP library around libcurl. + +[Lisp](https://common-lisp.net/project/cl-curl/) Written by Liam Healy + +Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel + +[Mono](https://forge.novell.com/modules/xfmod/project/?libcurl-mono) Written by Jeffrey Phillips + +[.NET](https://sourceforge.net/projects/libcurl-net/) libcurl-net by Jeffrey Phillips + +[Nim](https://nimble.directory/pkg/libcurl) wrapper for libcurl + +[node.js](https://github.com/JCMais/node-libcurl) node-libcurl by Jonathan Cardoso Machado + +[Object-Pascal](https://web.archive.org/web/20020610214926/www.tekool.com/opcurl) Free Pascal, Delphi and Kylix binding written by Christophe Espern. + +[OCaml](https://opam.ocaml.org/packages/ocurl/) Written by Lars Nilsson and ygrek + +[Pascal](https://web.archive.org/web/20030804091414/houston.quik.com/jkp/curlpas/) Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer. + +Perl: [WWW::Curl](https://github.com/szbalint/WWW--Curl) Maintained by Cris +Bailiff and Bálint Szilakszi, +[perl6-net-curl](https://github.com/azawawi/perl6-net-curl) by Ahmad M. Zawawi +[NET::Curl](https://metacpan.org/pod/Net::Curl) by Przemyslaw Iskra + +[PHP](https://php.net/curl) Originally written by Sterling Hughes + +[PostgreSQL](https://github.com/pramsey/pgsql-http) - HTTP client for PostgreSQL + +[PureBasic](https://www.purebasic.com/documentation/http/index.html) uses libcurl in its "native" HTTP subsystem + +[Python](http://pycurl.io/) PycURL by Kjetil Jacobsen + +[R](https://cran.r-project.org/package=curl) + +[Rexx](https://rexxcurl.sourceforge.io/) Written Mark Hessling + +[Ring](https://ring-lang.sourceforge.io/doc1.3/libcurl.html) RingLibCurl by Mahmoud Fayed + +RPG, support for ILE/RPG on OS/400 is included in source distribution + +Ruby: [curb](https://github.com/taf2/curb) written by Ross Bamford + +[Rust](https://github.com/carllerche/curl-rust) curl-rust - by Carl Lerche + +[Scheme](https://www.metapaper.net/lisovsky/web/curl/) Bigloo binding by Kirill Lisovsky + +[Scilab](https://help.scilab.org/docs/current/fr_FR/getURL.html) binding by Sylvestre Ledru + +[S-Lang](https://www.jedsoft.org/slang/modules/curl.html) by John E Davis + +[Smalltalk](http://www.squeaksource.com/CurlPlugin/) Written by Danil Osipchuk + +[SP-Forth](https://sourceforge.net/p/spf/spf/ci/master/tree/devel/~ac/lib/lin/curl/) Written by Andrey Cherezov + +[SPL](http://www.clifford.at/spl/) Written by Clifford Wolf + +[Tcl](https://web.archive.org/web/20160826011806/mirror.yellow5.com/tclcurl/) Tclcurl by Andrés García + +[Visual Basic](https://sourceforge.net/projects/libcurl-vb/) libcurl-vb by Jeffrey Phillips + +[Visual Foxpro](https://web.archive.org/web/20130730181523/www.ctl32.com.ar/libcurl.asp) by Carlos Alloatti + +[Q](https://q-lang.sourceforge.io/) The libcurl module is part of the default install + +[wxWidgets](https://wxcode.sourceforge.io/components/wxcurl/) Written by Casey O'Donnell + +[XBLite](https://web.archive.org/web/20060426150418/perso.wanadoo.fr/xblite/libraries.html) Written by David Szafranski + +[Xojo](https://github.com/charonn0/RB-libcURL) Written by Andrew Lambert diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUG-BOUNTY.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUG-BOUNTY.md new file mode 100644 index 00000000..8ee9ac62 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUG-BOUNTY.md @@ -0,0 +1,106 @@ +# The curl bug bounty + +The curl project runs a bug bounty program in association with +[HackerOne](https://www.hackerone.com) and the [Internet Bug +Bounty](https://internetbugbounty.org). + +# How does it work? + +Start out by posting your suspected security vulnerability directly to [curl's +HackerOne program](https://hackerone.com/curl). + +After you have reported a security issue, it has been deemed credible, and a +patch and advisory has been made public, you may be eligible for a bounty from +this program. + +See all details at [https://hackerone.com/curl](https://hackerone.com/curl) + +This bounty is relying on funds from sponsors. If you use curl professionally, +consider help funding this! See +[https://opencollective.com/curl](https://opencollective.com/curl) for +details. + +# What are the reward amounts? + +The curl projects offer monetary compensation for reported and published +security vulnerabilities. The amount of money that is rewarded depends on how +serious the flaw is determined to be. + +We offer reward money *up to* a certain amount per severity. The curl security +team determines the severity of each reported flaw on a case by case basis and +the exact amount rewarded to the reporter is then decided. + +Check out the current award amounts at [https://hackerone.com/curl](https://hackerone.com/curl) + +# Who is eligible for a reward? + +Everyone and anyone who reports a security problem in a released curl version +that hasn't already been reported can ask for a bounty. + +Vulnerabilities in features that are off by default and documented as +experimental are not eligible for a reward. + +The vulnerability has to be fixed and publicly announced (by the curl project) +before a bug bounty will be considered. + +Bounties need to be requested within twelve months from the publication of the +vulnerability. + +The vulnerabilities must not have been made public before February 1st, 2019. +We do not retroactively pay for old, already known, or published security +problems. + +# Product vulnerabilities only + +This bug bounty only concerns the curl and libcurl products and thus their +respective source codes - when running on existing hardware. It does not +include documentation, websites, or other infrastructure. + +The curl security team will be the sole arbiter if a reported flaw can be +subject to a bounty or not. + +# How are vulnerabilities graded? + +The grading of each reported vulnerability that makes a reward claim will be +performed by the curl security team. The grading will be based on the CVSS +(Common Vulnerability Scoring System) 3.0. + +# How are reward amounts determined? + +The curl security team first gives the vulnerability a score, as mentioned +above, and based on that level we set an amount depending on the specifics of +the individual case. Other sponsors of the program might also get involved and +can raise the amounts depending on the particular issue. + +# What happens if the bounty fund is drained? + +The bounty fund depends on sponsors. If we pay out more bounties than we add, +the fund will eventually drain. If that end up happening, we will simply not +be able to pay out as high bounties as we would like and hope that we can +convince new sponsors to help us top up the fund again. + +# Regarding taxes, etc. on the bounties + +In the event that the individual receiving a curl bug bounty needs to pay +taxes on the reward money, the responsibility lies with the receiver. The +curl project or its security team never actually receive any of this money, +hold the money, or pay out the money. + +## Bonus levels + +In cooperation with [Dropbox](https://www.dropbox.com) the curl bug bounty can +offer the highest levels of rewards if the issue covers one of the interest +areas of theirs - and only if the bug is graded *high* or *critical*. A +non-exhaustive list of vulnerabilities Dropbox is interested in are: + + - RCE + - URL parsing vulnerabilities with demonstrable security impact + +Dropbox would generally hand out rewards for critical vulnerabilities ranging +from 12k-32k USD where RCE is on the upper end of the spectrum. + +URL parsing vulnerabilities with demonstrable security impact might include +incorrectly determining the authority of a URL when a special character is +inserted into the path of the URL (as a hypothetical). This type of +vulnerability would likely yield 6k-12k unless further impact could be +demonstrated. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUGS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUGS.md new file mode 100644 index 00000000..cc09a5d1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/BUGS.md @@ -0,0 +1,266 @@ +# BUGS + +## There are still bugs + + Curl and libcurl keep being developed. Adding features and changing code + means that bugs will sneak in, no matter how hard we try not to. + + Of course there are lots of bugs left. And lots of misfeatures. + + To help us make curl the stable and solid product we want it to be, we need + bug reports and bug fixes. + +## Where to report + + If you can't fix a bug yourself and submit a fix for it, try to report an as + detailed report as possible to a curl mailing list to allow one of us to have + a go at a solution. You can optionally also submit your problem in [curl's + bug tracking system](https://github.com/curl/curl/issues). + + Please read the rest of this document below first before doing that! + + If you feel you need to ask around first, find a suitable [mailing list]( + https://curl.haxx.se/mail/) and post your questions there. + +## Security bugs + + If you find a bug or problem in curl or libcurl that you think has a security + impact, for example a bug that can put users in danger or make them + vulnerable if the bug becomes public knowledge, then please report that bug + using our security development process. + + Security related bugs or bugs that are suspected to have a security impact, + should be reported on the [curl security tracker at + HackerOne](https://hackerone.com/curl). + + This ensures that the report reaches the curl security team so that they + first can be deal with the report away from the public to minimize the harm + and impact it will have on existing users out there who might be using the + vulnerable versions. + + The curl project's process for handling security related issues is + [documented separately](https://curl.haxx.se/dev/secprocess.html). + +## What to report + + When reporting a bug, you should include all information that will help us + understand what's wrong, what you expected to happen and how to repeat the + bad behavior. You therefore need to tell us: + + - your operating system's name and version number + + - what version of curl you're using (`curl -V` is fine) + + - versions of the used libraries that libcurl is built to use + + - what URL you were working with (if possible), at least which protocol + + and anything and everything else you think matters. Tell us what you expected + to happen, tell use what did happen, tell us how you could make it work + another way. Dig around, try out, test. Then include all the tiny bits and + pieces in your report. You will benefit from this yourself, as it will enable + us to help you quicker and more accurately. + + Since curl deals with networks, it often helps us if you include a protocol + debug dump with your bug report. The output you get by using the `-v` or + `--trace` options. + + If curl crashed, causing a core dump (in unix), there is hardly any use to + send that huge file to anyone of us. Unless we have an exact same system + setup as you, we can't do much with it. Instead we ask you to get a stack + trace and send that (much smaller) output to us instead! + + The address and how to subscribe to the mailing lists are detailed in the + `MANUAL.md` file. + +## libcurl problems + + When you've written your own application with libcurl to perform transfers, + it is even more important to be specific and detailed when reporting bugs. + + Tell us the libcurl version and your operating system. Tell us the name and + version of all relevant sub-components like for example the SSL library + you're using and what name resolving your libcurl uses. If you use SFTP or + SCP, the libssh2 version is relevant etc. + + Showing us a real source code example repeating your problem is the best way + to get our attention and it will greatly increase our chances to understand + your problem and to work on a fix (if we agree it truly is a problem). + + Lots of problems that appear to be libcurl problems are actually just abuses + of the libcurl API or other malfunctions in your applications. It is advised + that you run your problematic program using a memory debug tool like valgrind + or similar before you post memory-related or "crashing" problems to us. + +## Who will fix the problems + + If the problems or bugs you describe are considered to be bugs, we want to + have the problems fixed. + + There are no developers in the curl project that are paid to work on bugs. + All developers that take on reported bugs do this on a voluntary basis. We do + it out of an ambition to keep curl and libcurl excellent products and out of + pride. + + But please do not assume that you can just lump over something to us and it + will then magically be fixed after some given time. Most often we need + feedback and help to understand what you've experienced and how to repeat a + problem. Then we may only be able to assist YOU to debug the problem and to + track down the proper fix. + + We get reports from many people every month and each report can take a + considerable amount of time to really go to the bottom with. + +## How to get a stack trace + + First, you must make sure that you compile all sources with `-g` and that you + don't 'strip' the final executable. Try to avoid optimizing the code as well, + remove `-O`, `-O2` etc from the compiler options. + + Run the program until it cores. + + Run your debugger on the core file, like ` curl + core`. `` should be replaced with the name of your debugger, in + most cases that will be `gdb`, but `dbx` and others also occur. + + When the debugger has finished loading the core file and presents you a + prompt, enter `where` (without quotes) and press return. + + The list that is presented is the stack trace. If everything worked, it is + supposed to contain the chain of functions that were called when curl + crashed. Include the stack trace with your detailed bug report. It'll help a + lot. + +## Bugs in libcurl bindings + + There will of course pop up bugs in libcurl bindings. You should then + primarily approach the team that works on that particular binding and see + what you can do to help them fix the problem. + + If you suspect that the problem exists in the underlying libcurl, then please + convert your program over to plain C and follow the steps outlined above. + +## Bugs in old versions + + The curl project typically releases new versions every other month, and we + fix several hundred bugs per year. For a huge table of releases, number of + bug fixes and more, see: https://curl.haxx.se/docs/releases.html + + The developers in the curl project do not have bandwidth or energy enough to + maintain several branches or to spend much time on hunting down problems in + old versions when chances are we already fixed them or at least that they've + changed nature and appearance in later versions. + + When you experience a problem and want to report it, you really SHOULD + include the version number of the curl you're using when you experience the + issue. If that version number shows us that you're using an out-of-date curl, + you should also try out a modern curl version to see if the problem persists + or how/if it has changed in appearance. + + Even if you cannot immediately upgrade your application/system to run the + latest curl version, you can most often at least run a test version or + experimental build or similar, to get this confirmed or not. + + At times people insist that they cannot upgrade to a modern curl version, but + instead they "just want the bug fixed". That's fine, just don't count on us + spending many cycles on trying to identify which single commit, if that's + even possible, that at some point in the past fixed the problem you're now + experiencing. + + Security wise, it is almost always a bad idea to lag behind the current curl + versions by a lot. We keeping discovering and reporting security problems + over time see you can see in [this + table](https://curl.haxx.se/docs/vulnerabilities.html) + +# Bug fixing procedure + +## What happens on first filing + + When a new issue is posted in the issue tracker or on the mailing list, the + team of developers first need to see the report. Maybe they took the day off, + maybe they're off in the woods hunting. Have patience. Allow at least a few + days before expecting someone to have responded. + + In the issue tracker you can expect that some labels will be set on the issue + to help categorize it. + +## First response + + If your issue/bug report wasn't perfect at once (and few are), chances are + that someone will ask follow-up questions. Which version did you use? Which + options did you use? How often does the problem occur? How can we reproduce + this problem? Which protocols does it involve? Or perhaps much more specific + and deep diving questions. It all depends on your specific issue. + + You should then respond to these follow-up questions and provide more info + about the problem, so that we can help you figure it out. Or maybe you can + help us figure it out. An active back-and-forth communication is important + and the key for finding a cure and landing a fix. + +## Not reproducible + + For problems that we can't reproduce and can't understand even after having + gotten all the info we need and having studied the source code over again, + are really hard to solve so then we may require further work from you who + actually see or experience the problem. + +## Unresponsive + + If the problem haven't been understood or reproduced, and there's nobody + responding to follow-up questions or questions asking for clarifications or + for discussing possible ways to move forward with the task, we take that as a + strong suggestion that the bug is not important. + + Unimportant issues will be closed as inactive sooner or later as they can't + be fixed. The inactivity period (waiting for responses) should not be shorter + than two weeks but may extend months. + +## Lack of time/interest + + Bugs that are filed and are understood can unfortunately end up in the + "nobody cares enough about it to work on it" category. Such bugs are + perfectly valid problems that *should* get fixed but apparently aren't. We + try to mark such bugs as `KNOWN_BUGS material` after a time of inactivity and + if no activity is noticed after yet some time those bugs are added to + `KNOWN_BUGS` and are closed in the issue tracker. + +## `KNOWN_BUGS` + + This is a list of known bugs. Bugs we know exist and that have been pointed + out but that haven't yet been fixed. The reasons for why they haven't been + fixed can involve anything really, but the primary reason is that nobody has + considered these problems to be important enough to spend the necessary time + and effort to have them fixed. + + The `KNOWN_BUGS` are always up for grabs and we will always love the ones who + bring one of them back to live and offers solutions to them. + + The `KNOWN_BUGS` document has a sibling document known as `TODO`. + +## `TODO` + + Issues that are filed or reported that aren't really bugs but more missing + features or ideas for future improvements and so on are marked as + 'enhancement' or 'feature-request' and will be added to the `TODO` document + instead and the issue is closed. We don't keep TODO items in the issue + tracker. + + The `TODO` document is full of ideas and suggestions of what we can add or + fix one day. You're always encouraged and free to grab one of those items and + take up a discussion with the curl development team on how that could be + implemented or provided in the project so that you can work on ticking it odd + that document. + + If the issue is rather a bug and not a missing feature or functionality, it + is listed in `KNOWN_BUGS` instead. + +## Closing off stalled bugs + + The [issue and pull request trackers](https://github.com/curl/curl) only + holds "active" entries open (using a non-precise definition of what active + actually is, but they're at least not completely dead). Those that are + abandoned or in other ways dormant will be closed and sometimes added to + `TODO` and `KNOWN_BUGS` instead. + + This way, we only have "active" issues open on github. Irrelevant issues and + pull requests will not distract developers or casual visitors. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CHECKSRC.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CHECKSRC.md new file mode 100644 index 00000000..d36763bc --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CHECKSRC.md @@ -0,0 +1,166 @@ +# checksrc + +This is the tool we use within the curl project to scan C source code and +check that it adheres to our [Source Code Style guide](CODE_STYLE.md). + +## Usage + + checksrc.pl [options] [file1] [file2] ... + +## Command line options + +`-W[file]` skip that file and excludes it from being checked. Helpful +when, for example, one of the files is generated. + +`-D[dir]` directory name to prepend to file names when accessing them. + +`-h` shows the help output, that also lists all recognized warnings + +## What does checksrc warn for? + +checksrc does not check and verify the code against the entire style guide, +but the script is instead an effort to detect the most common mistakes and +syntax mistakes that contributors make before they get accustomed to our code +style. Heck, many of us regulars do the mistakes too and this script helps us +keep the code in shape. + + checksrc.pl -h + +Lists how to use the script and it lists all existing warnings it has and +problems it detects. At the time of this writing, the existing checksrc +warnings are: + +- `ASSIGNWITHINCONDITION`: Assignment within a conditional expression. The + code style mandates the assignment to be done outside of it. + +- `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the more + appropriate `char *name` style. The asterisk should sit next to the name. + +- `ASTERISKSPACE`: A pointer was declared like `char * name` instead of the + more appropriate `char *name` style. The asterisk should sit right next to + the name without a space in between. + +- `BADCOMMAND`: There's a bad !checksrc! instruction in the code. See the + **Ignore certain warnings** section below for details. + +- `BANNEDFUNC`: A banned function was used. The functions sprintf, vsprintf, + strcat, strncat, gets are **never** allowed in curl source code. + +- `BRACEELSE`: '} else' on the same line. The else is supposed to be on the + following line. + +- `BRACEPOS`: wrong position for an open brace (`{`). + +- `COMMANOSPACE`: a comma without following space + +- `COPYRIGHT`: the file is missing a copyright statement! + +- `CPPCOMMENTS`: `//` comment detected, that's not C89 compliant + +- `FOPENMODE`: `fopen()` needs a macro for the mode string, use it + +- `INDENTATION`: detected a wrong start column for code. Note that this + warning only checks some specific places and will certainly miss many bad + indentations. + +- `LONGLINE`: A line is longer than 79 columns. + +- `MULTISPACE`: Multiple spaces were found where only one should be used. + +- `NOSPACEEQUALS`: An equals sign was found without preceding space. We prefer + `a = 2` and *not* `a=2`. + +- `ONELINECONDITION`: do not put the conditional block on the same line as `if()` + +- `OPENCOMMENT`: File ended with a comment (`/*`) still "open". + +- `PARENBRACE`: `){` was used without sufficient space in between. + +- `RETURNNOSPACE`: `return` was used without space between the keyword and the + following value. + +- `SEMINOSPACE`: There was no space (or newline) following a semicolon. + +- `SIZEOFNOPAREN`: Found use of sizeof without parentheses. We prefer + `sizeof(int)` style. + +- `SNPRINTF` - Found use of `snprintf()`. Since we use an internal replacement + with a different return code etc, we prefer `msnprintf()`. + +- `SPACEAFTERPAREN`: there was a space after open parenthesis, `( text`. + +- `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`. + +- `SPACEBEFORECOMMA`: there was a space before a comma, `one , two`. + +- `SPACEBEFOREPAREN`: there was a space before an open parenthesis, `if (`, + where one was not expected + +- `SPACESEMICOLON`: there was a space before semicolon, ` ;`. + +- `TABS`: TAB characters are not allowed! + +- `TRAILINGSPACE`: Trailing whitespace on the line + +- `TYPEDEFSTRUCT`: we frown upon (most) typedefed structs + +- `UNUSEDIGNORE`: a checksrc inlined warning ignore was asked for but not used, + that's an ignore that should be removed or changed to get used. + +### Extended warnings + +Some warnings are quite computationally expensive to perform, so they are +turned off by default. To enable these warnings, place a `.checksrc` file in +the directory where they should be activated with commands to enable the +warnings you are interested in. The format of the file is to enable one +warning per line like so: `enable ` + +Currently there is one extended warning which can be enabled: + +- `COPYRIGHTYEAR`: the current changeset hasn't updated the copyright year in + the source file + +## Ignore certain warnings + +Due to the nature of the source code and the flaws of the checksrc tool, there +is sometimes a need to ignore specific warnings. checksrc allows a few +different ways to do this. + +### Inline ignore + +You can control what to ignore within a specific source file by providing +instructions to checksrc in the source code itself. You need a magic marker +that is `!checksrc!` followed by the instruction. The instruction can ask to +ignore a specific warning N number of times or you ignore all of them until +you mark the end of the ignored section. + +Inline ignores are only done for that single specific source code file. + +Example + + /* !checksrc! disable LONGLINE all */ + +This will ignore the warning for overly long lines until it is re-enabled with: + + /* !checksrc! enable LONGLINE */ + +If the enabling isn't performed before the end of the file, it will be enabled +automatically for the next file. + +You can also opt to ignore just N violations so that if you have a single long +line you just can't shorten and is agreed to be fine anyway: + + /* !checksrc! disable LONGLINE 1 */ + +... and the warning for long lines will be enabled again automatically after +it has ignored that single warning. The number `1` can of course be changed to +any other integer number. It can be used to make sure only the exact intended +instances are ignored and nothing extra. + +### Directory wide ignore patterns + +This is a method we've transitioned away from. Use inline ignores as far as +possible. + +Make a `checksrc.skip` file in the directory of the source code with the +false positive, and include the full offending line into this file. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CIPHERS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CIPHERS.md new file mode 100644 index 00000000..19aedf36 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CIPHERS.md @@ -0,0 +1,516 @@ +# Ciphers + +With curl's options +[`CURLOPT_SSL_CIPHER_LIST`](https://curl.haxx.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html) +and +[`--ciphers`](https://curl.haxx.se/docs/manpage.html#--ciphers) +users can control which ciphers to consider when negotiating TLS connections. + +TLS 1.3 ciphers are supported since curl 7.61 for OpenSSL 1.1.1+ with options +[`CURLOPT_TLS13_CIPHERS`](https://curl.haxx.se/libcurl/c/CURLOPT_TLS13_CIPHERS.html) +and +[`--tls13-ciphers`](https://curl.haxx.se/docs/manpage.html#--tls13-ciphers) +. If you are using a different SSL backend you can try setting TLS 1.3 cipher +suites by using the respective regular cipher option. + +The names of the known ciphers differ depending on which TLS backend that +libcurl was built to use. This is an attempt to list known cipher names. + +## OpenSSL + +(based on [OpenSSL docs](https://www.openssl.org/docs/man1.1.0/apps/ciphers.html)) + +When specifying multiple cipher names, separate them with colon (`:`). + +### SSL3 cipher suites + +`NULL-MD5` +`NULL-SHA` +`RC4-MD5` +`RC4-SHA` +`IDEA-CBC-SHA` +`DES-CBC3-SHA` +`DH-DSS-DES-CBC3-SHA` +`DH-RSA-DES-CBC3-SHA` +`DHE-DSS-DES-CBC3-SHA` +`DHE-RSA-DES-CBC3-SHA` +`ADH-RC4-MD5` +`ADH-DES-CBC3-SHA` + +### TLS v1.0 cipher suites + +`NULL-MD5` +`NULL-SHA` +`RC4-MD5` +`RC4-SHA` +`IDEA-CBC-SHA` +`DES-CBC3-SHA` +`DHE-DSS-DES-CBC3-SHA` +`DHE-RSA-DES-CBC3-SHA` +`ADH-RC4-MD5` +`ADH-DES-CBC3-SHA` + +### AES ciphersuites from RFC3268, extending TLS v1.0 + +`AES128-SHA` +`AES256-SHA` +`DH-DSS-AES128-SHA` +`DH-DSS-AES256-SHA` +`DH-RSA-AES128-SHA` +`DH-RSA-AES256-SHA` +`DHE-DSS-AES128-SHA` +`DHE-DSS-AES256-SHA` +`DHE-RSA-AES128-SHA` +`DHE-RSA-AES256-SHA` +`ADH-AES128-SHA` +`ADH-AES256-SHA` + +### SEED ciphersuites from RFC4162, extending TLS v1.0 + +`SEED-SHA` +`DH-DSS-SEED-SHA` +`DH-RSA-SEED-SHA` +`DHE-DSS-SEED-SHA` +`DHE-RSA-SEED-SHA` +`ADH-SEED-SHA` + +### GOST ciphersuites, extending TLS v1.0 + +`GOST94-GOST89-GOST89` +`GOST2001-GOST89-GOST89` +`GOST94-NULL-GOST94` +`GOST2001-NULL-GOST94` + +### Elliptic curve cipher suites + +`ECDHE-RSA-NULL-SHA` +`ECDHE-RSA-RC4-SHA` +`ECDHE-RSA-DES-CBC3-SHA` +`ECDHE-RSA-AES128-SHA` +`ECDHE-RSA-AES256-SHA` +`ECDHE-ECDSA-NULL-SHA` +`ECDHE-ECDSA-RC4-SHA` +`ECDHE-ECDSA-DES-CBC3-SHA` +`ECDHE-ECDSA-AES128-SHA` +`ECDHE-ECDSA-AES256-SHA` +`AECDH-NULL-SHA` +`AECDH-RC4-SHA` +`AECDH-DES-CBC3-SHA` +`AECDH-AES128-SHA` +`AECDH-AES256-SHA` + +### TLS v1.2 cipher suites + +`NULL-SHA256` +`AES128-SHA256` +`AES256-SHA256` +`AES128-GCM-SHA256` +`AES256-GCM-SHA384` +`DH-RSA-AES128-SHA256` +`DH-RSA-AES256-SHA256` +`DH-RSA-AES128-GCM-SHA256` +`DH-RSA-AES256-GCM-SHA384` +`DH-DSS-AES128-SHA256` +`DH-DSS-AES256-SHA256` +`DH-DSS-AES128-GCM-SHA256` +`DH-DSS-AES256-GCM-SHA384` +`DHE-RSA-AES128-SHA256` +`DHE-RSA-AES256-SHA256` +`DHE-RSA-AES128-GCM-SHA256` +`DHE-RSA-AES256-GCM-SHA384` +`DHE-DSS-AES128-SHA256` +`DHE-DSS-AES256-SHA256` +`DHE-DSS-AES128-GCM-SHA256` +`DHE-DSS-AES256-GCM-SHA384` +`ECDHE-RSA-AES128-SHA256` +`ECDHE-RSA-AES256-SHA384` +`ECDHE-RSA-AES128-GCM-SHA256` +`ECDHE-RSA-AES256-GCM-SHA384` +`ECDHE-ECDSA-AES128-SHA256` +`ECDHE-ECDSA-AES256-SHA384` +`ECDHE-ECDSA-AES128-GCM-SHA256` +`ECDHE-ECDSA-AES256-GCM-SHA384` +`ADH-AES128-SHA256` +`ADH-AES256-SHA256` +`ADH-AES128-GCM-SHA256` +`ADH-AES256-GCM-SHA384` +`AES128-CCM` +`AES256-CCM` +`DHE-RSA-AES128-CCM` +`DHE-RSA-AES256-CCM` +`AES128-CCM8` +`AES256-CCM8` +`DHE-RSA-AES128-CCM8` +`DHE-RSA-AES256-CCM8` +`ECDHE-ECDSA-AES128-CCM` +`ECDHE-ECDSA-AES256-CCM` +`ECDHE-ECDSA-AES128-CCM8` +`ECDHE-ECDSA-AES256-CCM8` + +### Camellia HMAC-Based ciphersuites from RFC6367, extending TLS v1.2 + +`ECDHE-ECDSA-CAMELLIA128-SHA256` +`ECDHE-ECDSA-CAMELLIA256-SHA384` +`ECDHE-RSA-CAMELLIA128-SHA256` +`ECDHE-RSA-CAMELLIA256-SHA384` + +### TLS 1.3 cipher suites + +(Note these ciphers are set with `CURLOPT_TLS13_CIPHERS` and `--tls13-ciphers`) + +`TLS_AES_256_GCM_SHA384` +`TLS_CHACHA20_POLY1305_SHA256` +`TLS_AES_128_GCM_SHA256` +`TLS_AES_128_CCM_8_SHA256` +`TLS_AES_128_CCM_SHA256` + +## NSS + +### Totally insecure + +`rc4` +`rc4-md5` +`rc4export` +`rc2` +`rc2export` +`des` +`desede3` + +### SSL3/TLS cipher suites + +`rsa_rc4_128_md5` +`rsa_rc4_128_sha` +`rsa_3des_sha` +`rsa_des_sha` +`rsa_rc4_40_md5` +`rsa_rc2_40_md5` +`rsa_null_md5` +`rsa_null_sha` +`fips_3des_sha` +`fips_des_sha` +`fortezza` +`fortezza_rc4_128_sha` +`fortezza_null` + +### TLS 1.0 Exportable 56-bit Cipher Suites + +`rsa_des_56_sha` +`rsa_rc4_56_sha` + +### AES ciphers + +`dhe_dss_aes_128_cbc_sha` +`dhe_dss_aes_256_cbc_sha` +`dhe_rsa_aes_128_cbc_sha` +`dhe_rsa_aes_256_cbc_sha` +`rsa_aes_128_sha` +`rsa_aes_256_sha` + +### ECC ciphers + +`ecdh_ecdsa_null_sha` +`ecdh_ecdsa_rc4_128_sha` +`ecdh_ecdsa_3des_sha` +`ecdh_ecdsa_aes_128_sha` +`ecdh_ecdsa_aes_256_sha` +`ecdhe_ecdsa_null_sha` +`ecdhe_ecdsa_rc4_128_sha` +`ecdhe_ecdsa_3des_sha` +`ecdhe_ecdsa_aes_128_sha` +`ecdhe_ecdsa_aes_256_sha` +`ecdh_rsa_null_sha` +`ecdh_rsa_128_sha` +`ecdh_rsa_3des_sha` +`ecdh_rsa_aes_128_sha` +`ecdh_rsa_aes_256_sha` +`ecdhe_rsa_null` +`ecdhe_rsa_rc4_128_sha` +`ecdhe_rsa_3des_sha` +`ecdhe_rsa_aes_128_sha` +`ecdhe_rsa_aes_256_sha` +`ecdh_anon_null_sha` +`ecdh_anon_rc4_128sha` +`ecdh_anon_3des_sha` +`ecdh_anon_aes_128_sha` +`ecdh_anon_aes_256_sha` + +### HMAC-SHA256 cipher suites + +`rsa_null_sha_256` +`rsa_aes_128_cbc_sha_256` +`rsa_aes_256_cbc_sha_256` +`dhe_rsa_aes_128_cbc_sha_256` +`dhe_rsa_aes_256_cbc_sha_256` +`ecdhe_ecdsa_aes_128_cbc_sha_256` +`ecdhe_rsa_aes_128_cbc_sha_256` + +### AES GCM cipher suites in RFC 5288 and RFC 5289 + +`rsa_aes_128_gcm_sha_256` +`dhe_rsa_aes_128_gcm_sha_256` +`dhe_dss_aes_128_gcm_sha_256` +`ecdhe_ecdsa_aes_128_gcm_sha_256` +`ecdh_ecdsa_aes_128_gcm_sha_256` +`ecdhe_rsa_aes_128_gcm_sha_256` +`ecdh_rsa_aes_128_gcm_sha_256` + +### cipher suites using SHA384 + +`rsa_aes_256_gcm_sha_384` +`dhe_rsa_aes_256_gcm_sha_384` +`dhe_dss_aes_256_gcm_sha_384` +`ecdhe_ecdsa_aes_256_sha_384` +`ecdhe_rsa_aes_256_sha_384` +`ecdhe_ecdsa_aes_256_gcm_sha_384` +`ecdhe_rsa_aes_256_gcm_sha_384` + +### chacha20-poly1305 cipher suites + +`ecdhe_rsa_chacha20_poly1305_sha_256` +`ecdhe_ecdsa_chacha20_poly1305_sha_256` +`dhe_rsa_chacha20_poly1305_sha_256` + +### TLS 1.3 cipher suites + +`aes_128_gcm_sha_256` +`aes_256_gcm_sha_384` +`chacha20_poly1305_sha_256` + +## GSKit + +Ciphers are internally defined as +[numeric codes](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/gsk_attribute_set_buffer.htm), +but libcurl maps them to the following case-insensitive names. + +### SSL2 cipher suites (insecure: disabled by default) + +`rc2-md5` +`rc4-md5` +`exp-rc2-md5` +`exp-rc4-md5` +`des-cbc-md5` +`des-cbc3-md5` + +### SSL3 cipher suites + +`null-md5` +`null-sha` +`rc4-md5` +`rc4-sha` +`exp-rc2-cbc-md5` +`exp-rc4-md5` +`exp-des-cbc-sha` +`des-cbc3-sha` + +### TLS v1.0 cipher suites + +`null-md5` +`null-sha` +`rc4-md5` +`rc4-sha` +`exp-rc2-cbc-md5` +`exp-rc4-md5` +`exp-des-cbc-sha` +`des-cbc3-sha` +`aes128-sha` +`aes256-sha` + +### TLS v1.1 cipher suites + +`null-md5` +`null-sha` +`rc4-md5` +`rc4-sha` +`exp-des-cbc-sha` +`des-cbc3-sha` +`aes128-sha` +`aes256-sha` + +### TLS v1.2 cipher suites + +`null-md5` +`null-sha` +`null-sha256` +`rc4-md5` +`rc4-sha` +`des-cbc3-sha` +`aes128-sha` +`aes256-sha` +`aes128-sha256` +`aes256-sha256` +`aes128-gcm-sha256` +`aes256-gcm-sha384` + +## WolfSSL + +`RC4-SHA`, +`RC4-MD5`, +`DES-CBC3-SHA`, +`AES128-SHA`, +`AES256-SHA`, +`NULL-SHA`, +`NULL-SHA256`, +`DHE-RSA-AES128-SHA`, +`DHE-RSA-AES256-SHA`, +`DHE-PSK-AES256-GCM-SHA384`, +`DHE-PSK-AES128-GCM-SHA256`, +`PSK-AES256-GCM-SHA384`, +`PSK-AES128-GCM-SHA256`, +`DHE-PSK-AES256-CBC-SHA384`, +`DHE-PSK-AES128-CBC-SHA256`, +`PSK-AES256-CBC-SHA384`, +`PSK-AES128-CBC-SHA256`, +`PSK-AES128-CBC-SHA`, +`PSK-AES256-CBC-SHA`, +`DHE-PSK-AES128-CCM`, +`DHE-PSK-AES256-CCM`, +`PSK-AES128-CCM`, +`PSK-AES256-CCM`, +`PSK-AES128-CCM-8`, +`PSK-AES256-CCM-8`, +`DHE-PSK-NULL-SHA384`, +`DHE-PSK-NULL-SHA256`, +`PSK-NULL-SHA384`, +`PSK-NULL-SHA256`, +`PSK-NULL-SHA`, +`HC128-MD5`, +`HC128-SHA`, +`HC128-B2B256`, +`AES128-B2B256`, +`AES256-B2B256`, +`RABBIT-SHA`, +`NTRU-RC4-SHA`, +`NTRU-DES-CBC3-SHA`, +`NTRU-AES128-SHA`, +`NTRU-AES256-SHA`, +`AES128-CCM-8`, +`AES256-CCM-8`, +`ECDHE-ECDSA-AES128-CCM`, +`ECDHE-ECDSA-AES128-CCM-8`, +`ECDHE-ECDSA-AES256-CCM-8`, +`ECDHE-RSA-AES128-SHA`, +`ECDHE-RSA-AES256-SHA`, +`ECDHE-ECDSA-AES128-SHA`, +`ECDHE-ECDSA-AES256-SHA`, +`ECDHE-RSA-RC4-SHA`, +`ECDHE-RSA-DES-CBC3-SHA`, +`ECDHE-ECDSA-RC4-SHA`, +`ECDHE-ECDSA-DES-CBC3-SHA`, +`AES128-SHA256`, +`AES256-SHA256`, +`DHE-RSA-AES128-SHA256`, +`DHE-RSA-AES256-SHA256`, +`ECDH-RSA-AES128-SHA`, +`ECDH-RSA-AES256-SHA`, +`ECDH-ECDSA-AES128-SHA`, +`ECDH-ECDSA-AES256-SHA`, +`ECDH-RSA-RC4-SHA`, +`ECDH-RSA-DES-CBC3-SHA`, +`ECDH-ECDSA-RC4-SHA`, +`ECDH-ECDSA-DES-CBC3-SHA`, +`AES128-GCM-SHA256`, +`AES256-GCM-SHA384`, +`DHE-RSA-AES128-GCM-SHA256`, +`DHE-RSA-AES256-GCM-SHA384`, +`ECDHE-RSA-AES128-GCM-SHA256`, +`ECDHE-RSA-AES256-GCM-SHA384`, +`ECDHE-ECDSA-AES128-GCM-SHA256`, +`ECDHE-ECDSA-AES256-GCM-SHA384`, +`ECDH-RSA-AES128-GCM-SHA256`, +`ECDH-RSA-AES256-GCM-SHA384`, +`ECDH-ECDSA-AES128-GCM-SHA256`, +`ECDH-ECDSA-AES256-GCM-SHA384`, +`CAMELLIA128-SHA`, +`DHE-RSA-CAMELLIA128-SHA`, +`CAMELLIA256-SHA`, +`DHE-RSA-CAMELLIA256-SHA`, +`CAMELLIA128-SHA256`, +`DHE-RSA-CAMELLIA128-SHA256`, +`CAMELLIA256-SHA256`, +`DHE-RSA-CAMELLIA256-SHA256`, +`ECDHE-RSA-AES128-SHA256`, +`ECDHE-ECDSA-AES128-SHA256`, +`ECDH-RSA-AES128-SHA256`, +`ECDH-ECDSA-AES128-SHA256`, +`ECDHE-RSA-AES256-SHA384`, +`ECDHE-ECDSA-AES256-SHA384`, +`ECDH-RSA-AES256-SHA384`, +`ECDH-ECDSA-AES256-SHA384`, +`ECDHE-RSA-CHACHA20-POLY1305`, +`ECDHE-ECDSA-CHACHA20-POLY1305`, +`DHE-RSA-CHACHA20-POLY1305`, +`ECDHE-RSA-CHACHA20-POLY1305-OLD`, +`ECDHE-ECDSA-CHACHA20-POLY1305-OLD`, +`DHE-RSA-CHACHA20-POLY1305-OLD`, +`ADH-AES128-SHA`, +`QSH`, +`RENEGOTIATION-INFO`, +`IDEA-CBC-SHA`, +`ECDHE-ECDSA-NULL-SHA`, +`ECDHE-PSK-NULL-SHA256`, +`ECDHE-PSK-AES128-CBC-SHA256`, +`PSK-CHACHA20-POLY1305`, +`ECDHE-PSK-CHACHA20-POLY1305`, +`DHE-PSK-CHACHA20-POLY1305`, +`EDH-RSA-DES-CBC3-SHA`, + +## Schannel + +Schannel allows the enabling and disabling of encryption algorithms, but not +specific ciphersuites. They are +[defined](https://docs.microsoft.com/windows/desktop/SecCrypto/alg-id) by +Microsoft. + +There is also the case that the selected algorithm is not supported by the +protocol or does not match the ciphers offered by the server during the SSL +negotiation. In this case curl will return error +`CURLE_SSL_CONNECT_ERROR (35) SEC_E_ALGORITHM_MISMATCH` +and the request will fail. + +`CALG_MD2`, +`CALG_MD4`, +`CALG_MD5`, +`CALG_SHA`, +`CALG_SHA1`, +`CALG_MAC`, +`CALG_RSA_SIGN`, +`CALG_DSS_SIGN`, +`CALG_NO_SIGN`, +`CALG_RSA_KEYX`, +`CALG_DES`, +`CALG_3DES_112`, +`CALG_3DES`, +`CALG_DESX`, +`CALG_RC2`, +`CALG_RC4`, +`CALG_SEAL`, +`CALG_DH_SF`, +`CALG_DH_EPHEM`, +`CALG_AGREEDKEY_ANY`, +`CALG_HUGHES_MD5`, +`CALG_SKIPJACK`, +`CALG_TEK`, +`CALG_CYLINK_MEK`, +`CALG_SSL3_SHAMD5`, +`CALG_SSL3_MASTER`, +`CALG_SCHANNEL_MASTER_HASH`, +`CALG_SCHANNEL_MAC_KEY`, +`CALG_SCHANNEL_ENC_KEY`, +`CALG_PCT1_MASTER`, +`CALG_SSL2_MASTER`, +`CALG_TLS1_MASTER`, +`CALG_RC5`, +`CALG_HMAC`, +`CALG_TLS1PRF`, +`CALG_HASH_REPLACE_OWF`, +`CALG_AES_128`, +`CALG_AES_192`, +`CALG_AES_256`, +`CALG_AES`, +`CALG_SHA_256`, +`CALG_SHA_384`, +`CALG_SHA_512`, +`CALG_ECDH`, +`CALG_ECMQV`, +`CALG_ECDSA`, +`CALG_ECDH_EPHEM`, diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CMakeLists.txt new file mode 100644 index 00000000..22863bc0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CMakeLists.txt @@ -0,0 +1,24 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +#add_subdirectory(examples) +add_subdirectory(libcurl) +add_subdirectory(cmdline-opts) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_OF_CONDUCT.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..1f71c387 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,32 @@ +Contributor Code of Conduct +=========================== + +As contributors and maintainers of this project, we pledge to respect all +people who contribute through reporting issues, posting feature requests, +updating documentation, submitting pull requests or patches, and other +activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, or religion. + +Examples of unacceptable behavior by participants include the use of sexual +language or imagery, derogatory comments or personal attacks, trolling, public +or private harassment, insults, or other unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. Project maintainers who do not +follow the Code of Conduct may be removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by opening an issue or contacting one or more of the project +maintainers. + +This Code of Conduct is adapted from the [Contributor +Covenant](https://contributor-covenant.org/), version 1.1.0, available at +[https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_REVIEW.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_REVIEW.md new file mode 100644 index 00000000..f55cb098 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_REVIEW.md @@ -0,0 +1,168 @@ +# How to do code reviews for curl + +Anyone and everyone is encouraged and welcome to review code submissions in +curl. This is a guide on what to check for and how to perform a successful +code review. + +## All submissions should get reviewed + +All pull requests and patches submitted to the project should be reviewed by +at least one experienced curl maintainer before that code is accepted and +merged. + +## Let the tools and tests take the first rounds + +On initial pull requests, let the tools and tests do their job first and then +start out by helping the submitter understand the test failures and tool +alerts. + +## How to provide feedback to author + +Be nice. Ask questions. Provide examples or suggestions of improvements. +Assume best intentions. Remember language barriers. + +All first-time contributors can become regulars. Let's help them go there. + +## Is this a change we want? + +If this is not a change that seems to be aligned with the project's path +forward and as such cannot be accepted, inform the author about this sooner +rather than later. Do it gently and explain why and possibly what could be +done to make it more acceptable. + +## API/ABI stability or changed behavior + +Changing the API and the ABI may be fine in a change but it needs to be done +deliberately and carefully. If not, a reviewer must help the author to realize +the mistake. + +curl and libcurl are similarly very strict on not modifying existing +behavior. API and ABI stability is not enough, the behavior should also remain +intact as far as possible. + +## Code style + +Most code style nits are detected by checksrc but not all. Only leave remarks +on style deviation once checksrc doesn't find any more. + +Minor nits from fresh submitters can also be handled by the maintainer when +merging, in case it seems like the submitter isn't clear on what to do. We +want to make the process fun and exciting for new contributors. + +## Encourage consistency + +Make sure new code is written in a similar style as existing code. Naming, +logic, conditions, etc. + +## Are pointers always non-NULL? + +If a function or code rely on pointers being non-NULL, take an extra look if +that seems to be a fair assessment. + +## Asserts + +Conditions that should never be false can be verified with `DEBUGASSERT()` +calls to get caught in tests and debugging easier, while not having an impact +on final or release builds. + +## Memory allocation + +Can the mallocs be avoided? Do not introduce mallocs in any hot paths. If +there are (new) mallocs, can they be combined into fewer calls? + +Are all allocations handled in errorpaths to avoid leaks and crashes? + +## Thread-safety + +We do not like static variables as they break thread-safety and prevent +functions from being reentrant. + +## Should features be `#ifdef`ed? + +Features and functionality may not be present everywhere and should therefore +be `#ifdef`ed. Additionally, some features should be possible to switch on/off +in the build. + +Write `#ifdef`s to be as little of a "maze" as possible. + +## Does it look portable enough? + +curl runs "everywhere". Does the code take a reasonable stance and enough +precautions to be possible to build and run on most platforms? + +Remember that we live by C89 restrictions. + +## Tests and testability + +New features should be added in conjunction with one or more test cases. +Ideally, functions should also be written so that unit tests can be done to +test individual functions. + +## Documentation + +New features or changes to existing functionality **must** be accompanied with +updated documentation. Submitting that in a separate follow-up pull request is +not OK. A code review must also verify that the submitted documentation update +matches the code submission. + +English isn't everyone's first language, be mindful of this and help the +submitter improve the text if it needs a rewrite to read better. + +## Code shouldn't be hard to understand + +Source code should be written to maximize readability and be easy to +understand. + +## Functions shouldn't be large + +A single function should never be large as that makes it hard to follow and +understand all the exit points and state changes. Some existing functions in +curl certainly violate this ground rule but when reviewing new code we should +propose splitting into smaller functions. + +## Duplication is evil + +Anything that looks like duplicated code is a red flag. Anything that seems to +introduce code that we *should* already have or provide needs a closer check. + +## Sensitive data + +When credentials are involved, take an extra look at what happens with this +data. Where it comes from and where it goes. + +## Variable types differ + +`size_t` is not a fixed size. `time_t` can be signed or unsigned and have +different sizes. Relying on variable sizes is a red flag. + +Also remember that endianness and >= 32 bit accesses to unaligned addresses +are problematic areas. + +## Integer overflows + +Be careful about integer overflows. Some variable types can be either 32 bit +or 64 bit. Integer overflows must be detected and acted on *before* they +happen. + +## Dangerous use of functions + +Maybe use of `realloc()` should rather use the dynbuf functions? + +Do not allow new code that grows buffers without using dynbuf. + +Use of C functions that rely on a terminating zero must only be used on data +that really do have a zero terminating zero. + +## Dangerous "data styles" + +Make extra precautions and verify that memory buffers that need a terminating +zero always have exactly that. Buffers *without* a zero terminator must not be +used as input to string functions. + +# Commit messages + +Tightly coupled with a code review is making sure that the commit message is +good. It is the responsibilitiy of the person who merges the code to make sure +that the commit message follows our standard (detailed in the +[CONTRIBUTE.md](CONTRIBUTE.md) document). This includes making sure the PR +identifies related issues and giving credit to reporters and helpers. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_STYLE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_STYLE.md new file mode 100644 index 00000000..56134375 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CODE_STYLE.md @@ -0,0 +1,265 @@ +# curl C code style + +Source code that has a common style is easier to read than code that uses +different styles in different places. It helps making the code feel like one +single code base. Easy-to-read is a very important property of code and helps +making it easier to review when new things are added and it helps debugging +code when developers are trying to figure out why things go wrong. A unified +style is more important than individual contributors having their own personal +tastes satisfied. + +Our C code has a few style rules. Most of them are verified and upheld by the +`lib/checksrc.pl` script. Invoked with `make checksrc` or even by default by +the build system when built after `./configure --enable-debug` has been used. + +It is normally not a problem for anyone to follow the guidelines, as you just +need to copy the style already used in the source code and there are no +particularly unusual rules in our set of rules. + +We also work hard on writing code that are warning-free on all the major +platforms and in general on as many platforms as possible. Code that obviously +will cause warnings will not be accepted as-is. + +## Naming + +Try using a non-confusing naming scheme for your new functions and variable +names. It doesn't necessarily have to mean that you should use the same as in +other places of the code, just that the names should be logical, +understandable and be named according to what they're used for. File-local +functions should be made static. We like lower case names. + +See the [INTERNALS](INTERNALS.md) document on how we name non-exported +library-global symbols. + +## Indenting + +We use only spaces for indentation, never TABs. We use two spaces for each new +open brace. + + if(something_is_true) { + while(second_statement == fine) { + moo(); + } + } + +## Comments + +Since we write C89 code, **//** comments are not allowed. They weren't +introduced in the C standard until C99. We use only **/* comments */**. + + /* this is a comment */ + +## Long lines + +Source code in curl may never be wider than 79 columns and there are two +reasons for maintaining this even in the modern era of very large and high +resolution screens: + +1. Narrower columns are easier to read than very wide ones. There's a reason + newspapers have used columns for decades or centuries. + +2. Narrower columns allow developers to easier show multiple pieces of code + next to each other in different windows. I often have two or three source + code windows next to each other on the same screen - as well as multiple + terminal and debugging windows. + +## Braces + +In if/while/do/for expressions, we write the open brace on the same line as +the keyword and we then set the closing brace on the same indentation level as +the initial keyword. Like this: + + if(age < 40) { + /* clearly a youngster */ + } + +You may omit the braces if they would contain only a one-line statement: + + if(!x) + continue; + +For functions the opening brace should be on a separate line: + + int main(int argc, char **argv) + { + return 1; + } + +## 'else' on the following line + +When adding an **else** clause to a conditional expression using braces, we +add it on a new line after the closing brace. Like this: + + if(age < 40) { + /* clearly a youngster */ + } + else { + /* probably grumpy */ + } + +## No space before parentheses + +When writing expressions using if/while/do/for, there shall be no space +between the keyword and the open parenthesis. Like this: + + while(1) { + /* loop forever */ + } + +## Use boolean conditions + +Rather than test a conditional value such as a bool against TRUE or FALSE, a +pointer against NULL or != NULL and an int against zero or not zero in +if/while conditions we prefer: + + result = do_something(); + if(!result) { + /* something went wrong */ + return result; + } + +## No assignments in conditions + +To increase readability and reduce complexity of conditionals, we avoid +assigning variables within if/while conditions. We frown upon this style: + + if((ptr = malloc(100)) == NULL) + return NULL; + +and instead we encourage the above version to be spelled out more clearly: + + ptr = malloc(100); + if(!ptr) + return NULL; + +## New block on a new line + +We never write multiple statements on the same source line, even for very +short if() conditions. + + if(a) + return TRUE; + else if(b) + return FALSE; + +and NEVER: + + if(a) return TRUE; + else if(b) return FALSE; + +## Space around operators + +Please use spaces on both sides of operators in C expressions. Postfix **(), +[], ->, ., ++, --** and Unary **+, - !, ~, &** operators excluded they should +have no space. + +Examples: + + bla = func(); + who = name[0]; + age += 1; + true = !false; + size += -2 + 3 * (a + b); + ptr->member = a++; + struct.field = b--; + ptr = &address; + contents = *pointer; + complement = ~bits; + empty = (!*string) ? TRUE : FALSE; + +## No parentheses for return values + +We use the 'return' statement without extra parentheses around the value: + + int works(void) + { + return TRUE; + } + +## Parentheses for sizeof arguments + +When using the sizeof operator in code, we prefer it to be written with +parentheses around its argument: + + int size = sizeof(int); + +## Column alignment + +Some statements cannot be completed on a single line because the line would be +too long, the statement too hard to read, or due to other style guidelines +above. In such a case the statement will span multiple lines. + +If a continuation line is part of an expression or sub-expression then you +should align on the appropriate column so that it's easy to tell what part of +the statement it is. Operators should not start continuation lines. In other +cases follow the 2-space indent guideline. Here are some examples from +libcurl: + + if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) && + (handle->set.httpversion != CURL_HTTP_VERSION_1_0) && + (handle->set.httpreq == HTTPREQ_GET || + handle->set.httpreq == HTTPREQ_HEAD)) + /* didn't ask for HTTP/1.0 and a GET or HEAD */ + return TRUE; + +If no parenthesis, use the default indent: + + data->set.http_disable_hostname_check_before_authentication = + (0 != va_arg(param, long)) ? TRUE : FALSE; + +Function invoke with an open parenthesis: + + if(option) { + result = parse_login_details(option, strlen(option), + (userp ? &user : NULL), + (passwdp ? &passwd : NULL), + NULL); + } + +Align with the "current open" parenthesis: + + DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing " + "server response left\n", + (int)clipamount)); + +## Platform dependent code + +Use **#ifdef HAVE_FEATURE** to do conditional code. We avoid checking for +particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE +shall be generated by the configure script for unix-like systems and they are +hard-coded in the `config-[system].h` files for the others. + +We also encourage use of macros/functions that possibly are empty or defined +to constants when libcurl is built without that feature, to make the code +seamless. Like this example where the **magic()** function works differently +depending on a build-time conditional: + + #ifdef HAVE_MAGIC + void magic(int a) + { + return a + 2; + } + #else + #define magic(x) 1 + #endif + + int content = magic(3); + +## No typedefed structs + +Use structs by all means, but do not typedef them. Use the `struct name` way +of identifying them: + + struct something { + void *valid; + size_t way_to_write; + }; + struct something instance; + +**Not okay**: + + typedef struct { + void *wrong; + size_t way_to_write; + } something; + something instance; diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CONTRIBUTE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CONTRIBUTE.md new file mode 100644 index 00000000..69ddfbee --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CONTRIBUTE.md @@ -0,0 +1,307 @@ +# Contributing to the curl project + +This document is intended to offer guidelines on how to best contribute to the +curl project. This concerns new features as well as corrections to existing +flaws or bugs. + +## Learning curl + +### Join the Community + +Skip over to [https://curl.haxx.se/mail/](https://curl.haxx.se/mail/) and join +the appropriate mailing list(s). Read up on details before you post +questions. Read this file before you start sending patches! We prefer +questions sent to and discussions being held on the mailing list(s), not sent +to individuals. + +Before posting to one of the curl mailing lists, please read up on the +[mailing list etiquette](https://curl.haxx.se/mail/etiquette.html). + +We also hang out on IRC in #curl on irc.freenode.net + +If you're at all interested in the code side of things, consider clicking +'watch' on the [curl repo on github](https://github.com/curl/curl) to be +notified of pull requests and new issues posted there. + +### License and copyright + +When contributing with code, you agree to put your changes and new code under +the same license curl and libcurl is already using unless stated and agreed +otherwise. + +If you add a larger piece of code, you can opt to make that file or set of +files to use a different license as long as they don't enforce any changes to +the rest of the package and they make sense. Such "separate parts" can not be +GPL licensed (as we don't want copyleft to affect users of libcurl) but they +must use "GPL compatible" licenses (as we want to allow users to use libcurl +properly in GPL licensed environments). + +When changing existing source code, you do not alter the copyright of the +original file(s). The copyright will still be owned by the original creator(s) +or those who have been assigned copyright by the original author(s). + +By submitting a patch to the curl project, you are assumed to have the right +to the code and to be allowed by your employer or whatever to hand over that +patch/code to us. We will credit you for your changes as far as possible, to +give credit but also to keep a trace back to who made what changes. Please +always provide us with your full real name when contributing! + +### What To Read + +Source code, the man pages, the [INTERNALS +document](https://curl.haxx.se/dev/internals.html), +[TODO](https://curl.haxx.se/docs/todo.html), +[KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) and the [most recent +changes](https://curl.haxx.se/dev/sourceactivity.html) in git. Just lurking on +the [curl-library mailing +list](https://curl.haxx.se/mail/list.cgi?list=curl-library) will give you a +lot of insights on what's going on right now. Asking there is a good idea too. + +## Write a good patch + +### Follow code style + +When writing C code, follow the +[CODE_STYLE](https://curl.haxx.se/dev/code-style.html) already established in +the project. Consistent style makes code easier to read and mistakes less +likely to happen. Run `make checksrc` before you submit anything, to make sure +you follow the basic style. That script doesn't verify everything, but if it +complains you know you have work to do. + +### Non-clobbering All Over + +When you write new functionality or fix bugs, it is important that you don't +fiddle all over the source files and functions. Remember that it is likely +that other people have done changes in the same source files as you have and +possibly even in the same functions. If you bring completely new +functionality, try writing it in a new source file. If you fix bugs, try to +fix one bug at a time and send them as separate patches. + +### Write Separate Changes + +It is annoying when you get a huge patch from someone that is said to fix 511 +odd problems, but discussions and opinions don't agree with 510 of them - or +509 of them were already fixed in a different way. Then the person merging +this change needs to extract the single interesting patch from somewhere +within the huge pile of source, and that creates a lot of extra work. + +Preferably, each fix that corrects a problem should be in its own patch/commit +with its own description/commit message stating exactly what they correct so +that all changes can be selectively applied by the maintainer or other +interested parties. + +Also, separate changes enable bisecting much better for tracking problems +and regression in the future. + +### Patch Against Recent Sources + +Please try to get the latest available sources to make your patches against. +It makes the lives of the developers so much easier. The very best is if you +get the most up-to-date sources from the git repository, but the latest +release archive is quite OK as well! + +### Documentation + +Writing docs is dead boring and one of the big problems with many open source +projects. But someone's gotta do it! It makes things a lot easier if you +submit a small description of your fix or your new features with every +contribution so that it can be swiftly added to the package documentation. + +The documentation is always made in man pages (nroff formatted) or plain +ASCII files. All HTML files on the website and in the release archives are +generated from the nroff/ASCII versions. + +### Test Cases + +Since the introduction of the test suite, we can quickly verify that the main +features are working as they're supposed to. To maintain this situation and +improve it, all new features and functions that are added need to be tested +in the test suite. Every feature that is added should get at least one valid +test case that verifies that it works as documented. If every submitter also +posts a few test cases, it won't end up as a heavy burden on a single person! + +If you don't have test cases or perhaps you have done something that is very +hard to write tests for, do explain exactly how you have otherwise tested and +verified your changes. + +## Sharing Your Changes + +### How to get your changes into the main sources + +Ideally you file a [pull request on +github](https://github.com/curl/curl/pulls), but you can also send your plain +patch to [the curl-library mailing +list](https://curl.haxx.se/mail/list.cgi?list=curl-library). + +Either way, your change will be reviewed and discussed there and you will be +expected to correct flaws pointed out and update accordingly, or the change +risks stalling and eventually just getting deleted without action. As a +submitter of a change, you are the owner of that change until it has been merged. + +Respond on the list or on github about the change and answer questions and/or +fix nits/flaws. This is very important. We will take lack of replies as a +sign that you're not very anxious to get your patch accepted and we tend to +simply drop such changes. + +### About pull requests + +With github it is easy to send a [pull +request](https://github.com/curl/curl/pulls) to the curl project to have +changes merged. + +We strongly prefer pull requests to mailed patches, as it makes it a proper +git commit that is easy to merge and they are easy to track and not that easy +to loose in the flood of many emails, like they sometimes do on the mailing +lists. + +Every pull request submitted will automatically be tested in several different +ways. Every pull request is verified for each of the following: + + - ... it still builds, warning-free, on Linux and macOS, with both + clang and gcc + - ... it still builds fine on Windows with several MSVC versions + - ... it still builds with cmake on Linux, with gcc and clang + - ... it follows rudimentary code style rules + - ... the test suite still runs 100% fine + - ... the release tarball (the "dist") still works + - ... it builds fine in-tree as well as out-of-tree + - ... code coverage doesn't shrink drastically + +If the pull-request fails one of these tests, it will show up as a red X and +you are expected to fix the problem. If you don't understand when the issue is +or have other problems to fix the complaint, just ask and other project +members will likely be able to help out. + +Consider the following table while looking at pull request failures: + + | CI platform as shown in PR | State | What to look at next | + | ----------------------------------- | ------ | -------------------------- | + | CI / codeql | stable | quality check results | + | CI / fuzzing | stable | fuzzing results | + | CI / macos ... | stable | all errors and failures | + | Code scanning results / CodeQL | stable | quality check results | + | FreeBSD FreeBSD: ... | stable | all errors and failures | + | LGTM analysis: Python | stable | new findings | + | LGTM analysis: C/C++ | stable | new findings | + | buildbot/curl_winssl_ ... | stable | all errors and failures | + | continuous-integration/appveyor/pr | stable | all errors and failures | + | continuous-integration/travis-ci/pr | stable | all errors and failures | + | curl.curl (linux ...) | stable | all errors and failures | + | curl.curl (windows ...) | flaky | repetitive errors/failures | + | deepcode-ci-bot | stable | new findings | + | musedev | stable | new findings | + +Sometimes the tests fail due to a dependency service temporarily being offline +or otherwise unavailable, eg. package downloads. In this case you can just +try to update your pull requests to rerun the tests later as described below. + +You can update your pull requests by pushing new commits or force-pushing +changes to existing commits. Force-pushing an amended commit without any +actual content changed also allows you to retrigger the tests for that commit. + +When you adjust your pull requests after review, consider squashing the +commits so that we can review the full updated version more easily. + +### Making quality patches + +Make the patch against as recent source versions as possible. + +If you've followed the tips in this document and your patch still hasn't been +incorporated or responded to after some weeks, consider resubmitting it to the +list or better yet: change it to a pull request. + +### Write good commit messages + +A short guide to how to write commit messages in the curl project. + + ---- start ---- + [area]: [short line describing the main effect] + -- empty line -- + [full description, no wider than 72 columns that describe as much as + possible as to why this change is made, and possibly what things + it fixes and everything else that is related] + -- empty line -- + [Closes/Fixes #1234 - if this closes or fixes a github issue] + [Bug: URL to source of the report or more related discussion] + [Reported-by: John Doe - credit the reporter] + [whatever-else-by: credit all helpers, finders, doers] + ---- stop ---- + +The first line is a succinct description of the change: + + - use the imperative, present tense: "change" not "changed" nor "changes" + - don't capitalize first letter + - no dot (.) at the end + +The `[area]` in the first line can be `http2`, `cookies`, `openssl` or +similar. There's no fixed list to select from but using the same "area" as +other related changes could make sense. + +Don't forget to use commit --author="" if you commit someone else's work, and +make sure that you have your own user and email setup correctly in git before +you commit + +### Write Access to git Repository + +If you are a very frequent contributor, you may be given push access to the +git repository and then you'll be able to push your changes straight into the +git repo instead of sending changes as pull requests or by mail as patches. + +Just ask if this is what you'd want. You will be required to have posted +several high quality patches first, before you can be granted push access. + +### How To Make a Patch with git + +You need to first checkout the repository: + + git clone https://github.com/curl/curl.git + +You then proceed and edit all the files you like and you commit them to your +local repository: + + git commit [file] + +As usual, group your commits so that you commit all changes at once that +constitute a logical change. + +Once you have done all your commits and you're happy with what you see, you +can make patches out of your changes that are suitable for mailing: + + git format-patch remotes/origin/master + +This creates files in your local directory named NNNN-[name].patch for each +commit. + +Now send those patches off to the curl-library list. You can of course opt to +do that with the 'git send-email' command. + +### How To Make a Patch without git + +Keep a copy of the unmodified curl sources. Make your changes in a separate +source tree. When you think you have something that you want to offer the +curl community, use GNU diff to generate patches. + +If you have modified a single file, try something like: + + diff -u unmodified-file.c my-changed-one.c > my-fixes.diff + +If you have modified several files, possibly in different directories, you +can use diff recursively: + + diff -ur curl-original-dir curl-modified-sources-dir > my-fixes.diff + +The GNU diff and GNU patch tools exist for virtually all platforms, including +all kinds of Unixes and Windows: + +For unix-like operating systems: + + - [https://savannah.gnu.org/projects/patch/](https://savannah.gnu.org/projects/patch/) + - [https://www.gnu.org/software/diffutils/](https://www.gnu.org/software/diffutils/) + +For Windows: + + - [https://gnuwin32.sourceforge.io/packages/patch.htm](https://gnuwin32.sourceforge.io/packages/patch.htm) + - [https://gnuwin32.sourceforge.io/packages/diffutils.htm](https://gnuwin32.sourceforge.io/packages/diffutils.htm) + +### Useful resources +* [Webinar on getting code into cURL](https://www.youtube.com/watch?v=QmZ3W1d6LQI) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CURL-DISABLE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CURL-DISABLE.md new file mode 100644 index 00000000..a9e6acaf --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/CURL-DISABLE.md @@ -0,0 +1,124 @@ +# Code defines to disable features and protocols + +## CURL_DISABLE_COOKIES + +Disable support for HTTP cookies. + +## CURL_DISABLE_CRYPTO_AUTH + +Disable support for authentication methods using crypto. + +## CURL_DISABLE_DICT + +Disable the DICT protocol + +## CURL_DISABLE_DOH + +Disable DNS-over-HTTPS + +## CURL_DISABLE_FILE + +Disable the FILE protocol + +## CURL_DISABLE_FTP + +Disable the FTP (and FTPS) protocol + +## CURL_DISABLE_GETOPTIONS + +Disable the `curl_easy_options` API calls that lets users get information +about existing options to `curl_easy_setopt`. + +## CURL_DISABLE_GOPHER + +Disable the GOPHER protocol. + +## CURL_DISABLE_HTTP + +Disable the HTTP(S) protocols. Note that this then also disable HTTP proxy +support. + +## CURL_DISABLE_HTTP_AUTH + +Disable support for all HTTP authentication methods. + +## CURL_DISABLE_IMAP + +Disable the IMAP(S) protocols. + +## CURL_DISABLE_LDAP + +Disable the LDAP(S) protocols. + +## CURL_DISABLE_LDAPS + +Disable the LDAPS protocol. + +## CURL_DISABLE_LIBCURL_OPTION + +Disable the --libcurl option from the curl tool. + +## CURL_DISABLE_MIME + +Disable MIME support. + +## CURL_DISABLE_MQTT + +Disable MQTT support. + +## CURL_DISABLE_NETRC + +Disable the netrc parser. + +## CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG + +Disable the auto load config support in the OpenSSL backend. + +## CURL_DISABLE_PARSEDATE + +Disable date parsing + +## CURL_DISABLE_POP + +Disable the POP(S) protocols + +## CURL_DISABLE_PROGRESS_METER + +Disable the built-in progress meter + +## CURL_DISABLE_PROXY + +Disable support for proxies + +## CURL_DISABLE_RTSP + +Disable the RTSP protocol. + +## CURL_DISABLE_SHUFFLE_DNS + +Disable the shuffle DNS feature + +## CURL_DISABLE_SMB + +Disable the SMB(S) protocols + +## CURL_DISABLE_SMTP + +Disable the SMTP(S) protocols + +## CURL_DISABLE_SOCKETPAIR + +Disable the use of socketpair internally to allow waking up and canceling +curl_multi_poll(). + +## CURL_DISABLE_TELNET + +Disable the TELNET protocol + +## CURL_DISABLE_TFTP + +Disable the TFTP protocol + +## CURL_DISABLE_VERBOSE_STRINGS + +Disable verbose strings and error messages. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DEPRECATE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DEPRECATE.md new file mode 100644 index 00000000..26877c48 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DEPRECATE.md @@ -0,0 +1,12 @@ +# Items to be removed from future curl releases + +If any of these deprecated features is a cause for concern for you, please +email the curl-library mailing list as soon as possible and explain to us why +this is a problem for you and how your use case can't be satisfied properly +using a work around. + +## Past removals + + - Pipelining + - axTLS + - PolarSSL diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DYNBUF.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DYNBUF.md new file mode 100644 index 00000000..aa528ec3 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/DYNBUF.md @@ -0,0 +1,86 @@ +# dynbuf + +This is the internal module for creating and handling "dynamic buffers". This +means buffers that can be appended to, dynamically and grow in size to adapt. + +There will always be a terminating zero put at the end of the dynamic buffer. + +The `struct dynbuf` is used to hold data for each instance of a dynamic +buffer. The members of that struct **MUST NOT** be accessed or modified +without using the dedicated dynbuf API. + +## init + + void Curl_dyn_init(struct dynbuf *s, size_t toobig); + +This inits a struct to use for dynbuf and it can't fail. The `toobig` value +**must** be set to the maximum size we allow this buffer instance to grow to. +The functions below will return `CURLE_OUT_OF_MEMORY` when hitting this limit. + +## free + + void Curl_dyn_free(struct dynbuf *s); + +Free the associated memory and clean up. After a free, the `dynbuf` struct can +be re-used to start appending new data to. + +## addn + + CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len); + +Append arbitrary data of a given length to the end of the buffer. + +## add + + CURLcode Curl_dyn_add(struct dynbuf *s, const char *str); + +Append a C string to the end of the buffer. + +## addf + + CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...); + +Append a `printf()`-style string to the end of the buffer. + +## vaddf + + CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap); + +Append a `vprintf()`-style string to the end of the buffer. + +## reset + + void Curl_dyn_reset(struct dynbuf *s); + +Reset the buffer length, but leave the allocation. + +## tail + + CURLcode Curl_dyn_tail(struct dynbuf *s, size_t length) + +Keep `length` bytes of the buffer tail (the last `length` bytes of the +buffer). The rest of the buffer is dropped. The specified `length` must not be +larger than the buffer length. + +## ptr + + char *Curl_dyn_ptr(const struct dynbuf *s); + +Returns a `char *` to the buffer if it has a length, otherwise a NULL. Since +the buffer may be reallocated, this pointer should not be trusted or used +anymore after the next buffer manipulation call. + +## uptr + + unsigned char *Curl_dyn_uptr(const struct dynbuf *s); + +Returns an `unsigned char *` to the buffer if it has a length, otherwise a +NULL. Since the buffer may be reallocated, this pointer should not be trusted +or used anymore after the next buffer manipulation call. + +## len + + size_t Curl_dyn_len(const struct dynbuf *s); + +Returns the length of the buffer in bytes. Does not include the terminating +zero byte. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ECH.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ECH.md new file mode 100644 index 00000000..ea1efaa6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ECH.md @@ -0,0 +1,135 @@ +# TLS: ECH support in curl and libcurl + +## Summary + +**ECH** means **Encrypted Client Hello**, a TLS 1.3 extension which is +currently the subject of an [IETF Draft][tlsesni]. (ECH was formerly known as +ESNI). + +This file is intended to show the latest current state of ECH support +in **curl** and **libcurl**. + +At end of August 2019, an [experimental fork of curl][niallorcurl], built +using an [experimental fork of OpenSSL][sftcdopenssl], which in turn provided +an implementation of ECH, was demonstrated interoperating with a server +belonging to the [DEfO Project][defoproj]. + +Further sections here describe + +- resources needed for building and demonstrating **curl** support + for ECH, + +- progress to date, + +- TODO items, and + +- additional details of specific stages of the progress. + +## Resources needed + +To build and demonstrate ECH support in **curl** and/or **libcurl**, +you will need + +- a TLS library, supported by **libcurl**, which implements ECH; + +- an edition of **curl** and/or **libcurl** which supports the ECH + implementation of the chosen TLS library; + +- an environment for building and running **curl**, and at least + building **OpenSSL**; + +- a server, supporting ECH, against which to run a demonstration + and perhaps a specific target URL; + +- some instructions. + +The following set of resources is currently known to be available. + +| Set | Component | Location | Remarks | +|:-----|:-------------|:------------------------------|:-------------------------------------------| +| DEfO | TLS library | [sftcd/openssl][sftcdopenssl] | Tag *esni-2019-08-30* avoids bleeding edge | +| | curl fork | [niallor/curl][niallorcurl] | Tag *esni-2019-08-30* likewise | +| | instructions | [ESNI-README][niallorreadme] | | + +## Progress + +### PR 4011 (Jun 2019) expected in curl release 7.67.0 (Oct 2019) + +- Details [below](#pr4011); + +- New configuration option: `--enable-ech`; + +- Build-time check for availability of resources needed for ECH + support; + +- Pre-processor symbol `USE_ECH` for conditional compilation of + ECH support code, subject to configuration option and + availability of needed resources. + +## TODO + +- (next PR) Add libcurl options to set ECH parameters. + +- (next PR) Add curl tool command line options to set ECH parameters. + +- (WIP) Extend DoH functions so that published ECH parameters can be + retrieved from DNS instead of being required as options. + +- (WIP) Work with OpenSSL community to finalize ECH API. + +- Track OpenSSL ECH API in libcurl + +- Identify and implement any changes needed for CMake. + +- Optimize build-time checking of available resources. + +- Encourage ECH support work on other TLS/SSL backends. + +## Additional detail + +### PR 4011 + +**TLS: Provide ECH support framework for curl and libcurl** + +The proposed change provides a framework to facilitate work to implement ECH +support in curl and libcurl. It is not intended either to provide ECH +functionality or to favour any particular TLS-providing backend. Specifically, +the change reserves a feature bit for ECH support (symbol +`CURL_VERSION_ECH`), implements setting and reporting of this bit, includes +dummy book-keeping for the symbol, adds a build-time configuration option +(`--enable-ech`), provides an extensible check for resources available to +provide ECH support, and defines a compiler pre-processor symbol (`USE_ECH`) +accordingly. + +Proposed-by: @niallor (Niall O'Reilly)\ +Encouraged-by: @sftcd (Stephen Farrell)\ +See-also: [this message](https://curl.haxx.se/mail/lib-2019-05/0108.html) + +Limitations: +- Book-keeping (symbols-in-versions) needs real release number, not 'DUMMY'. + +- Framework is incomplete, as it covers autoconf, but not CMake. + +- Check for available resources, although extensible, refers only to + specific work in progress ([described + here](https://github.com/sftcd/openssl/tree/master/esnistuff)) to + implement ECH for OpenSSL, as this is the immediate motivation + for the proposed change. + +## References + +Cloudflare blog: [Encrypting SNI: Fixing One of the Core Internet Bugs][corebug] + +Cloudflare blog: [Encrypt it or lose it: how encrypted SNI works][esniworks] + +IETF Draft: [Encrypted Server Name Indication for TLS 1.3][tlsesni] + +--- + +[tlsesni]: https://datatracker.ietf.org/doc/draft-ietf-tls-esni/ +[esniworks]: https://blog.cloudflare.com/encrypted-sni/ +[corebug]: https://blog.cloudflare.com/esni/ +[defoproj]: https://defo.ie/ +[sftcdopenssl]: https://github.com/sftcd/openssl/ +[niallorcurl]: https://github.com/niallor/curl/ +[niallorreadme]: https://github.com/niallor/curl/blob/master/ESNI-README.md diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/EXPERIMENTAL.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/EXPERIMENTAL.md new file mode 100644 index 00000000..6a014c3d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/EXPERIMENTAL.md @@ -0,0 +1,23 @@ +# Experimental + +Some features and functionality in curl and libcurl are considered +**EXPERIMENTAL**. + +Experimental support in curl means: + +1. Experimental features are provided to allow users to try them out and + provide feedback on functionality and API etc before they ship and get + "carved in stone". +2. You must enable the feature when invoking configure as otherwise curl will + not be built with the feature present. +3. We strongly advice against using this feature in production. +4. **We reserve the right to change behavior** of the feature without sticking + to our API/ABI rules as we do for regular features, as long as it is marked + experimental. +5. Experimental features are clearly marked so in documentation. Beware. + +## Experimental features right now + + - HTTP/3 support and options + - alt-svc support and options + - CURLSSLOPT_NATIVE_CA (No configure option, feature built in when supported) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FAQ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FAQ new file mode 100644 index 00000000..b5efb119 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FAQ @@ -0,0 +1,1550 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +FAQ + + 1. Philosophy + 1.1 What is cURL? + 1.2 What is libcurl? + 1.3 What is curl not? + 1.4 When will you make curl do XXXX ? + 1.5 Who makes curl? + 1.6 What do you get for making curl? + 1.7 What about CURL from curl.com? + 1.8 I have a problem who do I mail? + 1.9 Where do I buy commercial support for curl? + 1.10 How many are using curl? + 1.11 Why don't you update ca-bundle.crt + 1.12 I have a problem who can I chat with? + 1.13 curl's ECCN number? + 1.14 How do I submit my patch? + 1.15 How do I port libcurl to my OS? + + 2. Install Related Problems + 2.1 configure doesn't find OpenSSL even when it is installed + 2.1.1 native linker doesn't find OpenSSL + 2.1.2 only the libssl lib is missing + 2.2 Does curl work/build with other SSL libraries? + 2.3 Where can I find a copy of LIBEAY32.DLL? + 2.4 Does curl support SOCKS (RFC 1928) ? + + 3. Usage Problems + 3.1 curl: (1) SSL is disabled, https: not supported + 3.2 How do I tell curl to resume a transfer? + 3.3 Why doesn't my posting using -F work? + 3.4 How do I tell curl to run custom FTP commands? + 3.5 How can I disable the Accept: */* header? + 3.6 Does curl support ASP, XML, XHTML or HTML version Y? + 3.7 Can I use curl to delete/rename a file through FTP? + 3.8 How do I tell curl to follow HTTP redirects? + 3.9 How do I use curl in my favorite programming language? + 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? + 3.11 How do I POST with a different Content-Type? + 3.12 Why do FTP-specific features over HTTP proxy fail? + 3.13 Why do my single/double quotes fail? + 3.14 Does curl support Javascript or PAC (automated proxy config)? + 3.15 Can I do recursive fetches with curl? + 3.16 What certificates do I need when I use SSL? + 3.17 How do I list the root dir of an FTP server? + 3.18 Can I use curl to send a POST/PUT and not wait for a response? + 3.19 How do I get HTTP from a host using a specific IP address? + 3.20 How to SFTP from my user's home directory? + 3.21 Protocol xxx not supported or disabled in libcurl + 3.22 curl -X gives me HTTP problems + + 4. Running Problems + 4.1 Problems connecting to SSL servers. + 4.2 Why do I get problems when I use & or % in the URL? + 4.3 How can I use {, }, [ or ] to specify multiple URLs? + 4.4 Why do I get downloaded data even though the web page doesn't exist? + 4.5 Why do I get return code XXX from a HTTP server? + 4.5.1 "400 Bad Request" + 4.5.2 "401 Unauthorized" + 4.5.3 "403 Forbidden" + 4.5.4 "404 Not Found" + 4.5.5 "405 Method Not Allowed" + 4.5.6 "301 Moved Permanently" + 4.6 Can you tell me what error code 142 means? + 4.7 How do I keep user names and passwords secret in Curl command lines? + 4.8 I found a bug! + 4.9 Curl can't authenticate to the server that requires NTLM? + 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! + 4.11 Why do my HTTP range requests return the full document? + 4.12 Why do I get "certificate verify failed" ? + 4.13 Why is curl -R on Windows one hour off? + 4.14 Redirects work in browser but not with curl! + 4.15 FTPS doesn't work + 4.16 My HTTP POST or PUT requests are slow! + 4.17 Non-functional connect timeouts on Windows + 4.18 file:// URLs containing drive letters (Windows, NetWare) + 4.19 Why doesn't curl return an error when the network cable is unplugged? + 4.20 curl doesn't return error for HTTP non-200 responses! + 4.21 Why is there a HTTP/1.1 in my HTTP/2 request? + + 5. libcurl Issues + 5.1 Is libcurl thread-safe? + 5.2 How can I receive all data into a large memory chunk? + 5.3 How do I fetch multiple files with libcurl? + 5.4 Does libcurl do Winsock initing on win32 systems? + 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ? + 5.6 What about Keep-Alive or persistent connections? + 5.7 Link errors when building libcurl on Windows! + 5.8 libcurl.so.X: open failed: No such file or directory + 5.9 How does libcurl resolve host names? + 5.10 How do I prevent libcurl from writing the response to stdout? + 5.11 How do I make libcurl not receive the whole HTTP response? + 5.12 Can I make libcurl fake or hide my real IP address? + 5.13 How do I stop an ongoing transfer? + 5.14 Using C++ non-static functions for callbacks? + 5.15 How do I get an FTP directory listing? + 5.16 I want a different time-out! + 5.17 Can I write a server with libcurl? + 5.18 Does libcurl use threads? + + 6. License Issues + 6.1 I have a GPL program, can I use the libcurl library? + 6.2 I have a closed-source program, can I use the libcurl library? + 6.3 I have a BSD licensed program, can I use the libcurl library? + 6.4 I have a program that uses LGPL libraries, can I use libcurl? + 6.5 Can I modify curl/libcurl for my program and keep the changes secret? + 6.6 Can you please change the curl/libcurl license to XXXX? + 6.7 What are my obligations when using libcurl in my commercial apps? + + 7. PHP/CURL Issues + 7.1 What is PHP/CURL? + 7.2 Who wrote PHP/CURL? + 7.3 Can I perform multiple requests using the same handle? + 7.4 Does PHP/CURL have dependencies? + +============================================================================== + +1. Philosophy + + 1.1 What is cURL? + + cURL is the name of the project. The name is a play on 'Client for URLs', + originally with URL spelled in uppercase to make it obvious it deals with + URLs. The fact it can also be pronounced 'see URL' also helped, it works as + an abbreviation for "Client URL Request Library" or why not the recursive + version: "Curl URL Request Library". + + The cURL project produces two products: + + libcurl + + A free and easy-to-use client-side URL transfer library, supporting DICT, + FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, + POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET + and TFTP. + + libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, + Kerberos, SPNEGO, HTTP form based upload, proxies, cookies, user+password + authentication, file transfer resume, http proxy tunneling and more! + + libcurl is highly portable, it builds and works identically on numerous + platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HP-UX, + IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOS, Mac + OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS, Symbian, OSF, + Android, Minix, IBM TPF and more... + + libcurl is free, thread-safe, IPv6 compatible, feature rich, well + supported and fast. + + curl + + A command line tool for getting or sending files using URL syntax. + + Since curl uses libcurl, curl supports the same wide range of common + Internet protocols that libcurl does. + + We pronounce curl with an initial k sound. It rhymes with words like girl + and earl. This is a short WAV file to help you: + + https://media.merriam-webster.com/soundc11/c/curl0001.wav + + There are numerous sub-projects and related projects that also use the word + curl in the project names in various combinations, but you should take + notice that this FAQ is directed at the command-line tool named curl (and + libcurl the library), and may therefore not be valid for other curl-related + projects. (There is however a small section for the PHP/CURL in this FAQ.) + + 1.2 What is libcurl? + + libcurl is a reliable and portable library which provides you with an easy + interface to a range of common Internet protocols. + + You can use libcurl for free in your application, be it open source, + commercial or closed-source. + + libcurl is most probably the most portable, most powerful and most often + used C-based multi-platform file transfer library on this planet - be it + open source or commercial. + + 1.3 What is curl not? + + Curl is not a wget clone. That is a common misconception. Never, during + curl's development, have we intended curl to replace wget or compete on its + market. Curl is targeted at single-shot file transfers. + + Curl is not a website mirroring program. If you want to use curl to mirror + something: fine, go ahead and write a script that wraps around curl to make + it reality (like curlmirror.pl does). + + Curl is not an FTP site mirroring program. Sure, get and send FTP with curl + but if you want systematic and sequential behavior you should write a + script (or write a new program that interfaces libcurl) and do it. + + Curl is not a PHP tool, even though it works perfectly well when used from + or with PHP (when using the PHP/CURL module). + + Curl is not a program for a single operating system. Curl exists, compiles, + builds and runs under a wide range of operating systems, including all + modern Unixes (and a bunch of older ones too), Windows, Amiga, BeOS, OS/2, + OS X, QNX etc. + + 1.4 When will you make curl do XXXX ? + + We love suggestions of what to change in order to make curl and libcurl + better. We do however believe in a few rules when it comes to the future of + curl: + + Curl -- the command line tool -- is to remain a non-graphical command line + tool. If you want GUIs or fancy scripting capabilities, you should look for + another tool that uses libcurl. + + We do not add things to curl that other small and available tools already do + very well at the side. Curl's output can be piped into another program or + redirected to another file for the next program to interpret. + + We focus on protocol related issues and improvements. If you want to do more + magic with the supported protocols than curl currently does, chances are good + we will agree. If you want to add more protocols, we may very well agree. + + If you want someone else to do all the work while you wait for us to + implement it for you, that is not a very friendly attitude. We spend a + considerable time already on maintaining and developing curl. In order to + get more out of us, you should consider trading in some of your time and + effort in return. Simply go to the GitHub repo which resides at + https://github.com/curl/curl, fork the project, and create pull requests + with your proposed changes. + + If you write the code, chances are better that it will get into curl faster. + + 1.5 Who makes curl? + + curl and libcurl are not made by any single individual. Daniel Stenberg is + project leader and main developer, but other persons' submissions are + important and crucial. Anyone can contribute and post their changes and + improvements and have them inserted in the main sources (of course on the + condition that developers agree that the fixes are good). + + The full list of all contributors is found in the docs/THANKS file. + + curl is developed by a community, with Daniel at the wheel. + + 1.6 What do you get for making curl? + + Project cURL is entirely free and open. We do this voluntarily, mostly in + our spare time. Companies may pay individual developers to work on curl, + but that's up to each company and developer. This is not controlled by nor + supervised in any way by the curl project. + + We get help from companies. Haxx provides website, bandwidth, mailing lists + etc, GitHub hosts the primary git repository and other services like the bug + tracker at https://github.com/curl/curl. Also again, some companies have + sponsored certain parts of the development in the past and I hope some will + continue to do so in the future. + + If you want to support our project, consider a donation or a banner-program + or even better: by helping us with coding, documenting or testing etc. + + See also: https://curl.haxx.se/sponsors.html + + 1.7 What about CURL from curl.com? + + During the summer of 2001, curl.com was busy advertising their client-side + programming language for the web, named CURL. + + We are in no way associated with curl.com or their CURL programming + language. + + Our project name curl has been in effective use since 1998. We were not the + first computer related project to use the name "curl" and do not claim any + rights to the name. + + We recognize that we will be living in parallel with curl.com and wish them + every success. + + 1.8 I have a problem whom do I mail? + + Please do not mail any single individual unless you really need to. Keep + curl-related questions on a suitable mailing list. All available mailing + lists are listed in the MANUAL document and online at + https://curl.haxx.se/mail/ + + Keeping curl-related questions and discussions on mailing lists allows + others to join in and help, to share their ideas, to contribute their + suggestions and to spread their wisdom. Keeping discussions on public mailing + lists also allows for others to learn from this (both current and future + users thanks to the web based archives of the mailing lists), thus saving us + from having to repeat ourselves even more. Thanks for respecting this. + + If you have found or simply suspect a security problem in curl or libcurl, + mail curl-security at haxx.se (closed list of receivers, mails are not + disclosed) and tell. Then we can produce a fix in a timely manner before the + flaw is announced to the world, thus lessen the impact the problem will have + on existing users. + + 1.9 Where do I buy commercial support for curl? + + curl is fully open source. It means you can hire any skilled engineer to fix + your curl-related problems. + + We list available alternatives on the curl website: + https://curl.haxx.se/support.html + + 1.10 How many are using curl? + + It is impossible to tell. + + We don't know how many users that knowingly have installed and use curl. + + We don't know how many users that use curl without knowing that they are in + fact using it. + + We don't know how many users that downloaded or installed curl and then + never use it. + + In 2020, we estimate that curl runs in rougly ten billion installations + world wide. + + 1.11 Why don't you update ca-bundle.crt + + In the cURL project we've decided not to attempt to keep this file updated + (or even present) since deciding what to add to a ca cert bundle is an + undertaking we've not been ready to accept, and the one we can get from + Mozilla is perfectly fine so there's no need to duplicate that work. + + Today, with many services performed over HTTPS, every operating system + should come with a default ca cert bundle that can be deemed somewhat + trustworthy and that collection (if reasonably updated) should be deemed to + be a lot better than a private curl version. + + If you want the most recent collection of ca certs that Mozilla Firefox + uses, we recommend that you extract the collection yourself from Mozilla + Firefox (by running 'make ca-bundle), or by using our online service setup + for this purpose: https://curl.haxx.se/docs/caextract.html + + 1.12 I have a problem who can I chat with? + + There's a bunch of friendly people hanging out in the #curl channel on the + IRC network irc.freenode.net. If you're polite and nice, chances are good + that you can get -- or provide -- help instantly. + + 1.13 curl's ECCN number? + + The US government restricts exports of software that contains or uses + cryptography. When doing so, the Export Control Classification Number (ECCN) + is used to identify the level of export control etc. + + Apache Software Foundation gives a good explanation of ECCNs at + https://www.apache.org/dev/crypto.html + + We believe curl's number might be ECCN 5D002, another possibility is + 5D992. It seems necessary to write them (the authority that administers ECCN + numbers), asking to confirm. + + Comprehensible explanations of the meaning of such numbers and how to obtain + them (resp.) are here + + https://www.bis.doc.gov/licensing/exportingbasics.htm + https://www.bis.doc.gov/licensing/do_i_needaneccn.html + + An incomprehensible description of the two numbers above is here + https://www.bis.doc.gov/index.php/documents/new-encryption/1653-ccl5-pt2-3 + + 1.14 How do I submit my patch? + + We strongly encourage you to submit changes and improvements directly as + "pull requests" on github: https://github.com/curl/curl/pulls + + If you for any reason can't or won't deal with github, send your patch to + the curl-library mailing list. We're many subscribers there and there are + lots of people who can review patches, comment on them and "receive" them + properly. + + Lots of more details are found in the CONTRIBUTE and INTERNALS docs. + + 1.15 How do I port libcurl to my OS? + + Here's a rough step-by-step: + + 1. copy a suitable lib/config-*.h file as a start to lib/config-[youros].h + + 2. edit lib/config-[youros].h to match your OS and setup + + 3. edit lib/curl_setup.h to include config-[youros].h when your OS is + detected by the preprocessor, in the style others already exist + + 4. compile lib/*.c and make them into a library + + +2. Install Related Problems + + 2.1 configure doesn't find OpenSSL even when it is installed + + This may be because of several reasons. + + 2.1.1 native linker doesn't find openssl + + Affected platforms: + Solaris (native cc compiler) + HPUX (native cc compiler) + SGI IRIX (native cc compiler) + SCO UNIX (native cc compiler) + + When configuring curl, I specify --with-ssl. OpenSSL is installed in + /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find + CRYPTO_lock in -lcrypto + + Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER + -lcrypto, so ld can't find the library. This is due to a bug in the GNU + autoconf tool. + + Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of + ./configure places the -L/usr/local/ssl/lib early enough in the command + line to make things work + + 2.1.2 only the libssl lib is missing + + If all include files and the libcrypto lib is present, with only the + libssl being missing according to configure, this is most likely because + a few functions are left out from the libssl. + + If the function names missing include RSA or RSAREF you can be certain + that this is because libssl requires the RSA and RSAREF libs to build. + + See the INSTALL file section that explains how to add those libs to + configure. Make sure that you remove the config.cache file before you + rerun configure with the new flags. + + 2.2 Does curl work/build with other SSL libraries? + + Curl has been written to use a generic SSL function layer internally, and + that SSL functionality can then be provided by one out of many different SSL + backends. + + curl can be built to use one of the following SSL alternatives: OpenSSL, + libressl, BoringSSL, GnuTLS, wolfSSL, NSS, mbedTLS, MesaLink, Secure + Transport (native iOS/OS X), Schannel (native Windows), GSKit (native IBM + i), or BearSSL. They all have their pros and cons, and we try to maintain a + comparison of them here: https://curl.haxx.se/docs/ssl-compared.html + + 2.3 Where can I find a copy of LIBEAY32.DLL? + + That is an OpenSSL binary built for Windows. + + Curl can be built with OpenSSL to do the SSL stuff. The LIBEAY32.DLL is then + what curl needs on a windows machine to do https:// etc. Check out the curl + website to find accurate and up-to-date pointers to recent OpenSSL DLLs and + other binary packages. + + 2.4 Does curl support SOCKS (RFC 1928) ? + + Yes, SOCKS 4 and 5 are supported. + + +3. Usage problems + + 3.1 curl: (1) SSL is disabled, https: not supported + + If you get this output when trying to get anything from a https:// server, + it means that the instance of curl/libcurl that you're using was built + without support for this protocol. + + This could've happened if the configure script that was run at build time + couldn't find all libs and include files curl requires for SSL to work. If + the configure script fails to find them, curl is simply built without SSL + support. + + To get the https:// support into a curl that was previously built but that + reports that https:// is not supported, you should dig through the document + and logs and check out why the configure script doesn't find the SSL libs + and/or include files. + + Also, check out the other paragraph in this FAQ labeled "configure doesn't + find OpenSSL even when it is installed". + + 3.2 How do I tell curl to resume a transfer? + + Curl supports resumed transfers both ways on both FTP and HTTP. + Try the -C option. + + 3.3 Why doesn't my posting using -F work? + + You can't arbitrarily use -F or -d, the choice between -F or -d depends on the + HTTP operation you need curl to do and what the web server that will receive + your post expects. + + If the form you're trying to submit uses the type 'multipart/form-data', then + and only then you must use the -F type. In all the most common cases, you + should use -d which then causes a posting with the type + 'application/x-www-form-urlencoded'. + + This is described in some detail in the MANUAL and TheArtOfHttpScripting + documents, and if you don't understand it the first time, read it again + before you post questions about this to the mailing list. Also, try reading + through the mailing list archives for old postings and questions regarding + this. + + 3.4 How do I tell curl to run custom FTP commands? + + You can tell curl to perform optional commands both before and/or after a + file transfer. Study the -Q/--quote option. + + Since curl is used for file transfers, you don't normally use curl to + perform FTP commands without transferring anything. Therefore you must + always specify a URL to transfer to/from even when doing custom FTP + commands, or use -I which implies the "no body" option sent to libcurl. + + 3.5 How can I disable the Accept: */* header? + + You can change all internally generated headers by adding a replacement with + the -H/--header option. By adding a header with empty contents you safely + disable that one. Use -H "Accept:" to disable that specific header. + + 3.6 Does curl support ASP, XML, XHTML or HTML version Y? + + To curl, all contents are alike. It doesn't matter how the page was + generated. It may be ASP, PHP, Perl, shell-script, SSI or plain HTML + files. There's no difference to curl and it doesn't even know what kind of + language that generated the page. + + See also item 3.14 regarding javascript. + + 3.7 Can I use curl to delete/rename a file through FTP? + + Yes. You specify custom FTP commands with -Q/--quote. + + One example would be to delete a file after you have downloaded it: + + curl -O ftp://download.com/coolfile -Q '-DELE coolfile' + + or rename a file after upload: + + curl -T infile ftp://upload.com/dir/ -Q "-RNFR infile" -Q "-RNTO newname" + + 3.8 How do I tell curl to follow HTTP redirects? + + Curl does not follow so-called redirects by default. The Location: header + that informs the client about this is only interpreted if you're using the + -L/--location option. As in: + + curl -L http://redirector.com + + Not all redirects are HTTP ones, see 4.14 + + 3.9 How do I use curl in my favorite programming language? + + Many programming languages have interfaces/bindings that allow you to use + curl without having to use the command line tool. If you are fluent in such + a language, you may prefer to use one of these interfaces instead. + + Find out more about which languages that support curl directly, and how to + install and use them, in the libcurl section of the curl website: + https://curl.haxx.se/libcurl/ + + All the various bindings to libcurl are made by other projects and people, + outside of the cURL project. The cURL project itself only produces libcurl + with its plain C API. If you don't find anywhere else to ask you can ask + about bindings on the curl-library list too, but be prepared that people on + that list may not know anything about bindings. + + In February 2019, there were interfaces available for the following + languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Delphi, Dylan, Eiffel, + Euphoria, Falcon, Ferite, Gambas, glib/GTK+, Go, Guile, Harbour, Haskell, + Java, Julia, Lisp, Lua, Mono, .NET, node.js, Object-Pascal, OCaml, Pascal, + Perl, PHP, PostgreSQL, Python, R, Rexx, Ring, RPG, Ruby, Rust, Scheme, + Scilab, S-Lang, Smalltalk, SP-Forth, SPL, Tcl, Visual Basic, Visual FoxPro, + Q, wxwidgets, XBLite and Xoho. By the time you read this, additional ones + may have appeared! + + 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? + + Curl adheres to the HTTP spec, which basically means you can play with *any* + protocol that is built on top of HTTP. Protocols such as SOAP, WEBDAV and + XML-RPC are all such ones. You can use -X to set custom requests and -H to + set custom headers (or replace internally generated ones). + + Using libcurl is of course just as good and you'd just use the proper + library options to do the same. + + 3.11 How do I POST with a different Content-Type? + + You can always replace the internally generated headers with -H/--header. + To make a simple HTTP POST with text/xml as content-type, do something like: + + curl -d "datatopost" -H "Content-Type: text/xml" [URL] + + 3.12 Why do FTP-specific features over HTTP proxy fail? + + Because when you use a HTTP proxy, the protocol spoken on the network will + be HTTP, even if you specify a FTP URL. This effectively means that you + normally can't use FTP-specific features such as FTP upload and FTP quote + etc. + + There is one exception to this rule, and that is if you can "tunnel through" + the given HTTP proxy. Proxy tunneling is enabled with a special option (-p) + and is generally not available as proxy admins usually disable tunneling to + ports other than 443 (which is used for HTTPS access through proxies). + + 3.13 Why do my single/double quotes fail? + + To specify a command line option that includes spaces, you might need to + put the entire option within quotes. Like in: + + curl -d " with spaces " url.com + + or perhaps + + curl -d ' with spaces ' url.com + + Exactly what kind of quotes and how to do this is entirely up to the shell + or command line interpreter that you are using. For most unix shells, you + can more or less pick either single (') or double (") quotes. For + Windows/DOS prompts I believe you're forced to use double (") quotes. + + Please study the documentation for your particular environment. Examples in + the curl docs will use a mix of both of these as shown above. You must + adjust them to work in your environment. + + Remember that curl works and runs on more operating systems than most single + individuals have ever tried. + + 3.14 Does curl support Javascript or PAC (automated proxy config)? + + Many web pages do magic stuff using embedded Javascript. Curl and libcurl + have no built-in support for that, so it will be treated just like any other + contents. + + .pac files are a netscape invention and are sometimes used by organizations + to allow them to differentiate which proxies to use. The .pac contents is + just a Javascript program that gets invoked by the browser and that returns + the name of the proxy to connect to. Since curl doesn't support Javascript, + it can't support .pac proxy configuration either. + + Some workarounds usually suggested to overcome this Javascript dependency: + + Depending on the Javascript complexity, write up a script that translates it + to another language and execute that. + + Read the Javascript code and rewrite the same logic in another language. + + Implement a Javascript interpreter, people have successfully used the + Mozilla Javascript engine in the past. + + Ask your admins to stop this, for a static proxy setup or similar. + + 3.15 Can I do recursive fetches with curl? + + No. curl itself has no code that performs recursive operations, such as + those performed by wget and similar tools. + + There exists wrapper scripts with that functionality (for example the + curlmirror perl script), and you can write programs based on libcurl to do + it, but the command line tool curl itself cannot. + + 3.16 What certificates do I need when I use SSL? + + There are three different kinds of "certificates" to keep track of when we + talk about using SSL-based protocols (HTTPS or FTPS) using curl or libcurl. + + CLIENT CERTIFICATE + + The server you communicate with may require that you can provide this in + order to prove that you actually are who you claim to be. If the server + doesn't require this, you don't need a client certificate. + + A client certificate is always used together with a private key, and the + private key has a pass phrase that protects it. + + SERVER CERTIFICATE + + The server you communicate with has a server certificate. You can and should + verify this certificate to make sure that you are truly talking to the real + server and not a server impersonating it. + + CERTIFICATE AUTHORITY CERTIFICATE ("CA cert") + + You often have several CA certs in a CA cert bundle that can be used to + verify a server certificate that was signed by one of the authorities in the + bundle. curl does not come with a CA cert bundle but most curl installs + provide one. You can also override the default. + + The server certificate verification process is made by using a Certificate + Authority certificate ("CA cert") that was used to sign the server + certificate. Server certificate verification is enabled by default in curl + and libcurl and is often the reason for problems as explained in FAQ entry + 4.12 and the SSLCERTS document + (https://curl.haxx.se/docs/sslcerts.html). Server certificates that are + "self-signed" or otherwise signed by a CA that you do not have a CA cert + for, cannot be verified. If the verification during a connect fails, you are + refused access. You then need to explicitly disable the verification to + connect to the server. + + 3.17 How do I list the root dir of an FTP server? + + There are two ways. The way defined in the RFC is to use an encoded slash + in the first path part. List the "/tmp" dir like this: + + curl ftp://ftp.sunet.se/%2ftmp/ + + or the not-quite-kosher-but-more-readable way, by simply starting the path + section of the URL with a slash: + + curl ftp://ftp.sunet.se//tmp/ + + 3.18 Can I use curl to send a POST/PUT and not wait for a response? + + No. + + But you could easily write your own program using libcurl to do such stunts. + + 3.19 How do I get HTTP from a host using a specific IP address? + + For example, you may be trying out a website installation that isn't yet in + the DNS. Or you have a site using multiple IP addresses for a given host + name and you want to address a specific one out of the set. + + Set a custom Host: header that identifies the server name you want to reach + but use the target IP address in the URL: + + curl --header "Host: www.example.com" http://127.0.0.1/ + + You can also opt to add faked host name entries to curl with the --resolve + option. That has the added benefit that things like redirects will also work + properly. The above operation would instead be done as: + + curl --resolve www.example.com:80:127.0.0.1 http://www.example.com/ + + 3.20 How to SFTP from my user's home directory? + + Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to + work with. It means that if you don't specify that you want the user's home + directory, you get the actual root directory. + + To specify a file in your user's home directory, you need to use the correct + URL syntax which for SFTP might look similar to: + + curl -O -u user:password sftp://example.com/~/file.txt + + and for SCP it is just a different protocol prefix: + + curl -O -u user:password scp://example.com/~/file.txt + + 3.21 Protocol xxx not supported or disabled in libcurl + + When passing on a URL to curl to use, it may respond that the particular + protocol is not supported or disabled. The particular way this error message + is phrased is because curl doesn't make a distinction internally of whether + a particular protocol is not supported (i.e. never got any code added that + knows how to speak that protocol) or if it was explicitly disabled. curl can + be built to only support a given set of protocols, and the rest would then + be disabled or not supported. + + Note that this error will also occur if you pass a wrongly spelled protocol + part as in "htpt://example.com" or as in the less evident case if you prefix + the protocol part with a space as in " http://example.com/". + + 3.22 curl -X gives me HTTP problems + + In normal circumstances, -X should hardly ever be used. + + By default you use curl without explicitly saying which request method to + use when the URL identifies a HTTP transfer. If you just pass in a URL like + "curl http://example.com" it will use GET. If you use -d or -F curl will use + POST, -I will cause a HEAD and -T will make it a PUT. + + If for whatever reason you're not happy with these default choices that curl + does for you, you can override those request methods by specifying -X + [WHATEVER]. This way you can for example send a DELETE by doing "curl -X + DELETE [URL]". + + It is thus pointless to do "curl -XGET [URL]" as GET would be used + anyway. In the same vein it is pointless to do "curl -X POST -d data + [URL]"... But you can make a fun and somewhat rare request that sends a + request-body in a GET request with something like "curl -X GET -d data + [URL]" + + Note that -X doesn't actually change curl's behavior as it only modifies the + actual string sent in the request, but that may of course trigger a + different set of events. + + Accordingly, by using -XPOST on a command line that for example would follow + a 303 redirect, you will effectively prevent curl from behaving + correctly. Be aware. + + +4. Running Problems + + 4.1 Problems connecting to SSL servers. + + It took a very long time before we could sort out why curl had problems to + connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. The + error sometimes showed up similar to: + + 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233: + + It turned out to be because many older SSL servers don't deal with SSLv3 + requests properly. To correct this problem, tell curl to select SSLv2 from + the command line (-2/--sslv2). + + There have also been examples where the remote server didn't like the SSLv2 + request and instead you had to force curl to use SSLv3 with -3/--sslv3. + + 4.2 Why do I get problems when I use & or % in the URL? + + In general unix shells, the & symbol is treated specially and when used, it + runs the specified command in the background. To safely send the & as a part + of a URL, you should quote the entire URL by using single (') or double (") + quotes around it. Similar problems can also occur on some shells with other + characters, including ?*!$~(){}<>\|;`. When in doubt, quote the URL. + + An example that would invoke a remote CGI that uses &-symbols could be: + + curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl' + + In Windows, the standard DOS shell treats the percent sign specially and you + need to use TWO percent signs for each single one you want to use in the + URL. + + If you want a literal percent sign to be part of the data you pass in a POST + using -d/--data you must encode it as '%25' (which then also needs the + percent sign doubled on Windows machines). + + 4.3 How can I use {, }, [ or ] to specify multiple URLs? + + Because those letters have a special meaning to the shell, to be used in + a URL specified to curl you must quote them. + + An example that downloads two URLs (sequentially) would be: + + curl '{curl,www}.haxx.se' + + To be able to use those characters as actual parts of the URL (without using + them for the curl URL "globbing" system), use the -g/--globoff option: + + curl -g 'www.site.com/weirdname[].html' + + 4.4 Why do I get downloaded data even though the web page doesn't exist? + + Curl asks remote servers for the page you specify. If the page doesn't exist + at the server, the HTTP protocol defines how the server should respond and + that means that headers and a "page" will be returned. That's simply how + HTTP works. + + By using the --fail option you can tell curl explicitly to not get any data + if the HTTP return code doesn't say success. + + 4.5 Why do I get return code XXX from a HTTP server? + + RFC2616 clearly explains the return codes. This is a short transcript. Go + read the RFC for exact details: + + 4.5.1 "400 Bad Request" + + The request could not be understood by the server due to malformed + syntax. The client SHOULD NOT repeat the request without modifications. + + 4.5.2 "401 Unauthorized" + + The request requires user authentication. + + 4.5.3 "403 Forbidden" + + The server understood the request, but is refusing to fulfill it. + Authorization will not help and the request SHOULD NOT be repeated. + + 4.5.4 "404 Not Found" + + The server has not found anything matching the Request-URI. No indication + is given of whether the condition is temporary or permanent. + + 4.5.5 "405 Method Not Allowed" + + The method specified in the Request-Line is not allowed for the resource + identified by the Request-URI. The response MUST include an Allow header + containing a list of valid methods for the requested resource. + + 4.5.6 "301 Moved Permanently" + + If you get this return code and an HTML output similar to this: + +

Moved Permanently

The document has moved
here. + + it might be because you requested a directory URL but without the trailing + slash. Try the same operation again _with_ the trailing URL, or use the + -L/--location option to follow the redirection. + + 4.6 Can you tell me what error code 142 means? + + All curl error codes are described at the end of the man page, in the + section called "EXIT CODES". + + Error codes that are larger than the highest documented error code means + that curl has exited due to a crash. This is a serious error, and we + appreciate a detailed bug report from you that describes how we could go + ahead and repeat this! + + 4.7 How do I keep user names and passwords secret in Curl command lines? + + This problem has two sides: + + The first part is to avoid having clear-text passwords in the command line + so that they don't appear in 'ps' outputs and similar. That is easily + avoided by using the "-K" option to tell curl to read parameters from a file + or stdin to which you can pass the secret info. curl itself will also + attempt to "hide" the given password by blanking out the option - this + doesn't work on all platforms. + + To keep the passwords in your account secret from the rest of the world is + not a task that curl addresses. You could of course encrypt them somehow to + at least hide them from being read by human eyes, but that is not what + anyone would call security. + + Also note that regular HTTP (using Basic authentication) and FTP passwords + are sent as cleartext across the network. All it takes for anyone to fetch + them is to listen on the network. Eavesdropping is very easy. Use more secure + authentication methods (like Digest, Negotiate or even NTLM) or consider the + SSL-based alternatives HTTPS and FTPS. + + 4.8 I found a bug! + + It is not a bug if the behavior is documented. Read the docs first. + Especially check out the KNOWN_BUGS file, it may be a documented bug! + + If it is a problem with a binary you've downloaded or a package for your + particular platform, try contacting the person who built the package/archive + you have. + + If there is a bug, read the BUGS document first. Then report it as described + in there. + + 4.9 Curl can't authenticate to the server that requires NTLM? + + NTLM support requires OpenSSL, GnuTLS, mbedTLS, NSS, Secure Transport, or + Microsoft Windows libraries at build-time to provide this functionality. + + NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You + should not use such ones. + + 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! + + Many web servers allow or demand that the administrator configures the + server properly for these requests to work on the web server. + + Some servers seem to support HEAD only on certain kinds of URLs. + + To fully grasp this, try the documentation for the particular server + software you're trying to interact with. This is not anything curl can do + anything about. + + 4.11 Why do my HTTP range requests return the full document? + + Because the range may not be supported by the server, or the server may + choose to ignore it and return the full document anyway. + + 4.12 Why do I get "certificate verify failed" ? + + You invoke curl 7.10 or later to communicate on a https:// URL and get an + error back looking something similar to this: + + curl: (35) SSL: error:14090086:SSL routines: + SSL3_GET_SERVER_CERTIFICATE:certificate verify failed + + Then it means that curl couldn't verify that the server's certificate was + good. Curl verifies the certificate using the CA cert bundle that comes with + the curl installation. + + To disable the verification (which makes it act like curl did before 7.10), + use -k. This does however enable man-in-the-middle attacks. + + If you get this failure but are having a CA cert bundle installed and used, + the server's certificate is not signed by one of the CA's in the bundle. It + might for example be self-signed. You then correct this problem by obtaining + a valid CA cert for the server. Or again, decrease the security by disabling + this check. + + Details are also in the SSLCERTS file in the release archives, found online + here: https://curl.haxx.se/docs/sslcerts.html + + 4.13 Why is curl -R on Windows one hour off? + + Since curl 7.53.0 this issue should be fixed as long as curl was built with + any modern compiler that allows for a 64-bit curl_off_t type. For older + compilers or prior curl versions it may set a time that appears one hour off. + This happens due to a flaw in how Windows stores and uses file modification + times and it is not easily worked around. For more details read this: + https://www.codeproject.com/Articles/1144/Beating-the-Daylight-Savings-Time-bug-and-getting + + 4.14 Redirects work in browser but not with curl! + + curl supports HTTP redirects well (see item 3.8). Browsers generally support + at least two other ways to perform redirects that curl does not: + + Meta tags. You can write a HTML tag that will cause the browser to redirect + to another given URL after a certain time. + + Javascript. You can write a Javascript program embedded in a HTML page that + redirects the browser to another given URL. + + There is no way to make curl follow these redirects. You must either + manually figure out what the page is set to do, or write a script that parses + the results and fetches the new URL. + + 4.15 FTPS doesn't work + + curl supports FTPS (sometimes known as FTP-SSL) both implicit and explicit + mode. + + When a URL is used that starts with FTPS://, curl assumes implicit SSL on + the control connection and will therefore immediately connect and try to + speak SSL. FTPS:// connections default to port 990. + + To use explicit FTPS, you use a FTP:// URL and the --ftp-ssl option (or one + of its related flavors). This is the most common method, and the one + mandated by RFC4217. This kind of connection will then of course use the + standard FTP port 21 by default. + + 4.16 My HTTP POST or PUT requests are slow! + + libcurl makes all POST and PUT requests (except for POST requests with a + very tiny request body) use the "Expect: 100-continue" header. This header + allows the server to deny the operation early so that libcurl can bail out + before having to send any data. This is useful in authentication + cases and others. + + However, many servers don't implement the Expect: stuff properly and if the + server doesn't respond (positively) within 1 second libcurl will continue + and send off the data anyway. + + You can disable libcurl's use of the Expect: header the same way you disable + any header, using -H / CURLOPT_HTTPHEADER, or by forcing it to use HTTP 1.0. + + 4.17 Non-functional connect timeouts + + In most Windows setups having a timeout longer than 21 seconds make no + difference, as it will only send 3 TCP SYN packets and no more. The second + packet sent three seconds after the first and the third six seconds after + the second. No more than three packets are sent, no matter how long the + timeout is set. + + See option TcpMaxConnectRetransmissions on this page: + https://support.microsoft.com/en-us/kb/175523/en-us + + Also, even on non-Windows systems there may run a firewall or anti-virus + software or similar that accepts the connection but does not actually do + anything else. This will make (lib)curl to consider the connection connected + and thus the connect timeout won't trigger. + + 4.18 file:// URLs containing drive letters (Windows, NetWare) + + When using curl to try to download a local file, one might use a URL + in this format: + + file://D:/blah.txt + + You'll find that even if D:\blah.txt does exist, curl returns a 'file + not found' error. + + According to RFC 1738 (https://www.ietf.org/rfc/rfc1738.txt), + file:// URLs must contain a host component, but it is ignored by + most implementations. In the above example, 'D:' is treated as the + host component, and is taken away. Thus, curl tries to open '/blah.txt'. + If your system is installed to drive C:, that will resolve to 'C:\blah.txt', + and if that doesn't exist you will get the not found error. + + To fix this problem, use file:// URLs with *three* leading slashes: + + file:///D:/blah.txt + + Alternatively, if it makes more sense, specify 'localhost' as the host + component: + + file://localhost/D:/blah.txt + + In either case, curl should now be looking for the correct file. + + 4.19 Why doesn't curl return an error when the network cable is unplugged? + + Unplugging a cable is not an error situation. The TCP/IP protocol stack + was designed to be fault tolerant, so even though there may be a physical + break somewhere the connection shouldn't be affected, just possibly + delayed. Eventually, the physical break will be fixed or the data will be + re-routed around the physical problem through another path. + + In such cases, the TCP/IP stack is responsible for detecting when the + network connection is irrevocably lost. Since with some protocols it is + perfectly legal for the client to wait indefinitely for data, the stack may + never report a problem, and even when it does, it can take up to 20 minutes + for it to detect an issue. The curl option --keepalive-time enables + keep-alive support in the TCP/IP stack which makes it periodically probe the + connection to make sure it is still available to send data. That should + reliably detect any TCP/IP network failure. + + But even that won't detect the network going down before the TCP/IP + connection is established (e.g. during a DNS lookup) or using protocols that + don't use TCP. To handle those situations, curl offers a number of timeouts + on its own. --speed-limit/--speed-time will abort if the data transfer rate + falls too low, and --connect-timeout and --max-time can be used to put an + overall timeout on the connection phase or the entire transfer. + + A libcurl-using application running in a known physical environment (e.g. + an embedded device with only a single network connection) may want to act + immediately if its lone network connection goes down. That can be achieved + by having the application monitor the network connection on its own using an + OS-specific mechanism, then signaling libcurl to abort (see also item 5.13). + + 4.20 curl doesn't return error for HTTP non-200 responses! + + Correct. Unless you use -f (--fail). + + When doing HTTP transfers, curl will perform exactly what you're asking it + to do and if successful it will not return an error. You can use curl to + test your web server's "file not found" page (that gets 404 back), you can + use it to check your authentication protected web pages (that gets a 401 + back) and so on. + + The specific HTTP response code does not constitute a problem or error for + curl. It simply sends and delivers HTTP as you asked and if that worked, + everything is fine and dandy. The response code is generally providing more + higher level error information that curl doesn't care about. The error was + not in the HTTP transfer. + + If you want your command line to treat error codes in the 400 and up range + as errors and thus return a non-zero value and possibly show an error + message, curl has a dedicated option for that: -f (CURLOPT_FAILONERROR in + libcurl speak). + + You can also use the -w option and the variable %{response_code} to extract + the exact response code that was returned in the response. + + 4.21 Why is there a HTTP/1.1 in my HTTP/2 request? + + If you use verbose to see the HTTP request when you send off a HTTP/2 + request, it will still say 1.1. + + The reason for this is that we first generate the request to send using the + old 1.1 style and show that request in the verbose output, and then we + convert it over to the binary header-compressed HTTP/2 style. The actual + "1.1" part from that request is then not actually used in the transfer. + The binary HTTP/2 headers are not human readable. + +5. libcurl Issues + + 5.1 Is libcurl thread-safe? + + Yes. + + We have written the libcurl code specifically adjusted for multi-threaded + programs. libcurl will use thread-safe functions instead of non-safe ones if + your system has such. Note that you must never share the same handle in + multiple threads. + + There may be some exceptions to thread safety depending on how libcurl was + built. Please review the guidelines for thread safety to learn more: + https://curl.haxx.se/libcurl/c/threadsafe.html + + 5.2 How can I receive all data into a large memory chunk? + + [ See also the examples/getinmemory.c source ] + + You are in full control of the callback function that gets called every time + there is data received from the remote server. You can make that callback do + whatever you want. You do not have to write the received data to a file. + + One solution to this problem could be to have a pointer to a struct that you + pass to the callback function. You set the pointer using the + CURLOPT_WRITEDATA option. Then that pointer will be passed to the callback + instead of a FILE * to a file: + + /* imaginary struct */ + struct MemoryStruct { + char *memory; + size_t size; + }; + + /* imaginary callback function */ + size_t + WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) + { + size_t realsize = size * nmemb; + struct MemoryStruct *mem = (struct MemoryStruct *)data; + + mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1); + if (mem->memory) { + memcpy(&(mem->memory[mem->size]), ptr, realsize); + mem->size += realsize; + mem->memory[mem->size] = 0; + } + return realsize; + } + + 5.3 How do I fetch multiple files with libcurl? + + libcurl has excellent support for transferring multiple files. You should + just repeatedly set new URLs with curl_easy_setopt() and then transfer it + with curl_easy_perform(). The handle you get from curl_easy_init() is not + only reusable, but you're even encouraged to reuse it if you can, as that + will enable libcurl to use persistent connections. + + 5.4 Does libcurl do Winsock initialization on win32 systems? + + Yes, if told to in the curl_global_init() call. + + 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ? + + Yes, but you cannot open a FILE * and pass the pointer to a DLL and have + that DLL use the FILE * (as the DLL and the client application cannot access + each others' variable memory areas). If you set CURLOPT_WRITEDATA you must + also use CURLOPT_WRITEFUNCTION as well to set a function that writes the + file, even if that simply writes the data to the specified FILE *. + Similarly, if you use CURLOPT_READDATA you must also specify + CURLOPT_READFUNCTION. + + 5.6 What about Keep-Alive or persistent connections? + + curl and libcurl have excellent support for persistent connections when + transferring several files from the same server. Curl will attempt to reuse + connections for all URLs specified on the same command line/config file, and + libcurl will reuse connections for all transfers that are made using the + same libcurl handle. + + When you use the easy interface the connection cache is kept within the easy + handle. If you instead use the multi interface, the connection cache will be + kept within the multi handle and will be shared among all the easy handles + that are used within the same multi handle. + + 5.7 Link errors when building libcurl on Windows! + + You need to make sure that your project, and all the libraries (both static + and dynamic) that it links against, are compiled/linked against the same run + time library. + + This is determined by the /MD, /ML, /MT (and their corresponding /M?d) + options to the command line compiler. /MD (linking against MSVCRT dll) seems + to be the most commonly used option. + + When building an application that uses the static libcurl library, you must + add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for + dynamic import symbols. If you're using Visual Studio, you need to instead + add CURL_STATICLIB in the "Preprocessor Definitions" section. + + If you get linker error like "unknown symbol __imp__curl_easy_init ..." you + have linked against the wrong (static) library. If you want to use the + libcurl.dll and import lib, you don't need any extra CFLAGS, but use one of + the import libraries below. These are the libraries produced by the various + lib/Makefile.* files: + + Target: static lib. import lib for libcurl*.dll. + ----------------------------------------------------------- + MingW: libcurl.a libcurldll.a + MSVC (release): libcurl.lib libcurl_imp.lib + MSVC (debug): libcurld.lib libcurld_imp.lib + Borland: libcurl.lib libcurl_imp.lib + + 5.8 libcurl.so.X: open failed: No such file or directory + + This is an error message you might get when you try to run a program linked + with a shared version of libcurl and your run-time linker (ld.so) couldn't + find the shared library named libcurl.so.X. (Where X is the number of the + current libcurl ABI, typically 3 or 4). + + You need to make sure that ld.so finds libcurl.so.X. You can do that + multiple ways, and it differs somewhat between different operating systems, + but they are usually: + + * Add an option to the linker command line that specify the hard-coded path + the run-time linker should check for the lib (usually -R) + + * Set an environment variable (LD_LIBRARY_PATH for example) where ld.so + should check for libs + + * Adjust the system's config to check for libs in the directory where you've + put the dir (like Linux's /etc/ld.so.conf) + + 'man ld.so' and 'man ld' will tell you more details + + 5.9 How does libcurl resolve host names? + + libcurl supports a large a number of different name resolve functions. One + of them is picked at build-time and will be used unconditionally. Thus, if + you want to change name resolver function you must rebuild libcurl and tell + it to use a different function. + + - The non-IPv6 resolver that can use one of four different host name resolve + calls (depending on what your system supports): + + A - gethostbyname() + B - gethostbyname_r() with 3 arguments + C - gethostbyname_r() with 5 arguments + D - gethostbyname_r() with 6 arguments + + - The IPv6-resolver that uses getaddrinfo() + + - The c-ares based name resolver that uses the c-ares library for resolves. + Using this offers asynchronous name resolves. + + - The threaded resolver (default option on Windows). It uses: + + A - gethostbyname() on plain IPv4 hosts + B - getaddrinfo() on IPv6 enabled hosts + + Also note that libcurl never resolves or reverse-lookups addresses given as + pure numbers, such as 127.0.0.1 or ::1. + + 5.10 How do I prevent libcurl from writing the response to stdout? + + libcurl provides a default built-in write function that writes received data + to stdout. Set the CURLOPT_WRITEFUNCTION to receive the data, or possibly + set CURLOPT_WRITEDATA to a different FILE * handle. + + 5.11 How do I make libcurl not receive the whole HTTP response? + + You make the write callback (or progress callback) return an error and + libcurl will then abort the transfer. + + 5.12 Can I make libcurl fake or hide my real IP address? + + No. libcurl operates on a higher level. Besides, faking IP address would + imply sending IP packets with a made-up source address, and then you normally + get a problem with receiving the packet sent back as they would then not be + routed to you! + + If you use a proxy to access remote sites, the sites will not see your local + IP address but instead the address of the proxy. + + Also note that on many networks NATs or other IP-munging techniques are used + that makes you see and use a different IP address locally than what the + remote server will see you coming from. You may also consider using + https://www.torproject.org/ . + + 5.13 How do I stop an ongoing transfer? + + With the easy interface you make sure to return the correct error code from + one of the callbacks, but none of them are instant. There is no function you + can call from another thread or similar that will stop it immediately. + Instead, you need to make sure that one of the callbacks you use returns an + appropriate value that will stop the transfer. Suitable callbacks that you + can do this with include the progress callback, the read callback and the + write callback. + + If you're using the multi interface, you can also stop a transfer by + removing the particular easy handle from the multi stack at any moment you + think the transfer is done or when you wish to abort the transfer. + + 5.14 Using C++ non-static functions for callbacks? + + libcurl is a C library, it doesn't know anything about C++ member functions. + + You can overcome this "limitation" with relative ease using a static + member function that is passed a pointer to the class: + + // f is the pointer to your object. + static size_t YourClass::func(void *buffer, size_t sz, size_t n, void *f) + { + // Call non-static member function. + static_cast(f)->nonStaticFunction(); + } + + // This is how you pass pointer to the static function: + curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass::func); + curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this); + + 5.15 How do I get an FTP directory listing? + + If you end the FTP URL you request with a slash, libcurl will provide you + with a directory listing of that given directory. You can also set + CURLOPT_CUSTOMREQUEST to alter what exact listing command libcurl would use + to list the files. + + The follow-up question tends to be how is a program supposed to parse the + directory listing. How does it know what's a file and what's a dir and what's + a symlink etc. If the FTP server supports the MLSD command then it will + return data in a machine-readable format that can be parsed for type. The + types are specified by RFC3659 section 7.5.1. If MLSD is not supported then + you have to work with what you're given. The LIST output format is entirely + at the server's own liking and the NLST output doesn't reveal any types and + in many cases doesn't even include all the directory entries. Also, both LIST + and NLST tend to hide unix-style hidden files (those that start with a dot) + by default so you need to do "LIST -a" or similar to see them. + + Example - List only directories. + ftp.funet.fi supports MLSD and ftp.kernel.org does not: + + curl -s ftp.funet.fi/pub/ -X MLSD | \ + perl -lne 'print if s/(?:^|;)type=dir;[^ ]+ (.+)$/$1/' + + curl -s ftp.kernel.org/pub/linux/kernel/ | \ + perl -lne 'print if s/^d[-rwx]{9}(?: +[^ ]+){7} (.+)$/$1/' + + If you need to parse LIST output in libcurl one such existing + list parser is available at https://cr.yp.to/ftpparse.html Versions of + libcurl since 7.21.0 also provide the ability to specify a wildcard to + download multiple files from one FTP directory. + + 5.16 I want a different time-out! + + Time and time again users realize that CURLOPT_TIMEOUT and + CURLOPT_CONNECTIMEOUT are not sufficiently advanced or flexible to cover all + the various use cases and scenarios applications end up with. + + libcurl offers many more ways to time-out operations. A common alternative + is to use the CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME options to + specify the lowest possible speed to accept before to consider the transfer + timed out. + + The most flexible way is by writing your own time-out logic and using + CURLOPT_XFERINFOFUNCTION (perhaps in combination with other callbacks) and + use that to figure out exactly when the right condition is met when the + transfer should get stopped. + + 5.17 Can I write a server with libcurl? + + No. libcurl offers no functions or building blocks to build any kind of + internet protocol server. libcurl is only a client-side library. For server + libraries, you need to continue your search elsewhere but there exist many + good open source ones out there for most protocols you could possibly want a + server for. And there are really good stand-alone ones that have been tested + and proven for many years. There's no need for you to reinvent them! + + 5.18 Does libcurl use threads? + + Put simply: no, libcurl will execute in the same thread you call it in. All + callbacks will be called in the same thread as the one you call libcurl in. + + If you want to avoid your thread to be blocked by the libcurl call, you make + sure you use the non-blocking API which will do transfers asynchronously - + but still in the same single thread. + + libcurl will potentially internally use threads for name resolving, if it + was built to work like that, but in those cases it'll create the child + threads by itself and they will only be used and then killed internally by + libcurl and never exposed to the outside. + +6. License Issues + + Curl and libcurl are released under a MIT/X derivate license. The license is + very liberal and should not impose a problem for your project. This section + is just a brief summary for the cases we get the most questions. (Parts of + this section was much enhanced by Bjorn Reese.) + + We are not lawyers and this is not legal advice. You should probably consult + one if you want true and accurate legal insights without our prejudice. Note + especially that this section concerns the libcurl license only; compiling in + features of libcurl that depend on other libraries (e.g. OpenSSL) may affect + the licensing obligations of your application. + + 6.1 I have a GPL program, can I use the libcurl library? + + Yes! + + Since libcurl may be distributed under the MIT/X derivate license, it can be + used together with GPL in any software. + + 6.2 I have a closed-source program, can I use the libcurl library? + + Yes! + + libcurl does not put any restrictions on the program that uses the library. + + 6.3 I have a BSD licensed program, can I use the libcurl library? + + Yes! + + libcurl does not put any restrictions on the program that uses the library. + + 6.4 I have a program that uses LGPL libraries, can I use libcurl? + + Yes! + + The LGPL license doesn't clash with other licenses. + + 6.5 Can I modify curl/libcurl for my program and keep the changes secret? + + Yes! + + The MIT/X derivate license practically allows you to do almost anything with + the sources, on the condition that the copyright texts in the sources are + left intact. + + 6.6 Can you please change the curl/libcurl license to XXXX? + + No. + + We have carefully picked this license after years of development and + discussions and a large amount of people have contributed with source code + knowing that this is the license we use. This license puts the restrictions + we want on curl/libcurl and it does not spread to other programs or + libraries that use it. It should be possible for everyone to use libcurl or + curl in their projects, no matter what license they already have in use. + + 6.7 What are my obligations when using libcurl in my commercial apps? + + Next to none. All you need to adhere to is the MIT-style license (stated in + the COPYING file) which basically says you have to include the copyright + notice in "all copies" and that you may not use the copyright holder's name + when promoting your software. + + You do not have to release any of your source code. + + You do not have to reveal or make public any changes to the libcurl source + code. + + You do not have to broadcast to the world that you are using libcurl within + your app. + + All we ask is that you disclose "the copyright notice and this permission + notice" somewhere. Most probably like in the documentation or in the section + where other third party dependencies already are mentioned and acknowledged. + + As can be seen here: https://curl.haxx.se/docs/companies.html and elsewhere, + more and more companies are discovering the power of libcurl and take + advantage of it even in commercial environments. + + +7. PHP/CURL Issues + + 7.1 What is PHP/CURL? + + The module for PHP that makes it possible for PHP programs to access curl- + functions from within PHP. + + In the cURL project we call this module PHP/CURL to differentiate it from + curl the command line tool and libcurl the library. The PHP team however + does not refer to it like this (for unknown reasons). They call it plain + CURL (often using all caps) or sometimes ext/curl, but both cause much + confusion to users which in turn gives us a higher question load. + + 7.2 Who wrote PHP/CURL? + + PHP/CURL was initially written by Sterling Hughes. + + 7.3 Can I perform multiple requests using the same handle? + + Yes - at least in PHP version 4.3.8 and later (this has been known to not + work in earlier versions, but the exact version when it started to work is + unknown to me). + + After a transfer, you just set new options in the handle and make another + transfer. This will make libcurl re-use the same connection if it can. + + 7.4 Does PHP/CURL have dependencies? + + PHP/CURL is a module that comes with the regular PHP package. It depends on + and uses libcurl, so you need to have libcurl installed properly before + PHP/CURL can be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FEATURES b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FEATURES new file mode 100644 index 00000000..35b26e1b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/FEATURES @@ -0,0 +1,207 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +FEATURES + +curl tool + - config file support + - multiple URLs in a single command line + - range "globbing" support: [0-13], {one,two,three} + - multiple file upload on a single command line + - custom maximum transfer rate + - redirectable stderr + - metalink support (*13) + +libcurl + - full URL syntax with no length limit + - custom maximum download time + - custom least download speed acceptable + - custom output result after completion + - guesses protocol from host name unless specified + - uses .netrc + - progress bar with time statistics while downloading + - "standard" proxy environment variables support + - compiles on win32 (reported builds on 40+ operating systems) + - selectable network interface for outgoing traffic + - IPv6 support on unix and Windows + - persistent connections + - socks 4 + 5 support, with or without local name resolving + - supports user name and password in proxy environment variables + - operations through proxy "tunnel" (using CONNECT) + - support for large files (>2GB and >4GB) during upload and download + - replaceable memory functions (malloc, free, realloc, etc) + - asynchronous name resolving (*6) + - both a push and a pull style interface + - international domain names (*11) + +HTTP + - HTTP/1.1 compliant (optionally uses 1.0) + - GET + - PUT + - HEAD + - POST + - Pipelining + - multipart formpost (RFC1867-style) + - authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3) + to server and proxy + - resume (both GET and PUT) + - follow redirects + - maximum amount of redirects to follow + - custom HTTP request + - cookie get/send fully parsed + - reads/writes the netscape cookie file format + - custom headers (replace/remove internally generated headers) + - custom user-agent string + - custom referrer string + - range + - proxy authentication + - time conditions + - via http-proxy + - retrieve file modification date + - Content-Encoding support for deflate and gzip + - "Transfer-Encoding: chunked" support in uploads + - data compression (*12) + - HTTP/2 (*5) + +HTTPS (*1) + - (all the HTTP features) + - using client certificates + - verify server certificate + - via http-proxy + - select desired encryption + - force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1) + +FTP + - download + - authentication + - Kerberos 5 (*14) + - active/passive using PORT, EPRT, PASV or EPSV + - single file size information (compare to HTTP HEAD) + - 'type=' URL support + - dir listing + - dir listing names-only + - upload + - upload append + - upload via http-proxy as HTTP PUT + - download resume + - upload resume + - custom ftp commands (before and/or after the transfer) + - simple "range" support + - via http-proxy + - all operations can be tunneled through a http-proxy + - customizable to retrieve file modification date + - no dir depth limit + +FTPS (*1) + - implicit ftps:// support that use SSL on both connections + - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp:// + connection to use SSL for both or one of the connections + +SCP (*8) + - both password and public key auth + +SFTP (*8) + - both password and public key auth + - with custom commands sent before/after the transfer + +TFTP + - download + - upload + +TELNET + - connection negotiation + - custom telnet options + - stdin/stdout I/O + +LDAP (*2) + - full LDAP URL support + +DICT + - extended DICT URL support + +FILE + - URL support + - upload + - resume + +SMB + - SMBv1 over TCP and SSL + - download + - upload + - authentication with NTLMv1 + +SMTP + - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5 + (*4) and External. + - send e-mails + - mail from support + - mail size support + - mail auth support for trusted server-to-server relaying + - multiple recipients + - via http-proxy + +SMTPS (*1) + - implicit smtps:// support + - explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL + - via http-proxy + +POP3 + - authentication: Clear Text, APOP and SASL + - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), + Kerberos 5 (*4) and External. + - list e-mails + - retrieve e-mails + - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via + custom requests + - via http-proxy + +POP3S (*1) + - implicit pop3s:// support + - explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL + - via http-proxy + +IMAP + - authentication: Clear Text and SASL + - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), + Kerberos 5 (*4) and External. + - list the folders of a mailbox + - select a mailbox with support for verifying the UIDVALIDITY + - fetch e-mails with support for specifying the UID and SECTION + - upload e-mails via the append command + - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS, + STORE, COPY and UID via custom requests + - via http-proxy + +IMAPS (*1) + - implicit imaps:// support + - explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL + - via http-proxy + +MQTT + - Subscribe to and publish topics using url scheme mqtt://broker/topic + +FOOTNOTES +========= + + *1 = requires a TLS library + *2 = requires OpenLDAP or WinLDAP + *3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or + SSPI (native Windows) + *4 = requires a GSS-API implementation, however, only Windows SSPI is + currently supported + *5 = requires nghttp2 and possibly a recent TLS library + *6 = requires c-ares + *7 = requires OpenSSL, NSS, GSKit, Schannel or Secure Transport; GnuTLS, for + example, only supports SSLv3 and TLSv1 + *8 = requires libssh2 + *9 = requires OpenSSL, GnuTLS, mbedTLS, NSS, yassl, Secure Transport or SSPI + (native Windows) + *10 = requires an SSL library that supports SSLv3 + *11 = requires libidn or Windows + *12 = requires libz + *13 = requires libmetalink, and either an Apple or Microsoft operating + system, or OpenSSL, or GnuTLS, or NSS + *14 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/GOVERNANCE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/GOVERNANCE.md new file mode 100644 index 00000000..a4c006fb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/GOVERNANCE.md @@ -0,0 +1,167 @@ +# Decision making in the curl project + +A rough guide to how we make decisions and who does what. + +## BDFL + +This project was started by and has to some extent been pushed forward over +the years with Daniel Stenberg as the driving force. It matches a standard +BDFL (Benevolent Dictator For Life) style project. + +This setup has been used due to convenience and the fact that is has worked +fine this far. It is not because someone thinks of it as a superior project +leadership model. It will also only continue working as long as Daniel manages +to listen in to what the project and the general user population wants and +expects from us. + +## Legal entity + +There is no legal entity. The curl project is just a bunch of people scattered +around the globe with the common goal to produce source code that creates +great products. We are not part of any umbrella organization and we are not +located in any specific country. We are totally independent. + +The copyrights in the project are owned by the individuals and organizations +that wrote those parts of the code. + +## Decisions + +The curl project is not a democracy, but everyone is entitled to state their +opinion and may argue for their sake within the community. + +All and any changes that have been done or will be done are eligible to bring +up for discussion, to object to or to praise. Ideally, we find consensus for +the appropriate way forward in any given situation or challenge. + +If there is no obvious consensus, a maintainer who's knowledgeable in the +specific area will take an "executive" decision that they think is the right +for the project. + +## Donations + +Donating plain money to curl is best done to curl's [Open Collective +fund](https://opencollective.com/curl). Open Collective is a US based +non-profit organization that holds on to funds for us. This fund is then used +for paying the curl security bug bounties, to reimburse project related +expenses etc. + +Donations to the project can also come in form of server hosting, providing +services and paying for people to work on curl related code etc. Usually, such +donations are services paid for directly by the sponsors. + +We grade sponsors in a few different levels and if they meet the criteria, +they can be mentioned on the Sponsors page on the curl website. + +## Commercial Support + +The curl project does not do or offer commercial support. It only hosts +mailing lists, runs bug trackers etc to facilitate communication and work. + +However, Daniel works for wolfSSL and we offer commercial curl support there. + +## Key roles + +### Maintainers + +A maintainer in the curl project is an individual who has been given +permissions to push commits to one of the git repositories. + +Maintainers are free to push commits to the repositories at their own will. +Maintainers are however expected to listen to feedback from users and any +change that is non-trivial in size or nature *should* be brought to the +project as a PR to allow others to comment/object before merge. + +### Former maintainers + +A maintainer who stops being active in the project will at some point get +their push permissions removed. We do this for security reasons but also to +make sure that we always have the list of maintainers as "the team that push +stuff to curl". + +Getting push permissions removed is not a punishment. Everyone who ever worked +on maintaining curl is considered a hero, for all time hereafter. + +### Security team members + +We have a security team. That's the team of people who are subscribed to the +curl-security mailing list; the receivers of security reports from users and +developers. This list of people will vary over time but should be skilled +developers familiar with the curl project. + +The security team works best when it consists of a small set of active +persons. We invite new members when the team seems to need it, and we also +expect to retire security team members as they "drift off" from the project or +just find themselves unable to perform their duties there. + +### Server admins + +We run a web server, a mailing list and more on the curl project's primary +server. That physical machine is owned and run by Haxx. Daniel is the primary +admin of all things curl related server stuff, but Björn Stenberg and Linus +Feltzing serve as backup admins for when Daniel is gone or unable. + +The primary server is paid for by Haxx. The machine is physically located in a +server bunker in Stockholm Sweden, operated by the company Portlane. + +The website contents are served to the web via Fastly and Daniel is the +primary curl contact with Fastly. + +### BDFL + +That's Daniel. + +# Maintainers + +A curl maintainer is a project volunteer who has the authority and rights to +merge changes into a git repository in the curl project. + +Anyone can aspire to become a curl maintainer. + +### Duties + +There are no mandatory duties. We hope and wish that maintainers consider +reviewing patches and help merging them, especially when the changes are +within the area of personal expertise and experience. + +### Requirements + +- only merge code that meets our quality and style guide requirements. +- *never* merge code without doing a PR first, unless the change is "trivial" +- if in doubt, ask for input/feedback from others + +### Recommendations + +- we require two-factor authentication enabled on your github account to + reduce risk of malicious source code tampering +- consider enabling signed git commits for additional verification of changes + +### Merge advice + +When you're merging patches/PRs... + +- make sure the commit messages follow our template +- squash patch sets into a few logical commits even if the PR didn't, if + necessary +- avoid the "merge" button on github, do it "manually" instead to get full + control and full audit trail (github leaves out you as "Committer:") +- remember to credit the reporter and the helpers! + +## Who are maintainers? + +The [list of maintainers](https://github.com/orgs/curl/people). Be aware that +the level of presence and activity in the project vary greatly between +different individuals and over time. + +### Become a maintainer? + +If you think you can help making the project better by shouldering some +maintaining responsibilities, then please get in touch. + +You will be expected to be familiar with the curl project and its ways of +working. You need to have gotten a few quality patches merged as a proof of +this. + +### Stop being a maintainer + +If you (appear to) not be active in the project anymore, you may be removed as +a maintainer. Thank you for your service! diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HELP-US.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HELP-US.md new file mode 100644 index 00000000..54744346 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HELP-US.md @@ -0,0 +1,87 @@ +# How to get started helping out in the curl project + +We are always in need of more help. If you are new to the project and are +looking for ways to contribute and help out, this document aims to give a few +good starting points. + +A good idea is to start by subscribing to the [curl-library mailing +list](https://cool.haxx.se/mailman/listinfo/curl-library) to keep track of the +current discussion topics. + +## Scratch your own itch + +One of the best ways is to start working on any problems or issues you have +found yourself or perhaps got annoyed at in the past. It can be a spelling +error in an error text or a weirdly phrased section in a man page. Hunt it +down and report the bug. Or make your first pull request with a fix for that. + +## Smaller tasks + +Some projects mark small issues as "beginner friendly", "bite-sized" or +similar. We don't do that in curl since such issues never linger around long +enough. Simple issues get handled very fast. + +If you're looking for a smaller or simpler task in the project to help out +with as an entry-point into the project, perhaps because you are a newcomer or +even maybe not a terribly experienced developer, here's our advice: + + - Read through this document to get a grasp on a general approach to use + - Consider adding a test case for something not currentled tested (correctly) + - Consider updating or adding documentation + - One way to get your feet wet gently in the project, is to participate in an + existing issue/PR and help out by reproducing the issue, review the code in + the PR etc. + +## Help wanted + +In the issue tracker we occasionally mark bugs with [help +wanted](https://github.com/curl/curl/labels/help%20wanted), as a sign that the +bug is acknowledged to exist and that there's nobody known to work on this +issue for the moment. Those are bugs that are fine to "grab" and provide a +pull request for. The complexity level of these will of course vary, so pick +one that piques your interest. + +## Work on known bugs + +Some bugs are known and haven't yet received attention and work enough to get +fixed. We collect such known existing flaws in the +[KNOWN_BUGS](https://curl.haxx.se/docs/knownbugs.html) page. Many of them link +to the original bug report with some additional details, but some may also +have aged a bit and may require some verification that the bug still exists in +the same way and that what was said about it in the past is still valid. + +## Fix autobuild problems + +On the [autobuilds page](https://curl.haxx.se/dev/builds.html) we show a +collection of test results from the automatic curl build and tests that are +performed by volunteers. Fixing compiler warnings and errors shown there is +something we value greatly. Also, if you own or run systems or architectures +that aren't already tested in the autobuilds, we also appreciate more +volunteers running builds automatically to help us keep curl portable. + +## TODO items + +Ideas for features and functions that we have considered worthwhile to +implement and provide are kept in the +[TODO](https://curl.haxx.se/docs/todo.html) file. Some of the ideas are +rough. Some are well thought out. Some probably aren't really suitable +anymore. + +Before you invest a lot of time on a TODO item, do bring it up for discussion +on the mailing list. For discussion on applicability but also for ideas and +brainstorming on specific ways to do the implementation etc. + +## You decide + +You can also come up with a completely new thing you think we should do. Or +not do. Or fix. Or add to the project. You then either bring it to the mailing +list first to see if people will shoot down the idea at once, or you bring a +first draft of the idea as a pull request and take the discussion there around +the specific implementation. Either way is fine. + +## CONTRIBUTE + +We offer [guidelines](https://curl.haxx.se/dev/contribute.html) that are +suitable to be familiar with before you decide to contribute to curl. If +you're used to open source development, you'll probably not find many +surprises in there. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HISTORY.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HISTORY.md new file mode 100644 index 00000000..c5ed1384 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HISTORY.md @@ -0,0 +1,384 @@ +How curl Became Like This +========================= + +Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot +for an Amiga related channel on EFnet. He then came up with the idea to make +currency-exchange calculations available to Internet Relay Chat (IRC) +users. All the necessary data were published on the Web; he just needed to +automate their retrieval. + +1996 +---- + +Daniel adopted an existing command-line open-source tool, httpget, that +Brazilian Rafael Sagula had written and recently released version 0.1 +of. After a few minor adjustments, it did just what he needed. + +1997 +---- + +HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support. + +We soon found and fixed support for getting currencies over GOPHER. Once FTP +download support was added, the name of the project was changed and urlget 2.0 +was released in August 1997. The http-only days were already passed. + +1998 +---- + +The project slowly grew bigger. When upload capabilities were added and the +name once again was misleading, a second name change was made and on March 20, +1998 curl 4 was released. (The version numbering from the previous names was +kept.) + +(Unrelated to this project a company called Curl Corporation registered a US +trademark on the name "CURL" on May 18 1998. That company had then already +registered the curl.com domain back in November of the previous year. All this +was revealed to us much later.) + +SSL support was added, powered by the SSLeay library. + +August: first announcement of curl on freshmeat.net. + +October: with the curl 4.9 release and the introduction of cookie support, +curl was no longer released under the GPL license. Now we're at 4000 lines of +code, we switched over to the MPL license to restrict the effects of +"copyleft". + +November: configure script and reported successful compiles on several +major operating systems. The never-quite-understood -F option was added and +curl could now simulate quite a lot of a browser. TELNET support was added. + +Curl 5 was released in December 1998 and introduced the first ever curl man +page. People started making Linux RPM packages out of it. + +1999 +---- + +January: DICT support added. + +OpenSSL took over and SSLeay was abandoned. + +May: first Debian package. + +August: LDAP:// and FILE:// support added. The curl website gets 1300 visits +weekly. Moved site to curl.haxx.nu. + +September: Released curl 6.0. 15000 lines of code. + +December 28: added the project on Sourceforge and started using its services +for managing the project. + +2000 +---- + +Spring: major internal overhaul to provide a suitable library interface. +The first non-beta release was named 7.1 and arrived in August. This offered +the easy interface and turned out to be the beginning of actually getting +other software and programs to be based on and powered by libcurl. Almost +20000 lines of code. + +June: the curl site moves to "curl.haxx.se" + +August, the curl website gets 4000 visits weekly. + +The PHP guys adopted libcurl already the same month, when the first ever third +party libcurl binding showed up. CURL has been a supported module in PHP since +the release of PHP 4.0.2. This would soon get followers. More than 16 +different bindings exist at the time of this writing. + +September: kerberos4 support was added. + +November: started the work on a test suite for curl. It was later re-written +from scratch again. The libcurl major SONAME number was set to 1. + +2001 +---- + +January: Daniel released curl 7.5.2 under a new license again: MIT (or +MPL). The MIT license is extremely liberal and can be combined with GPL +in other projects. This would finally put an end to the "complaints" from +people involved in GPLed projects that previously were prohibited from using +libcurl while it was released under MPL only. (Due to the fact that MPL is +deemed "GPL incompatible".) + +March 22: curl supports HTTP 1.1 starting with the release of 7.7. This +also introduced libcurl's ability to do persistent connections. 24000 lines of +code. The libcurl major SONAME number was bumped to 2 due to this overhaul. +The first experimental ftps:// support was added. + +August: curl is bundled in Mac OS X, 10.1. It was already becoming more and +more of a standard utility of Linux distributions and a regular in the BSD +ports collections. The curl website gets 8000 visits weekly. Curl Corporation +contacted Daniel to discuss "the name issue". After Daniel's reply, they have +never since got back in touch again. + +September: libcurl 7.9 introduces cookie jar and curl_formadd(). During the +forthcoming 7.9.x releases, we introduced the multi interface slowly and +without many whistles. + +2002 +---- + +June: the curl website gets 13000 visits weekly. curl and libcurl is +35000 lines of code. Reported successful compiles on more than 40 combinations +of CPUs and operating systems. + +To estimate number of users of the curl tool or libcurl library is next to +impossible. Around 5000 downloaded packages each week from the main site gives +a hint, but the packages are mirrored extensively, bundled with numerous OS +distributions and otherwise retrieved as part of other software. + +October 1: with the release of curl 7.10 it is released under the MIT license +only. + +Starting with 7.10, curl verifies SSL server certificates by default. + +2003 +---- + +January: Started working on the distributed curl tests. The autobuilds. + +February: the curl site averages at 20000 visits weekly. At any given moment, +there's an average of 3 people browsing the curl.haxx.se site. + +Multiple new authentication schemes are supported: Digest (May), NTLM (June) +and Negotiate (June). + +November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors +to the curl.haxx.se site. Five official web mirrors. + +December: full-fledged SSL for FTP is supported. + +2004 +---- + +January: curl 7.11.0 introduced large file support. + +June: curl 7.12.0 introduced IDN support. 10 official web mirrors. + +This release bumped the major SONAME to 3 due to the removal of the +curl_formparse() function + +August: Curl and libcurl 7.12.1 + + Public curl release number: 82 + Releases counted from the very beginning: 109 + Available command line options: 96 + Available curl_easy_setopt() options: 120 + Number of public functions in libcurl: 36 + Amount of public website mirrors: 12 + Number of known libcurl bindings: 26 + +2005 +---- + +April: GnuTLS can now optionally be used for the secure layer when curl is +built. + +April: Added the multi_socket() API + +September: TFTP support was added. + +More than 100,000 unique visitors of the curl website. 25 mirrors. + +December: security vulnerability: libcurl URL Buffer Overflow + +2006 +---- + +January: We dropped support for Gopher. We found bugs in the implementation +that turned out to have been introduced years ago, so with the conclusion that +nobody had found out in all this time we removed it instead of fixing it. + +March: security vulnerability: libcurl TFTP Packet Buffer Overflow + +September: The major SONAME number for libcurl was bumped to 4 due to the +removal of ftp third party transfer support. + +November: Added SCP and SFTP support + +2007 +---- + +February: Added support for the Mozilla NSS library to do the SSL/TLS stuff + +July: security vulnerability: libcurl GnuTLS insufficient cert verification + +2008 +---- + +November: + + Command line options: 128 + curl_easy_setopt() options: 158 + Public functions in libcurl: 58 + Known libcurl bindings: 37 + Contributors: 683 + + 145,000 unique visitors. >100 GB downloaded. + +2009 +---- + +March: security vulnerability: libcurl Arbitrary File Access + +April: added CMake support + +August: security vulnerability: libcurl embedded zero in cert name + +December: Added support for IMAP, POP3 and SMTP + +2010 +---- + +January: Added support for RTSP + +February: security vulnerability: libcurl data callback excessive length + +March: The project switched over to use git (hosted by github) instead of CVS +for source code control + +May: Added support for RTMP + +Added support for PolarSSL to do the SSL/TLS stuff + +August: + + Public curl releases: 117 + Command line options: 138 + curl_easy_setopt() options: 180 + Public functions in libcurl: 58 + Known libcurl bindings: 39 + Contributors: 808 + + Gopher support added (re-added actually, see January 2006) + +2011 +---- + +February: added support for the axTLS backend + +April: added the cyassl backend (later renamed to WolfSSL) + +2012 +---- + + July: Added support for Schannel (native Windows TLS backend) and Darwin SSL + (Native Mac OS X and iOS TLS backend). + + Supports metalink + + October: SSH-agent support. + +2013 +---- + + February: Cleaned up internals to always uses the "multi" non-blocking + approach internally and only expose the blocking API with a wrapper. + + September: First small steps on supporting HTTP/2 with nghttp2. + + October: Removed krb4 support. + + December: Happy eyeballs. + +2014 +---- + + March: first real release supporting HTTP/2 + + September: Website had 245,000 unique visitors and served 236GB data + + SMB and SMBS support + +2015 +---- + + June: support for multiplexing with HTTP/2 + + August: support for HTTP/2 server push + + December: Public Suffix List + +2016 +---- + + January: the curl tool defaults to HTTP/2 for HTTPS URLs + + December: curl 7.52.0 introduced support for HTTPS-proxy! + + First TLS 1.3 support + +2017 +---- + + July: OSS-Fuzz started fuzzing libcurl + + September: Added Multi-SSL support + + The website serves 3100 GB/month + + Public curl releases: 169 + Command line options: 211 + curl_easy_setopt() options: 249 + Public functions in libcurl: 74 + Contributors: 1609 + + October: SSLKEYLOGFILE support, new MIME API + + October: Daniel received the Polhem Prize for his work on curl + + November: brotli + +2018 +---- + + January: new SSH backend powered by libssh + + March: starting with the 1803 release of Windows 10, curl is shipped bundled + with Microsoft's operating system. + + July: curl shows headers using bold type face + + October: added DNS-over-HTTPS (DoH) and the URL API + + MesaLink is a new supported TLS backend + + libcurl now does HTTP/2 (and multiplexing) by default on HTTPS URLs + + curl and libcurl are installed in an estimated 5 *billion* instances + world-wide. + + October 31: Curl and libcurl 7.62.0 + + Public curl releases: 177 + Command line options: 219 + curl_easy_setopt() options: 261 + Public functions in libcurl: 80 + Contributors: 1808 + + December: removed axTLS support + +2019 +---- + + March: added experimental alt-svc support + + August: the first HTTP/3 requests with curl. + + September: 7.66.0 is released and the tool offers parallel downloads + +2020 +---- + + curl and libcurl are installed in an estimated 10 *billion* instances + world-wide. + + January: added BearSSL support + + March: removed support for PolarSSL, added wolfSSH support + + April: experimental MQTT support + + August: zstd support diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP-COOKIES.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP-COOKIES.md new file mode 100644 index 00000000..de9d1de6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP-COOKIES.md @@ -0,0 +1,134 @@ +# HTTP Cookies + +## Cookie overview + + Cookies are `name=contents` pairs that a HTTP server tells the client to + hold and then the client sends back those to the server on subsequent + requests to the same domains and paths for which the cookies were set. + + Cookies are either "session cookies" which typically are forgotten when the + session is over which is often translated to equal when browser quits, or + the cookies aren't session cookies they have expiration dates after which + the client will throw them away. + + Cookies are set to the client with the Set-Cookie: header and are sent to + servers with the Cookie: header. + + For a very long time, the only spec explaining how to use cookies was the + original [Netscape spec from 1994](https://curl.haxx.se/rfc/cookie_spec.html). + + In 2011, [RFC6265](https://www.ietf.org/rfc/rfc6265.txt) was finally + published and details how cookies work within HTTP. In 2016, an update which + added support for prefixes was + [proposed](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00), + and in 2017, another update was + [drafted](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01) + to deprecate modification of 'secure' cookies from non-secure origins. Both + of these drafts have been incorporated into a proposal to + [replace](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02) + RFC6265. Cookie prefixes and secure cookie modification protection has been + implemented by curl. + +## Cookies saved to disk + + Netscape once created a file format for storing cookies on disk so that they + would survive browser restarts. curl adopted that file format to allow + sharing the cookies with browsers, only to see browsers move away from that + format. Modern browsers no longer use it, while curl still does. + + The netscape cookie file format stores one cookie per physical line in the + file with a bunch of associated meta data, each field separated with + TAB. That file is called the cookiejar in curl terminology. + + When libcurl saves a cookiejar, it creates a file header of its own in which + there is a URL mention that will link to the web version of this document. + +## Cookie file format + + The cookie file format is text based and stores one cookie per line. Lines + that start with `#` are treated as comments. + + Each line that each specifies a single cookie consists of seven text fields + separated with TAB characters. A valid line must end with a newline + character. + +### Fields in the file + + Field number, what type and example data and the meaning of it: + + 0. string `example.com` - the domain name + 1. boolean `FALSE` - include subdomains + 2. string `/foobar/` - path + 3. boolean `TRUE` - send/receive over HTTPS only + 4. number `1462299217` - expires at - seconds since Jan 1st 1970, or 0 + 5. string `person` - name of the cookie + 6. string `daniel` - value of the cookie + +## Cookies with curl the command line tool + + curl has a full cookie "engine" built in. If you just activate it, you can + have curl receive and send cookies exactly as mandated in the specs. + + Command line options: + + `-b, --cookie` + + tell curl a file to read cookies from and start the cookie engine, or if it + isn't a file it will pass on the given string. -b name=var works and so does + -b cookiefile. + + `-j, --junk-session-cookies` + + when used in combination with -b, it will skip all "session cookies" on load + so as to appear to start a new cookie session. + + `-c, --cookie-jar` + + tell curl to start the cookie engine and write cookies to the given file + after the request(s) + +## Cookies with libcurl + + libcurl offers several ways to enable and interface the cookie engine. These + options are the ones provided by the native API. libcurl bindings may offer + access to them using other means. + + `CURLOPT_COOKIE` + + Is used when you want to specify the exact contents of a cookie header to + send to the server. + + `CURLOPT_COOKIEFILE` + + Tell libcurl to activate the cookie engine, and to read the initial set of + cookies from the given file. Read-only. + + `CURLOPT_COOKIEJAR` + + Tell libcurl to activate the cookie engine, and when the easy handle is + closed save all known cookies to the given cookiejar file. Write-only. + + `CURLOPT_COOKIELIST` + + Provide detailed information about a single cookie to add to the internal + storage of cookies. Pass in the cookie as a HTTP header with all the details + set, or pass in a line from a netscape cookie file. This option can also be + used to flush the cookies etc. + + `CURLINFO_COOKIELIST` + + Extract cookie information from the internal cookie storage as a linked + list. + +## Cookies with javascript + + These days a lot of the web is built up by javascript. The webbrowser loads + complete programs that render the page you see. These javascript programs + can also set and access cookies. + + Since curl and libcurl are plain HTTP clients without any knowledge of or + capability to handle javascript, such cookies will not be detected or used. + + Often, if you want to mimic what a browser does on such websites, you can + record web browser HTTP traffic when using such a site and then repeat the + cookie operations using curl or libcurl. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP2.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP2.md new file mode 100644 index 00000000..4c72a29b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP2.md @@ -0,0 +1,127 @@ +HTTP/2 with curl +================ + +[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt) +[http2 explained](https://daniel.haxx.se/http2/) + +Build prerequisites +------------------- + - nghttp2 + - OpenSSL, libressl, BoringSSL, NSS, GnutTLS, mbedTLS, wolfSSL or Schannel + with a new enough version. + +[nghttp2](https://nghttp2.org/) +------------------------------- + +libcurl uses this 3rd party library for the low level protocol handling +parts. The reason for this is that HTTP/2 is much more complex at that layer +than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already +existing and well functional library. + +We require at least version 1.12.0. + +Over an http:// URL +------------------- + +If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will +include an upgrade header in the initial request to the host to allow +upgrading to HTTP/2. + +Possibly we can later introduce an option that will cause libcurl to fail if +not possible to upgrade. Possibly we introduce an option that makes libcurl +use HTTP/2 at once over http:// + +Over an https:// URL +-------------------- + +If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use +ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce +an option that will cause libcurl to fail if not possible to use HTTP/2. + +`CURL_HTTP_VERSION_2TLS` was added in 7.47.0 as a way to ask libcurl to prefer +HTTP/2 for HTTPS but stick to 1.1 by default for plain old HTTP connections. + +ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is +for a similar purpose, was made prior to ALPN and is used for SPDY so early +HTTP/2 servers are implemented using NPN before ALPN support is widespread. + +`CURLOPT_SSL_ENABLE_ALPN` and `CURLOPT_SSL_ENABLE_NPN` are offered to allow +applications to explicitly disable ALPN or NPN. + +SSL libs +-------- + +The challenge is the ALPN and NPN support and all our different SSL +backends. You may need a fairly updated SSL library version for it to provide +the necessary TLS features. Right now we support: + + - OpenSSL: ALPN and NPN + - libressl: ALPN and NPN + - BoringSSL: ALPN and NPN + - NSS: ALPN and NPN + - GnuTLS: ALPN + - mbedTLS: ALPN + - Schannel: ALPN + - wolfSSL: ALPN + - Secure Transport: ALPN + +Multiplexing +------------ + +Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the +term for doing multiple independent transfers over the same physical TCP +connection. + +To take advantage of multiplexing, you need to use the multi interface and set +`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will +attempt to re-use existing HTTP/2 connections and just add a new stream over +that when doing subsequent parallel requests. + +While libcurl sets up a connection to a HTTP server there is a period during +which it doesn't know if it can pipeline or do multiplexing and if you add new +transfers in that period, libcurl will default to start new connections for +those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you +can ask that a transfer should rather wait and see in case there's a +connection for the same host in progress that might end up being possible to +multiplex on. It favours keeping the number of connections low to the cost of +slightly longer time to first byte transferred. + +Applications +------------ + +We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers +in HTTP 1.1 style. This allows applications to work unmodified. + +curl tool +--------- + +curl offers the `--http2` command line option to enable use of HTTP/2. + +curl offers the `--http2-prior-knowledge` command line option to enable use of +HTTP/2 without HTTP/1.1 Upgrade. + +Since 7.47.0, the curl tool enables HTTP/2 by default for HTTPS connections. + +curl tool limitations +--------------------- + +The command line tool won't do any HTTP/2 multiplexing even though libcurl +supports it, simply because the curl tool is not written to take advantage of +the libcurl API that's necessary for this (the multi interface). We have an +outstanding TODO item for this and **you** can help us make it happen. + +The command line tool also doesn't support HTTP/2 server push for the same +reason it doesn't do multiplexing: it needs to use the multi interface for +that so that multiplexing is supported. + +HTTP Alternative Services +------------------------- + +Alt-Svc is an extension with a corresponding frame (ALTSVC) in HTTP/2 that +tells the client about an alternative "route" to the same content for the same +origin server that you get the response from. A browser or long-living client +can use that hint to create a new connection asynchronously. For libcurl, we +may introduce a way to bring such clues to the application and/or let a +subsequent request use the alternate route automatically. + +[Detailed in RFC 7838](https://tools.ietf.org/html/rfc7838) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP3.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP3.md new file mode 100644 index 00000000..fa9d2443 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/HTTP3.md @@ -0,0 +1,142 @@ +# HTTP3 (and QUIC) + +## Resources + +[HTTP/3 Explained](https://daniel.haxx.se/http3-explained/) - the online free +book describing the protocols involved. + +[QUIC implementation](https://github.com/curl/curl/wiki/QUIC-implementation) - +the wiki page describing the plan for how to support QUIC and HTTP/3 in curl +and libcurl. + +[quicwg.org](https://quicwg.org/) - home of the official protocol drafts + +## QUIC libraries + +QUIC libraries we're experimenting with: + +[ngtcp2](https://github.com/ngtcp2/ngtcp2) + +[quiche](https://github.com/cloudflare/quiche) + +## Experimental! + +HTTP/3 and QUIC support in curl is considered **EXPERIMENTAL** until further +notice. It needs to be enabled at build-time. + +Further development and tweaking of the HTTP/3 support in curl will happen in +in the master branch using pull-requests, just like ordinary changes. + +# ngtcp2 version + +## Build with OpenSSL + +Build (patched) OpenSSL + + % git clone --depth 1 -b OpenSSL_1_1_1g-quic-draft-29 https://github.com/tatsuhiro-t/openssl + % cd openssl + % ./config enable-tls1_3 --prefix= + % make + % make install_sw + +Build nghttp3 + + % cd .. + % git clone https://github.com/ngtcp2/nghttp3 + % cd nghttp3 + % autoreconf -i + % ./configure --prefix= --enable-lib-only + % make + % make install + +Build ngtcp2 + + % cd .. + % git clone https://github.com/ngtcp2/ngtcp2 + % cd ngtcp2 + % autoreconf -i + % ./configure PKG_CONFIG_PATH=/lib/pkgconfig:/lib/pkgconfig LDFLAGS="-Wl,-rpath,/lib" --prefix= + % make + % make install + +Build curl + + % cd .. + % git clone https://github.com/curl/curl + % cd curl + % ./buildconf + % LDFLAGS="-Wl,-rpath,/lib" ./configure --with-ssl= --with-nghttp3= --with-ngtcp2= --enable-alt-svc + % make + +## Build with GnuTLS + +Build (patched) GnuTLS + + % git clone --depth 1 -b tmp-quic https://gitlab.com/gnutls/gnutls.git + % cd gnutls + % ./bootstrap + % ./configure --disable-doc --prefix= + % make + % make install + +Build nghttp3 + + % cd .. + % git clone https://github.com/ngtcp2/nghttp3 + % cd nghttp3 + % autoreconf -i + % ./configure --prefix= --enable-lib-only + % make + % make install + +Build ngtcp2 + + % cd .. + % git clone https://github.com/ngtcp2/ngtcp2 + % cd ngtcp2 + % autoreconf -i + % ./configure PKG_CONFIG_PATH=/lib/pkgconfig:/lib/pkgconfig LDFLAGS="-Wl,-rpath,/lib" --prefix= + % make + % make install + +Build curl + + % cd .. + % git clone https://github.com/curl/curl + % cd curl + % ./buildconf + % ./configure --without-ssl --with-gnutls= --with-nghttp3= --with-ngtcp2= --enable-alt-svc + % make + +# quiche version + +## build + +Build quiche and BoringSSL: + + % git clone --recursive https://github.com/cloudflare/quiche + % cd quiche + % cargo build --release --features pkg-config-meta,qlog + % mkdir deps/boringssl/src/lib + % ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) deps/boringssl/src/lib/ + +Build curl: + + % cd .. + % git clone https://github.com/curl/curl + % cd curl + % ./buildconf + % ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-ssl=$PWD/../quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release --enable-alt-svc + % make + +## Run + +Use HTTP/3 directly: + + curl --http3 https://nghttp2.org:8443/ + +Upgrade via Alt-Svc: + + curl --alt-svc altsvc.cache https://quic.aiortc.org/ + +See this [list of public HTTP/3 servers](https://bagder.github.io/HTTP3-test/) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL new file mode 100644 index 00000000..ff260b1b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL @@ -0,0 +1,9 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + How To Compile + +see INSTALL.md diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.cmake b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.cmake new file mode 100644 index 00000000..828d9b9c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.cmake @@ -0,0 +1,89 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + How To Compile with CMake + +Building with CMake +========================== + This document describes how to compile, build and install curl and libcurl + from source code using the CMake build tool. To build with CMake, you will + of course have to first install CMake. The minimum required version of + CMake is specified in the file CMakeLists.txt found in the top of the curl + source tree. Once the correct version of CMake is installed you can follow + the instructions below for the platform you are building on. + + CMake builds can be configured either from the command line, or from one + of CMake's GUI's. + +Current flaws in the curl CMake build +===================================== + + Missing features in the cmake build: + + - Builds libcurl without large file support + - Does not support all SSL libraries (only OpenSSL, Schannel, + Secure Transport, and mbed TLS, NSS, WolfSSL) + - Doesn't allow different resolver backends (no c-ares build support) + - No RTMP support built + - Doesn't allow build curl and libcurl debug enabled + - Doesn't allow a custom CA bundle path + - Doesn't allow you to disable specific protocols from the build + - Doesn't find or use krb4 or GSS + - Rebuilds test files too eagerly, but still can't run the tests + - Doesn't detect the correct strerror_r flavor when cross-compiling (issue #1123) + + +Command Line CMake +================== + A CMake build of curl is similar to the autotools build of curl. It + consists of the following steps after you have unpacked the source. + + 1. Create an out of source build tree parallel to the curl source + tree and change into that directory + + $ mkdir curl-build + $ cd curl-build + + 2. Run CMake from the build tree, giving it the path to the top of + the curl source tree. CMake will pick a compiler for you. If you + want to specify the compile, you can set the CC environment + variable prior to running CMake. + + $ cmake ../curl + $ make + + 3. Install to default location: + + $ make install + + (The test suite does not work with the cmake build) + +ccmake +========= + CMake comes with a curses based interface called ccmake. To run ccmake on + a curl use the instructions for the command line cmake, but substitute + ccmake ../curl for cmake ../curl. This will bring up a curses interface + with instructions on the bottom of the screen. You can press the "c" key + to configure the project, and the "g" key to generate the project. After + the project is generated, you can run make. + +cmake-gui +========= + CMake also comes with a Qt based GUI called cmake-gui. To configure with + cmake-gui, you run cmake-gui and follow these steps: + 1. Fill in the "Where is the source code" combo box with the path to + the curl source tree. + 2. Fill in the "Where to build the binaries" combo box with the path + to the directory for your build tree, ideally this should not be the + same as the source tree, but a parallel directory called curl-build or + something similar. + 3. Once the source and binary directories are specified, press the + "Configure" button. + 4. Select the native build tool that you want to use. + 5. At this point you can change any of the options presented in the + GUI. Once you have selected all the options you want, click the + "Generate" button. + 6. Run the native build tool that you used CMake to generate. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.md new file mode 100644 index 00000000..33b439ec --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INSTALL.md @@ -0,0 +1,509 @@ +# how to install curl and libcurl + +## Installing Binary Packages + +Lots of people download binary distributions of curl and libcurl. This +document does not describe how to install curl or libcurl using such a binary +package. This document describes how to compile, build and install curl and +libcurl from source code. + +## Building using vcpkg + +You can download and install curl and libcurl using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + vcpkg install curl[tool] + +The curl port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +## Building from git + +If you get your code off a git repository instead of a release tarball, see +the `GIT-INFO` file in the root directory for specific instructions on how to +proceed. + +# Unix + +A normal Unix installation is made in three or four steps (after you've +unpacked the source archive): + + ./configure + make + make test (optional) + make install + +You probably need to be root when doing the last command. + +Get a full listing of all available configure options by invoking it like: + + ./configure --help + +If you want to install curl in a different file hierarchy than `/usr/local`, +specify that when running configure: + + ./configure --prefix=/path/to/curl/tree + +If you have write permission in that directory, you can do 'make install' +without being root. An example of this would be to make a local install in +your own home directory: + + ./configure --prefix=$HOME + make + make install + +The configure script always tries to find a working SSL library unless +explicitly told not to. If you have OpenSSL installed in the default search +path for your compiler/linker, you don't need to do anything special. If you +have OpenSSL installed in `/usr/local/ssl`, you can run configure like: + + ./configure --with-ssl + +If you have OpenSSL installed somewhere else (for example, `/opt/OpenSSL`) and +you have pkg-config installed, set the pkg-config path first, like this: + + env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl + +Without pkg-config installed, use this: + + ./configure --with-ssl=/opt/OpenSSL + +If you insist on forcing a build without SSL support, even though you may +have OpenSSL installed in your system, you can run configure like this: + + ./configure --without-ssl + +If you have OpenSSL installed, but with the libraries in one place and the +header files somewhere else, you have to set the `LDFLAGS` and `CPPFLAGS` +environment variables prior to running configure. Something like this should +work: + + CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" ./configure + +If you have shared SSL libs installed in a directory where your run-time +linker doesn't find them (which usually causes configure failures), you can +provide this option to gcc to set a hard-coded path to the run-time linker: + + LDFLAGS=-Wl,-R/usr/local/ssl/lib ./configure --with-ssl + +## More Options + +To force a static library compile, disable the shared library creation by +running configure like: + + ./configure --disable-shared + +To tell the configure script to skip searching for thread-safe functions, add +an option like: + + ./configure --disable-thread + +If you're a curl developer and use gcc, you might want to enable more debug +options with the `--enable-debug` option. + +curl can be built to use a whole range of libraries to provide various useful +services, and configure will try to auto-detect a decent default. But if you +want to alter it, you can select how to deal with each individual library. + +## Select TLS backend + +The default OpenSSL configure check will also detect and use BoringSSL or +libressl. + + - GnuTLS: `--without-ssl --with-gnutls`. + - wolfSSL: `--without-ssl --with-wolfssl` + - NSS: `--without-ssl --with-nss` + - mbedTLS: `--without-ssl --with-mbedtls` + - schannel: `--without-ssl --with-schannel` + - secure transport: `--without-ssl --with-secure-transport` + - MesaLink: `--without-ssl --with-mesalink` + - BearSSL: `--without-ssl --with-bearssl` + +# Windows + +## Building Windows DLLs and C run-time (CRT) linkage issues + + As a general rule, building a DLL with static CRT linkage is highly + discouraged, and intermixing CRTs in the same app is something to avoid at + any cost. + + Reading and comprehending Microsoft Knowledge Base articles KB94248 and + KB140584 is a must for any Windows developer. Especially important is full + understanding if you are not going to follow the advice given above. + + - [How To Use the C Run-Time](https://support.microsoft.com/help/94248/how-to-use-the-c-run-time) + - [Run-Time Library Compiler Options](https://docs.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library) + - [Potential Errors Passing CRT Objects Across DLL Boundaries](https://docs.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries) + +If your app is misbehaving in some strange way, or it is suffering from +memory corruption, before asking for further help, please try first to +rebuild every single library your app uses as well as your app using the +debug multithreaded dynamic C runtime. + + If you get linkage errors read section 5.7 of the FAQ document. + +## MingW32 + +Make sure that MinGW32's bin dir is in the search path, for example: + + set PATH=c:\mingw32\bin;%PATH% + +then run `mingw32-make mingw32` in the root dir. There are other +make targets available to build libcurl with more features, use: + + - `mingw32-make mingw32-zlib` to build with Zlib support; + - `mingw32-make mingw32-ssl-zlib` to build with SSL and Zlib enabled; + - `mingw32-make mingw32-ssh2-ssl-zlib` to build with SSH2, SSL, Zlib; + - `mingw32-make mingw32-ssh2-ssl-sspi-zlib` to build with SSH2, SSL, Zlib + and SSPI support. + +If you have any problems linking libraries or finding header files, be sure +to verify that the provided `Makefile.m32` files use the proper paths, and +adjust as necessary. It is also possible to override these paths with +environment variables, for example: + + set ZLIB_PATH=c:\zlib-1.2.8 + set OPENSSL_PATH=c:\openssl-1.0.2c + set LIBSSH2_PATH=c:\libssh2-1.6.0 + +It is also possible to build with other LDAP SDKs than MS LDAP; currently +it is possible to build with native Win32 OpenLDAP, or with the Novell CLDAP +SDK. If you want to use these you need to set these vars: + + set LDAP_SDK=c:\openldap + set USE_LDAP_OPENLDAP=1 + +or for using the Novell SDK: + + set USE_LDAP_NOVELL=1 + +If you want to enable LDAPS support then set LDAPS=1. + +## Cygwin + +Almost identical to the unix installation. Run the configure script in the +curl source tree root with `sh configure`. Make sure you have the `sh` +executable in `/bin/` or you'll see the configure fail toward the end. + +Run `make` + +## Disabling Specific Protocols in Windows builds + +The configure utility, unfortunately, is not available for the Windows +environment, therefore, you cannot use the various disable-protocol options of +the configure utility on this platform. + +You can use specific defines to disable specific protocols and features. See +[CURL-DISABLE.md](CURL-DISABLE-md) for the full list. + +If you want to set any of these defines you have the following options: + + - Modify `lib/config-win32.h` + - Modify `lib/curl_setup.h` + - Modify `winbuild/Makefile.vc` + - Modify the "Preprocessor Definitions" in the libcurl project + +Note: The pre-processor settings can be found using the Visual Studio IDE +under "Project -> Settings -> C/C++ -> General" in VC6 and "Project -> +Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later +versions. + +## Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds + +In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack it is +necessary to make definition of preprocessor symbol `USE_LWIPSOCK` visible to +libcurl and curl compilation processes. To set this definition you have the +following alternatives: + + - Modify `lib/config-win32.h` and `src/config-win32.h` + - Modify `winbuild/Makefile.vc` + - Modify the "Preprocessor Definitions" in the libcurl project + +Note: The pre-processor settings can be found using the Visual Studio IDE +under "Project -> Settings -> C/C++ -> General" in VC6 and "Project -> +Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later +versions. + +Once that libcurl has been built with BSD-style lwIP TCP/IP stack support, in +order to use it with your program it is mandatory that your program includes +lwIP header file `` (or another lwIP header that includes this) +before including any libcurl header. Your program does not need the +`USE_LWIPSOCK` preprocessor definition which is for libcurl internals only. + +Compilation has been verified with [lwIP +1.4.0](https://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip) and +[contrib-1.4.0](https://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip). + +This BSD-style lwIP TCP/IP stack support must be considered experimental given +that it has been verified that lwIP 1.4.0 still needs some polish, and libcurl +might yet need some additional adjustment, caveat emptor. + +## Important static libcurl usage note + +When building an application that uses the static libcurl library on Windows, +you must add `-DCURL_STATICLIB` to your `CFLAGS`. Otherwise the linker will +look for dynamic import symbols. + +## Legacy Windows and SSL + +Schannel (from Windows SSPI), is the native SSL library in Windows. However, +Schannel in Windows <= XP is unable to connect to servers that +no longer support the legacy handshakes and algorithms used by those +versions. If you will be using curl in one of those earlier versions of +Windows you should choose another SSL backend such as OpenSSL. + +# Apple iOS and macOS + +On modern Apple operating systems, curl can be built to use Apple's SSL/TLS +implementation, Secure Transport, instead of OpenSSL. To build with Secure +Transport for SSL/TLS, use the configure option `--with-secure-transport`. (It +is not necessary to use the option `--without-ssl`.) This feature requires iOS +5.0 or later, or OS X 10.5 ("Leopard") or later. + +When Secure Transport is in use, the curl options `--cacert` and `--capath` +and their libcurl equivalents, will be ignored, because Secure Transport uses +the certificates stored in the Keychain to evaluate whether or not to trust +the server. This, of course, includes the root certificates that ship with the +OS. The `--cert` and `--engine` options, and their libcurl equivalents, are +currently unimplemented in curl with Secure Transport. + +For macOS users: In OS X 10.8 ("Mountain Lion"), Apple made a major overhaul +to the Secure Transport API that, among other things, added support for the +newer TLS 1.1 and 1.2 protocols. To get curl to support TLS 1.1 and 1.2, you +must build curl on Mountain Lion or later, or by using the equivalent SDK. If +you set the `MACOSX_DEPLOYMENT_TARGET` environmental variable to an earlier +version of macOS prior to building curl, then curl will use the new Secure +Transport API on Mountain Lion and later, and fall back on the older API when +the same curl binary is executed on older cats. For example, running these +commands in curl's directory in the shell will build the code such that it +will run on cats as old as OS X 10.6 ("Snow Leopard") (using bash): + + export MACOSX_DEPLOYMENT_TARGET="10.6" + ./configure --with-secure-transport + make + +# Android + +When building curl for Android it's recommended to use a Linux environment +since using curl's `configure` script is the easiest way to build curl +for Android. Before you can build curl for Android, you need to install the +Android NDK first. This can be done using the SDK Manager that is part of +Android Studio. Once you have installed the Android NDK, you need to figure out +where it has been installed and then set up some environment variables before +launching `configure`. On macOS, those variables could look like this to compile +for `aarch64` and API level 29: + + export NDK=~/Library/Android/sdk/ndk/20.1.5948944 + export HOST_TAG=darwin-x86_64 + export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG + export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar + export AS=$TOOLCHAIN/bin/aarch64-linux-android-as + export CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang + export CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++ + export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld + export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib + export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip + +When building on Linux or targeting other API levels or architectures, you need +to adjust those variables accordingly. After that you can build curl like this: + + ./configure --host aarch64-linux-android --with-pic --disable-shared + +Note that this won't give you SSL/TLS support. If you need SSL/TLS, you have +to build curl against a SSL/TLS layer, e.g. OpenSSL, because it's impossible for +curl to access Android's native SSL/TLS layer. To build curl for Android using +OpenSSL, follow the OpenSSL build instructions and then install `libssl.a` and +`libcrypto.a` to `$TOOLCHAIN/sysroot/usr/lib` and copy `include/openssl` to +`$TOOLCHAIN/sysroot/usr/include`. Now you can build curl for Android using +OpenSSL like this: + + ./configure --host aarch64-linux-android --with-pic --disable-shared --with-ssl="$TOOLCHAIN/sysroot/usr" + +Note, however, that you must target at least Android M (API level 23) or `configure` +won't be able to detect OpenSSL since `stderr` (and the like) weren't defined +before Android M. + +# Cross compile + +Download and unpack the curl package. + +`cd` to the new directory. (e.g. `cd curl-7.12.3`) + +Set environment variables to point to the cross-compile toolchain and call +configure with any options you need. Be sure and specify the `--host` and +`--build` parameters at configuration time. The following script is an +example of cross-compiling for the IBM 405GP PowerPC processor using the +toolchain from MonteVista for Hardhat Linux. + + #! /bin/sh + + export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin + export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include" + export AR=ppc_405-ar + export AS=ppc_405-as + export LD=ppc_405-ld + export RANLIB=ppc_405-ranlib + export CC=ppc_405-gcc + export NM=ppc_405-nm + + ./configure --target=powerpc-hardhat-linux + --host=powerpc-hardhat-linux + --build=i586-pc-linux-gnu + --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local + --exec-prefix=/usr/local + +You may also need to provide a parameter like `--with-random=/dev/urandom` to +configure as it cannot detect the presence of a random number generating +device for a target system. The `--prefix` parameter specifies where curl +will be installed. If `configure` completes successfully, do `make` and `make +install` as usual. + +In some cases, you may be able to simplify the above commands to as little as: + + ./configure --host=ARCH-OS + +# REDUCING SIZE + +There are a number of configure options that can be used to reduce the size of +libcurl for embedded applications where binary size is an important factor. +First, be sure to set the `CFLAGS` variable when configuring with any relevant +compiler optimization flags to reduce the size of the binary. For gcc, this +would mean at minimum the -Os option, and potentially the `-march=X`, +`-mdynamic-no-pic` and `-flto` options as well, e.g. + + ./configure CFLAGS='-Os' LDFLAGS='-Wl,-Bsymbolic'... + +Note that newer compilers often produce smaller code than older versions +due to improved optimization. + +Be sure to specify as many `--disable-` and `--without-` flags on the +configure command-line as you can to disable all the libcurl features that you +know your application is not going to need. Besides specifying the +`--disable-PROTOCOL` flags for all the types of URLs your application will not +use, here are some other flags that can reduce the size of the library: + + - `--disable-ares` (disables support for the C-ARES DNS library) + - `--disable-cookies` (disables support for HTTP cookies) + - `--disable-crypto-auth` (disables HTTP cryptographic authentication) + - `--disable-ipv6` (disables support for IPv6) + - `--disable-manual` (disables support for the built-in documentation) + - `--disable-proxy` (disables support for HTTP and SOCKS proxies) + - `--disable-unix-sockets` (disables support for UNIX sockets) + - `--disable-verbose` (eliminates debugging strings and error code strings) + - `--disable-versioned-symbols` (disables support for versioned symbols) + - `--enable-hidden-symbols` (eliminates unneeded symbols in the shared library) + - `--without-libidn` (disables support for the libidn DNS library) + - `--without-librtmp` (disables support for RTMP) + - `--without-ssl` (disables support for SSL/TLS) + - `--without-zlib` (disables support for on-the-fly decompression) + +The GNU compiler and linker have a number of options that can reduce the +size of the libcurl dynamic libraries on some platforms even further. +Specify them by providing appropriate `CFLAGS` and `LDFLAGS` variables on +the configure command-line, e.g. + + CFLAGS="-Os -ffunction-sections -fdata-sections + -fno-unwind-tables -fno-asynchronous-unwind-tables -flto" + LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" + +Be sure also to strip debugging symbols from your binaries after compiling +using 'strip' (or the appropriate variant if cross-compiling). If space is +really tight, you may be able to remove some unneeded sections of the shared +library using the -R option to objcopy (e.g. the .comment section). + +Using these techniques it is possible to create a basic HTTP-only shared +libcurl library for i386 Linux platforms that is only 113 KiB in size, and an +FTP-only library that is 113 KiB in size (as of libcurl version 7.50.3, using +gcc 5.4.0). + +You may find that statically linking libcurl to your application will result +in a lower total size than dynamically linking. + +Note that the curl test harness can detect the use of some, but not all, of +the `--disable` statements suggested above. Use will cause tests relying on +those features to fail. The test harness can be manually forced to skip the +relevant tests by specifying certain key words on the `runtests.pl` command +line. Following is a list of appropriate key words: + + - `--disable-cookies` !cookies + - `--disable-manual` !--manual + - `--disable-proxy` !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5 + +# PORTS + +This is a probably incomplete list of known hardware and operating systems +that curl has been compiled for. If you know a system curl compiles and +runs on, that isn't listed, please let us know! + + - Alpha DEC OSF 4 + - Alpha Digital UNIX v3.2 + - Alpha FreeBSD 4.1, 4.5 + - Alpha Linux 2.2, 2.4 + - Alpha NetBSD 1.5.2 + - Alpha OpenBSD 3.0 + - Alpha OpenVMS V7.1-1H2 + - Alpha Tru64 v5.0 5.1 + - AVR32 Linux + - ARM Android 1.5, 2.1, 2.3, 3.2, 4.x + - ARM INTEGRITY + - ARM iOS + - Cell Linux + - Cell Cell OS + - HP-PA HP-UX 9.X 10.X 11.X + - HP-PA Linux + - HP3000 MPE/iX + - MicroBlaze uClinux + - MIPS IRIX 6.2, 6.5 + - MIPS Linux + - OS/400 + - Pocket PC/Win CE 3.0 + - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 + - PowerPC Darwin 1.0 + - PowerPC INTEGRITY + - PowerPC Linux + - PowerPC Mac OS 9 + - PowerPC Mac OS X + - SH4 Linux 2.6.X + - SH4 OS21 + - SINIX-Z v5 + - Sparc Linux + - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10 + - Sparc SunOS 4.1.X + - StrongARM (and other ARM) RISC OS 3.1, 4.02 + - StrongARM/ARM7/ARM9 Linux 2.4, 2.6 + - StrongARM NetBSD 1.4.1 + - Symbian OS (P.I.P.S.) 9.x + - TPF + - Ultrix 4.3a + - UNICOS 9.0 + - i386 BeOS + - i386 DOS + - i386 eCos 1.3.1 + - i386 Esix 4.1 + - i386 FreeBSD + - i386 HURD + - i386 Haiku OS + - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 + - i386 Mac OS X + - i386 MINIX 3.1 + - i386 NetBSD + - i386 Novell NetWare + - i386 OS/2 + - i386 OpenBSD + - i386 QNX 6 + - i386 SCO unix + - i386 Solaris 2.7 + - i386 Windows 95, 98, ME, NT, 2000, XP, 2003 + - i486 ncr-sysv4.3.03 (NCR MP-RAS) + - ia64 Linux 2.3.99 + - m68k AmigaOS 3 + - m68k Linux + - m68k uClinux + - m68k OpenBSD + - m88k dg-dgux5.4R3.00 + - s390 Linux + - x86_64 Linux + - XScale/PXA250 Linux 2.4 + - Nios II uClinux diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INTERNALS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INTERNALS.md new file mode 100644 index 00000000..e9be0889 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/INTERNALS.md @@ -0,0 +1,1102 @@ +curl internals +============== + + - [Intro](#intro) + - [git](#git) + - [Portability](#Portability) + - [Windows vs Unix](#winvsunix) + - [Library](#Library) + - [`Curl_connect`](#Curl_connect) + - [`multi_do`](#multi_do) + - [`Curl_readwrite`](#Curl_readwrite) + - [`multi_done`](#multi_done) + - [`Curl_disconnect`](#Curl_disconnect) + - [HTTP(S)](#http) + - [FTP](#ftp) + - [Kerberos](#kerberos) + - [TELNET](#telnet) + - [FILE](#file) + - [SMB](#smb) + - [LDAP](#ldap) + - [E-mail](#email) + - [General](#general) + - [Persistent Connections](#persistent) + - [multi interface/non-blocking](#multi) + - [SSL libraries](#ssl) + - [Library Symbols](#symbols) + - [Return Codes and Informationals](#returncodes) + - [AP/ABI](#abi) + - [Client](#client) + - [Memory Debugging](#memorydebug) + - [Test Suite](#test) + - [Asynchronous name resolves](#asyncdns) + - [c-ares](#cares) + - [`curl_off_t`](#curl_off_t) + - [curlx](#curlx) + - [Content Encoding](#contentencoding) + - [`hostip.c` explained](#hostip) + - [Track Down Memory Leaks](#memoryleak) + - [`multi_socket`](#multi_socket) + - [Structs in libcurl](#structs) + - [Curl_easy](#Curl_easy) + - [connectdata](#connectdata) + - [Curl_multi](#Curl_multi) + - [Curl_handler](#Curl_handler) + - [conncache](#conncache) + - [Curl_share](#Curl_share) + - [CookieInfo](#CookieInfo) + + +Intro +===== + + This project is split in two. The library and the client. The client part + uses the library, but the library is designed to allow other applications to + use it. + + The largest amount of code and complexity is in the library part. + + + +git +=== + + All changes to the sources are committed to the git repository as soon as + they're somewhat verified to work. Changes shall be committed as independently + as possible so that individual changes can be easily spotted and tracked + afterwards. + + Tagging shall be used extensively, and by the time we release new archives we + should tag the sources with a name similar to the released version number. + + +Portability +=========== + + We write curl and libcurl to compile with C89 compilers. On 32-bit and up + machines. Most of libcurl assumes more or less POSIX compliance but that's + not a requirement. + + We write libcurl to build and work with lots of third party tools, and we + want it to remain functional and buildable with these and later versions + (older versions may still work but is not what we work hard to maintain): + +Dependencies +------------ + + - OpenSSL 0.9.7 + - GnuTLS 3.1.10 + - zlib 1.1.4 + - libssh2 0.16 + - c-ares 1.6.0 + - libidn2 2.0.0 + - wolfSSL 2.0.0 + - openldap 2.0 + - MIT Kerberos 1.2.4 + - GSKit V5R3M0 + - NSS 3.14.x + - Heimdal ? + - nghttp2 1.12.0 + - WinSock 2.2 (on Windows 95+ and Windows CE .NET 4.1+) + +Operating Systems +----------------- + + On systems where configure runs, we aim at working on them all - if they have + a suitable C compiler. On systems that don't run configure, we strive to keep + curl running correctly on: + + - Windows 98 + - AS/400 V5R3M0 + - Symbian 9.1 + - Windows CE ? + - TPF ? + +Build tools +----------- + + When writing code (mostly for generating stuff included in release tarballs) + we use a few "build tools" and we make sure that we remain functional with + these versions: + + - GNU Libtool 1.4.2 + - GNU Autoconf 2.57 + - GNU Automake 1.7 + - GNU M4 1.4 + - perl 5.004 + - roffit 0.5 + - groff ? (any version that supports `groff -Tps -man [in] [out]`) + - ps2pdf (gs) ? + + +Windows vs Unix +=============== + + There are a few differences in how to program curl the Unix way compared to + the Windows way. Perhaps the four most notable details are: + + 1. Different function names for socket operations. + + In curl, this is solved with defines and macros, so that the source looks + the same in all places except for the header file that defines them. The + macros in use are `sclose()`, `sread()` and `swrite()`. + + 2. Windows requires a couple of init calls for the socket stuff. + + That's taken care of by the `curl_global_init()` call, but if other libs + also do it etc there might be reasons for applications to alter that + behaviour. + + We require WinSock version 2.2 and load this version during global init. + + 3. The file descriptors for network communication and file operations are + not as easily interchangeable as in Unix. + + We avoid this by not trying any funny tricks on file descriptors. + + 4. When writing data to stdout, Windows makes end-of-lines the DOS way, thus + destroying binary data, although you do want that conversion if it is + text coming through... (sigh) + + We set stdout to binary under windows + + Inside the source code, We make an effort to avoid `#ifdef [Your OS]`. All + conditionals that deal with features *should* instead be in the format + `#ifdef HAVE_THAT_WEIRD_FUNCTION`. Since Windows can't run configure scripts, + we maintain a `curl_config-win32.h` file in lib directory that is supposed to + look exactly like a `curl_config.h` file would have looked like on a Windows + machine! + + Generally speaking: always remember that this will be compiled on dozens of + operating systems. Don't walk on the edge! + + +Library +======= + + (See [Structs in libcurl](#structs) for the separate section describing all + major internal structs and their purposes.) + + There are plenty of entry points to the library, namely each publicly defined + function that libcurl offers to applications. All of those functions are + rather small and easy-to-follow. All the ones prefixed with `curl_easy` are + put in the `lib/easy.c` file. + + `curl_global_init()` and `curl_global_cleanup()` should be called by the + application to initialize and clean up global stuff in the library. As of + today, it can handle the global SSL initing if SSL is enabled and it can init + the socket layer on windows machines. libcurl itself has no "global" scope. + + All printf()-style functions use the supplied clones in `lib/mprintf.c`. This + makes sure we stay absolutely platform independent. + + [ `curl_easy_init()`][2] allocates an internal struct and makes some + initializations. The returned handle does not reveal internals. This is the + `Curl_easy` struct which works as an "anchor" struct for all `curl_easy` + functions. All connections performed will get connect-specific data allocated + that should be used for things related to particular connections/requests. + + [`curl_easy_setopt()`][1] takes three arguments, where the option stuff must + be passed in pairs: the parameter-ID and the parameter-value. The list of + options is documented in the man page. This function mainly sets things in + the `Curl_easy` struct. + + `curl_easy_perform()` is just a wrapper function that makes use of the multi + API. It basically calls `curl_multi_init()`, `curl_multi_add_handle()`, + `curl_multi_wait()`, and `curl_multi_perform()` until the transfer is done + and then returns. + + Some of the most important key functions in `url.c` are called from + `multi.c` when certain key steps are to be made in the transfer operation. + + +Curl_connect() +-------------- + + Analyzes the URL, it separates the different components and connects to the + remote host. This may involve using a proxy and/or using SSL. The + `Curl_resolv()` function in `lib/hostip.c` is used for looking up host + names (it does then use the proper underlying method, which may vary + between platforms and builds). + + When `Curl_connect` is done, we are connected to the remote site. Then it + is time to tell the server to get a document/file. `Curl_do()` arranges + this. + + This function makes sure there's an allocated and initiated `connectdata` + struct that is used for this particular connection only (although there may + be several requests performed on the same connect). A bunch of things are + inited/inherited from the `Curl_easy` struct. + + +multi_do() +--------- + + `multi_do()` makes sure the proper protocol-specific function is called. + The functions are named after the protocols they handle. + + The protocol-specific functions of course deal with protocol-specific + negotiations and setup. They have access to the `Curl_sendf()` (from + `lib/sendf.c`) function to send printf-style formatted data to the remote + host and when they're ready to make the actual file transfer they call the + `Curl_setup_transfer()` function (in `lib/transfer.c`) to setup the + transfer and returns. + + If this DO function fails and the connection is being re-used, libcurl will + then close this connection, setup a new connection and re-issue the DO + request on that. This is because there is no way to be perfectly sure that + we have discovered a dead connection before the DO function and thus we + might wrongly be re-using a connection that was closed by the remote peer. + + +Curl_readwrite() +---------------- + + Called during the transfer of the actual protocol payload. + + During transfer, the progress functions in `lib/progress.c` are called at + frequent intervals (or at the user's choice, a specified callback might get + called). The speedcheck functions in `lib/speedcheck.c` are also used to + verify that the transfer is as fast as required. + + +multi_done() +----------- + + Called after a transfer is done. This function takes care of everything + that has to be done after a transfer. This function attempts to leave + matters in a state so that `multi_do()` should be possible to call again on + the same connection (in a persistent connection case). It might also soon + be closed with `Curl_disconnect()`. + + +Curl_disconnect() +----------------- + + When doing normal connections and transfers, no one ever tries to close any + connections so this is not normally called when `curl_easy_perform()` is + used. This function is only used when we are certain that no more transfers + are going to be made on the connection. It can be also closed by force, or + it can be called to make sure that libcurl doesn't keep too many + connections alive at the same time. + + This function cleans up all resources that are associated with a single + connection. + + +HTTP(S) +======= + + HTTP offers a lot and is the protocol in curl that uses the most lines of + code. There is a special file `lib/formdata.c` that offers all the + multipart post functions. + + base64-functions for user+password stuff (and more) is in `lib/base64.c` + and all functions for parsing and sending cookies are found in + `lib/cookie.c`. + + HTTPS uses in almost every case the same procedure as HTTP, with only two + exceptions: the connect procedure is different and the function used to read + or write from the socket is different, although the latter fact is hidden in + the source by the use of `Curl_read()` for reading and `Curl_write()` for + writing data to the remote server. + + `http_chunks.c` contains functions that understands HTTP 1.1 chunked transfer + encoding. + + An interesting detail with the HTTP(S) request, is the `Curl_add_buffer()` + series of functions we use. They append data to one single buffer, and when + the building is finished the entire request is sent off in one single write. + This is done this way to overcome problems with flawed firewalls and lame + servers. + + +FTP +=== + + The `Curl_if2ip()` function can be used for getting the IP number of a + specified network interface, and it resides in `lib/if2ip.c`. + + `Curl_ftpsendf()` is used for sending FTP commands to the remote server. It + was made a separate function to prevent us programmers from forgetting that + they must be CRLF terminated. They must also be sent in one single `write()` + to make firewalls and similar happy. + + +Kerberos +======== + + Kerberos support is mainly in `lib/krb5.c` but also `curl_sasl_sspi.c` and + `curl_sasl_gssapi.c` for the email protocols and `socks_gssapi.c` and + `socks_sspi.c` for SOCKS5 proxy specifics. + + +TELNET +====== + + Telnet is implemented in `lib/telnet.c`. + + +FILE +==== + + The `file://` protocol is dealt with in `lib/file.c`. + + +SMB +=== + + The `smb://` protocol is dealt with in `lib/smb.c`. + + +LDAP +==== + + Everything LDAP is in `lib/ldap.c` and `lib/openldap.c`. + + +E-mail +====== + + The e-mail related source code is in `lib/imap.c`, `lib/pop3.c` and + `lib/smtp.c`. + + +General +======= + + URL encoding and decoding, called escaping and unescaping in the source code, + is found in `lib/escape.c`. + + While transferring data in `Transfer()` a few functions might get used. + `curl_getdate()` in `lib/parsedate.c` is for HTTP date comparisons (and + more). + + `lib/getenv.c` offers `curl_getenv()` which is for reading environment + variables in a neat platform independent way. That's used in the client, but + also in `lib/url.c` when checking the proxy environment variables. Note that + contrary to the normal unix `getenv()`, this returns an allocated buffer that + must be `free()`ed after use. + + `lib/netrc.c` holds the `.netrc` parser. + + `lib/timeval.c` features replacement functions for systems that don't have + `gettimeofday()` and a few support functions for timeval conversions. + + A function named `curl_version()` that returns the full curl version string + is found in `lib/version.c`. + + +Persistent Connections +====================== + + The persistent connection support in libcurl requires some considerations on + how to do things inside of the library. + + - The `Curl_easy` struct returned in the [`curl_easy_init()`][2] call + must never hold connection-oriented data. It is meant to hold the root data + as well as all the options etc that the library-user may choose. + + - The `Curl_easy` struct holds the "connection cache" (an array of + pointers to `connectdata` structs). + + - This enables the 'curl handle' to be reused on subsequent transfers. + + - When libcurl is told to perform a transfer, it first checks for an already + existing connection in the cache that we can use. Otherwise it creates a + new one and adds that to the cache. If the cache is full already when a new + connection is added, it will first close the oldest unused one. + + - When the transfer operation is complete, the connection is left + open. Particular options may tell libcurl not to, and protocols may signal + closure on connections and then they won't be kept open, of course. + + - When `curl_easy_cleanup()` is called, we close all still opened connections, + unless of course the multi interface "owns" the connections. + + The curl handle must be re-used in order for the persistent connections to + work. + + +multi interface/non-blocking +============================ + + The multi interface is a non-blocking interface to the library. To make that + interface work as well as possible, no low-level functions within libcurl + must be written to work in a blocking manner. (There are still a few spots + violating this rule.) + + One of the primary reasons we introduced c-ares support was to allow the name + resolve phase to be perfectly non-blocking as well. + + The FTP and the SFTP/SCP protocols are examples of how we adapt and adjust + the code to allow non-blocking operations even on multi-stage command- + response protocols. They are built around state machines that return when + they would otherwise block waiting for data. The DICT, LDAP and TELNET + protocols are crappy examples and they are subject for rewrite in the future + to better fit the libcurl protocol family. + + +SSL libraries +============= + + Originally libcurl supported SSLeay for SSL/TLS transports, but that was then + extended to its successor OpenSSL but has since also been extended to several + other SSL/TLS libraries and we expect and hope to further extend the support + in future libcurl versions. + + To deal with this internally in the best way possible, we have a generic SSL + function API as provided by the `vtls/vtls.[ch]` system, and they are the only + SSL functions we must use from within libcurl. vtls is then crafted to use + the appropriate lower-level function calls to whatever SSL library that is in + use. For example `vtls/openssl.[ch]` for the OpenSSL library. + + +Library Symbols +=============== + + All symbols used internally in libcurl must use a `Curl_` prefix if they're + used in more than a single file. Single-file symbols must be made static. + Public ("exported") symbols must use a `curl_` prefix. (There are exceptions, + but they are to be changed to follow this pattern in future versions.) Public + API functions are marked with `CURL_EXTERN` in the public header files so + that all others can be hidden on platforms where this is possible. + + +Return Codes and Informationals +=============================== + + I've made things simple. Almost every function in libcurl returns a CURLcode, + that must be `CURLE_OK` if everything is OK or otherwise a suitable error + code as the `curl/curl.h` include file defines. The very spot that detects an + error must use the `Curl_failf()` function to set the human-readable error + description. + + In aiding the user to understand what's happening and to debug curl usage, we + must supply a fair number of informational messages by using the + `Curl_infof()` function. Those messages are only displayed when the user + explicitly asks for them. They are best used when revealing information that + isn't otherwise obvious. + + +API/ABI +======= + + We make an effort to not export or show internals or how internals work, as + that makes it easier to keep a solid API/ABI over time. See docs/libcurl/ABI + for our promise to users. + + +Client +====== + + `main()` resides in `src/tool_main.c`. + + `src/tool_hugehelp.c` is automatically generated by the `mkhelp.pl` perl + script to display the complete "manual" and the `src/tool_urlglob.c` file + holds the functions used for the URL-"globbing" support. Globbing in the + sense that the `{}` and `[]` expansion stuff is there. + + The client mostly sets up its `config` struct properly, then + it calls the `curl_easy_*()` functions of the library and when it gets back + control after the `curl_easy_perform()` it cleans up the library, checks + status and exits. + + When the operation is done, the `ourWriteOut()` function in `src/writeout.c` + may be called to report about the operation. That function is mostly using the + `curl_easy_getinfo()` function to extract useful information from the curl + session. + + It may loop and do all this several times if many URLs were specified on the + command line or config file. + + +Memory Debugging +================ + + The file `lib/memdebug.c` contains debug-versions of a few functions. + Functions such as `malloc()`, `free()`, `fopen()`, `fclose()`, etc that + somehow deal with resources that might give us problems if we "leak" them. + The functions in the memdebug system do nothing fancy, they do their normal + function and then log information about what they just did. The logged data + can then be analyzed after a complete session, + + `memanalyze.pl` is the perl script present in `tests/` that analyzes a log + file generated by the memory tracking system. It detects if resources are + allocated but never freed and other kinds of errors related to resource + management. + + Internally, definition of preprocessor symbol `DEBUGBUILD` restricts code + which is only compiled for debug enabled builds. And symbol `CURLDEBUG` is + used to differentiate code which is _only_ used for memory + tracking/debugging. + + Use `-DCURLDEBUG` when compiling to enable memory debugging, this is also + switched on by running configure with `--enable-curldebug`. Use + `-DDEBUGBUILD` when compiling to enable a debug build or run configure with + `--enable-debug`. + + `curl --version` will list 'Debug' feature for debug enabled builds, and + will list 'TrackMemory' feature for curl debug memory tracking capable + builds. These features are independent and can be controlled when running + the configure script. When `--enable-debug` is given both features will be + enabled, unless some restriction prevents memory tracking from being used. + + +Test Suite +========== + + The test suite is placed in its own subdirectory directly off the root in the + curl archive tree, and it contains a bunch of scripts and a lot of test case + data. + + The main test script is `runtests.pl` that will invoke test servers like + `httpserver.pl` and `ftpserver.pl` before all the test cases are performed. + The test suite currently only runs on Unix-like platforms. + + You'll find a description of the test suite in the `tests/README` file, and + the test case data files in the `tests/FILEFORMAT` file. + + The test suite automatically detects if curl was built with the memory + debugging enabled, and if it was, it will detect memory leaks, too. + + +Asynchronous name resolves +========================== + + libcurl can be built to do name resolves asynchronously, using either the + normal resolver in a threaded manner or by using c-ares. + + +[c-ares][3] +------ + +### Build libcurl to use a c-ares + +1. ./configure --enable-ares=/path/to/ares/install +2. make + +### c-ares on win32 + + First I compiled c-ares. I changed the default C runtime library to be the + single-threaded rather than the multi-threaded (this seems to be required to + prevent linking errors later on). Then I simply build the areslib project + (the other projects adig/ahost seem to fail under MSVC). + + Next was libcurl. I opened `lib/config-win32.h` and I added a: + `#define USE_ARES 1` + + Next thing I did was I added the path for the ares includes to the include + path, and the libares.lib to the libraries. + + Lastly, I also changed libcurl to be single-threaded rather than + multi-threaded, again this was to prevent some duplicate symbol errors. I'm + not sure why I needed to change everything to single-threaded, but when I + didn't I got redefinition errors for several CRT functions (`malloc()`, + `stricmp()`, etc.) + + +`curl_off_t` +========== + + `curl_off_t` is a data type provided by the external libcurl include + headers. It is the type meant to be used for the [`curl_easy_setopt()`][1] + options that end with LARGE. The type is 64-bit large on most modern + platforms. + + +curlx +===== + + The libcurl source code offers a few functions by source only. They are not + part of the official libcurl API, but the source files might be useful for + others so apps can optionally compile/build with these sources to gain + additional functions. + + We provide them through a single header file for easy access for apps: + `curlx.h` + +`curlx_strtoofft()` +------------------- + A macro that converts a string containing a number to a `curl_off_t` number. + This might use the `curlx_strtoll()` function which is provided as source + code in strtoofft.c. Note that the function is only provided if no + `strtoll()` (or equivalent) function exist on your platform. If `curl_off_t` + is only a 32-bit number on your platform, this macro uses `strtol()`. + +Future +------ + + Several functions will be removed from the public `curl_` name space in a + future libcurl release. They will then only become available as `curlx_` + functions instead. To make the transition easier, we already today provide + these functions with the `curlx_` prefix to allow sources to be built + properly with the new function names. The concerned functions are: + + - `curlx_getenv` + - `curlx_strequal` + - `curlx_strnequal` + - `curlx_mvsnprintf` + - `curlx_msnprintf` + - `curlx_maprintf` + - `curlx_mvaprintf` + - `curlx_msprintf` + - `curlx_mprintf` + - `curlx_mfprintf` + - `curlx_mvsprintf` + - `curlx_mvprintf` + - `curlx_mvfprintf` + + +Content Encoding +================ + +## About content encodings + + [HTTP/1.1][4] specifies that a client may request that a server encode its + response. This is usually used to compress a response using one (or more) + encodings from a set of commonly available compression techniques. These + schemes include `deflate` (the zlib algorithm), `gzip`, `br` (brotli) and + `compress`. A client requests that the server perform an encoding by including + an `Accept-Encoding` header in the request document. The value of the header + should be one of the recognized tokens `deflate`, ... (there's a way to + register new schemes/tokens, see sec 3.5 of the spec). A server MAY honor + the client's encoding request. When a response is encoded, the server + includes a `Content-Encoding` header in the response. The value of the + `Content-Encoding` header indicates which encodings were used to encode the + data, in the order in which they were applied. + + It's also possible for a client to attach priorities to different schemes so + that the server knows which it prefers. See sec 14.3 of RFC 2616 for more + information on the `Accept-Encoding` header. See sec + [3.1.2.2 of RFC 7231][15] for more information on the `Content-Encoding` + header. + +## Supported content encodings + + The `deflate`, `gzip` and `br` content encodings are supported by libcurl. + Both regular and chunked transfers work fine. The zlib library is required + for the `deflate` and `gzip` encodings, while the brotli decoding library is + for the `br` encoding. + +## The libcurl interface + + To cause libcurl to request a content encoding use: + + [`curl_easy_setopt`][1](curl, [`CURLOPT_ACCEPT_ENCODING`][5], string) + + where string is the intended value of the `Accept-Encoding` header. + + Currently, libcurl does support multiple encodings but only + understands how to process responses that use the `deflate`, `gzip` and/or + `br` content encodings, so the only values for [`CURLOPT_ACCEPT_ENCODING`][5] + that will work (besides `identity`, which does nothing) are `deflate`, + `gzip` and `br`. If a response is encoded using the `compress` or methods, + libcurl will return an error indicating that the response could + not be decoded. If `` is NULL no `Accept-Encoding` header is + generated. If `` is a zero-length string, then an `Accept-Encoding` + header containing all supported encodings will be generated. + + The [`CURLOPT_ACCEPT_ENCODING`][5] must be set to any non-NULL value for + content to be automatically decoded. If it is not set and the server still + sends encoded content (despite not having been asked), the data is returned + in its raw form and the `Content-Encoding` type is not checked. + +## The curl interface + + Use the [`--compressed`][6] option with curl to cause it to ask servers to + compress responses using any format supported by curl. + + +`hostip.c` explained +==================== + + The main compile-time defines to keep in mind when reading the `host*.c` + source file are these: + +## `CURLRES_IPV6` + + this host has `getaddrinfo()` and family, and thus we use that. The host may + not be able to resolve IPv6, but we don't really have to take that into + account. Hosts that aren't IPv6-enabled have `CURLRES_IPV4` defined. + +## `CURLRES_ARES` + + is defined if libcurl is built to use c-ares for asynchronous name + resolves. This can be Windows or \*nix. + +## `CURLRES_THREADED` + + is defined if libcurl is built to use threading for asynchronous name + resolves. The name resolve will be done in a new thread, and the supported + asynch API will be the same as for ares-builds. This is the default under + (native) Windows. + + If any of the two previous are defined, `CURLRES_ASYNCH` is defined too. If + libcurl is not built to use an asynchronous resolver, `CURLRES_SYNCH` is + defined. + +## `host*.c` sources + + The `host*.c` sources files are split up like this: + + - `hostip.c` - method-independent resolver functions and utility functions + - `hostasyn.c` - functions for asynchronous name resolves + - `hostsyn.c` - functions for synchronous name resolves + - `asyn-ares.c` - functions for asynchronous name resolves using c-ares + - `asyn-thread.c` - functions for asynchronous name resolves using threads + - `hostip4.c` - IPv4 specific functions + - `hostip6.c` - IPv6 specific functions + + The `hostip.h` is the single united header file for all this. It defines the + `CURLRES_*` defines based on the `config*.h` and `curl_setup.h` defines. + + +Track Down Memory Leaks +======================= + +## Single-threaded + + Please note that this memory leak system is not adjusted to work in more + than one thread. If you want/need to use it in a multi-threaded app. Please + adjust accordingly. + +## Build + + Rebuild libcurl with `-DCURLDEBUG` (usually, rerunning configure with + `--enable-debug` fixes this). `make clean` first, then `make` so that all + files are actually rebuilt properly. It will also make sense to build + libcurl with the debug option (usually `-g` to the compiler) so that + debugging it will be easier if you actually do find a leak in the library. + + This will create a library that has memory debugging enabled. + +## Modify Your Application + + Add a line in your application code: + + `curl_dbg_memdebug("dump");` + + This will make the malloc debug system output a full trace of all resource + using functions to the given file name. Make sure you rebuild your program + and that you link with the same libcurl you built for this purpose as + described above. + +## Run Your Application + + Run your program as usual. Watch the specified memory trace file grow. + + Make your program exit and use the proper libcurl cleanup functions etc. So + that all non-leaks are returned/freed properly. + +## Analyze the Flow + + Use the `tests/memanalyze.pl` perl script to analyze the dump file: + + tests/memanalyze.pl dump + + This now outputs a report on what resources that were allocated but never + freed etc. This report is very fine for posting to the list! + + If this doesn't produce any output, no leak was detected in libcurl. Then + the leak is mostly likely to be in your code. + + +`multi_socket` +============== + + Implementation of the `curl_multi_socket` API + + The main ideas of this API are simply: + + 1. The application can use whatever event system it likes as it gets info + from libcurl about what file descriptors libcurl waits for what action + on. (The previous API returns `fd_sets` which is very + `select()`-centric). + + 2. When the application discovers action on a single socket, it calls + libcurl and informs that there was action on this particular socket and + libcurl can then act on that socket/transfer only and not care about + any other transfers. (The previous API always had to scan through all + the existing transfers.) + + The idea is that [`curl_multi_socket_action()`][7] calls a given callback + with information about what socket to wait for what action on, and the + callback only gets called if the status of that socket has changed. + + We also added a timer callback that makes libcurl call the application when + the timeout value changes, and you set that with [`curl_multi_setopt()`][9] + and the [`CURLMOPT_TIMERFUNCTION`][10] option. To get this to work, + Internally, there's an added struct to each easy handle in which we store + an "expire time" (if any). The structs are then "splay sorted" so that we + can add and remove times from the linked list and yet somewhat swiftly + figure out both how long there is until the next nearest timer expires + and which timer (handle) we should take care of now. Of course, the upside + of all this is that we get a [`curl_multi_timeout()`][8] that should also + work with old-style applications that use [`curl_multi_perform()`][11]. + + We created an internal "socket to easy handles" hash table that given + a socket (file descriptor) returns the easy handle that waits for action on + that socket. This hash is made using the already existing hash code + (previously only used for the DNS cache). + + To make libcurl able to report plain sockets in the socket callback, we had + to re-organize the internals of the [`curl_multi_fdset()`][12] etc so that + the conversion from sockets to `fd_sets` for that function is only done in + the last step before the data is returned. I also had to extend c-ares to + get a function that can return plain sockets, as that library too returned + only `fd_sets` and that is no longer good enough. The changes done to c-ares + are available in c-ares 1.3.1 and later. + + +Structs in libcurl +================== + +This section should cover 7.32.0 pretty accurately, but will make sense even +for older and later versions as things don't change drastically that often. + + +## Curl_easy + + The `Curl_easy` struct is the one returned to the outside in the external API + as a `CURL *`. This is usually known as an easy handle in API documentations + and examples. + + Information and state that is related to the actual connection is in the + `connectdata` struct. When a transfer is about to be made, libcurl will + either create a new connection or re-use an existing one. The particular + connectdata that is used by this handle is pointed out by + `Curl_easy->easy_conn`. + + Data and information that regard this particular single transfer is put in + the `SingleRequest` sub-struct. + + When the `Curl_easy` struct is added to a multi handle, as it must be in + order to do any transfer, the `->multi` member will point to the `Curl_multi` + struct it belongs to. The `->prev` and `->next` members will then be used by + the multi code to keep a linked list of `Curl_easy` structs that are added to + that same multi handle. libcurl always uses multi so `->multi` *will* point + to a `Curl_multi` when a transfer is in progress. + + `->mstate` is the multi state of this particular `Curl_easy`. When + `multi_runsingle()` is called, it will act on this handle according to which + state it is in. The mstate is also what tells which sockets to return for a + specific `Curl_easy` when [`curl_multi_fdset()`][12] is called etc. + + The libcurl source code generally use the name `data` for the variable that + points to the `Curl_easy`. + + When doing multiplexed HTTP/2 transfers, each `Curl_easy` is associated with + an individual stream, sharing the same connectdata struct. Multiplexing + makes it even more important to keep things associated with the right thing! + + +## connectdata + + A general idea in libcurl is to keep connections around in a connection + "cache" after they have been used in case they will be used again and then + re-use an existing one instead of creating a new as it creates a significant + performance boost. + + Each `connectdata` identifies a single physical connection to a server. If + the connection can't be kept alive, the connection will be closed after use + and then this struct can be removed from the cache and freed. + + Thus, the same `Curl_easy` can be used multiple times and each time select + another `connectdata` struct to use for the connection. Keep this in mind, + as it is then important to consider if options or choices are based on the + connection or the `Curl_easy`. + + Functions in libcurl will assume that `connectdata->data` points to the + `Curl_easy` that uses this connection (for the moment). + + As a special complexity, some protocols supported by libcurl require a + special disconnect procedure that is more than just shutting down the + socket. It can involve sending one or more commands to the server before + doing so. Since connections are kept in the connection cache after use, the + original `Curl_easy` may no longer be around when the time comes to shut down + a particular connection. For this purpose, libcurl holds a special dummy + `closure_handle` `Curl_easy` in the `Curl_multi` struct to use when needed. + + FTP uses two TCP connections for a typical transfer but it keeps both in + this single struct and thus can be considered a single connection for most + internal concerns. + + The libcurl source code generally use the name `conn` for the variable that + points to the connectdata. + + +## Curl_multi + + Internally, the easy interface is implemented as a wrapper around multi + interface functions. This makes everything multi interface. + + `Curl_multi` is the multi handle struct exposed as `CURLM *` in external + APIs. + + This struct holds a list of `Curl_easy` structs that have been added to this + handle with [`curl_multi_add_handle()`][13]. The start of the list is + `->easyp` and `->num_easy` is a counter of added `Curl_easy`s. + + `->msglist` is a linked list of messages to send back when + [`curl_multi_info_read()`][14] is called. Basically a node is added to that + list when an individual `Curl_easy`'s transfer has completed. + + `->hostcache` points to the name cache. It is a hash table for looking up + name to IP. The nodes have a limited life time in there and this cache is + meant to reduce the time for when the same name is wanted within a short + period of time. + + `->timetree` points to a tree of `Curl_easy`s, sorted by the remaining time + until it should be checked - normally some sort of timeout. Each `Curl_easy` + has one node in the tree. + + `->sockhash` is a hash table to allow fast lookups of socket descriptor for + which `Curl_easy` uses that descriptor. This is necessary for the + `multi_socket` API. + + `->conn_cache` points to the connection cache. It keeps track of all + connections that are kept after use. The cache has a maximum size. + + `->closure_handle` is described in the `connectdata` section. + + The libcurl source code generally use the name `multi` for the variable that + points to the `Curl_multi` struct. + + +## Curl_handler + + Each unique protocol that is supported by libcurl needs to provide at least + one `Curl_handler` struct. It defines what the protocol is called and what + functions the main code should call to deal with protocol specific issues. + In general, there's a source file named `[protocol].c` in which there's a + `struct Curl_handler Curl_handler_[protocol]` declared. In `url.c` there's + then the main array with all individual `Curl_handler` structs pointed to + from a single array which is scanned through when a URL is given to libcurl + to work with. + + `->scheme` is the URL scheme name, usually spelled out in uppercase. That's + "HTTP" or "FTP" etc. SSL versions of the protocol need their own + `Curl_handler` setup so HTTPS separate from HTTP. + + `->setup_connection` is called to allow the protocol code to allocate + protocol specific data that then gets associated with that `Curl_easy` for + the rest of this transfer. It gets freed again at the end of the transfer. + It will be called before the `connectdata` for the transfer has been + selected/created. Most protocols will allocate its private + `struct [PROTOCOL]` here and assign `Curl_easy->req.protop` to point to it. + + `->connect_it` allows a protocol to do some specific actions after the TCP + connect is done, that can still be considered part of the connection phase. + + Some protocols will alter the `connectdata->recv[]` and + `connectdata->send[]` function pointers in this function. + + `->connecting` is similarly a function that keeps getting called as long as + the protocol considers itself still in the connecting phase. + + `->do_it` is the function called to issue the transfer request. What we call + the DO action internally. If the DO is not enough and things need to be kept + getting done for the entire DO sequence to complete, `->doing` is then + usually also provided. Each protocol that needs to do multiple commands or + similar for do/doing need to implement their own state machines (see SCP, + SFTP, FTP). Some protocols (only FTP and only due to historical reasons) has + a separate piece of the DO state called `DO_MORE`. + + `->doing` keeps getting called while issuing the transfer request command(s) + + `->done` gets called when the transfer is complete and DONE. That's after the + main data has been transferred. + + `->do_more` gets called during the `DO_MORE` state. The FTP protocol uses + this state when setting up the second connection. + + `->proto_getsock` + `->doing_getsock` + `->domore_getsock` + `->perform_getsock` + Functions that return socket information. Which socket(s) to wait for which + action(s) during the particular multi state. + + `->disconnect` is called immediately before the TCP connection is shutdown. + + `->readwrite` gets called during transfer to allow the protocol to do extra + reads/writes + + `->defport` is the default report TCP or UDP port this protocol uses + + `->protocol` is one or more bits in the `CURLPROTO_*` set. The SSL versions + have their "base" protocol set and then the SSL variation. Like + "HTTP|HTTPS". + + `->flags` is a bitmask with additional information about the protocol that will + make it get treated differently by the generic engine: + + - `PROTOPT_SSL` - will make it connect and negotiate SSL + + - `PROTOPT_DUAL` - this protocol uses two connections + + - `PROTOPT_CLOSEACTION` - this protocol has actions to do before closing the + connection. This flag is no longer used by code, yet still set for a bunch + of protocol handlers. + + - `PROTOPT_DIRLOCK` - "direction lock". The SSH protocols set this bit to + limit which "direction" of socket actions that the main engine will + concern itself with. + + - `PROTOPT_NONETWORK` - a protocol that doesn't use network (read `file:`) + + - `PROTOPT_NEEDSPWD` - this protocol needs a password and will use a default + one unless one is provided + + - `PROTOPT_NOURLQUERY` - this protocol can't handle a query part on the URL + (?foo=bar) + + +## conncache + + Is a hash table with connections for later re-use. Each `Curl_easy` has a + pointer to its connection cache. Each multi handle sets up a connection + cache that all added `Curl_easy`s share by default. + + +## Curl_share + + The libcurl share API allocates a `Curl_share` struct, exposed to the + external API as `CURLSH *`. + + The idea is that the struct can have a set of its own versions of caches and + pools and then by providing this struct in the `CURLOPT_SHARE` option, those + specific `Curl_easy`s will use the caches/pools that this share handle + holds. + + Then individual `Curl_easy` structs can be made to share specific things + that they otherwise wouldn't, such as cookies. + + The `Curl_share` struct can currently hold cookies, DNS cache and the SSL + session cache. + + +## CookieInfo + + This is the main cookie struct. It holds all known cookies and related + information. Each `Curl_easy` has its own private `CookieInfo` even when + they are added to a multi handle. They can be made to share cookies by using + the share API. + + +[1]: https://curl.haxx.se/libcurl/c/curl_easy_setopt.html +[2]: https://curl.haxx.se/libcurl/c/curl_easy_init.html +[3]: https://c-ares.haxx.se/ +[4]: https://tools.ietf.org/html/rfc7230 "RFC 7230" +[5]: https://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html +[6]: https://curl.haxx.se/docs/manpage.html#--compressed +[7]: https://curl.haxx.se/libcurl/c/curl_multi_socket_action.html +[8]: https://curl.haxx.se/libcurl/c/curl_multi_timeout.html +[9]: https://curl.haxx.se/libcurl/c/curl_multi_setopt.html +[10]: https://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html +[11]: https://curl.haxx.se/libcurl/c/curl_multi_perform.html +[12]: https://curl.haxx.se/libcurl/c/curl_multi_fdset.html +[13]: https://curl.haxx.se/libcurl/c/curl_multi_add_handle.html +[14]: https://curl.haxx.se/libcurl/c/curl_multi_info_read.html +[15]: https://tools.ietf.org/html/rfc7231#section-3.1.2.2 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/KNOWN_BUGS b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/KNOWN_BUGS new file mode 100644 index 00000000..1aa025fd --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/KNOWN_BUGS @@ -0,0 +1,827 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Known Bugs + +These are problems and bugs known to exist at the time of this release. Feel +free to join in and help us correct one or more of these! Also be sure to +check the changelog of the current development status, as one or more of these +problems may have been fixed or changed somewhat since this was written! + + 1. HTTP + 1.2 Multiple methods in a single WWW-Authenticate: header + 1.3 STARTTRANSFER time is wrong for HTTP POSTs + 1.4 multipart formposts file name encoding + 1.5 Expect-100 meets 417 + 1.6 Unnecessary close when 401 received waiting for 100 + 1.7 Deflate error after all content was received + 1.8 DoH isn't used for all name resolves when enabled + 1.9 HTTP/2 frames while in the connection pool kill reuse + 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM + + 2. TLS + 2.1 CURLINFO_SSL_VERIFYRESULT has limited support + 2.2 DER in keychain + 2.3 Unable to use PKCS12 certificate with Secure Transport + 2.4 Secure Transport won't import PKCS#12 client certificates without a password + 2.5 Client cert handling with Issuer DN differs between backends + 2.6 CURL_GLOBAL_SSL + 2.7 Client cert (MTLS) issues with Schannel + 2.8 Schannel disable CURLOPT_SSL_VERIFYPEER and verify hostname + 2.9 TLS session cache doesn't work with TFO + 2.10 Store TLS context per transfer instead of per connection + 2.11 Schannel TLS 1.2 handshake bug in old Windows versions + + 3. Email protocols + 3.1 IMAP SEARCH ALL truncated response + 3.2 No disconnect command + 3.3 POP3 expects "CRLF.CRLF" eob for some single-line responses + 3.4 AUTH PLAIN for SMTP is not working on all servers + + 4. Command line + 4.1 -J and -O with %-encoded file names + 4.2 -J with -C - fails + 4.3 --retry and transfer timeouts + 4.4 Improve --data-urlencode space encoding + + 5. Build and portability issues + 5.1 OS400 port requires deprecated IBM library + 5.2 curl-config --libs contains private details + 5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10 + 5.4 Build with statically built dependency + 5.5 can't handle Unicode arguments in non-Unicode builds on Windows + 5.6 cmake support gaps + 5.7 Visual Studio project gaps + 5.8 configure finding libs in wrong directory + 5.9 Utilize Requires.private directives in libcurl.pc + 5.11 configure --with-gssapi with Heimdal is ignored on macOS + + 6. Authentication + 6.1 NTLM authentication and unicode + 6.2 MIT Kerberos for Windows build + 6.3 NTLM in system context uses wrong name + 6.4 Negotiate and Kerberos V5 need a fake user name + 6.5 NTLM doesn't support password with § character + 6.6 libcurl can fail to try alternatives with --proxy-any + 6.7 Don't clear digest for single realm + 6.8 RTSP authentication breaks without redirect support + + 7. FTP + 7.1 FTP without or slow 220 response + 7.2 FTP with CONNECT and slow server + 7.3 FTP with NOBODY and FAILONERROR + 7.4 FTP with ACCT + 7.5 ASCII FTP + 7.6 FTP with NULs in URL parts + 7.7 FTP and empty path parts in the URL + 7.8 Premature transfer end but healthy control channel + 7.9 Passive transfer tries only one IP address + 7.10 FTPS needs session reuse + + 8. TELNET + 8.1 TELNET and time limitations don't work + 8.2 Microsoft telnet server + + 9. SFTP and SCP + 9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct + 9.2 wolfssh: publickey auth doesn't work + + 10. SOCKS + 10.3 FTPS over SOCKS + 10.4 active FTP over a SOCKS + + 11. Internals + 11.1 Curl leaks .onion hostnames in DNS + 11.2 error buffer not set if connection to multiple addresses fails + 11.3 c-ares deviates from stock resolver on http://1346569778 + 11.4 HTTP test server 'connection-monitor' problems + 11.5 Connection information when using TCP Fast Open + 11.6 slow connect to localhost on Windows + 11.7 signal-based resolver timeouts + 11.8 DoH leaks memory after followlocation + 11.9 DoH doesn't inherit all transfer options + 11.10 Blocking socket operations in non-blocking API + 11.11 A shared connection cache is not thread-safe + 11.12 'no_proxy' string-matches IPv6 numerical addreses + + 12. LDAP and OpenLDAP + 12.1 OpenLDAP hangs after returning results + 12.2 LDAP on Windows does authentication wrong? + 12.3 LDAP on Windows doesn't work + + 13. TCP/IP + 13.1 --interface for ipv6 binds to unusable IP address + + 14 DICT + 14.1 DICT responses show the underlying protocol + +============================================================================== + +1. HTTP + +1.2 Multiple methods in a single WWW-Authenticate: header + + The HTTP responses headers WWW-Authenticate: can provide information about + multiple authentication methods as multiple headers or as several methods + within a single header. The latter way, several methods in the same physical + line, is not supported by libcurl's parser. (For no good reason.) + +1.3 STARTTRANSFER time is wrong for HTTP POSTs + + Wrong STARTTRANSFER timer accounting for POST requests Timer works fine with + GET requests, but while using POST the time for CURLINFO_STARTTRANSFER_TIME + is wrong. While using POST CURLINFO_STARTTRANSFER_TIME minus + CURLINFO_PRETRANSFER_TIME is near to zero every time. + + https://github.com/curl/curl/issues/218 + https://curl.haxx.se/bug/view.cgi?id=1213 + +1.4 multipart formposts file name encoding + + When creating multipart formposts. The file name part can be encoded with + something beyond ascii but currently libcurl will only pass in the verbatim + string the app provides. There are several browsers that already do this + encoding. The key seems to be the updated draft to RFC2231: + https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02 + +1.5 Expect-100 meets 417 + + If an upload using Expect: 100-continue receives an HTTP 417 response, it + ought to be automatically resent without the Expect:. A workaround is for + the client application to redo the transfer after disabling Expect:. + https://curl.haxx.se/mail/archive-2008-02/0043.html + +1.6 Unnecessary close when 401 received waiting for 100 + + libcurl closes the connection if an HTTP 401 reply is received while it is + waiting for the 100-continue response. + https://curl.haxx.se/mail/lib-2008-08/0462.html + +1.7 Deflate error after all content was received + + There's a situation where we can get an error in a HTTP response that is + compressed, when that error is detected after all the actual body contents + have been received and delivered to the application. This is tricky, but is + ultimately a broken server. + + See https://github.com/curl/curl/issues/2719 + +1.8 DoH isn't used for all name resolves when enabled + + Even if DoH is specified to be used, there are some name resolves that are + done without it. This should be fixed. When the internal function + `Curl_resolver_wait_resolv()` is called, it doesn't use DoH to complete the + resolve as it otherwise should. + + See https://github.com/curl/curl/pull/3857 and + https://github.com/curl/curl/pull/3850 + +1.9 HTTP/2 frames while in the connection pool kill reuse + + If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to + curl while the connection is held in curl's connection pool, the socket will + be found readable when considered for reuse and that makes curl think it is + dead and then it will be closed and a new connection gets created instead. + + This is *best* fixed by adding monitoring to connections while they are kept + in the pool so that pings can be responded to appropriately. + +1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM + + I'm using libcurl to POST form data using a FILE* with the CURLFORM_STREAM + option of curl_formadd(). I've noticed that if the connection drops at just + the right time, the POST is reattempted without the data from the file. It + seems like the file stream position isn't getting reset to the beginning of + the file. I found the CURLOPT_SEEKFUNCTION option and set that with a + function that performs an fseek() on the FILE*. However, setting that didn't + seem to fix the issue or even get called. See + https://github.com/curl/curl/issues/768 + + +2. TLS + +2.1 CURLINFO_SSL_VERIFYRESULT has limited support + + CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL, NSS and + GnuTLS backends, so relying on this information in a generic app is flaky. + +2.2 DER in keychain + + Curl doesn't recognize certificates in DER format in keychain, but it works + with PEM. https://curl.haxx.se/bug/view.cgi?id=1065 + +2.3 Unable to use PKCS12 certificate with Secure Transport + + See https://github.com/curl/curl/issues/5403 + +2.4 Secure Transport won't import PKCS#12 client certificates without a password + + libcurl calls SecPKCS12Import with the PKCS#12 client certificate, but that + function rejects certificates that do not have a password. + https://github.com/curl/curl/issues/1308 + +2.5 Client cert handling with Issuer DN differs between backends + + When the specified client certificate doesn't match any of the + server-specified DNs, the OpenSSL and GnuTLS backends behave differently. + The github discussion may contain a solution. + + See https://github.com/curl/curl/issues/1411 + +2.6 CURL_GLOBAL_SSL + + Since libcurl 7.57.0, the flag CURL_GLOBAL_SSL is a no-op. The change was + merged in https://github.com/curl/curl/commit/d661b0afb571a + + It was removed since it was + + A) never clear for applications on how to deal with init in the light of + different SSL backends (the option was added back in the days when life + was simpler) + + B) multissl introduced dynamic switching between SSL backends which + emphasized (A) even more + + C) libcurl uses some TLS backend functionality even for non-TLS functions (to + get "good" random) so applications trying to avoid the init for + performance reasons would do wrong anyway + + D) never very carefully documented so all this mostly just happened to work + for some users + + However, in spite of the problems with the feature, there were some users who + apparently depended on this feature and who now claim libcurl is broken for + them. The fix for this situation is not obvious as a downright revert of the + patch is totally ruled out due to those reasons above. + + https://github.com/curl/curl/issues/2276 + +2.7 Client cert (MTLS) issues with Schannel + + See https://github.com/curl/curl/issues/3145 + +2.8 Schannel disable CURLOPT_SSL_VERIFYPEER and verify hostname + + This seems to be a limitation in the underlying Schannel API. + + https://github.com/curl/curl/issues/3284 + +2.9 TLS session cache doesn't work with TFO + + See https://github.com/curl/curl/issues/4301 + +2.10 Store TLS context per transfer instead of per connection + + The GnuTLS `backend->cred` and the OpenSSL `backend->ctx` data and their + proxy versions (and possibly other TLS backends), could be better moved to be + stored in the Curl_easy handle instead of in per connection so that a single + transfer that makes multiple connections can reuse the context and reduce + memory consumption. + + https://github.com/curl/curl/issues/5102 + +2.11 Schannel TLS 1.2 handshake bug in old Windows versions + + In old versions of Windows such as 7 and 8.1 the Schannel TLS 1.2 handshake + implementation likely has a bug that can rarely cause the key exchange to + fail, resulting in error SEC_E_BUFFER_TOO_SMALL or SEC_E_MESSAGE_ALTERED. + + https://github.com/curl/curl/issues/5488 + +3. Email protocols + +3.1 IMAP SEARCH ALL truncated response + + IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the + code reveals that pingpong.c contains some truncation code, at line 408, when + it deems the server response to be too large truncating it to 40 characters" + https://curl.haxx.se/bug/view.cgi?id=1366 + +3.2 No disconnect command + + The disconnect commands (LOGOUT and QUIT) may not be sent by IMAP, POP3 and + SMTP if a failure occurs during the authentication phase of a connection. + +3.3 POP3 expects "CRLF.CRLF" eob for some single-line responses + + You have to tell libcurl not to expect a body, when dealing with one line + response commands. Please see the POP3 examples and test cases which show + this for the NOOP and DELE commands. https://curl.haxx.se/bug/?i=740 + +3.4 AUTH PLAIN for SMTP is not working on all servers + + Specifying "--login-options AUTH=PLAIN" on the command line doesn't seem to + work correctly. + + See https://github.com/curl/curl/issues/4080 + +4. Command line + +4.1 -J and -O with %-encoded file names + + -J/--remote-header-name doesn't decode %-encoded file names. RFC6266 details + how it should be done. The can of worm is basically that we have no charset + handling in curl and ascii >=128 is a challenge for us. Not to mention that + decoding also means that we need to check for nastiness that is attempted, + like "../" sequences and the like. Probably everything to the left of any + embedded slashes should be cut off. + https://curl.haxx.se/bug/view.cgi?id=1294 + + -O also doesn't decode %-encoded names, and while it has even less + information about the charset involved the process is similar to the -J case. + + Note that we won't add decoding to -O without the user asking for it with + some other means as well, since -O has always been documented to use the name + exactly as specified in the URL. + +4.2 -J with -C - fails + + When using -J (with -O), automatically resumed downloading together with "-C + -" fails. Without -J the same command line works! This happens because the + resume logic is worked out before the target file name (and thus its + pre-transfer size) has been figured out! + https://curl.haxx.se/bug/view.cgi?id=1169 + +4.3 --retry and transfer timeouts + + If using --retry and the transfer timeouts (possibly due to using -m or + -y/-Y) the next attempt doesn't resume the transfer properly from what was + downloaded in the previous attempt but will truncate and restart at the + original position where it was at before the previous failed attempt. See + https://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report + https://qa.mandriva.com/show_bug.cgi?id=22565 + +4.4 Improve --data-urlencode space encoding + + ASCII space characters in --data-urlencode are currently encoded as %20 + rather than +, which RFC 1866 says should be used. + + See https://github.com/curl/curl/issues/3229 + +5. Build and portability issues + +5.1 OS400 port requires deprecated IBM library + + curl for OS400 requires QADRT to build, which provides ASCII wrappers for + libc/POSIX functions in the ILE, but IBM no longer supports or even offers + this library to download. + + See https://github.com/curl/curl/issues/5176 + +5.2 curl-config --libs contains private details + + "curl-config --libs" will include details set in LDFLAGS when configure is + run that might be needed only for building libcurl. Further, curl-config + --cflags suffers from the same effects with CFLAGS/CPPFLAGS. + +5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10 + + See https://github.com/curl/curl/issues/2905 + +5.4 Build with statically built dependency + + The build scripts in curl (autotools, cmake and others) are primarily done to + work with shared/dynamic third party dependencies. When linking with shared + libraries, the dependency "chain" is handled automatically by the library + loader - on all modern systems. + + If you instead link with a static library, we need to provide all the + dependency libraries already at the link command line. + + Figuring out all the dependency libraries for a given library is hard, as it + might also involve figuring out the dependencies of the dependencies and they + may vary between platforms and even change between versions. + + When using static dependencies, the build scripts will mostly assume that + you, the user, will provide all the necessary additional dependency libraries + as additional arguments in the build. With configure, by setting LIBS/LDFLAGS + on the command line. + + We welcome help to improve curl's ability to link with static libraries, but + it is likely a task that we can never fully support. + +5.5 can't handle Unicode arguments in non-Unicode builds on Windows + + If a URL or filename can't be encoded using the user's current codepage then + it can only be encoded properly in the Unicode character set. Windows uses + UTF-16 encoding for Unicode and stores it in wide characters, however curl + and libcurl are not equipped for that at the moment except when built with + _UNICODE and UNICODE defined. And, except for Cygwin, Windows can't use UTF-8 + as a locale. + + https://curl.haxx.se/bug/?i=345 + https://curl.haxx.se/bug/?i=731 + https://curl.haxx.se/bug/?i=3747 + +5.6 cmake support gaps + + The cmake build setup lacks several features that the autoconf build + offers. This includes: + + - use of correct soname for the shared library build + + - support for several TLS backends are missing + + - the unit tests cause link failures in regular non-static builds + + - no nghttp2 check + + - unusable tool_hugehelp.c with MinGW, see + https://github.com/curl/curl/issues/3125 + +5.7 Visual Studio project gaps + + The Visual Studio projects lack some features that the autoconf and nmake + builds offer, such as the following: + + - support for zlib and nghttp2 + - use of static runtime libraries + - add the test suite components + + In addition to this the following could be implemented: + + - support for other development IDEs + - add PATH environment variables for third-party DLLs + +5.8 configure finding libs in wrong directory + + When the configure script checks for third-party libraries, it adds those + directories to the LDFLAGS variable and then tries linking to see if it + works. When successful, the found directory is kept in the LDFLAGS variable + when the script continues to execute and do more tests and possibly check for + more libraries. + + This can make subsequent checks for libraries wrongly detect another + installation in a directory that was previously added to LDFLAGS by another + library check! + + A possibly better way to do these checks would be to keep the pristine LDFLAGS + even after successful checks and instead add those verified paths to a + separate variable that only after all library checks have been performed gets + appended to LDFLAGS. + +5.9 Utilize Requires.private directives in libcurl.pc + + https://github.com/curl/curl/issues/864 + +5.11 configure --with-gssapi with Heimdal is ignored on macOS + + ... unless you also pass --with-gssapi-libs + + https://github.com/curl/curl/issues/3841 + +6. Authentication + +6.1 NTLM authentication and unicode + + NTLM authentication involving unicode user name or password only works + properly if built with UNICODE defined together with the Schannel + backend. The original problem was mentioned in: + https://curl.haxx.se/mail/lib-2009-10/0024.html + https://curl.haxx.se/bug/view.cgi?id=896 + + The Schannel version verified to work as mentioned in + https://curl.haxx.se/mail/lib-2012-07/0073.html + +6.2 MIT Kerberos for Windows build + + libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's + library header files exporting symbols/macros that should be kept private to + the KfW library. See ticket #5601 at https://krbdev.mit.edu/rt/ + +6.3 NTLM in system context uses wrong name + + NTLM authentication using SSPI (on Windows) when (lib)curl is running in + "system context" will make it use wrong(?) user name - at least when compared + to what winhttp does. See https://curl.haxx.se/bug/view.cgi?id=535 + +6.4 Negotiate and Kerberos V5 need a fake user name + + In order to get Negotiate (SPNEGO) authentication to work in HTTP or Kerberos + V5 in the e-mail protocols, you need to provide a (fake) user name (this + concerns both curl and the lib) because the code wrongly only considers + authentication if there's a user name provided by setting + conn->bits.user_passwd in url.c https://curl.haxx.se/bug/view.cgi?id=440 How? + https://curl.haxx.se/mail/lib-2004-08/0182.html A possible solution is to + either modify this variable to be set or introduce a variable such as + new conn->bits.want_authentication which is set when any of the authentication + options are set. + +6.5 NTLM doesn't support password with § character + + https://github.com/curl/curl/issues/2120 + +6.6 libcurl can fail to try alternatives with --proxy-any + + When connecting via a proxy using --proxy-any, a failure to establish an + authentication will cause libcurl to abort trying other options if the + failed method has a higher preference than the alternatives. As an example, + --proxy-any against a proxy which advertise Negotiate and NTLM, but which + fails to set up Kerberos authentication won't proceed to try authentication + using NTLM. + + https://github.com/curl/curl/issues/876 + +6.7 Don't clear digest for single realm + + https://github.com/curl/curl/issues/3267 + +6.8 RTSP authentication breaks without redirect support + + RTSP authentication broke in 7.66.0. A work-around is to enable RTSP in + CURLOPT_REDIR_PROTOCOLS. Authentication should however not be considered an + actual redirect so a "proper" fix needs to be different and not require users + to allow redirects to RTSP to work. + + See https://github.com/curl/curl/pull/4750 + +7. FTP + +7.1 FTP without or slow 220 response + + If a connection is made to a FTP server but the server then just never sends + the 220 response or otherwise is dead slow, libcurl will not acknowledge the + connection timeout during that phase but only the "real" timeout - which may + surprise users as it is probably considered to be the connect phase to most + people. Brought up (and is being misunderstood) in: + https://curl.haxx.se/bug/view.cgi?id=856 + +7.2 FTP with CONNECT and slow server + + When doing FTP over a socks proxy or CONNECT through HTTP proxy and the multi + interface is used, libcurl will fail if the (passive) TCP connection for the + data transfer isn't more or less instant as the code does not properly wait + for the connect to be confirmed. See test case 564 for a first shot at a test + case. + +7.3 FTP with NOBODY and FAILONERROR + + It seems sensible to be able to use CURLOPT_NOBODY and CURLOPT_FAILONERROR + with FTP to detect if a file exists or not, but it is not working: + https://curl.haxx.se/mail/lib-2008-07/0295.html + +7.4 FTP with ACCT + + When doing an operation over FTP that requires the ACCT command (but not when + logging in), the operation will fail since libcurl doesn't detect this and + thus fails to issue the correct command: + https://curl.haxx.se/bug/view.cgi?id=635 + +7.5 ASCII FTP + + FTP ASCII transfers do not follow RFC959. They don't convert the data + accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1 + clearly describes how this should be done: + + The sender converts the data from an internal character representation to + the standard 8-bit NVT-ASCII representation (see the Telnet + specification). The receiver will convert the data from the standard + form to his own internal form. + + Since 7.15.4 at least line endings are converted. + +7.6 FTP with NULs in URL parts + + FTP URLs passed to curl may contain NUL (0x00) in the RFC 1738 , + , and components, encoded as "%00". The problem is that + curl_unescape does not detect this, but instead returns a shortened C string. + From a strict FTP protocol standpoint, NUL is a valid character within RFC + 959 , so the way to handle this correctly in curl would be to use a + data structure other than a plain C string, one that can handle embedded NUL + characters. From a practical standpoint, most FTP servers would not + meaningfully support NUL characters within RFC 959 , anyway (e.g., + Unix pathnames may not contain NUL). + +7.7 FTP and empty path parts in the URL + + libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that + such parts should be sent to the server as 'CWD ' (without an argument). The + only exception to this rule, is that we knowingly break this if the empty + part is first in the path, as then we use the double slashes to indicate that + the user wants to reach the root dir (this exception SHALL remain even when + this bug is fixed). + +7.8 Premature transfer end but healthy control channel + + When 'multi_done' is called before the transfer has been completed the normal + way, it is considered a "premature" transfer end. In this situation, libcurl + closes the connection assuming it doesn't know the state of the connection so + it can't be reused for subsequent requests. + + With FTP however, this isn't necessarily true but there are a bunch of + situations (listed in the ftp_done code) where it *could* keep the connection + alive even in this situation - but the current code doesn't. Fixing this would + allow libcurl to reuse FTP connections better. + +7.9 Passive transfer tries only one IP address + + When doing FTP operations through a proxy at localhost, the reported spotted + that curl only tried to connect once to the proxy, while it had multiple + addresses and a failed connect on one address should make it try the next. + + After switching to passive mode (EPSV), curl should try all IP addresses for + "localhost". Currently it tries ::1, but it should also try 127.0.0.1. + + See https://github.com/curl/curl/issues/1508 + +7.10 FTPS needs session reuse + + When the control connection is reused for a subsequent transfer, some FTPS + servers complain about "missing session reuse" for the data channel for the + second transfer. + + https://github.com/curl/curl/issues/4654 + +8. TELNET + +8.1 TELNET and time limitations don't work + + When using telnet, the time limitation options don't work. + https://curl.haxx.se/bug/view.cgi?id=846 + +8.2 Microsoft telnet server + + There seems to be a problem when connecting to the Microsoft telnet server. + https://curl.haxx.se/bug/view.cgi?id=649 + + +9. SFTP and SCP + +9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct + + When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP server + using the multi interface, the commands are not being sent correctly and + instead the connection is "cancelled" (the operation is considered done) + prematurely. There is a half-baked (busy-looping) patch provided in the bug + report but it cannot be accepted as-is. See + https://curl.haxx.se/bug/view.cgi?id=748 + +9.2 wolfssh: publickey auth doesn't work + + When building curl to use the wolfSSH backend for SFTP, the publickey + authentication doesn't work. This is simply functionality not written for curl + yet, the necessary API for make this work is provided by wolfSSH. + + See https://github.com/curl/curl/issues/4820 + +10. SOCKS + +10.3 FTPS over SOCKS + + libcurl doesn't support FTPS over a SOCKS proxy. + +10.4 active FTP over a SOCKS + + libcurl doesn't support active FTP over a SOCKS proxy + + +11. Internals + +11.1 Curl leaks .onion hostnames in DNS + + Curl sends DNS requests for hostnames with a .onion TLD. This leaks + information about what the user is attempting to access, and violates this + requirement of RFC7686: https://tools.ietf.org/html/rfc7686 + + Issue: https://github.com/curl/curl/issues/543 + +11.2 error buffer not set if connection to multiple addresses fails + + If you ask libcurl to resolve a hostname like example.com to IPv6 addresses + only. But you only have IPv4 connectivity. libcurl will correctly fail with + CURLE_COULDNT_CONNECT. But the error buffer set by CURLOPT_ERRORBUFFER + remains empty. Issue: https://github.com/curl/curl/issues/544 + +11.3 c-ares deviates from stock resolver on http://1346569778 + + When using the socket resolvers, that URL becomes: + + * Rebuilt URL to: http://1346569778/ + * Trying 80.67.6.50... + + but with c-ares it instead says "Could not resolve: 1346569778 (Domain name + not found)" + + See https://github.com/curl/curl/issues/893 + +11.4 HTTP test server 'connection-monitor' problems + + The 'connection-monitor' feature of the sws HTTP test server doesn't work + properly if some tests are run in unexpected order. Like 1509 and then 1525. + + See https://github.com/curl/curl/issues/868 + +11.5 Connection information when using TCP Fast Open + + CURLINFO_LOCAL_PORT (and possibly a few other) fails when TCP Fast Open is + enabled. + + See https://github.com/curl/curl/issues/1332 and + https://github.com/curl/curl/issues/4296 + +11.6 slow connect to localhost on Windows + + When connecting to "localhost" on Windows, curl will resolve the name for + both ipv4 and ipv6 and try to connect to both happy eyeballs-style. Something + in there does however make it take 200 milliseconds to succeed - which is the + HAPPY_EYEBALLS_TIMEOUT define exactly. Lowering that define speeds up the + connection, suggesting a problem in the HE handling. + + If we can *know* that we're talking to a local host, we should lower the + happy eyeballs delay timeout for IPv6 (related: hardcode the "localhost" + addresses, mentioned in TODO). Possibly we should reduce that delay for all. + + https://github.com/curl/curl/issues/2281 + +11.7 signal-based resolver timeouts + + libcurl built without an asynchronous resolver library uses alarm() to time + out DNS lookups. When a timeout occurs, this causes libcurl to jump from the + signal handler back into the library with a sigsetjmp, which effectively + causes libcurl to continue running within the signal handler. This is + non-portable and could cause problems on some platforms. A discussion on the + problem is available at https://curl.haxx.se/mail/lib-2008-09/0197.html + + Also, alarm() provides timeout resolution only to the nearest second. alarm + ought to be replaced by setitimer on systems that support it. + +11.8 DoH leaks memory after followlocation + + https://github.com/curl/curl/issues/4592 + +11.9 DoH doesn't inherit all transfer options + + https://github.com/curl/curl/issues/4578 + +11.10 Blocking socket operations in non-blocking API + + The list of blocking socket operations is in TODO section "More non-blocking". + +11.11 A shared connection cache is not thread-safe + + The share interface offers CURL_LOCK_DATA_CONNECT to have multiple easy + handle share a connection cache, but due to how connections are used they are + still not thread-safe when used shared. + + See https://github.com/curl/curl/issues/4915 and lib1541.c + +11.12 'no_proxy' string-matches IPv6 numerical addreses + + This has the downside that "::1" for example doesn't match "::0:1" even + though they are in fact the same address. + + See https://github.com/curl/curl/issues/5745 + +12. LDAP and OpenLDAP + +12.1 OpenLDAP hangs after returning results + + By configuration defaults, openldap automatically chase referrals on + secondary socket descriptors. The OpenLDAP backend is asynchronous and thus + should monitor all socket descriptors involved. Currently, these secondary + descriptors are not monitored, causing openldap library to never receive + data from them. + + As a temporary workaround, disable referrals chasing by configuration. + + The fix is not easy: proper automatic referrals chasing requires a + synchronous bind callback and monitoring an arbitrary number of socket + descriptors for a single easy handle (currently limited to 5). + + Generic LDAP is synchronous: OK. + + See https://github.com/curl/curl/issues/622 and + https://curl.haxx.se/mail/lib-2016-01/0101.html + +12.2 LDAP on Windows does authentication wrong? + + https://github.com/curl/curl/issues/3116 + +12.3 LDAP on Windows doesn't work + + A simple curl command line getting "ldap://ldap.forumsys.com" returns an + error that says "no memory" ! + + https://github.com/curl/curl/issues/4261 + +13. TCP/IP + +13.1 --interface for ipv6 binds to unusable IP address + + Since IPv6 provides a lot of addresses with different scope, binding to an + IPv6 address needs to take the proper care so that it doesn't bind to a + locally scoped address as that is bound to fail. + + https://github.com/curl/curl/issues/686 + +14. DICT + +14.1 DICT responses show the underlying protocol + + When getting a DICT response, the protocol parts of DICT aren't stripped off + from the output. + + https://github.com/curl/curl/issues/1809 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MAIL-ETIQUETTE b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MAIL-ETIQUETTE new file mode 100644 index 00000000..9d210a65 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MAIL-ETIQUETTE @@ -0,0 +1,285 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +MAIL ETIQUETTE + + 1. About the lists + 1.1 Mailing Lists + 1.2 Netiquette + 1.3 Do Not Mail a Single Individual + 1.4 Subscription Required + 1.5 Moderation of new posters + 1.6 Handling trolls and spam + 1.7 How to unsubscribe + 1.8 I posted, now what? + 1.9 Your emails are public + + 2. Sending mail + 2.1 Reply or New Mail + 2.2 Reply to the List + 2.3 Use a Sensible Subject + 2.4 Do Not Top-Post + 2.5 HTML is not for mails + 2.6 Quoting + 2.7 Digest + 2.8 Please Tell Us How You Solved The Problem! + +============================================================================== + +1. About the lists + + 1.1 Mailing Lists + + The mailing lists we have are all listed and described at + https://curl.haxx.se/mail/ + + Each mailing list is targeted to a specific set of users and subjects, + please use the one or the ones that suit you the most. + + Each mailing list has hundreds up to thousands of readers, meaning that + each mail sent will be received and read by a very large number of people. + People from various cultures, regions, religions and continents. + + 1.2 Netiquette + + Netiquette is a common term for how to behave on the internet. Of course, in + each particular group and subculture there will be differences in what is + acceptable and what is considered good manners. + + This document outlines what we in the curl project consider to be good + etiquette, and primarily this focus on how to behave on and how to use our + mailing lists. + + 1.3 Do Not Mail a Single Individual + + Many people send one question to one person. One person gets many mails, and + there is only one person who can give you a reply. The question may be + something that other people would also like to ask. These other people have + no way to read the reply, but to ask the one person the question. The one + person consequently gets overloaded with mail. + + If you really want to contact an individual and perhaps pay for his or her + services, by all means go ahead, but if it's just another curl question, + take it to a suitable list instead. + + 1.4 Subscription Required + + All curl mailing lists require that you are subscribed to allow a mail to go + through to all the subscribers. + + If you post without being subscribed (or from a different mail address than + the one you are subscribed with), your mail will simply be silently + discarded. You have to subscribe first, then post. + + The reason for this unfortunate and strict subscription policy is of course + to stop spam from pestering the lists. + + 1.5 Moderation of new posters + + Several of the curl mailing lists automatically make all posts from new + subscribers be moderated. This means that after you've subscribed and + sent your first mail to a list, that mail will not be let through to the + list until a mailing list administrator has verified that it is OK and + permits it to get posted. + + Once a first post has been made that proves the sender is actually talking + about curl-related subjects, the moderation "flag" will be switched off and + future posts will go through without being moderated. + + The reason for this moderation policy is that we do suffer from spammers who + actually subscribe and send spam to our lists. + + 1.6 Handling trolls and spam + + Despite our good intentions and hard work to keep spam off the lists and to + maintain a friendly and positive atmosphere, there will be times when spam + and or trolls get through. + + Troll - "someone who posts inflammatory, extraneous, or off-topic messages + in an online community" + + Spam - "use of electronic messaging systems to send unsolicited bulk + messages" + + No matter what, we NEVER EVER respond to trolls or spammers on the list. If + you believe the list admin should do something in particular, contact him/her + off-list. The subject will be taken care of as much as possible to prevent + repeated offenses, but responding on the list to such messages never leads to + anything good and only puts the light even more on the offender: which was + the entire purpose of it getting sent to the list in the first place. + + Don't feed the trolls! + + 1.7 How to unsubscribe + + You can unsubscribe the same way you subscribed in the first place. You go + to the page for the particular mailing list you're subscribed to and you enter + your email address and password and press the unsubscribe button. + + Also, the instructions to unsubscribe are included in the headers of every + mail that is sent out to all curl related mailing lists and there's a footer + in each mail that links to the "admin" page on which you can unsubscribe and + change other options. + + You NEVER EVER email the mailing list requesting someone else to take you off + the list. + + 1.8 I posted, now what? + + If you aren't subscribed with the exact same email address that you used to + send the email, your post will just be silently discarded. + + If you posted for the first time to the mailing list, you first need to wait + for an administrator to allow your email to go through (moderated). This normally + happens very quickly but in case we're asleep, you may have to wait a few + hours. + + Once your email goes through it is sent out to several hundred or even + thousands of recipients. Your email may cover an area that not that many people + know about or are interested in. Or possibly the person who knows about it + is on vacation or under a very heavy work load right now. You may have to wait + for a response and you should not expect to get a response at all, but + hopefully you get an answer within a couple of days. + + You do yourself and all of us a service when you include as many details as + possible already in your first email. Mention your operating system and + environment. Tell us which curl version you're using and tell us what you + did, what happened and what you expected would happen. Preferably, show us + what you did with details enough to allow others to help point out the problem + or repeat the same steps in their locations. + + Failing to include details will only delay responses and make people respond + and ask for more details and you will have to send a follow-up email that + includes them. + + Expect the responses to primarily help YOU debug the issue, or ask YOU + questions that can lead you or others towards a solution or explanation to + whatever you experience. + + If you are a repeat offender to the guidelines outlined in this document, + chances are that people will ignore you at will and your chances to get + responses in the future will greatly diminish. + + 1.9 Your emails are public + + Your email, its contents and all its headers and the details in those + headers will be received by every subscriber of the mailing list that you + send your email to. + + Your email as sent to a curl mailing list will end up in mail archives, on + the curl website and elsewhere, for others to see and read. Today and in + the future. In addition to the archives, the mail is sent out to thousands + of individuals. There is no way to undo a sent email. + + When sending emails to a curl mailing list, do not include sensitive + information such as user names and passwords; use fake ones, temporary ones + or just remove them completely from the mail. Note that this includes base64 + encoded HTTP Basic auth headers. + + This public nature of the curl mailing lists makes automatically inserted mail + footers about mails being "private" or "only meant for the recipient" or + similar even more silly than usual. Because they are absolutely not private + when sent to a public mailing list. + + +2. Sending mail + + 2.1 Reply or New Mail + + Please do not reply to an existing message as a short-cut to post a message + to the lists. + + Many mail programs and web archivers use information within mails to keep + them together as "threads", as collections of posts that discuss a certain + subject. If you don't intend to reply on the same or similar subject, don't + just hit reply on an existing mail and change subject, create a new mail. + + 2.2 Reply to the List + + When replying to a message from the list, make sure that you do "group + reply" or "reply to all", and not just reply to the author of the single + mail you reply to. + + We're actively discouraging replying back to the single person by setting + the Reply-To: field in outgoing mails back to the mailing list address, + making it harder for people to mail the author directly, if only by mistake. + + 2.3 Use a Sensible Subject + + Please use a subject of the mail that makes sense and that is related to the + contents of your mail. It makes it a lot easier to find your mail afterwards + and it makes it easier to track mail threads and topics. + + 2.4 Do Not Top-Post + + If you reply to a message, don't use top-posting. Top-posting is when you + write the new text at the top of a mail and you insert the previous quoted + mail conversation below. It forces users to read the mail in a backwards + order to properly understand it. + + This is why top posting is so bad (in top posting order): + + A: Because it messes up the order in which people normally read text. + Q: Why is top-posting such a bad thing? + A: Top-posting. + Q: What is the most annoying thing in e-mail? + + Apart from the screwed up read order (especially when mixed together in a + thread when someone responds using the mandated bottom-posting style), it + also makes it impossible to quote only parts of the original mail. + + When you reply to a mail. You let the mail client insert the previous mail + quoted. Then you put the cursor on the first line of the mail and you move + down through the mail, deleting all parts of the quotes that don't add + context for your comments. When you want to add a comment you do so, inline, + right after the quotes that relate to your comment. Then you continue + downwards again. + + When most of the quotes have been removed and you've added your own words, + you're done! + + 2.5 HTML is not for mails + + Please switch off those HTML encoded messages. You can mail all those funny + mails to your friends. We speak plain text mails. + + 2.6 Quoting + + Quote as little as possible. Just enough to provide the context you cannot + leave out. A lengthy description can be found here: + + https://www.netmeister.org/news/learn2quote.html + + 2.7 Digest + + We allow subscribers to subscribe to the "digest" version of the mailing + lists. A digest is a collection of mails lumped together in one single mail. + + Should you decide to reply to a mail sent out as a digest, there are two + things you MUST consider if you really really cannot subscribe normally + instead: + + Cut off all mails and chatter that is not related to the mail you want to + reply to. + + Change the subject name to something sensible and related to the subject, + preferably even the actual subject of the single mail you wanted to reply to + + 2.8 Please Tell Us How You Solved The Problem! + + Many people mail questions to the list, people spend some of their time and + make an effort in providing good answers to these questions. + + If you are the one who asks, please consider responding once more in case + one of the hints was what solved your problems. The guys who write answers + feel good to know that they provided a good answer and that you fixed the + problem. Far too often, the person who asked the question is never heard from + again, and we never get to know if he/she is gone because the problem was + solved or perhaps because the problem was unsolvable! + + Getting the solution posted also helps other users that experience the same + problem(s). They get to see (possibly in the web archives) that the + suggested fixes actually has helped at least one person. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MQTT.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MQTT.md new file mode 100644 index 00000000..741b0729 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/MQTT.md @@ -0,0 +1,29 @@ +# MQTT in curl + +## Usage + +A plain "GET" subscribes to the topic and prints all published messages. +Doing a "POST" publishes the post data to the topic and exits. + +Example subscribe: + + curl mqtt://host/home/bedroom/temp + +Example publish: + + curl -d 75 mqtt://host/home/bedroom/dimmer + +## What does curl deliver as a response to a subscribe + +It outputs two bytes topic length (MSB | LSB), the topic followed by the +payload. + +## Caveats + +Remaining limitations: + - No username support + - Only QoS level 0 is implemented for publish + - No way to set retain flag for publish + - No username/password support + - No TLS (mqtts) support + - Naive EAGAIN handling won't handle split messages diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.am b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.am new file mode 100644 index 00000000..b7d17922 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.am @@ -0,0 +1,123 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +AUTOMAKE_OPTIONS = foreign no-dependencies + +# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable +# but distribute it (using the relative file name) in the next variable +man_MANS = $(abs_builddir)/curl.1 +noinst_man_MANS = curl.1 mk-ca-bundle.1 +dist_man_MANS = curl-config.1 +GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html +PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf +MANDISTPAGES = curl.1.dist curl-config.1.dist + +HTMLPAGES = $(GENHTMLPAGES) index.html + +# Build targets in this file (.) before cmdline-opts to ensure that +# the curl.1 rule below runs first +SUBDIRS = . cmdline-opts +DIST_SUBDIRS = $(SUBDIRS) examples libcurl + +CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1 + +EXTRA_DIST = \ + $(noinst_man_MANS) \ + ALTSVC.md \ + BINDINGS.md \ + BUG-BOUNTY.md \ + BUGS.md \ + CHECKSRC.md \ + CIPHERS.md \ + CMakeLists.txt \ + CODE_OF_CONDUCT.md \ + CODE_REVIEW.md \ + CODE_STYLE.md \ + CONTRIBUTE.md \ + CURL-DISABLE.md \ + DEPRECATE.md \ + DYNBUF.md \ + ECH.md \ + EXPERIMENTAL.md \ + FAQ \ + FEATURES \ + GOVERNANCE.md \ + HELP-US.md \ + HISTORY.md \ + HTTP-COOKIES.md \ + HTTP2.md \ + HTTP3.md \ + INSTALL \ + INSTALL.cmake \ + INSTALL.md \ + INTERNALS.md \ + KNOWN_BUGS \ + MAIL-ETIQUETTE \ + MQTT.md \ + options-in-versions \ + PARALLEL-TRANSFERS.md \ + README.md \ + RELEASE-PROCEDURE.md \ + ROADMAP.md \ + SECURITY-PROCESS.md \ + SSL-PROBLEMS.md \ + SSLCERTS.md \ + THANKS \ + TODO \ + TheArtOfHttpScripting.md \ + VERSIONS.md + +MAN2HTML= roffit $< >$@ + +SUFFIXES = .1 .html .pdf + +# $(abs_builddir) is to disable VPATH when searching for this file, which +# would otherwise find the copy in $(srcdir) which breaks the $(HUGE) +# rule in src/Makefile.am in out-of-tree builds that references the file in the +# build directory. +# +# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree +# build), then run make recursively to rebuild it only if its dependencies +# have changed. +$(abs_builddir)/curl.1: + if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \ + $(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi + cd cmdline-opts && $(MAKE) + +html: $(HTMLPAGES) + cd libcurl && $(MAKE) html + +pdf: $(PDFPAGES) + cd libcurl && $(MAKE) pdf + +.1.html: + $(MAN2HTML) + +.1.pdf: + @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ + groff -Tps -man $< >$$foo.ps; \ + ps2pdf $$foo.ps $@; \ + rm $$foo.ps; \ + echo "converted $< to $@") + +distclean: + rm -f $(CLEANFILES) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.in new file mode 100644 index 00000000..368a6e09 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/Makefile.in @@ -0,0 +1,921 @@ +# Makefile.in generated by automake 1.16.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = docs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ + $(top_srcdir)/m4/curl-confopts.m4 \ + $(top_srcdir)/m4/curl-functions.m4 \ + $(top_srcdir)/m4/curl-openssl.m4 \ + $(top_srcdir)/m4/curl-override.m4 \ + $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/xc-am-iface.m4 \ + $(top_srcdir)/m4/xc-cc-check.m4 \ + $(top_srcdir)/m4/xc-lt-iface.m4 \ + $(top_srcdir)/m4/xc-translit.m4 \ + $(top_srcdir)/m4/xc-val-flgs.m4 \ + $(top_srcdir)/m4/zz40-xc-ovr.m4 \ + $(top_srcdir)/m4/zz50-xc-ovr.m4 \ + $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +depcomp = +am__maybe_remake_depfiles = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +MANS = $(dist_man_MANS) $(man_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in INSTALL \ + THANKS TODO +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AR_FLAGS = @AR_FLAGS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@ +CURLVERSION = @CURLVERSION@ +CURL_CA_BUNDLE = @CURL_CA_BUNDLE@ +CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@ +CURL_DISABLE_DICT = @CURL_DISABLE_DICT@ +CURL_DISABLE_FILE = @CURL_DISABLE_FILE@ +CURL_DISABLE_FTP = @CURL_DISABLE_FTP@ +CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@ +CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@ +CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@ +CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@ +CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@ +CURL_DISABLE_MQTT = @CURL_DISABLE_MQTT@ +CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@ +CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@ +CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@ +CURL_DISABLE_SMB = @CURL_DISABLE_SMB@ +CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@ +CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@ +CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ +CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ +CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ +CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_SHARED = @ENABLE_SHARED@ +ENABLE_STATIC = @ENABLE_STATIC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ +GCOV = @GCOV@ +GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ +HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ +HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ +HAVE_ZSTD = @HAVE_ZSTD@ +IDN_ENABLED = @IDN_ENABLED@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCURL_LIBS = @LIBCURL_LIBS@ +LIBCURL_NO_SHARED = @LIBCURL_NO_SHARED@ +LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@ +LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@ +LIBMETALINK_LIBS = @LIBMETALINK_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MANOPT = @MANOPT@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NROFF = @NROFF@ +NSS_LIBS = @NSS_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKGADD_NAME = @PKGADD_NAME@ +PKGADD_PKG = @PKGADD_PKG@ +PKGADD_VENDOR = @PKGADD_VENDOR@ +PKGCONFIG = @PKGCONFIG@ +RANDOM_FILE = @RANDOM_FILE@ +RANLIB = @RANLIB@ +REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ +SSL_ENABLED = @SSL_ENABLED@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +SUPPORT_FEATURES = @SUPPORT_FEATURES@ +SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ +USE_ARES = @USE_ARES@ +USE_BEARSSL = @USE_BEARSSL@ +USE_GNUTLS = @USE_GNUTLS@ +USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ +USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ +USE_LIBSSH2 = @USE_LIBSSH2@ +USE_MBEDTLS = @USE_MBEDTLS@ +USE_MESALINK = @USE_MESALINK@ +USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_GNUTLS = @USE_NGTCP2_CRYPTO_GNUTLS@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ +USE_NSS = @USE_NSS@ +USE_OPENLDAP = @USE_OPENLDAP@ +USE_QUICHE = @USE_QUICHE@ +USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ +USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ +USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSH = @USE_WOLFSSH@ +USE_WOLFSSL = @USE_WOLFSSL@ +VERSION = @VERSION@ +VERSIONNUM = @VERSIONNUM@ +ZLIB_LIBS = @ZLIB_LIBS@ +ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libext = @libext@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign no-dependencies + +# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable +# but distribute it (using the relative file name) in the next variable +man_MANS = $(abs_builddir)/curl.1 +noinst_man_MANS = curl.1 mk-ca-bundle.1 +dist_man_MANS = curl-config.1 +GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html +PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf +MANDISTPAGES = curl.1.dist curl-config.1.dist +HTMLPAGES = $(GENHTMLPAGES) index.html + +# Build targets in this file (.) before cmdline-opts to ensure that +# the curl.1 rule below runs first +SUBDIRS = . cmdline-opts +DIST_SUBDIRS = $(SUBDIRS) examples libcurl +CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1 +EXTRA_DIST = \ + $(noinst_man_MANS) \ + ALTSVC.md \ + BINDINGS.md \ + BUG-BOUNTY.md \ + BUGS.md \ + CHECKSRC.md \ + CIPHERS.md \ + CMakeLists.txt \ + CODE_OF_CONDUCT.md \ + CODE_REVIEW.md \ + CODE_STYLE.md \ + CONTRIBUTE.md \ + CURL-DISABLE.md \ + DEPRECATE.md \ + DYNBUF.md \ + ECH.md \ + EXPERIMENTAL.md \ + FAQ \ + FEATURES \ + GOVERNANCE.md \ + HELP-US.md \ + HISTORY.md \ + HTTP-COOKIES.md \ + HTTP2.md \ + HTTP3.md \ + INSTALL \ + INSTALL.cmake \ + INSTALL.md \ + INTERNALS.md \ + KNOWN_BUGS \ + MAIL-ETIQUETTE \ + MQTT.md \ + options-in-versions \ + PARALLEL-TRANSFERS.md \ + README.md \ + RELEASE-PROCEDURE.md \ + ROADMAP.md \ + SECURITY-PROCESS.md \ + SSL-PROBLEMS.md \ + SSLCERTS.md \ + THANKS \ + TODO \ + TheArtOfHttpScripting.md \ + VERSIONS.md + +MAN2HTML = roffit $< >$@ +SUFFIXES = .1 .html .pdf +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .1 .html .pdf +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign docs/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-man1: $(dist_man_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-man uninstall-man1 + +.PRECIOUS: Makefile + + +# $(abs_builddir) is to disable VPATH when searching for this file, which +# would otherwise find the copy in $(srcdir) which breaks the $(HUGE) +# rule in src/Makefile.am in out-of-tree builds that references the file in the +# build directory. +# +# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree +# build), then run make recursively to rebuild it only if its dependencies +# have changed. +$(abs_builddir)/curl.1: + if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \ + $(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi + cd cmdline-opts && $(MAKE) + +html: $(HTMLPAGES) + cd libcurl && $(MAKE) html + +pdf: $(PDFPAGES) + cd libcurl && $(MAKE) pdf + +.1.html: + $(MAN2HTML) + +.1.pdf: + @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ + groff -Tps -man $< >$$foo.ps; \ + ps2pdf $$foo.ps $@; \ + rm $$foo.ps; \ + echo "converted $< to $@") + +distclean: + rm -f $(CLEANFILES) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/PARALLEL-TRANSFERS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/PARALLEL-TRANSFERS.md new file mode 100644 index 00000000..da688ea0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/PARALLEL-TRANSFERS.md @@ -0,0 +1,58 @@ +# Parallel transfers + +curl 7.66.0 introduces support for doing multiple transfers simultaneously; in +parallel. + +## -Z, --parallel + +When this command line option is used, curl will perform the transfers given +to it at the same time. It will do up to `--parallel-max` concurrent +transfers, with a default value of 50. + +## Progress meter + +The progress meter that is displayed when doing parallel transfers is +completely different than the regular one used for each single transfer. + + It shows: + + o percent download (if known, which means *all* transfers need to have a + known size) + o percent upload (if known, with the same caveat as for download) + o total amount of downloaded data + o total amount of uploaded data + o number of transfers to perform + o number of concurrent transfers being transferred right now + o number of transfers queued up waiting to start + o total time all transfers are expected to take (if sizes are known) + o current time the transfers have spent so far + o estimated time left (if sizes are known) + o current transfer speed (the faster of UL/DL speeds measured over the last + few seconds) + +Example: + + DL% UL% Dled Uled Xfers Live Qd Total Current Left Speed + 72 -- 37.9G 0 101 30 23 0:00:55 0:00:34 0:00:22 2752M + +## Behavior differences + +Connections are shared fine between different easy handles, but the +"authentication contexts" are not. So for example doing HTTP Digest auth with +one handle for a particular transfer and then continue on with another handle +that reuses the same connection, the second handle can't send the necessary +Authorization header at once since the context is only kept in the original +easy handle. + +To fix this, the authorization state could be made possible to share with the +share API as well, as a context per origin + path (realm?) basically. + +Visible in test 153, 1412 and more. + +## Feedback! + +This is early days for parallel transfer support. Keep your eyes open for +unintended side effects or downright bugs. + +Tell us what you think and how you think we could improve this feature! + diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/README.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/README.md new file mode 100644 index 00000000..0521937d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/README.md @@ -0,0 +1,12 @@ +![curl logo](https://curl.haxx.se/logo/curl-logo.svg) + +# Documentation + +You'll find a mix of various documentation in this directory and +subdirectories, using several different formats. Some of them are not ideal +for reading directly in your browser. + +If you'd rather see the rendered version of the documentation, check out the +curl website's [documentation section](https://curl.haxx.se/docs/) for +general curl stuff or the [libcurl section](https://curl.haxx.se/libcurl/) for +libcurl related documentation. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/RELEASE-PROCEDURE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/RELEASE-PROCEDURE.md new file mode 100644 index 00000000..b53e5a39 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/RELEASE-PROCEDURE.md @@ -0,0 +1,110 @@ +curl release procedure - how to do a release +============================================ + +in the source code repo +----------------------- + +- run `./scripts/copyright.pl` and correct possible omissions + +- edit `RELEASE-NOTES` to be accurate + +- update `docs/THANKS` + +- make sure all relevant changes are committed on the master branch + +- tag the git repo in this style: `git tag -a curl-7_34_0`. -a annotates the + tag and we use underscores instead of dots in the version number. Make sure + the tag is GPG signed (using -s). + +- run "./maketgz 7.34.0" to build the release tarballs. It is important that + you run this on a machine with the correct set of autotools etc installed + as this is what then will be shipped and used by most users on \*nix like + systems. + +- push the git commits and the new tag + +- gpg sign the 4 tarballs as maketgz suggests + +- upload the 8 resulting files to the primary download directory + +in the curl-www repo +-------------------- + +- edit `Makefile` (version number and date), + +- edit `_newslog.html` (announce the new release) and + +- edit `_changes.html` (insert changes+bugfixes from RELEASE-NOTES) + +- commit all local changes + +- tag the repo with the same name as used for the source repo. + +- make sure all relevant changes are committed and pushed on the master branch + + (the website then updates its contents automatically) + +on github +--------- + +- edit the newly made release tag so that it is listed as the latest release + +inform +------ + +- send an email to curl-users, curl-announce and curl-library. Insert the + RELEASE-NOTES into the mail. + +celebrate +--------- + +- suitable beverage intake is encouraged for the festivities + +curl release scheduling +======================= + +Release Cycle +------------- + +We do releases every 8 weeks on Wednesdays. If critical problems arise, we can +insert releases outside of the schedule or we can move the release date - but +this is rare. + +Each 8 week release cycle is split in two 4-week periods. + +- During the first 4 weeks after a release, we allow new features and changes + to curl and libcurl. If we accept any such changes, we bump the minor number + used for the next release. + +- During the second 4-week period we do not merge any features or changes, we + then only focus on fixing bugs and polishing things to make a solid coming + release. + +- After a regular procedure-following release (made on Wednesdays), the + feature window remains closed until the following Monday in case of special + actions or patch releases etc. + +If a future release date happens to end up on a "bad date", like in the middle +of common public holidays or when the lead release manager is away traveling, +the release date can be moved forwards or backwards a full week. This is then +advertised well in advance. + +Coming dates +------------ + +Based on the description above, here are some planned release dates (at the +time of this writing): + +- August 19, 2020 (7.72.0) +- October 14, 2020 +- December 9, 2020 +- February 3, 2021 +- March 31, 2021 +- May 26, 2021 +- July 21, 2021 +- September 15, 2021 +- November 10, 2021 + +The above (and more) curl-related dates are published in +[iCalendar format](https://calendar.google.com/calendar/ical/c9u5d64odop9js55oltfarjk6g%40group.calendar.google.com/public/basic.ics) +as well. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ROADMAP.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ROADMAP.md new file mode 100644 index 00000000..574bd810 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/ROADMAP.md @@ -0,0 +1,19 @@ +curl the next few years - perhaps +================================= + +Roadmap of things Daniel Stenberg wants to work on next. It is intended to +serve as a guideline for others for information, feedback and possible +participation. + +HSTS +---- + + Merge [the existing PR](https://github.com/curl/curl/pull/5896). + +ECH (Encrypted Client Hello - formerly known as ESNI) +----------------------------------------------------- + + See Daniel's post on [Support of Encrypted + SNI](https://curl.haxx.se/mail/lib-2019-03/0000.html) on the mailing list. + + Initial work exists in https://github.com/curl/curl/pull/4011 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SECURITY-PROCESS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SECURITY-PROCESS.md new file mode 100644 index 00000000..d2ac1fd8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SECURITY-PROCESS.md @@ -0,0 +1,132 @@ +curl security process +===================== + +This document describes how security vulnerabilities should be handled in the +curl project. + +Publishing Information +---------------------- + +All known and public curl or libcurl related vulnerabilities are listed on +[the curl website security page](https://curl.haxx.se/docs/security.html). + +Security vulnerabilities **should not** be entered in the project's public bug +tracker. + +Vulnerability Handling +---------------------- + +The typical process for handling a new security vulnerability is as follows. + +No information should be made public about a vulnerability until it is +formally announced at the end of this process. That means, for example that a +bug tracker entry must NOT be created to track the issue since that will make +the issue public and it should not be discussed on any of the project's public +mailing lists. Also messages associated with any commits should not make any +reference to the security nature of the commit if done prior to the public +announcement. + +- The person discovering the issue, the reporter, reports the vulnerability on + [https://hackerone.com/curl](https://hackerone.com/curl). Issues filed there + reach a handful of selected and trusted people. + +- Messages that do not relate to the reporting or managing of an undisclosed + security vulnerability in curl or libcurl are ignored and no further action + is required. + +- A person in the security team responds to the original report to acknowledge + that a human has seen the report. + +- The security team investigates the report and either rejects it or accepts + it. + +- If the report is rejected, the team writes to the reporter to explain why. + +- If the report is accepted, the team writes to the reporter to let him/her + know it is accepted and that they are working on a fix. + +- The security team discusses the problem, works out a fix, considers the + impact of the problem and suggests a release schedule. This discussion + should involve the reporter as much as possible. + +- The release of the information should be "as soon as possible" and is most + often synchronized with an upcoming release that contains the fix. If the + reporter, or anyone else involved, thinks the next planned release is too + far away, then a separate earlier release should be considered. + +- Write a security advisory draft about the problem that explains what the + problem is, its impact, which versions it affects, solutions or workarounds, + when the release is out and make sure to credit all contributors properly. + Figure out the CWE (Common Weakness Enumeration) number for the flaw. + +- Request a CVE number from + [HackerOne](https://docs.hackerone.com/programs/cve-requests.html) + +- Consider informing + [distros@openwall](https://oss-security.openwall.org/wiki/mailing-lists/distros) + to prepare them about the upcoming public security vulnerability + announcement - attach the advisory draft for information. Note that + 'distros' won't accept an embargo longer than 14 days and they do not care + for Windows-specific flaws. + +- Update the "security advisory" with the CVE number. + +- The security team commits the fix in a private branch. The commit message + should ideally contain the CVE number. This fix is usually also distributed + to the 'distros' mailing list to allow them to use the fix prior to the + public announcement. + +- No more than 48 hours before the release, the private branch is merged into + the master branch and pushed. Once pushed, the information is accessible to + the public and the actual release should follow suit immediately afterwards. + The time between the push and the release is used for final tests and + reviews. + +- The project team creates a release that includes the fix. + +- The project team announces the release and the vulnerability to the world in + the same manner we always announce releases. It gets sent to the + curl-announce, curl-library and curl-users mailing lists. + +- The security web page on the website should get the new vulnerability + mentioned. + +curl-security (at haxx dot se) +------------------------------ + +This is a private mailing list for discussions on and about curl security +issues. + +Who is on this list? There are a couple of criteria you must meet, and then we +might ask you to join the list or you can ask to join it. It really isn't very +formal. We basically only require that you have a long-term presence in the +curl project and you have shown an understanding for the project and its way +of working. You must've been around for a good while and you should have no +plans in vanishing in the near future. + +We do not make the list of participants public mostly because it tends to vary +somewhat over time and a list somewhere will only risk getting outdated. + +Publishing Security Advisories +------------------------------ + +1. Write up the security advisory, using markdown syntax. Use the same + subtitles as last time to maintain consistency. + +2. Name the advisory file after the allocated CVE id. + +3. Add a line on the top of the array in `curl-www/docs/vuln.pm'. + +4. Put the new advisory markdown file in the curl-www/docs/ directory. Add it + to the git repo. + +5. Run `make` in your local web checkout and verify that things look fine. + +6. On security advisory release day, push the changes on the curl-www + repository's remote master branch. + +Bug Bounty +---------- + +See [BUG-BOUNTY](https://curl.haxx.se/docs/bugbounty.html) for details on the +bug bounty program. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSL-PROBLEMS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSL-PROBLEMS.md new file mode 100644 index 00000000..35000cf7 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSL-PROBLEMS.md @@ -0,0 +1,87 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +# SSL problems + + First, let's establish that we often refer to TLS and SSL interchangeably as + SSL here. The current protocol is called TLS, it was called SSL a long time + ago. + + There are several known reasons why a connection that involves SSL might + fail. This is a document that attempts to details the most common ones and + how to mitigate them. + +## CA certs + + CA certs are used to digitally verify the server's certificate. You need a + "ca bundle" for this. See lots of more details on this in the SSLCERTS + document. + +## CA bundle missing intermediate certificates + + When using said CA bundle to verify a server cert, you will experience + problems if your CA cert does not have the certificates for the + intermediates in the whole trust chain. + +## Protocol version + + Some broken servers fail to support the protocol negotiation properly that + SSL servers are supposed to handle. This may cause the connection to fail + completely. Sometimes you may need to explicitly select a SSL version to use + when connecting to make the connection succeed. + + An additional complication can be that modern SSL libraries sometimes are + built with support for older SSL and TLS versions disabled! + + All versions of SSL are considered insecure and should be avoided. Use TLS. + +## Ciphers + + Clients give servers a list of ciphers to select from. If the list doesn't + include any ciphers the server wants/can use, the connection handshake + fails. + + curl has recently disabled the user of a whole bunch of seriously insecure + ciphers from its default set (slightly depending on SSL backend in use). + + You may have to explicitly provide an alternative list of ciphers for curl + to use to allow the server to use a WEAK cipher for you. + + Note that these weak ciphers are identified as flawed. For example, this + includes symmetric ciphers with less than 128 bit keys and RC4. + + Schannel in Windows XP is not able to connect to servers that no longer + support the legacy handshakes and algorithms used by those versions, so we + advice against building curl to use Schannel on really old Windows versions. + + References: + + https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01 + +## Allow BEAST + + BEAST is the name of a TLS 1.0 attack that surfaced 2011. When adding means + to mitigate this attack, it turned out that some broken servers out there in + the wild didn't work properly with the BEAST mitigation in place. + + To make such broken servers work, the --ssl-allow-beast option was + introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability + but on the other hand it allows curl to connect to that kind of strange + servers. + +## Disabling certificate revocation checks + + Some SSL backends may do certificate revocation checks (CRL, OCSP, etc) + depending on the OS or build configuration. The --ssl-no-revoke option was + introduced in 7.44.0 to disable revocation checking but currently is only + supported for Schannel (the native Windows SSL library), with an exception + in the case of Windows' Untrusted Publishers block list which it seems can't + be bypassed. This option may have broader support to accommodate other SSL + backends in the future. + + References: + + https://curl.haxx.se/docs/ssl-compared.html diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSLCERTS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSLCERTS.md new file mode 100644 index 00000000..c991f67d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/SSLCERTS.md @@ -0,0 +1,173 @@ +SSL Certificate Verification +============================ + +SSL is TLS +---------- + +SSL is the old name. It is called TLS these days. + + +Native SSL +---------- + +If libcurl was built with Schannel or Secure Transport support (the native SSL +libraries included in Windows and Mac OS X), then this does not apply to +you. Scroll down for details on how the OS-native engines handle SSL +certificates. If you're not sure, then run "curl -V" and read the results. If +the version string says `Schannel` in it, then it was built with Schannel +support. + +It is about trust +----------------- + +This system is about trust. In your local CA certificate store you have certs +from *trusted* Certificate Authorities that you then can use to verify that the +server certificates you see are valid. They're signed by one of the CAs you +trust. + +Which CAs do you trust? You can decide to trust the same set of companies your +operating system trusts, or the set one of the known browsers trust. That's +basically trust via someone else you trust. You should just be aware that +modern operating systems and browsers are setup to trust *hundreds* of +companies and recent years several such CAs have been found untrustworthy. + +Certificate Verification +------------------------ + +libcurl performs peer SSL certificate verification by default. This is done +by using a CA certificate store that the SSL library can use to make sure the +peer's server certificate is valid. + +If you communicate with HTTPS, FTPS or other TLS-using servers using +certificates that are signed by CAs present in the store, you can be sure +that the remote server really is the one it claims to be. + +If the remote server uses a self-signed certificate, if you don't install a CA +cert store, if the server uses a certificate signed by a CA that isn't +included in the store you use or if the remote host is an impostor +impersonating your favorite site, and you want to transfer files from this +server, do one of the following: + + 1. Tell libcurl to *not* verify the peer. With libcurl you disable this with + `curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);` + + With the curl command line tool, you disable this with -k/--insecure. + + 2. Get a CA certificate that can verify the remote server and use the proper + option to point out this CA cert for verification when connecting. For + libcurl hackers: `curl_easy_setopt(curl, CURLOPT_CAINFO, cacert);` + + With the curl command line tool: --cacert [file] + + 3. Add the CA cert for your server to the existing default CA certificate + store. The default CA certificate store can be changed at compile time with + the following configure options: + + --with-ca-bundle=FILE: use the specified file as CA certificate store. CA + certificates need to be concatenated in PEM format into this file. + + --with-ca-path=PATH: use the specified path as CA certificate store. CA + certificates need to be stored as individual PEM files in this directory. + You may need to run c_rehash after adding files there. + + If neither of the two options is specified, configure will try to auto-detect + a setting. It's also possible to explicitly not hardcode any default store + but rely on the built in default the crypto library may provide instead. + You can achieve that by passing both --without-ca-bundle and + --without-ca-path to the configure script. + + If you use Internet Explorer, this is one way to get extract the CA cert + for a particular server: + + - View the certificate by double-clicking the padlock + - Find out where the CA certificate is kept (Certificate> + Authority Information Access>URL) + - Get a copy of the crt file using curl + - Convert it from crt to PEM using the openssl tool: + openssl x509 -inform DES -in yourdownloaded.crt \ + -out outcert.pem -text + - Add the 'outcert.pem' to the CA certificate store or use it stand-alone + as described below. + + If you use the 'openssl' tool, this is one way to get extract the CA cert + for a particular server: + + - `openssl s_client -showcerts -servername server -connect server:443 > cacert.pem` + - type "quit", followed by the "ENTER" key + - The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE" + markers. + - If you want to see the data in the certificate, you can do: "openssl + x509 -inform PEM -in certfile -text -out certdata" where certfile is + the cert you extracted from logfile. Look in certdata. + - If you want to trust the certificate, you can add it to your CA + certificate store or use it stand-alone as described. Just remember that + the security is no better than the way you obtained the certificate. + + 4. If you're using the curl command line tool, you can specify your own CA + cert file by setting the environment variable `CURL_CA_BUNDLE` to the path + of your choice. + + If you're using the curl command line tool on Windows, curl will search + for a CA cert file named "curl-ca-bundle.crt" in these directories and in + this order: + 1. application's directory + 2. current working directory + 3. Windows System directory (e.g. C:\windows\system32) + 4. Windows Directory (e.g. C:\windows) + 5. all directories along %PATH% + + 5. Get a better/different/newer CA cert bundle! One option is to extract the + one a recent Firefox browser uses by running 'make ca-bundle' in the curl + build tree root, or possibly download a version that was generated this + way for you: [CA Extract](https://curl.haxx.se/docs/caextract.html) + +Neglecting to use one of the above methods when dealing with a server using a +certificate that isn't signed by one of the certificates in the installed CA +certificate store, will cause SSL to report an error ("certificate verify +failed") during the handshake and SSL will then refuse further communication +with that server. + +Certificate Verification with NSS +--------------------------------- + +If libcurl was built with NSS support, then depending on the OS distribution, +it is probably required to take some additional steps to use the system-wide +CA cert db. RedHat ships with an additional module, libnsspem.so, which +enables NSS to read the OpenSSL PEM CA bundle. On openSUSE you can install +p11-kit-nss-trust which makes NSS use the system wide CA certificate store. NSS +also has a new [database format](https://wiki.mozilla.org/NSS_Shared_DB). + +Starting with version 7.19.7, libcurl automatically adds the 'sql:' prefix to +the certdb directory (either the hardcoded default /etc/pki/nssdb or the +directory configured with SSL_DIR environment variable). To check which certdb +format your distribution provides, examine the default certdb location: +/etc/pki/nssdb; the new certdb format can be identified by the filenames +cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db, +key3.db, secmod.db. + +Certificate Verification with Schannel and Secure Transport +----------------------------------------------------------- + +If libcurl was built with Schannel (Microsoft's native TLS engine) or Secure +Transport (Apple's native TLS engine) support, then libcurl will still perform +peer certificate verification, but instead of using a CA cert bundle, it will +use the certificates that are built into the OS. These are the same +certificates that appear in the Internet Options control panel (under Windows) +or Keychain Access application (under OS X). Any custom security rules for +certificates will be honored. + +Schannel will run CRL checks on certificates unless peer verification is +disabled. Secure Transport on iOS will run OCSP checks on certificates unless +peer verification is disabled. Secure Transport on OS X will run either OCSP +or CRL checks on certificates if those features are enabled, and this behavior +can be adjusted in the preferences of Keychain Access. + +HTTPS proxy +----------- + +Since version 7.52.0, curl can do HTTPS to the proxy separately from the +connection to the server. This TLS connection is handled separately from the +server connection so instead of `--insecure` and `--cacert` to control the +certificate verification, you use `--proxy-insecure` and `--proxy-cacert`. +With these options, you make sure that the TLS connection and the trust of the +proxy can be kept totally separate from the TLS connection to the server. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/THANKS b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/THANKS new file mode 100644 index 00000000..9e037eec --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/THANKS @@ -0,0 +1,2276 @@ + This project has been alive for many years. Countless people have provided + feedback that have improved curl. Here follows a list of people that have + contributed (a-z order). + + If you have contributed but are missing here, please let us know! + +1ocalhost on github +3dyd on github +Aaro Koskinen +Aaron Oneal +Aaron Orenstein +Aaron Scarisbrick +aasivov on github +Abram Pousada +accountantM on github +AceCrow on Github +Adam Barclay +Adam Brown +Adam Coyne +Adam D. Moss +Adam Langley +Adam Light +Adam Marcionek +Adam Piggott +Adam Sampson +Adam Tkac +Adnan Khan +adnn on github +Adrian Burcea +Adrian Peniak +Adrian Schuur +Adriano Meirelles +afrind on github +ahodesuka on github +Ajit Dhumale +Akhil Kedia +Aki Koskinen +Akos Pasztory +Akshay Vernekar +Alain Danteny +Alain Miniussi +Alan Jenkins +Alan Pinstein +Albert Chin-A-Young +Albert Choy +Alejandro Alvarez Ayllon +Alejandro R. Sedeño +Aleksandar Milivojevic +Aleksey Tulinov +Ales Mlakar +Ales Novak +Alessandro Ghedini +Alessandro Vesely +Alex aka WindEagle +Alex Baines +Alex Bligh +Alex Chan +Alex Fishman +Alex Gaynor +Alex Grebenschikov +Alex Gruz +Alex Kiernan +Alex Konev +Alex Malinovich +Alex Mayorga +Alex McLellan +Alex Neblett +Alex Nichols +Alex Potapenko +Alex Rousskov +Alex Samorukov +Alex Suykov +Alex Vinnik +Alexander Beedie +Alexander Dyagilev +Alexander Elgert +Alexander Klauer +Alexander Kourakos +Alexander Krasnostavsky +Alexander Lazic +Alexander Pepper +Alexander Peslyak +Alexander Sinditskiy +Alexander Traud +Alexander V. Tikhonov +Alexander Zhuravlev +Alexandre Pion +Alexey Borzov +Alexey Eremikhin +Alexey Melnichuk +Alexey Pesternikov +Alexey Simak +Alexey Zakhlestin +Alexis Carvalho +Alexis La Goutte +Alfonso Martone +Alfred Gebert +Allen Pulsifer +Alona Rossen +amishmm on github +Amit Katyal +Amol Pattekar +Amr Shahin +Anatol Belski +Anatoli Tubman +Anders Bakken +Anders Berg +Anders Gustafsson +Anders Havn +Anders Roxell +Anderson Sasaki +Anderson Toshiyuki Sasaki +Andi Jahja +Andre Guibert de Bruet +Andre Heinecke +Andreas Damm +Andreas Falkenhahn +Andreas Farber +Andreas Kostyrka +Andreas Malzahn +Andreas Ntaflos +Andreas Olsson +Andreas Rieke +Andreas Roth +Andreas Schneider +Andreas Schuldei +Andreas Streichardt +Andreas Wurf +Andrei Benea +Andrei Cipu +Andrei Karas +Andrei Kurushin +Andrei Neculau +Andrei Sedoi +Andrei Valeriu BICA +Andrei Virtosu +Andrej E Baranov +Andrew Barnes +Andrew Benham +Andrew Biggs +Andrew Bushnell +Andrew de los Reyes +Andrew Francis +Andrew Fuller +Andrew Ishchuk +Andrew Krieger +Andrew Kurushin +Andrew Lambert +Andrew Moise +Andrew Potter +Andrew Robbins +Andrew Wansink +Andrey Labunets +Andrii Moiseiev +Andrius Merkys +Andrés García +Andy Cedilnik +Andy Fiddaman +Andy Serpa +Andy Tsouladze +Angus Mackay +anio on github +anshnd on github +Antarpreet Singh +Anthon Pang +Anthony Avina +Anthony Bryan +Anthony G. Basile +Antoine Aubert +Antoine Calando +Anton Bychkov +Anton Gerasimov +Anton Kalmykov +Anton Malov +Anton Yabchinskiy +Antoni Villalonga +Antonio Larrosa +Antony74 on github +Antti Hätälä +arainchik on github +Archangel_SDY on github +Arkadiusz Miskiewicz +Armel Asselin +Arnaud Compan +Arnaud Ebalard +Arnaud Rebillout +Aron Bergman +Aron Rotteveel +Artak Galoyan +Arthur Murray +Arve Knudsen +Arvid Norberg +asavah on github +Ashish Shukla +Ashwin Metpalli +Ask Bjørn Hansen +Askar Safin +Ates Goral +Augustus Saunders +Austin Green +Avery Fay +Axel Tillequin +Ayoub Boudhar +Balaji Parasuram +Balaji S Rao +Balaji Salunke +Balazs Kovacsics +Balint Szilakszi +Barry Abrahamson +Barry Pollard +Bart Whiteley +Baruch Siach +Bas Mevissen +Bas van Schaik +Bastien Bouclet +Basuke Suzuki +baumanj on github +bdry on github +beckenc on github +Ben Boeckel +Ben Darnell +Ben Greear +Ben Kohler +Ben Madsen +Ben Noordhuis +Ben Van Hof +Ben Voris +Ben Winslow +Benbuck Nason +Benjamin Gerard +Benjamin Gilbert +Benjamin Johnson +Benjamin Kircher +Benjamin Ritcey +Benjamin Sergeant +Benoit Neil +Benoit Sigoure +Bernard Leak +Bernard Spil +Bernd Mueller +Bernhard Iselborn +Bernhard M. Wiedemann +Bernhard Reutner-Fischer +Bernhard Walle +Bert Huijben +Bertrand Demiddelaer +Bertrand Simonnet +Bevan Weiss +Bill Doyle +Bill Egert +Bill Hoffman +Bill Middlecamp +Bill Nagel +Bill Pyne +Billyzou0741326 on github +Bjarni Ingi Gislason +Bjoern Franke +Bjoern Sikora +Bjorn Augustsson +Bjorn Reese +Björn Stenberg +Blaise Potard +bnfp on github +Bob Relyea +Bob Richmond +Bob Schader +bobmitchell1956 on github +Bogdan Nicula +Brad Burdick +Brad Fitzpatrick +Brad Harder +Brad Hards +Brad King +Brad Spencer +Bradford Bruce +bramus on github +Brandon Casey +Brandon Dong +Brandon Wang +Brendan Jurd +Brent Beardsley +Brian Akins +Brian Bergeron +Brian Carpenter +Brian Chaplin +Brian Childs +Brian Chrisman +Brian Dessent +Brian E. Gallew +Brian Inglis +Brian J. Murrell +Brian Prodoehl +Brian R Duffy +Brian Ulm +Brock Noland +Bru Rom +Bruce Mitchener +Bruce Stephens +BrumBrum on hackerone +Bruno de Carvalho +Bruno Grasselli +Bruno Thomsen +Bryan Henderson +Bryan Kemp +bsammon on github +buzo-ffm on github +bxac on github +Bylon2 on github +Byrial Jensen +Caleb Raitto +Calvin Buckley +Cameron Cawley +Cameron Kaiser +Cameron MacMinn +Camille Moncelier +Caolan McNamara +Captain Basil +Carie Pointer +Carlo Cannas +Carlo Marcelo Arenas Belón +Carlo Teubner +Carlo Wood +Carlos ORyan +Carsten Lange +Casey O'Donnell +Catalin Patulea +causal-agent on github +cbartl on github +cclauss on github +Chad Monroe +Chandrakant Bagul +Charles Kerr +Charles Romestant +Chen Prog +Cherish98 on github +Chester Liu +Chih-Chung Chang +Chih-Hsuan Yen +Chris "Bob Bob" +Chris Araman +Chris Carlmar +Chris Combes +Chris Conlon +Chris Deidun +Chris Faherty +Chris Flerackers +Chris Gaukroger +Chris Maltby +Chris Mumford +Chris Paulson-Ellis +Chris Roberts +Chris Smowton +Chris Young +Christian Fillion +Christian Grothoff +Christian Heimes +Christian Hägele +Christian Krause +Christian Kurz +Christian Robottom Reis +Christian Schmitz +Christian Stewart +Christian Vogt +Christian Weisgerber +Christoph Krey +Christoph M. Becker +Christophe Demory +Christophe Dervieux +Christophe Legry +Christopher Conroy +Christopher Head +Christopher Palow +Christopher R. Palmer +Christopher Reid +Christopher Stone +Chungtsun Li +Ciprian Badescu +Claes Jakobsson +Clarence Gardner +Claudio Neves +clbr on github +Clemens Gruber +Cliff Crosland +Clifford Wolf +Clint Clayton +Clément Notin +cmfrolick on github +codesniffer13 on github +Cody Jones +Cody Mack +COFFEETALES on github +coinhubs on github +Colby Ranger +Colin Blair +Colin Hogben +Colin Watson +Colm Buckley +Constantine Sapuntzakis +Cory Benfield +Cory Nelson +Costya Shulyupin +Craig A West +Craig Andrews +Craig Davison +Craig de Stigter +Craig Markwardt +crazydef on github +Cris Bailiff +Cristian Greco +Cristian Rodríguez +Curt Bogmine +Cynthia Coan +Cyril B +Cyrill Osterwalder +Cédric Connes +Cédric Deltheil +D. Flinkmann +d912e3 on github +Da-Yoon Chung +daboul on github +Dag Ekengren +Dagobert Michelsen +Daiki Ueno +Dair Grant +Dambaev Alexander +Damian Dixon +Damien Adant +Damien Vielpeau +Dan Becker +Dan Cristian +Dan Donahue +Dan Fandrich +Dan Jacobson +Dan Johnson +Dan Kenigsberg +Dan Locks +Dan McNulty +Dan Nelson +Dan Petitt +Dan Torop +Dan Zitter +Daniel at touchtunes +Daniel Bankhead +Daniel Black +Daniel Cater +Daniel Egger +Daniel Gustafsson +Daniel Hwang +Daniel Jeliński +Daniel Johnson +Daniel Kahn Gillmor +Daniel Krügler +Daniel Lee Hwang +Daniel Lublin +Daniel Marjamäki +Daniel Melani +Daniel Mentz +Daniel Romero +Daniel Schauenberg +Daniel Seither +Daniel Shahaf +Daniel Silverstone +Daniel Steinberg +Daniel Stenberg +Daniel Theron +Daphne Luong +Dario Nieuwenhuis +Dario Weißer +Darryl House +Darshan Mody +Darío Hereñú +dasimx on github +Dave Dribin +Dave Halbakken +Dave Hamilton +Dave May +Dave Reisner +Dave Thompson +Dave Vasilevsky +Davey Shafik +David Bau +David Benjamin +David Binderman +David Blaikie +David Byron +David Cohen +David E. Narváez +David Eriksson +David Garske +David Houlder +David Hull +David J Meyer +David James +David Kalnischkies +David Kierznowski +David Kimdon +David L. +David Lang +David LeBlanc +David Lopes +David Lord +David McCreedy +David Odin +David Phillips +David Rosenstrauch +David Ryskalczyk +David Sanderson +David Schweikert +David Shaw +David Strauss +David Tarendash +David Thiel +David Walser +David Woodhouse +David Wright +David Yan +davidedec on github +dbrowndan on github +Dengminwen +Denis Baručić +Denis Chaplygin +Denis Feklushkin +Denis Goleshchikhin +Denis Ollier +Dennis Clarke +Dennis Felsing +Derek Higgins +Desmond O. Chang +destman on github +Detlef Schmier +Dheeraj Sangamkar +Didier Brisebourg +Diego Bes +Diego Casorran +Dilyan Palauzov +Dima Barsky +Dima Pasechnik +Dima Tisnek +Dimitar Boevski +Dimitre Dimitrov +Dimitrios Apostolou +Dimitrios Siganos +Dimitris Sarris +Dinar +Dirk Eddelbuettel +Dirk Feytons +Dirk Manske +Dirkjan Bussink +Diven Qi +divinity76 on github +dkjjr89 on github +dkwolfe4 on github +Dmitri Shubin +Dmitri Tikhonov +Dmitriy Sergeyev +dmitrmax on github +Dmitry Bartsevich +Dmitry Eremin-Solenikov +Dmitry Falko +Dmitry Kostjuchenko +Dmitry Kurochkin +Dmitry Mikhirev +Dmitry Popov +Dmitry Rechkin +Dmitry S. Baikov +dnivras on github +Dolbneff A.V +Domenico Andreoli +Dominick Meglio +Dominik Hölzl +Dominique Leuenberger +Don J Olmstead +Dongliang Mu +Doron Behar +Doug Kaufman +Doug Porter +Douglas Creager +Douglas E. Wegscheid +Douglas Kilpatrick +Douglas Mencken +Douglas R. Horner +Douglas Steinwand +Dov Murik +dpull on github +Drake Arconis +dtmsecurity on github +Duane Cathey +Duncan Mac-Vicar Prett +Duncan Wilcox +Dustin Boswell +Dusty Mabe +Duy Phan Thanh +Dwarakanath Yadavalli +Dylan Ellicott +Dylan Salisbury +Dániel Bakai +Early Ehlinger +Earnestly on github +Eason-Yu on github +Ebenezer Ikonne +Ed Morley +Edgaras Janušauskas +Edin Kadribasic +Edmond Yu +Eduard Bloch +Edward Kimmel +Edward Rudd +Edward Sheldrake +Edward Thomson +Eelco Dolstra +Eetu Ojanen +Egon Eckert +Ehren Bendler +Eldar Zaitov +elelel on github +elephoenix on github +Eli Schwartz +Elia Tufarolo +Elliot Saba +Ellis Pritchard +Elmira A Semenova +elsamuko on github +Emanuele Bovisio +Emil Engler +Emil Lerner +Emil Romanus +Emiliano Ida +Emmanuel Tychon +Enrico Scholz +Enrik Berkhan +Eramoto Masaya +Eric Cooper +Eric Curtin +Eric Gallager +Eric Hu +Eric Landes +Eric Lavigne +Eric Lubin +Eric Melville +Eric Mertens +Eric Rautman +Eric Rescorla +Eric Ridge +Eric Rosenquist +Eric S. Raymond +Eric Sauvageau +Eric Thelin +Eric Vergnaud +Eric Wong +Eric Wu +Eric Young +Erick Nuwendam +Erik Jacobsen +Erik Janssen +Erik Johansson +Erik Minekus +Ernest Beinrohr +Ernst Sjöstrand +Erwan Legrand +Erwin Authried +Estanislau Augé-Pujadas +Ethan Glasser Camp +Etienne Simard +Eugene Kotlyarov +Evan Jordan +Even Rouault +Evert Pot +Evgeny Grin +Evgeny Turnaev +eXeC64 on github +Eygene Ryabinkin +Eylem Ugurel +Fabian Frank +Fabian Hiernaux +Fabian Keil +Fabian Ruff +Fabrice Fontaine +Fabrizio Ammollo +Fahim Chandurwala +Faizur Rahman +fds242 on github +Federico Bianchi +Fedor Karpelevitch +Fedor Korotkov +Feist Josselin +Felipe Gasper +Felix Hädicke +Felix Kaiser +Felix von Leitner +Felix Yan +Feng Tu +Fernando Muñoz +Filip Salomonsson +Flavio Medeiros +Florian Pritz +Florian Schoppmann +Florian Weimer +Florin Petriuc +Forrest Cahoon +Francisco Moraes +Francisco Sedano +Francois Petitjean +Francois Rivard +Frank Denis +Frank Gevaerts +Frank Hempel +Frank Keeney +Frank McGeough +Frank Meier +Frank Ticheler +Frank Van Uffelen +František Kučera +François Charlier +François Rigault +Fred Machado +Fred New +Fred Noz +Fred Stluka +Frederic Lepied +Frederik B +Frederik Wedel-Heinen +Fredrik Thulin +FuccDucc on github +fullincome on github +Gabriel Kuri +Gabriel Sjoberg +Garrett Holmstrom +Gary Maxwell +Gaurav Malhotra +Gautam Kachroo +Gautam Mani +Gavin Wong +Gavrie Philipson +Gaz Iqbal +Gaël Portay +Geeknik Labs +Geoff Beier +Georg Horn +Georg Huettenegger +Georg Lippitsch +Georg Wicherski +George Liu +Gerd v. Egidy +Gergely Nagy +Gerhard Herre +Gerrit Bruchhäuser +Ghennadi Procopciuc +Giancarlo Formicuccia +Giaslas Georgios +Gil Weber +Gilad +Gilbert Ramirez Jr. +Gilles Blanc +Gilles Vollant +Giorgos Oikonomou +Gisle Vanem +GitYuanQu on github +Giuseppe Attardi +Giuseppe D'Ambrosio +Giuseppe Persico +Glen A Johnson Jr. +Glen Nakamura +Glen Scott +Glenn Sheridan +Google Inc. +Gordon Marler +Gorilla Maguila +Gou Lingfeng +Grant Erickson +Grant Pannell +Greg Hewgill +Greg Morse +Greg Onufer +Greg Pratt +Greg Rowe +Greg Zavertnik +Gregory Jefferis +Gregory Nicholls +Gregory Szorc +Griffin Downs +Grigory Entin +Guenole Bescon +Guido Berhoerster +Guillaume Arluison +guitared on github +Gunter Knauf +Gustaf Hui +Gustavo Grieco +Guy Poizat +GwanYeong Kim +Gwenole Beauchesne +Gökhan Şengün +Götz Babin-Ebell +H3RSKO on github +Hagai Auro +Haibo Huang +Hamish Mackenzie +hamstergene on github +Han Han +Han Qiao +Hang Kin Lau +Hang Su +Hannes Magnusson +Hanno Böck +Hanno Kranzhoff +Hans Steegers +Hans-Jurgen May +Hao Wu +Hardeep Singh +Haris Okanovic +Harold Stuart +Harry Sintonen +Harshal Pradhan +Hauke Duden +He Qin +Heikki Korpela +Heinrich Ko +Heinrich Schaefer +Helge Klein +Helmut K. C. Tessarek +Helwing Lutz +Hendrik Visage +Henri Gomez +Henrik Gaßmann +Henrik Storner +Henry Ludemann +Henry Roeland +Herve Amblard +Hidemoto Nakada +Ho-chi Chen +Hoi-Ho Chan +Hongli Lai +Howard Blaise +Howard Chu +hsiao yi +htasta on github +Hubert Kario +Hugo van Kemenade +Huzaifa Sidhpurwala +huzunhao on github +hydra3333 on github +Hzhijun +iammrtau on github +Ian D Allen +Ian Fette +Ian Ford +Ian Gulliver +Ian Lynagh +Ian Turner +Ian Wilkes +Ignacio Vazquez-Abrams +Igor Franchuk +Igor Khristophorov +Igor Makarov +Igor Novoseltsev +Igor Polyakov +Ihor Karpenko +ihsinme on github +Iida Yosiaki +Ilguiz Latypov +Ilja van Sprundel +Ilya Kosarev +imilli on github +Immanuel Gregoire +Inca R +infinnovation-dev on github +Ingmar Runge +Ingo Ralf Blum +Ingo Wilken +Ionuț-Francisc Oancea +Irfan Adilovic +Ironbars13 on github +Irving Wolfe +Isaac Boukris +Isaiah Norton +Ishan SinghLevett +Ithubg on github +Ivan Avdeev +IvanoG on github +Ivo Bellin Salarin +iz8mbw on github +Jack Zhang +Jackarain on github +Jacky Lam +Jacob Barthelmeh +Jacob Meuser +Jacob Moshenko +Jactry Zeng +Jad Chamcham +Jaime Fullaondo +jakirkham on github +Jakub Wilk +Jakub Zakrzewski +James Atwill +James Brown +James Bursa +James Cheng +James Clancy +James Cone +James Dury +James Fuller +James Gallagher +James Griffiths +James Housley +James Knight +James Le Cuirot +James MacMillan +James Slaughter +Jamie Lokier +Jamie Newton +Jamie Wilkinson +Jan Alexander Steffens +Jan Chren +Jan Ehrhardt +Jan Koen Annot +Jan Kunder +Jan Schaumann +Jan Schmidt +Jan Van Boghout +JanB on github +Janne Johansson +Jared Jennings +Jared Lundell +Jari Aalto +Jari Sundell +jasal82 on github +Jason Baietto +Jason Glasgow +Jason Juang +Jason Lee +Jason Liu +Jason McDonald +Jason S. Priebe +Javier Barroso +Javier Blazquez +Javier G. Sogo +Javier Navarro +Javier Sixto +Jay Austin +Jayesh A Shah +Jaz Fresh +Jean Fabrice +Jean Gressmann +Jean Jacques Drouin +Jean-Claude Chauve +Jean-Francois Bertrand +Jean-Francois Durand +Jean-Louis Lemaire +Jean-Marc Ranger +Jean-Noël Rouvignac +Jean-Philippe Barrette-LaPierre +Jeff Connelly +Jeff Hodges +Jeff Johnson +Jeff King +Jeff Lawson +Jeff Mears +Jeff Phillips +Jeff Pohlmeyer +Jeff Weber +Jeffrey Walton +Jens Finkhaeuser +Jens Rantil +Jens Schleusener +Jeremie Rapin +Jeremy Friesner +Jeremy Huddleston +Jeremy Lainé +Jeremy Lin +Jeremy Maitin-Shepard +Jeremy Pearson +Jeremy Tan +Jeroen Koekkoek +Jeroen Ooms +Jerome Muffat-Meridol +Jerome Robert +Jerome Vouillon +Jerry Krinock +Jerry Wu +Jes Badwal +Jesper Jensen +Jesse Chisholm +Jesse Noller +Jesse Tan +jethrogb on github +Jie He +Jim Drash +Jim Freeman +Jim Fuller +Jim Hollinger +Jim Meyering +Jimmy Gaussen +Jiri Dvorak +Jiri Hruska +Jiri Jaburek +Jiří Malák +jmdavitt on github +jnbr on github +Jocelyn Jaubert +Joe Halpin +Joe Malicki +Joe Mason +Joel Chen +Joel Depooter +joey-l-us on github +Jofell Gallardo +Johan Anderson +Johan Lantz +Johan Nilsson +Johan van Selst +Johannes Bauer +Johannes Ernst +Johannes G. Kristinsson +Johannes Schindelin +John A. Bristor +John Bradshaw +John Butterfield +John Coffey +John Crow +John David Anglin +John DeHelian +John Dennis +John Dunn +John E. Malmberg +John Gardiner Myers +John Hascall +John Janssen +John Joseph Bachir +John Kelly +John Kohl +John Lask +John Levon +John Lightsey +John Marino +John Marshall +John McGowan +John P. McCaskey +John Schroeder +John Simpson +John Starks +John Suprock +John V. Chow +John Wanghui +John Weismiller +John Wilkinson +John-Mark Bell +Johnny Luong +Jojojov on github +Jon DeVree +Jon Grubbs +Jon Johnson Jr +Jon Nelson +Jon Rumsey +Jon Sargeant +Jon Seymour +Jon Spencer +Jon Torrey +Jon Travis +Jon Turner +Jonas Forsman +Jonas Minnberg +Jonas Schnelli +Jonas Vautherin +Jonatan Lander +Jonatan Vela +Jonathan Cardoso Machado +Jonathan Hseu +Jonathan Moerman +Jonathan Nieder +Jongki Suwandi +jonrumsey on github +Joombalaya on github +Joonas Kuorilehto +Jose Alf +Jose Kahan +Josef Wolf +Josh Bialkowski +Josh Kapell +joshhe on github +Joshua Kwan +Joshua Swink +Josie Huddleston +Josue Andrade Gomes +Jozef Kralik +JP Mens +Juan Barreto +Juan F. Codagnone +Juan Ignacio Hervás +Juan RP +Judson Bishop +Juergen Hoetzel +Juergen Wilke +Jukka Pihl +Julian Noble +Julian Ospald +Julian Romero Nieto +Julian Taylor +Julian Z +Julien Chaffraix +Julien Nabet +Julien Royer +Jun-ichiro itojun Hagino +jungle-boogie on github +Junho Choi +Jurij Smakov +Juro Bystricky +Justin Clift +Justin Ehlert +Justin Fletcher +Justin Karneges +Justin Maggard +jveazey on github +jzinn on github +János Fekete +Jérémy Rocher +Jörg Mueller-Tolk +Jörn Hartroth +K. R. Walker +ka7 on github +Kai Engert +Kai Noda +Kai Sommerfeld +Kai-Uwe Rommel +Kalle Vahlman +Kamil Dudka +Kane York +Kang Lin +Kang-Jin Lee +Karl Chen +Karl Moerder +Karol Pietrzak +Kartik Mahajan +Kaspar Brand +Katie Wang +Katsuhiko YOSHIDA +Kazuho Oku +Kees Cook +Kees Dekker +Keith MacDonald +Keith McGuigan +Keith Mok +Ken Brown +Ken Hirsch +Ken Rastatter +Kenny To +Kent Boortz +Keshav Krity +Kevin Baughman +Kevin Fisk +Kevin Ji +Kevin Lussier +Kevin R. Bulgrien +Kevin Reed +Kevin Roth +Kevin Smith +Kim Minjoong +Kim Rinnewitz +Kim Vandry +Kimmo Kinnunen +Kirill Marchuk +Kjell Ericson +Kjetil Jacobsen +Klaus Stein +Klevtsov Vadim +Kobi Gurkan +Koen Dergent +Konstantin Isakov +Konstantin Kushnir +kotoriのねこ +kouzhudong on github +kreshano on github +Kris Kennaway +Krishnendu Majumdar +Krister Johansen +Kristian Gunstone +Kristian Köhntopp +Kristian Mide +Kristiyan Tsaklev +Kristoffer Gleditsch +Kunal Chandarana +Kunal Ekawde +Kurt Fankhauser +Kwon-Young Choi +Kyle Abramowitz +Kyle Edwards +Kyle J. McKay +Kyle L. Huff +Kyle Sallee +Kyohei Kadota +Kyselgov E.N +l00p3r on Hackerone +Lachlan O'Dea +Ladar Levison +Lance Ware +Laramie Leavitt +Larry Campbell +Larry Fahnoe +Larry Lin +Larry Stefani +Larry Stone +Lars Buitinck +Lars Gustafsson +Lars J. Aas +Lars Johannesen +Lars Nilsson +Lars Torben Wilson +Laurent Bonnans +Laurent Rabret +Lauri Kasanen +Laurie Clark-Michalek +Lawrence Matthews +Lawrence Wagerfield +Legoff Vincent +Lehel Bernadt +Leif W +Leigh Purdie +Leith Bade +Len Krause +Len Marinaccio +Lenaic Lefever +Lenny Rachitsky +Leo Neat +Leon Breedt +Leon Winter +Leonardo Rosati +Leonardo Taccari +Liam Healy +lijian996 on github +Lijo Antony +lilongyan-huawei on github +Linas Vepstas +Lindley French +Ling Thio +Linos Giannopoulos +Linus Lewandowski +Linus Nielsen Feltzing +Linus Nordberg +Lior Kaplan +Lisa Xu +Liviu Chircu +Liza Alenchery +Lloyd Fournier +Lluís Batlle i Rossell +Loganaden Velvindron +Loic Dachary +Loren Kirkby +Luan Cestari +Luca Altea +Luca Boccassi +Lucas Adamski +Lucas Pardue +Lucas Severo +Lucien Zürcher +Ludek Finstrle +Ludovico Cavedon +Ludwig Nussel +Lukas Ruzicka +Lukasz Czekierda +lukaszgn on github +Luke Amery +Luke Call +Luke Dashjr +Luo Jinghua +Luong Dinh Dung +Luz Paz +Luật Nguyễn +Lyman Epp +Lyndon Hill +M.R.T on github +Maciej Karpiuk +Maciej Puzio +Maciej W. Rozycki +madblobfish on github +Mahmoud Samir Fayed +Maks Naumov +Maksim Kuzevanov +Maksim Stsepanenka +Mamoru Tasaka +Mamta Upadhyay +Mandy Wu +Manfred Schwarb +MAntoniak on github +Manuel Massing +Marc Aldorasi +Marc Boucher +Marc Deslauriers +Marc Doughty +Marc Hesse +Marc Hörsken +Marc Kleine-Budde +Marc Renault +Marc Schlatter +Marc-Antoine Perennou +marc-groundctl on github +Marcel Hernandez +Marcel Raad +Marcel Roelofs +Marcelo Echeverria +Marcelo Juchem +Marcin Adamski +Marcin Gryszkalis +Marcin Konicki +Marco Deckel +Marco G. Salvagno +Marco Maggi +Marcos Diazr +Marcus Hoffmann +Marcus Klein +Marcus Sundberg +Marcus Webster +Marian Klymov +Mario Schroeder +Mark Brand +Mark Butler +Mark Davies +Mark Hamilton +Mark Incley +Mark Karpeles +Mark Lentczner +Mark Nottingham +Mark Salisbury +Mark Snelling +Mark Tully +Mark W. Eichin +Mark Wotton +Markus Duft +Markus Elfring +Markus Koetter +Markus Moeller +Markus Oberhumer +Markus Olsson +Markus Westerlind +Maros Priputen +Marquis de Muesli +Martijn Koster +Martin Ankerl +Martin Bašti +Martin C. Martin +Martin Drasar +Martin Dreher +Martin Frodl +Martin Galvan +Martin Gartner +Martin Hager +Martin Hedenfalk +Martin Jansen +Martin Kammerhofer +Martin Kepplinger +Martin Lemke +Martin Skinner +Martin Staael +Martin Storsjö +Martin V +Martin Vejnár +Marty Kuhrt +Maruko +Masaya Suzuki +masbug on github +Massimiliano Fantuzzi +Massimiliano Ziccardi +Massimo Callegari +Mateusz Loskot +Mathias Axelsson +Mathias Gumz +Mathieu Legare +Mats Lidell +Matt Arsenault +Matt Ford +Matt Kraai +Matt McClure +Matt Veenstra +Matt Witherspoon +Matt Wixson +Matteo Bignotti +Matteo Bignottignotti +Matteo Rocco +Matthew Blain +Matthew Clarke +Matthew Hall +Matthew Kerwin +Matthew Whitehead +Matthias Bolte +Matthias Naegler +Mattias Fornander +Matus Uzak +Maurice Barnum +Mauro Iorio +Mauro Rappa +Max Dymond +Max Katsev +Max Kellermann +Max Khon +Max Peal +Max Savenkov +Maxim Ivanov +Maxim Perenesenko +Maxim Prohorov +Maxime Larocque +Maxime Legros +mbeifuss on github +mccormickt12 on github +Mehmet Bozkurt +Mekonikum +Melissa Mears +Mert Yazıcıoğlu +Mettgut Jamalla +Michael Anti +Michael Baentsch +Michael Benedict +Michael Brehm +Michael Calmer +Michael Cronenworth +Michael Curtis +Michael Day +Michael Felt +Michael Forney +Michael Gmelin +Michael Goffioul +Michael Jahn +Michael Jerris +Michael Kalinin +Michael Kaufmann +Michael Kilburn +Michael Kujawa +Michael König +Michael Lee +Michael Maltese +Michael Mealling +Michael Mueller +Michael Musset +Michael Olbrich +Michael Osipov +Michael Schmid +Michael Smith +Michael Stapelberg +Michael Steuer +Michael Stillwell +Michael Vittiglio +Michael Wallner +Michal Bonino +Michal Marek +Michal Trybus +Michal Čaplygin +Michał Antoniak +Michał Fita +Michał Górny +Michał Janiszewski +Michał Kowalczyk +Michał Piechowski +Michel Promonet +Michele Bini +Miguel Angel +Miguel Diaz +migueljcrum on github +Mihai Ionescu +Mikael Johansson +Mikael Sennerholm +Mikalai Ananenka +Mike Bytnar +Mike Crowe +Mike Dobbs +Mike Dowell +Mike Frysinger +Mike Giancola +Mike Hasselberg +Mike Henshaw +Mike Hommey +Mike Mio +Mike Norton +Mike Power +Mike Protts +Mike Revi +Miklos Nemeth +Miloš Ljumović +Mingliang Zhu +Mingtao Yang +Miroslav Franc +Miroslav Spousta +Mischa Salle +Mitz Wark +mkzero on github +Mohamed Lrhazi +Mohamed Osama +Mohammad AlSaleh +Mohammad Hasbini +Mohun Biswas +momala454 on github +moohoorama on github +Mostyn Bramley-Moore +Moti Avrahami +MrdUkk on github +MrSorcus on github +Muhammad Herdiansyah +Murugan Balraj +Muz Dima +Myk Taylor +Nach M. S. +Nagai H +naost3rn on github +Nate Prewitt +Nathan Coulter +Nathan O'Sullivan +Nathanael Nerode +Nathaniel J. Smith +Nathaniel R. Lewis +Nathaniel Waisbrot +Naveen Chandran +Naveen Noel +Neal Poole +nedres on github +neex on github +Nehal J Wani +neheb on github +Neil Bowers +Neil Dunbar +Neil Kolban +Neil Spring +nevv on HackerOne/curl +Niall O'Reilly +niallor on github +nianxuejie on github +Nic Roets +Nicholas Maniscalco +Nick Draffen +Nick Gimbrone +Nick Humfrey +Nick Miyake +Nick Zitzmann +Nicklas Avén +Nico Baggus +nico-abram on github +Nicolas Berloquin +Nicolas Croiset +Nicolas François +Nicolas Grekas +Nicolas Guillier +Nicolas Morey-Chaisemartin +Nicolas Sterchele +Niels van Tongeren +Nikita Schmidt +Nikitinskit Dmitriy +Niklas Angebrand +Niklas Hambüchen +Nikolai Kondrashov +Nikos Mavrogiannopoulos +Nikos Tsipinakis +niner on github +Ning Dong +Nir Soffer +Nis Jorgensen +nk +NobodyXu on github +Nobuhiro Ban +Nodak Sodak +nopjmp on github +Norbert Frese +Norbert Kett +Norbert Novotny +NTMan on Github +Octavio Schroeder +Ofer +Okhin Vasilij +Ola Mork +Olaf Flebbe +Olaf Stüben +Oleg Pudeyev +Olen Andoni +olesteban on github +Oli Kingshott +Oliver Gondža +Oliver Graute +Oliver Kuckertz +Oliver Schindler +Olivier Berger +Olivier Brunel +Omar Ramadan +omau on github +Orange Tsai +Oren Souroujon +Oren Tirosh +Orgad Shaneh +Ori Avtalion +osabc on github +Oscar Koeroo +Oscar Norlander +Oskar Liljeblad +Oumph on github +ovidiu-benea on github +P R Schaffner +Palo Markovic +Paolo Mossino +Paolo Piacentini +Paras Sethia +Pascal Gaudette +Pascal Terjan +Pasha Kuznetsov +Pasi Karkkainen +Pat Ray +patelvivekv1993 on github +patnyb on github +Patrice Guerin +Patricia Muscalu +Patrick Bihan-Faou +Patrick Dawson +Patrick McManus +Patrick Monnerat +Patrick Rapin +Patrick Schlangen +Patrick Scott +Patrick Smith +Patrick Watson +Patrik Thunstrom +Pau Garcia i Quiles +Paul B. Omta +Paul Donohue +Paul Dreik +Paul Groke +Paul Harrington +Paul Harris +Paul Hoffman +Paul Howarth +Paul Joyce +Paul Marks +Paul Marquis +Paul Moore +Paul Nolan +Paul Oliver +Paul Querna +Paul Saab +Paul Vixie +Paulo Roberto Tomasi +Pavel Cenek +Pavel Gushchin +Pavel Löbl +Pavel Orehov +Pavel Pavlov +Pavel Raiskup +Pavel Rochnyak +Pavel Volgarev +Pavol Markovic +Pawel A. Gajda +Pawel Kierski +Pedro Larroy +Pedro Monreal +Pedro Neves +pendrek at hackerone +Peng Li +Per Lundberg +Per Malmberg +Pete Lomax +Peter Bray +Peter Forret +Peter Frühberger +Peter Gal +Peter Heuchert +Peter Hjalmarsson +Peter Korsgaard +Peter Körner +Peter Lamare +Peter Lamberg +Peter Laser +Peter O'Gorman +Peter Pentchev +Peter Piekarski +Peter Silva +Peter Simonyi +Peter Su +Peter Sumatra +Peter Sylvester +Peter Todd +Peter Varga +Peter Verhas +Peter Wang +Peter Wu +Peter Wullinger +Peteris Krumins +Petr Bahula +Petr Novak +Petr Pisar +Petr Voytsik +Phil Blundell +Phil Crump +Phil Karn +Phil Lisiecki +Phil Pellouchoud +Philip Craig +Philip Gladstone +Philip Langdale +Philip Prindeville +Philipp Waehnert +Philippe Hameau +Philippe Marguinaud +Philippe Raoult +Philippe Vaucher +Pierre +Pierre Brico +Pierre Chapuis +Pierre Joye +Pierre Ynard +Pierre-Yves Bigourdan +Piotr Dobrogost +Piotr Komborski +Po-Chuan Hsieh +Pooyan McSporran +Poul T Lomholt +Pramod Sharma +Prash Dush +Praveen Pvs +Priyanka Shah +Przemysław Tomaszewski +pszemus on github +puckipedia on github +Puneet Pawaia +qiandu2006 on github +Quagmire +Quanah Gibson-Mount +Quentin Balland +Quinn Slack +R. Dennis Steed +Radoslav Georgiev +Radu Simionescu +Rafa Muyo +Rafael Antonio +Rafael Sagula +Rafayel Mkrtchyan +Rafaël Carré +Rainer Canavan +Rainer Jung +Rainer Koenig +Rainer Müller +Rajesh Naganathan +Rajkumar Mandal +Ralf S. Engelschall +Ralph Beckmann +Ralph Mitchell +Ram Krushna Mishra +ramsay-jones on github +Ran Mozes +Randall S. Becker +Randy Armstrong +Randy McMurchy +Raphael Gozzo +Rasmus Melchior Jacobsen +Ravi Pratap +Ray Dassen +Ray Pekowski +Ray Satiro +Razvan Cojocaru +rcombs on github +Reed Loden +Reinhard Max +Reinout van Schouwen +Remco van Hooff +Remi Gacogne +Remo E +Renato Botelho +Renaud Allard +Renaud Chaillat +Renaud Duhaut +Renaud Guillard +Renaud Lehoux +Rene Bernhardt +Rene Rebe +Reuven Wachtfogel +Reza Arbab +Ricardo Cadime +Ricardo Gomes +Rich Burridge +Rich Gray +Rich Mirch +Rich Rauenzahn +Rich Salz +Rich Turner +Richard Adams +Richard Alcock +Richard Archer +Richard Atterer +Richard Bowker +Richard Bramante +Richard Clayton +Richard Cooper +Richard Gorton +Richard Gray +Richard Hosking +Richard Hsu +Richard Michael +Richard Moore +Richard Prescott +Richard Silverman +Richard van den Berg +Richy Kim +Rici Lake +Rick Deist +Rick Jones +Rick Richardson +Rick Welykochy +Rickard Hallerbäck +Ricki Hirner +Ricky Leverence +Ricky-Tigg on github +Rider Linden +Rikard Falkeborn +rl1987 on github +Rob Cotrone +Rob Crittenden +Rob Davies +Rob Jones +Rob Sanders +Rob Stanzel +Rob Ward +Robert A. Monat +Robert B. Harris +Robert D. Young +Robert Dunaj +Robert Foreman +Robert Iakobashvili +Robert Kolcun +Robert Linden +Robert Olson +Robert Prag +Robert Schumann +Robert Weaver +Robert Wruck +Robin Cornelius +Robin Douine +Robin Johnson +Robin Kay +Robson Braga Araujo +Rod Widdowson +Rodger Combs +Rodney Simmons +Rodric Glaser +Rodrigo Silva +Roger Leigh +Roger Orr +Roland Blom +Roland Hieber +Roland Krikava +Roland Zimmermann +Rolf Eike Beer +Rolland Dudemaine +Romain Coltel +Romain Fliedel +Romain Geissler +Roman Koifman +Roman Mamedov +Romulo A. Ceccon +Ron Eldor +Ron Parker +Ron Zapp +Ronnie Mose +Rosimildo da Silva +Ross Burton +Roy Bellingan +Roy Shan +Rune Kleveland +Ruslan Baratov +Ruslan Gazizov +Rutger Hofman +Ruurd Beerstra +RuurdBeerstra on github +Ryan Braud +Ryan Chan +Ryan Nelson +Ryan Schmidt +Ryan Scott +Ryan Winograd +Ryuichi KAWAMATA +Rémy Léone +S. Moonesamy +Salah-Eddin Shaban +Saleem Abdulrasool +Salvador Dávila +Salvatore Sorrentino +Sam Deane +Sam Hurst +Sam Roth +Sam Schanken +Samanta Navarro +Sampo Kellomaki +Samuel Díaz García +Samuel Listopad +Samuel Marks +Samuel Surtees +Samuel Thibault +Samuel Tranchet +Sander Gates +Sandor Feldi +Santhana Todatry +Santino Keupp +Saqib Ali +Sara Golemon +Saran Neti +Sascha Swiercy +Saul good +Saurav Babu +sayrer on github +SBKarr on github +Scott Bailey +Scott Barrett +Scott Cantor +Scott Davis +Scott McCreary +Sean Boudreau +Sean Burford +Sean MacLennan +Sean Miller +Sebastiaan van Erk +Sebastian Haglund +Sebastian Mundry +Sebastian Pohlschmidt +Sebastian Rasmussen +Senthil Raja Velu +Sergei Kuzmin +Sergei Nikulov +Sergey Ogryzkov +Sergey Tatarincev +Sergii Kavunenko +Sergii Pylypenko +Sergio Ballestrero +Sergio Barresi +Sergio Borghese +Serj Kalichev +Seshubabu Pasam +Seth Mos +Sevan Janiyan +Sh Diao +Shachaf Ben-Kiki +Shailesh Kapse +Shankar Jadhavar +Shao Shuchao +Sharad Gupta +Shard +Shaun Jackman +Shawn Landden +Shawn Poulson +Shine Fan +Shiraz Kanga +Shlomi Fish +Shmulik Regev +Siddhartha Prakash Jain +Sidney San Martín +Siegfried Gyuricsko +silveja1 on github +Simon Chalifoux +Simon Dick +Simon H. +Simon Josefsson +Simon Legner +Simon Liu +Simon Warta +Siva Sivaraman +SLDiggie on github +smuellerDD on github +sn on hackerone +sofaboss on github +Somnath Kundu +Song Ma +Sonia Subramanian +Spacen Jasset +Spezifant on github +Spiridonoff A.V +Spoon Man +Spork Schivago +sspiri on github +sstruchtrup on github +Stadler Stephan +Stan van de Burgt +Stanislav Ivochkin +Stanislav Zidek +steelman on github +Stefan Agner +Stefan Bühler +Stefan Eissing +Stefan Esser +Stefan Grether +Stefan Kanthak +Stefan Krause +Stefan Neis +Stefan Strogin +Stefan Teleman +Stefan Tomanek +Stefan Ulrich +Stefan Yohansson +Stefano Simonelli +Steinar H. Gunderson +steini2000 on github +Stepan Broz +Stepan Efremov +Stephan Bergmann +Stephan Lagerholm +Stephan Mühlstrasser +Stephan Szabo +Stephen Brokenshire +Stephen Collyer +Stephen Kick +Stephen More +Stephen Toub +Sterling Hughes +Steve Green +Steve H Truong +Steve Havelka +Steve Holme +Steve Lhomme +Steve Little +Steve Marx +Steve Oliphant +Steve Roskowski +Steve Walch +Steven Bazyl +Steven G. Johnson +Steven Gu +Steven M. Schweda +Steven Parkes +Steven Penny +Stian Soiland-Reyes +Stoned Elipot +stootill on github +Stuart Henderson +SumatraPeter on github +Sune Ahlgren +Sunny Bean +Sunny Purushe +Sven Anders +Sven Blumenstein +Sven Neuhaus +Sven Wegener +Svyatoslav Mishyn +swalkaus at yahoo.com +Sylvestre Ledru +Symeon Paraschoudis +Sébastien Willemijns +T. Bharath +T. Yamada +Tadej Vengust +Tae Hyoung Ahn +Tae Wong +Taiyu Len +Taneli Vähäkangas +Tanguy Fautre +tarek112 on github +Tatsuhiro Tsujikawa +tbugfinder on github +Teemu Yli-Elsila +Temprimus +Terri Oda +Terry Wu +thanhchungbtc on github +The Infinnovation team +TheAssassin on github +Theodore Dubois +therealhirudo on github +tholin on github +Thomas Bouzerar +Thomas Braun +Thomas Gamper +Thomas Glanzmann +Thomas J. Moore +Thomas Klausner +Thomas L. Shinnick +Thomas Lopatic +Thomas M. DuBuisson +Thomas Petazzoni +Thomas Ruecker +Thomas Schwinge +Thomas Tonino +Thomas van Hesteren +Thomas Vegas +Thorsten Schöning +Tiit Pikma +Till Maas +Tim Ansell +Tim Baker +Tim Bartley +Tim Chen +Tim Costello +Tim Harder +Tim Heckman +Tim Mcdonough +Tim Newsome +Tim Rühsen +Tim Sedlmeyer +Tim Sneddon +Tim Stack +Tim Starling +Tim Tassonis +Tim Verhoeven +Timo Sirainen +Timotej Lazar +Timothe Litt +Timothy Polich +Tinus van den Berg +TJ Saunders +tmkk on github +Tobias Blomberg +Tobias Hieta +Tobias Hintze +Tobias Lindgren +Tobias Markus +Tobias Rundström +Tobias Stoeckmann +Toby Peterson +Todd A Ouska +Todd Kaufmann +Todd Kulesza +Todd Short +Todd Vierling +Tom Benoist +Tom Donovan +Tom Grace +Tom Greenslade +Tom Lee +Tom Mattison +Tom Moers +Tom Mueller +Tom Regner +Tom Seddon +Tom Sparrow +Tom van der Woerdt +Tom Wright +Tom Zerucha +Tomas Berger +Tomas Hoger +Tomas Jakobsson +Tomas Mlcoch +Tomas Mraz +Tomas Pospisek +Tomas Szepe +Tomas Tomecek +Tomasz Kojm +Tomasz Lacki +Tommie Gannert +tommink[at]post.pl +Tommy Petty +Tommy Tam +Ton Voon +Toni Moreno +Tony Kelman +tonystz on Github +Toon Verwaest +Tor Arntsen +Torben Dannhauer +Torsten Foertsch +Toshio Kuratomi +Toshiyuki Maezawa +tpaukrt on github +Traian Nicolescu +Travis Burtrum +Travis Obenhaus +Trivikram Kamat +Troels Walsted Hansen +Troy Engel +Tseng Jun +Tuomo Rinne +Tupone Alfredo +Tyler Hall +Török Edwin +Ulf Härnhammar +Ulf Samuelsson +Ulrich Doehner +Ulrich Telle +Ulrich Zadow +Valentin David +Valentyn Korniienko +Valerii Zapodovnikov +vanillajonathan on github +Vasiliy Faronov +Vasily Lobaskin +Vasy Okhin +Venkat Akella +Venkataramana Mokkapati +Vicente Garcia +Victor Magierski +Victor Snezhko +Vijay Panghal +Vikram Saxena +Viktor Szakats +Vilhelm Prytz +Ville Skyttä +Vilmos Nebehaj +Vincas Razma +Vincent Bronner +Vincent Le Normand +Vincent Penquerc'h +Vincent Sanders +Vincent Torri +vitaha85 on github +Vlad Grachov +Vlad Ureche +Vladimir Grishchenko +Vladimir Kotal +Vladimir Lazarenko +Vlastimil Ovčáčík +Vojtech Janota +Vojtech Minarik +Vojtěch Král +Volker Schmid +Vsevolod Novikov +vshmuk on hackerone +Vyron Tsingaras +W. Mark Kubacki +Waldek Kozba +Walter J. Mack +Ward Willats +Warren Menzer +Wayne Haigh +Wenchao Li +Wenxiang Qian +Werner Koch +Werner Stolz +wesinator on github +Wesley Laxton +Wesley Miaw +Wez Furlong +Wham Bang +Wilfredo Sanchez +Will Dietz +Will Roberts +Willem Sparreboom +William A. Rowe Jr +William Ahern +wmsch on github +wncboy on github +Wojciech Zwiefka +Wouter Van Rooy +Wu Yongzheng +Wyatt O'Day +Xavier Bouchoux +XhstormR on github +Xiang Xiao +Xiangbin Li +Xiaoyin Liu +XmiliaH on github +xwxbug on github +Yaakov Selkowitz +Yang Tse +Yarram Sunil +Yasuharu Yamada +Yasuhiro Matsumoto +Yechiel Kalmenson +Yehezkel Horowitz +Yehoshua Hershberg +ygthien on github +Yi Huang +Yiming Jing +Yingwei Liu +Yonggang Luo +youngchopin on github +Yousuke Kimoto +Yu Xin +Yukihiro Kawada +Yun SangHo +Yuri Slobodyanyuk +Yuriy Sosov +Yves Arrouye +Yves Lejeune +Zachary Seguin +Zdenek Pavlas +Zekun Ni +zelinchen on github +Zenju on github +Zero King +Zhao Yisha +Zhaoyang Wu +Zhibiao Wu +Zhouyihai Ding +zloi-user on github +Zmey Petroff +Zvi Har'El +zzq1015 on github +İsmail Dönmez +Łukasz Domeradzki +Štefan Kremeň +Коваленко Анатолий Викторович +Никита Дорохин +加藤郁之 diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TODO b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TODO new file mode 100644 index 00000000..d45319d7 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TODO @@ -0,0 +1,1370 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Things that could be nice to do in the future + + Things to do in project curl. Please tell us what you think, contribute and + send us patches that improve things! + + Be aware that these are things that we could do, or have once been considered + things we could do. If you want to work on any of these areas, please + consider bringing it up for discussions first on the mailing list so that we + all agree it is still a good idea for the project! + + All bugs documented in the KNOWN_BUGS document are subject for fixing! + + 1. libcurl + 1.1 TFO support on Windows + 1.2 Consult %APPDATA% also for .netrc + 1.3 struct lifreq + 1.4 alt-svc sharing + 1.5 get rid of PATH_MAX + 1.6 native IDN support on macOS + 1.7 Support HTTP/2 for HTTP(S) proxies + 1.8 CURLOPT_RESOLVE for any port number + 1.9 Cache negative name resolves + 1.10 auto-detect proxy + 1.11 minimize dependencies with dynamically loaded modules + 1.12 updated DNS server while running + 1.13 c-ares and CURLOPT_OPENSOCKETFUNCTION + 1.14 Typesafe curl_easy_setopt() + 1.15 Monitor connections in the connection pool + 1.16 Try to URL encode given URL + 1.17 Add support for IRIs + 1.18 try next proxy if one doesn't work + 1.20 SRV and URI DNS records + 1.22 CURLINFO_PAUSE_STATE + 1.23 Offer API to flush the connection pool + 1.24 TCP Fast Open for windows + 1.25 Expose tried IP addresses that failed + 1.27 hardcode the "localhost" addresses + 1.28 FD_CLOEXEC + 1.29 Upgrade to websockets + 1.30 config file parsing + + 2. libcurl - multi interface + 2.1 More non-blocking + 2.2 Better support for same name resolves + 2.3 Non-blocking curl_multi_remove_handle() + 2.4 Split connect and authentication process + 2.5 Edge-triggered sockets should work + 2.6 multi upkeep + 2.7 Virtual external sockets + 2.8 dynamically decide to use socketpair + + 3. Documentation + 3.2 Provide cmake config-file + + 4. FTP + 4.1 HOST + 4.2 Alter passive/active on failure and retry + 4.3 Earlier bad letter detection + 4.5 ASCII support + 4.6 GSSAPI via Windows SSPI + 4.7 STAT for LIST without data connection + 4.8 Option to ignore private IP addresses in PASV response + + 5. HTTP + 5.1 Better persistency for HTTP 1.0 + 5.2 Set custom client ip when using haproxy protocol + 5.3 Rearrange request header order + 5.4 Allow SAN names in HTTP/2 server push + 5.5 auth= in URLs + + 6. TELNET + 6.1 ditch stdin + 6.2 ditch telnet-specific select + 6.3 feature negotiation debug data + + 7. SMTP + 7.2 Enhanced capability support + 7.3 Add CURLOPT_MAIL_CLIENT option + + 8. POP3 + 8.2 Enhanced capability support + + 9. IMAP + 9.1 Enhanced capability support + + 10. LDAP + 10.1 SASL based authentication mechanisms + 10.2 CURLOPT_SSL_CTX_FUNCTION for LDAPS + 10.3 Paged searches on LDAP server + + 11. SMB + 11.1 File listing support + 11.2 Honor file timestamps + 11.3 Use NTLMv2 + 11.4 Create remote directories + + 12. New protocols + + 13. SSL + 13.1 TLS-PSK with OpenSSL + 13.2 Provide mutex locking API + 13.3 Support in-memory certs/ca certs/keys + 13.4 Cache/share OpenSSL contexts + 13.5 Export session ids + 13.6 Provide callback for cert verification + 13.7 improve configure --with-ssl + 13.8 Support DANE + 13.9 TLS record padding + 13.10 Support Authority Information Access certificate extension (AIA) + 13.11 Support intermediate & root pinning for PINNEDPUBLICKEY + 13.12 Support HSTS + 13.13 Make sure we forbid TLS 1.3 post-handshake authentication + 13.14 Support the clienthello extension + + 14. GnuTLS + 14.2 check connection + + 15. Schannel + 15.1 Extend support for client certificate authentication + 15.2 Extend support for the --ciphers option + 15.3 Add option to disable client certificate auto-send + 15.4 Add option to allow abrupt server closure + + 16. SASL + 16.1 Other authentication mechanisms + 16.2 Add QOP support to GSSAPI authentication + 16.3 Support binary messages (i.e.: non-base64) + + 17. SSH protocols + 17.1 Multiplexing + 17.2 Handle growing SFTP files + 17.3 Support better than MD5 hostkey hash + 17.4 Support CURLOPT_PREQUOTE + 17.5 SSH over HTTPS proxy with more backends + + 18. Command line tool + 18.1 sync + 18.2 glob posts + 18.3 prevent file overwriting + 18.4 --proxycommand + 18.5 UTF-8 filenames in Content-Disposition + 18.6 Option to make -Z merge lined based outputs on stdout + 18.7 at least N milliseconds between requests + 18.8 Consider convenience options for JSON and XML? + 18.9 Choose the name of file in braces for complex URLs + 18.10 improve how curl works in a windows console window + 18.11 Windows: set attribute 'archive' for completed downloads + 18.12 keep running, read instructions from pipe/socket + 18.13 Ratelimit or wait between serial requests + 18.14 --dry-run + 18.15 --retry should resume + 18.16 send only part of --data + 18.17 consider file name from the redirected URL with -O ? + 18.18 retry on network is unreachable + 18.19 expand ~/ in config files + 18.20 host name sections in config files + 18.21 retry on the redirected-to URL + 18.23 Set the modification date on an uploaded file + 18.24 Use multiple parallel transfers for a single download + + 19. Build + 19.1 roffit + 19.2 Enable PIE and RELRO by default + 19.3 Don't use GNU libtool on OpenBSD + + 20. Test suite + 20.1 SSL tunnel + 20.2 nicer lacking perl message + 20.3 more protocols supported + 20.4 more platforms supported + 20.5 Add support for concurrent connections + 20.6 Use the RFC6265 test suite + 20.7 Support LD_PRELOAD on macOS + 20.8 Run web-platform-tests url tests + 20.9 Use "random" ports for the test servers + + 21. Next SONAME bump + 21.1 http-style HEAD output for FTP + 21.2 combine error codes + 21.3 extend CURLOPT_SOCKOPTFUNCTION prototype + + 22. Next major release + 22.1 cleanup return codes + 22.2 remove obsolete defines + 22.3 size_t + 22.4 remove several functions + 22.5 remove CURLOPT_FAILONERROR + 22.7 remove progress meter from libcurl + 22.8 remove 'curl_httppost' from public + +============================================================================== + +1. libcurl + +1.1 TFO support on Windows + + TCP Fast Open is supported on several platforms but not on Windows. Work on + this was once started but never finished. + + See https://github.com/curl/curl/pull/3378 + +1.2 Consult %APPDATA% also for .netrc + + %APPDATA%\.netrc is not considered when running on Windows. Shouldn't it? + + See https://github.com/curl/curl/issues/4016 + +1.3 struct lifreq + + Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and + SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete. + To support IPv6 interface addresses for network interfaces properly. + +1.4 alt-svc sharing + + The share interface could benefit from allowing the alt-svc cache to be + possible to share between easy handles. + + See https://github.com/curl/curl/issues/4476 + +1.5 get rid of PATH_MAX + + Having code use and rely on PATH_MAX is not nice: + https://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html + + Currently the libssh2 SSH based code uses it, but to remove PATH_MAX from + there we need libssh2 to properly tell us when we pass in a too small buffer + and its current API (as of libssh2 1.2.7) doesn't. + +1.6 native IDN support on macOS + + On recent macOS versions, the getaddrinfo() function itself has built-in IDN + support. By setting the AI_CANONNAME flag, the function will return the + encoded name in the ai_canonname struct field in the returned information. + This could be used by curl on macOS when built without a separate IDN library + and an IDN host name is used in a URL. + + See initial work in https://github.com/curl/curl/pull/5371 + +1.7 Support HTTP/2 for HTTP(S) proxies + + Support for doing HTTP/2 to HTTP and HTTPS proxies is still missing. + + See https://github.com/curl/curl/issues/3570 + +1.8 CURLOPT_RESOLVE for any port number + + This option allows applications to set a replacement IP address for a given + host + port pair. Consider making support for providing a replacement address + for the host name on all port numbers. + + See https://github.com/curl/curl/issues/1264 + +1.9 Cache negative name resolves + + A name resolve that has failed is likely to fail when made again within a + short period of time. Currently we only cache positive responses. + +1.10 auto-detect proxy + + libcurl could be made to detect the system proxy setup automatically and use + that. On Windows, macOS and Linux desktops for example. + + The pull-request to use libproxy for this was deferred due to doubts on the + reliability of the dependency and how to use it: + https://github.com/curl/curl/pull/977 + + libdetectproxy is a (C++) library for detecting the proxy on Windows + https://github.com/paulharris/libdetectproxy + +1.11 minimize dependencies with dynamically loaded modules + + We can create a system with loadable modules/plug-ins, where these modules + would be the ones that link to 3rd party libs. That would allow us to avoid + having to load ALL dependencies since only the necessary ones for this + app/invoke/used protocols would be necessary to load. See + https://github.com/curl/curl/issues/349 + +1.12 updated DNS server while running + + If /etc/resolv.conf gets updated while a program using libcurl is running, it + is may cause name resolves to fail unless res_init() is called. We should + consider calling res_init() + retry once unconditionally on all name resolve + failures to mitigate against this. Firefox works like that. Note that Windows + doesn't have res_init() or an alternative. + + https://github.com/curl/curl/issues/2251 + +1.13 c-ares and CURLOPT_OPENSOCKETFUNCTION + + curl will create most sockets via the CURLOPT_OPENSOCKETFUNCTION callback and + close them with the CURLOPT_CLOSESOCKETFUNCTION callback. However, c-ares + does not use those functions and instead opens and closes the sockets + itself. This means that when curl passes the c-ares socket to the + CURLMOPT_SOCKETFUNCTION it isn't owned by the application like other sockets. + + See https://github.com/curl/curl/issues/2734 + +1.14 Typesafe curl_easy_setopt() + + One of the most common problems in libcurl using applications is the lack of + type checks for curl_easy_setopt() which happens because it accepts varargs + and thus can take any type. + + One possible solution to this is to introduce a few different versions of the + setopt version for the different kinds of data you can set. + + curl_easy_set_num() - sets a long value + + curl_easy_set_large() - sets a curl_off_t value + + curl_easy_set_ptr() - sets a pointer + + curl_easy_set_cb() - sets a callback PLUS its callback data + +1.15 Monitor connections in the connection pool + + libcurl's connection cache or pool holds a number of open connections for the + purpose of possible subsequent connection reuse. It may contain a few up to a + significant amount of connections. Currently, libcurl leaves all connections + as they are and first when a connection is iterated over for matching or + reuse purpose it is verified that it is still alive. + + Those connections may get closed by the server side for idleness or they may + get a HTTP/2 ping from the peer to verify that they're still alive. By adding + monitoring of the connections while in the pool, libcurl can detect dead + connections (and close them) better and earlier, and it can handle HTTP/2 + pings to keep such ones alive even when not actively doing transfers on them. + +1.16 Try to URL encode given URL + + Given a URL that for example contains spaces, libcurl could have an option + that would try somewhat harder than it does now and convert spaces to %20 and + perhaps URL encoded byte values over 128 etc (basically do what the redirect + following code already does). + + https://github.com/curl/curl/issues/514 + +1.17 Add support for IRIs + + IRIs (RFC 3987) allow localized, non-ascii, names in the URL. To properly + support this, curl/libcurl would need to translate/encode the given input + from the input string encoding into percent encoded output "over the wire". + + To make that work smoothly for curl users even on Windows, curl would + probably need to be able to convert from several input encodings. + +1.18 try next proxy if one doesn't work + + Allow an application to specify a list of proxies to try, and failing to + connect to the first go on and try the next instead until the list is + exhausted. Browsers support this feature at least when they specify proxies + using PACs. + + https://github.com/curl/curl/issues/896 + +1.20 SRV and URI DNS records + + Offer support for resolving SRV and URI DNS records for libcurl to know which + server to connect to for various protocols (including HTTP!). + +1.22 CURLINFO_PAUSE_STATE + + Return information about the transfer's current pause state, in both + directions. https://github.com/curl/curl/issues/2588 + +1.23 Offer API to flush the connection pool + + Sometimes applications want to flush all the existing connections kept alive. + An API could allow a forced flush or just a forced loop that would properly + close all connections that have been closed by the server already. + +1.24 TCP Fast Open for windows + + libcurl supports the CURLOPT_TCP_FASTOPEN option since 7.49.0 for Linux and + Mac OS. Windows supports TCP Fast Open starting with Windows 10, version 1607 + and we should add support for it. + +1.25 Expose tried IP addresses that failed + + When libcurl fails to connect to a host, it should be able to offer the + application the list of IP addresses that were used in the attempt. + + https://github.com/curl/curl/issues/2126 + +1.27 hardcode the "localhost" addresses + + There's this new spec getting adopted that says "localhost" should always and + unconditionally be a local address and not get resolved by a DNS server. A + fine way for curl to fix this would be to simply hard-code the response to + 127.0.0.1 and/or ::1 (depending on what IP versions that are requested). This + is what the browsers probably will do with this hostname. + + https://bugzilla.mozilla.org/show_bug.cgi?id=1220810 + + https://tools.ietf.org/html/draft-ietf-dnsop-let-localhost-be-localhost-02 + +1.28 FD_CLOEXEC + + It sets the close-on-exec flag for the file descriptor, which causes the file + descriptor to be automatically (and atomically) closed when any of the + exec-family functions succeed. Should probably be set by default? + + https://github.com/curl/curl/issues/2252 + +1.29 Upgrade to websockets + + libcurl could offer a smoother path to get to a websocket connection. + See https://github.com/curl/curl/issues/3523 + + Michael Kaufmann suggestion here: + https://curl.haxx.se/video/curlup-2017/2017-03-19_05_Michael_Kaufmann_Websocket_support_for_curl.mp4 + +1.30 config file parsing + + Consider providing an API, possibly in a separate companion library, for + parsing a config file like curl's -K/--config option to allow applications to + get the same ability to read curl options from files. + + See https://github.com/curl/curl/issues/3698 + +2. libcurl - multi interface + +2.1 More non-blocking + + Make sure we don't ever loop because of non-blocking sockets returning + EWOULDBLOCK or similar. Blocking cases include: + + - Name resolves on non-windows unless c-ares or the threaded resolver is used. + + - The threaded resolver may block on cleanup: + https://github.com/curl/curl/issues/4852 + + - file:// transfers + + - TELNET transfers + + - GSSAPI authentication for FTP transfers + + - The "DONE" operation (post transfer protocol-specific actions) for the + protocols SFTP, SMTP, FTP. Fixing multi_done() for this is a worthy task. + + - curl_multi_remove_handle for any of the above. See section 2.3. + +2.2 Better support for same name resolves + + If a name resolve has been initiated for name NN and a second easy handle + wants to resolve that name as well, make it wait for the first resolve to end + up in the cache instead of doing a second separate resolve. This is + especially needed when adding many simultaneous handles using the same host + name when the DNS resolver can get flooded. + +2.3 Non-blocking curl_multi_remove_handle() + + The multi interface has a few API calls that assume a blocking behavior, like + add_handle() and remove_handle() which limits what we can do internally. The + multi API need to be moved even more into a single function that "drives" + everything in a non-blocking manner and signals when something is done. A + remove or add would then only ask for the action to get started and then + multi_perform() etc still be called until the add/remove is completed. + +2.4 Split connect and authentication process + + The multi interface treats the authentication process as part of the connect + phase. As such any failures during authentication won't trigger the relevant + QUIT or LOGOFF for protocols such as IMAP, POP3 and SMTP. + +2.5 Edge-triggered sockets should work + + The multi_socket API should work with edge-triggered socket events. One of + the internal actions that need to be improved for this to work perfectly is + the 'maxloops' handling in transfer.c:readwrite_data(). + +2.6 multi upkeep + + In libcurl 7.62.0 we introduced curl_easy_upkeep. It unfortunately only works + on easy handles. We should introduces a version of that for the multi handle, + and also consider doing "upkeep" automatically on connections in the + connection pool when the multi handle is in used. + + See https://github.com/curl/curl/issues/3199 + +2.7 Virtual external sockets + + libcurl performs operations on the given file descriptor that presumes it is + a socket and an application cannot replace them at the moment. Allowing an + application to fully replace those would allow a larger degree of freedom and + flexibility. + + See https://github.com/curl/curl/issues/5835 + +2.8 dynamically decide to use socketpair + + For users who don't use curl_multi_wait() or don't care for + curl_multi_wakeup(), we could introduce a way to make libcurl NOT + create a socketpair in the multi handle. + + See https://github.com/curl/curl/issues/4829 + +3. Documentation + +3.2 Provide cmake config-file + + A config-file package is a set of files provided by us to allow applications + to write cmake scripts to find and use libcurl easier. See + https://github.com/curl/curl/issues/885 + +4. FTP + +4.1 HOST + + HOST is a command for a client to tell which host name to use, to offer FTP + servers named-based virtual hosting: + + https://tools.ietf.org/html/rfc7151 + +4.2 Alter passive/active on failure and retry + + When trying to connect passively to a server which only supports active + connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the + connection. There could be a way to fallback to an active connection (and + vice versa). https://curl.haxx.se/bug/feature.cgi?id=1754793 + +4.3 Earlier bad letter detection + + Make the detection of (bad) %0d and %0a codes in FTP URL parts earlier in the + process to avoid doing a resolve and connect in vain. + +4.5 ASCII support + + FTP ASCII transfers do not follow RFC959. They don't convert the data + accordingly. + +4.6 GSSAPI via Windows SSPI + + In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5) + via third-party GSS-API libraries, such as Heimdal or MIT Kerberos, also add + support for GSSAPI authentication via Windows SSPI. + +4.7 STAT for LIST without data connection + + Some FTP servers allow STAT for listing directories instead of using LIST, + and the response is then sent over the control connection instead of as the + otherwise usedw data connection: https://www.nsftools.com/tips/RawFTP.htm#STAT + + This is not detailed in any FTP specification. + +4.8 Option to ignore private IP addresses in PASV response + + Some servers respond with and some other FTP client implementations can + ignore private (RFC 1918 style) IP addresses when received in PASV responses. + To consider for libcurl as well. See https://github.com/curl/curl/issues/1455 + +5. HTTP + +5.1 Better persistency for HTTP 1.0 + + "Better" support for persistent connections over HTTP 1.0 + https://curl.haxx.se/bug/feature.cgi?id=1089001 + +5.2 Set custom client ip when using haproxy protocol + + This would allow testing servers with different client ip addresses (without + using x-forward-for header). + + https://github.com/curl/curl/issues/5125 + +5.3 Rearrange request header order + + Server implementors often make an effort to detect browser and to reject + clients it can detect to not match. One of the last details we cannot yet + control in libcurl's HTTP requests, which also can be exploited to detect + that libcurl is in fact used even when it tries to impersonate a browser, is + the order of the request headers. I propose that we introduce a new option in + which you give headers a value, and then when the HTTP request is built it + sorts the headers based on that number. We could then have internally created + headers use a default value so only headers that need to be moved have to be + specified. + +5.4 Allow SAN names in HTTP/2 server push + + curl only allows HTTP/2 push promise if the provided :authority header value + exactly matches the host name given in the URL. It could be extended to allow + any name that would match the Subject Alternative Names in the server's TLS + certificate. + + See https://github.com/curl/curl/pull/3581 + +5.5 auth= in URLs + + Add the ability to specify the preferred authentication mechanism to use by + using ;auth= in the login part of the URL. + + For example: + + http://test:pass;auth=NTLM@example.com would be equivalent to specifying + --user test:pass;auth=NTLM or --user test:pass --ntlm from the command line. + + Additionally this should be implemented for proxy base URLs as well. + + +6. TELNET + +6.1 ditch stdin + + Reading input (to send to the remote server) on stdin is a crappy solution + for library purposes. We need to invent a good way for the application to be + able to provide the data to send. + +6.2 ditch telnet-specific select + + Move the telnet support's network select() loop go away and merge the code + into the main transfer loop. Until this is done, the multi interface won't + work for telnet. + +6.3 feature negotiation debug data + + Add telnet feature negotiation data to the debug callback as header data. + + +7. SMTP + +7.2 Enhanced capability support + + Add the ability, for an application that uses libcurl, to obtain the list of + capabilities returned from the EHLO command. + +7.3 Add CURLOPT_MAIL_CLIENT option + + Rather than use the URL to specify the mail client string to present in the + HELO and EHLO commands, libcurl should support a new CURLOPT specifically for + specifying this data as the URL is non-standard and to be honest a bit of a + hack ;-) + + Please see the following thread for more information: + https://curl.haxx.se/mail/lib-2012-05/0178.html + + +8. POP3 + +8.2 Enhanced capability support + + Add the ability, for an application that uses libcurl, to obtain the list of + capabilities returned from the CAPA command. + +9. IMAP + +9.1 Enhanced capability support + + Add the ability, for an application that uses libcurl, to obtain the list of + capabilities returned from the CAPABILITY command. + +10. LDAP + +10.1 SASL based authentication mechanisms + + Currently the LDAP module only supports ldap_simple_bind_s() in order to bind + to an LDAP server. However, this function sends username and password details + using the simple authentication mechanism (as clear text). However, it should + be possible to use ldap_bind_s() instead specifying the security context + information ourselves. + +10.2 CURLOPT_SSL_CTX_FUNCTION for LDAPS + + CURLOPT_SSL_CTX_FUNCTION works perfectly for HTTPS and email protocols, but + it has no effect for LDAPS connections. + + https://github.com/curl/curl/issues/4108 + +10.3 Paged searches on LDAP server + + https://github.com/curl/curl/issues/4452 + +11. SMB + +11.1 File listing support + +Add support for listing the contents of a SMB share. The output should probably +be the same as/similar to FTP. + +11.2 Honor file timestamps + +The timestamp of the transferred file should reflect that of the original file. + +11.3 Use NTLMv2 + +Currently the SMB authentication uses NTLMv1. + +11.4 Create remote directories + +Support for creating remote directories when uploading a file to a directory +that doesn't exist on the server, just like --ftp-create-dirs. + +12. New protocols + +13. SSL + +13.1 TLS-PSK with OpenSSL + + Transport Layer Security pre-shared key ciphersuites (TLS-PSK) is a set of + cryptographic protocols that provide secure communication based on pre-shared + keys (PSKs). These pre-shared keys are symmetric keys shared in advance among + the communicating parties. + + https://github.com/curl/curl/issues/5081 + +13.2 Provide mutex locking API + + Provide a libcurl API for setting mutex callbacks in the underlying SSL + library, so that the same application code can use mutex-locking + independently of OpenSSL or GnutTLS being used. + +13.3 Support in-memory certs/ca certs/keys + + You can specify the private and public keys for SSH/SSL as file paths. Some + programs want to avoid using files and instead just pass them as in-memory + data blobs. There's probably a challenge to make this work across the + plethory of different TLS and SSH backends that curl supports. + https://github.com/curl/curl/issues/2310 + +13.4 Cache/share OpenSSL contexts + + "Look at SSL cafile - quick traces look to me like these are done on every + request as well, when they should only be necessary once per SSL context (or + once per handle)". The major improvement we can rather easily do is to make + sure we don't create and kill a new SSL "context" for every request, but + instead make one for every connection and re-use that SSL context in the same + style connections are re-used. It will make us use slightly more memory but + it will libcurl do less creations and deletions of SSL contexts. + + Technically, the "caching" is probably best implemented by getting added to + the share interface so that easy handles who want to and can reuse the + context specify that by sharing with the right properties set. + + https://github.com/curl/curl/issues/1110 + +13.5 Export session ids + + Add an interface to libcurl that enables "session IDs" to get + exported/imported. Cris Bailiff said: "OpenSSL has functions which can + serialise the current SSL state to a buffer of your choice, and recover/reset + the state from such a buffer at a later date - this is used by mod_ssl for + apache to implement and SSL session ID cache". + +13.6 Provide callback for cert verification + + OpenSSL supports a callback for customised verification of the peer + certificate, but this doesn't seem to be exposed in the libcurl APIs. Could + it be? There's so much that could be done if it were! + +13.7 improve configure --with-ssl + + make the configure --with-ssl option first check for OpenSSL, then GnuTLS, + then NSS... + +13.8 Support DANE + + DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL + keys and certs over DNS using DNSSEC as an alternative to the CA model. + https://www.rfc-editor.org/rfc/rfc6698.txt + + An initial patch was posted by Suresh Krishnaswamy on March 7th 2013 + (https://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple + approach. See Daniel's comments: + https://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the + correct library to base this development on. + + Björn Stenberg wrote a separate initial take on DANE that was never + completed. + +13.9 TLS record padding + + TLS (1.3) offers optional record padding and OpenSSL provides an API for it. + I could make sense for libcurl to offer this ability to applications to make + traffic patterns harder to figure out by network traffic observers. + + See https://github.com/curl/curl/issues/5398 + +13.10 Support Authority Information Access certificate extension (AIA) + + AIA can provide various things like CRLs but more importantly information + about intermediate CA certificates that can allow validation path to be + fulfilled when the HTTPS server doesn't itself provide them. + + Since AIA is about downloading certs on demand to complete a TLS handshake, + it is probably a bit tricky to get done right. + + See https://github.com/curl/curl/issues/2793 + +13.11 Support intermediate & root pinning for PINNEDPUBLICKEY + + CURLOPT_PINNEDPUBLICKEY does not consider the hashes of intermediate & root + certificates when comparing the pinned keys. Therefore it is not compatible + with "HTTP Public Key Pinning" as there also intermediate and root + certificates can be pinned. This is very useful as it prevents webadmins from + "locking themself out of their servers". + + Adding this feature would make curls pinning 100% compatible to HPKP and + allow more flexible pinning. + +13.12 Support HSTS + + "HTTP Strict Transport Security" is TOFU (trust on first use), time-based + features indicated by a HTTP header send by the webserver. It is widely used + in browsers and it's purpose is to prevent insecure HTTP connections after a + previous HTTPS connection. It protects against SSLStripping attacks. + + Doc: https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security + RFC 6797: https://tools.ietf.org/html/rfc6797 + +13.13 Make sure we forbid TLS 1.3 post-handshake authentication + + RFC 8740 explains how using HTTP/2 must forbid the use of TLS 1.3 + post-handshake authentication. We should make sure to live up to that. + + See https://github.com/curl/curl/issues/5396 + +13.14 Support the clienthello extension + + Certain stupid networks and middle boxes have a problem with SSL handshake + pakets that are within a certain size range because how that sets some bits + that previously (in older TLS version) were not set. The clienthello + extension adds padding to avoid that size range. + + https://tools.ietf.org/html/rfc7685 + https://github.com/curl/curl/issues/2299 + +14. GnuTLS + +14.2 check connection + + Add a way to check if the connection seems to be alive, to correspond to the + SSL_peak() way we use with OpenSSL. + +15. Schannel + +15.1 Extend support for client certificate authentication + + The existing support for the -E/--cert and --key options could be + extended by supplying a custom certificate and key in PEM format, see: + - Getting a Certificate for Schannel + https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx + +15.2 Extend support for the --ciphers option + + The existing support for the --ciphers option could be extended + by mapping the OpenSSL/GnuTLS cipher suites to the Schannel APIs, see + - Specifying Schannel Ciphers and Cipher Strengths + https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx + +15.3 Add option to disable client certificate auto-send + + Microsoft says "By default, Schannel will, with no notification to the client, + attempt to locate a client certificate and send it to the server." That could + be considered a privacy violation and unexpected. + + Some Windows users have come to expect that default behavior and to change the + default to make it consistent with other SSL backends would be a breaking + change. An option should be added that can be used to disable the default + Schannel auto-send behavior. + + https://github.com/curl/curl/issues/2262 + +15.4 Add option to allow abrupt server closure + + libcurl w/schannel will error without a known termination point from the + server (such as length of transfer, or SSL "close notify" alert) to prevent + against a truncation attack. Really old servers may neglect to send any + termination point. An option could be added to ignore such abrupt closures. + + https://github.com/curl/curl/issues/4427 + +16. SASL + +16.1 Other authentication mechanisms + + Add support for other authentication mechanisms such as OLP, + GSS-SPNEGO and others. + +16.2 Add QOP support to GSSAPI authentication + + Currently the GSSAPI authentication only supports the default QOP of auth + (Authentication), whilst Kerberos V5 supports both auth-int (Authentication + with integrity protection) and auth-conf (Authentication with integrity and + privacy protection). + +16.3 Support binary messages (i.e.: non-base64) + + Mandatory to support LDAP SASL authentication. + + +17. SSH protocols + +17.1 Multiplexing + + SSH is a perfectly fine multiplexed protocols which would allow libcurl to do + multiple parallel transfers from the same host using the same connection, + much in the same spirit as HTTP/2 does. libcurl however does not take + advantage of that ability but will instead always create a new connection for + new transfers even if an existing connection already exists to the host. + + To fix this, libcurl would have to detect an existing connection and "attach" + the new transfer to the existing one. + +17.2 Handle growing SFTP files + + The SFTP code in libcurl checks the file size *before* a transfer starts and + then proceeds to transfer exactly that amount of data. If the remote file + grows while the transfer is in progress libcurl won't notice and will not + adapt. The OpenSSH SFTP command line tool does and libcurl could also just + attempt to download more to see if there is more to get... + + https://github.com/curl/curl/issues/4344 + +17.3 Support better than MD5 hostkey hash + + libcurl offers the CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 option for verifying the + server's key. MD5 is generally being deprecated so we should implement + support for stronger hashing algorithms. libssh2 itself is what provides this + underlying functionality and it supports at least SHA-1 as an alternative. + SHA-1 is also being deprecated these days so we should consider working with + libssh2 to instead offer support for SHA-256 or similar. + +17.4 Support CURLOPT_PREQUOTE + + The two other QUOTE options are supported for SFTP, but this was left out for + unknown reasons! + +17.5 SSH over HTTPS proxy with more backends + + The SSH based protocols SFTP and SCP didn't work over HTTPS proxy at + all until PR https://github.com/curl/curl/pull/6021 brought the + functionality with the libssh2 backend. Presumably, this support + can/could be added for the other backends as well. + +18. Command line tool + +18.1 sync + + "curl --sync http://example.com/feed[1-100].rss" or + "curl --sync http://example.net/{index,calendar,history}.html" + + Downloads a range or set of URLs using the remote name, but only if the + remote file is newer than the local file. A Last-Modified HTTP date header + should also be used to set the mod date on the downloaded file. + +18.2 glob posts + + Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'. + This is easily scripted though. + +18.3 prevent file overwriting + + Add an option that prevents curl from overwriting existing local files. When + used, and there already is an existing file with the target file name + (either -O or -o), a number should be appended (and increased if already + existing). So that index.html becomes first index.html.1 and then + index.html.2 etc. + +18.4 --proxycommand + + Allow the user to make curl run a command and use its stdio to make requests + and not do any network connection by itself. Example: + + curl --proxycommand 'ssh pi@raspberrypi.local -W 10.1.1.75 80' \ + http://some/otherwise/unavailable/service.php + + See https://github.com/curl/curl/issues/4941 + +18.5 UTF-8 filenames in Content-Disposition + + RFC 6266 documents how UTF-8 names can be passed to a client in the + Content-Disposition header, and curl does not support this. + + https://github.com/curl/curl/issues/1888 + +18.6 Option to make -Z merge lined based outputs on stdout + + When a user requests multiple lined based files using -Z and sends them to + stdout, curl will not "merge" and send complete lines fine but may very well + send partial lines from several sources. + + https://github.com/curl/curl/issues/5175 + +18.7 at least N milliseconds between requests + + Allow curl command lines issue a lot of request against services that limit + users to no more than N requests/second or similar. Could be implemented with + an option asking that at least a certain time has elapsed since the previous + request before the next one will be performed. Example: + + $ curl "https://example.com/api?input=[1-1000]" -d yadayada --after 500 + + See https://github.com/curl/curl/issues/3920 + +18.8 Consider convenience options for JSON and XML? + + Could we add `--xml` or `--json` to add headers needed to call rest API: + + `--xml` adds -H 'Content-Type: application/xml' -H "Accept: application/xml" and + `--json` adds -H 'Content-Type: application/json' -H "Accept: application/json" + + Setting Content-Type when doing a GET or any other method without a body + would be a bit strange I think - so maybe only add CT for requests with body? + Maybe plain `--xml` and ` --json` are a bit too brief and generic. Maybe + `--http-json` etc? + + See https://github.com/curl/curl/issues/5203 + +18.9 Choose the name of file in braces for complex URLs + + When using braces to download a list of URLs and you use complicated names + in the list of alternatives, it could be handy to allow curl to use other + names when saving. + + Consider a way to offer that. Possibly like + {partURL1:name1,partURL2:name2,partURL3:name3} where the name following the + colon is the output name. + + See https://github.com/curl/curl/issues/221 + +18.10 improve how curl works in a windows console window + + If you pull the scrollbar when transferring with curl in a Windows console + window, the transfer is interrupted and can get disconnected. This can + probably be improved. See https://github.com/curl/curl/issues/322 + +18.11 Windows: set attribute 'archive' for completed downloads + + The archive bit (FILE_ATTRIBUTE_ARCHIVE, 0x20) separates files that shall be + backed up from those that are either not ready or have not changed. + + Downloads in progress are neither ready to be backed up, nor should they be + opened by a different process. Only after a download has been completed it's + sensible to include it in any integer snapshot or backup of the system. + + See https://github.com/curl/curl/issues/3354 + +18.12 keep running, read instructions from pipe/socket + + Provide an option that makes curl not exit after the last URL (or even work + without a given URL), and then make it read instructions passed on a pipe or + over a socket to make further instructions so that a second subsequent curl + invoke can talk to the still running instance and ask for transfers to get + done, and thus maintain its connection pool, DNS cache and more. + +18.13 Ratelimit or wait between serial requests + + Consider a command line option that can make curl do multiple serial requests + slow, potentially with a (random) wait between transfers. There's also a + propsed set of standard HTTP headers to let servers let the client adapt to + its rate limits: + https://www.ietf.org/id/draft-polli-ratelimit-headers-02.html + + See https://github.com/curl/curl/issues/5406 + +18.14 --dry-run + + A command line option that makes curl show exactly what it would do and send + if it would run for real. + + See https://github.com/curl/curl/issues/5426 + +18.15 --retry should resume + + When --retry is used and curl actually retries transfer, it should use the + already transferred data and do a resumed transfer for the rest (when + possible) so that it doesn't have to transfer the same data again that was + already transferred before the retry. + + See https://github.com/curl/curl/issues/1084 + +18.16 send only part of --data + + When the user only wants to send a small piece of the data provided with + --data or --data-binary, like when that data is a huge file, consider a way + to specify that curl should only send a piece of that. One suggested syntax + would be: "--data-binary @largefile.zip!1073741823-2147483647". + + See https://github.com/curl/curl/issues/1200 + +18.17 consider file name from the redirected URL with -O ? + + When a user gives a URL and uses -O, and curl follows a redirect to a new + URL, the file name is not extracted and used from the newly redirected-to URL + even if the new URL may have a much more sensible file name. + + This is clearly documented and helps for security since there's no surprise + to users which file name that might get overwritten. But maybe a new option + could allow for this or maybe -J should imply such a treatment as well as -J + already allows for the server to decide what file name to use so it already + provides the "may overwrite any file" risk. + + This is extra tricky if the original URL has no file name part at all since + then the current code path will error out with an error message, and we can't + *know* already at that point if curl will be redirected to a URL that has a + file name... + + See https://github.com/curl/curl/issues/1241 + +18.18 retry on network is unreachable + + The --retry option retries transfers on "transient failures". We later added + --retry-connrefused to also retry for "connection refused" errors. + + Suggestions have been brought to also allow retry on "network is unreachable" + errors and while totally reasonable, maybe we should consider a way to make + this more configurable than to add a new option for every new error people + want to retry for? + + https://github.com/curl/curl/issues/1603 + +18.19 expand ~/ in config files + + For example .curlrc could benefit from being able to do this. + + See https://github.com/curl/curl/issues/2317 + +18.20 host name sections in config files + + config files would be more powerful if they could set different + configurations depending on used URLs, host name or possibly origin. Then a + default .curlrc could a specific user-agent only when doing requests against + a certain site. + +18.21 retry on the redirected-to URL + + When curl is told to --retry a failed transfer and follows redirects, it + might get a HTTP 429 response from the redirected-to URL and not the original + one, which then could make curl decide to rather retry the transfer on that + URL only instead of the original operation to the original URL. + + Perhaps extra emphasized if the original transfer is a large POST that + redirects to a separate GET, and that GET is what gets the 529 + + See https://github.com/curl/curl/issues/5462 + +18.23 Set the modification date on an uploaded file + + For SFTP and posssibly FTP, curl could offer an option to set the + modification time for the uploaded file. + + See https://github.com/curl/curl/issues/5768 + +18.24 Use multiple parallel transfers for a single download + + To enhance transfer speed, downloading a single URL can be split up into + multiple separate range downloads that get combined into a single final + result. + + An ideal implementation would not use a specified number of parallel + transfers, but curl could: + - First start getting the full file as transfer A + - If after N seconds have passed and the transfer is expected to continue for + M seconds or more, add a new transfer (B) that asks for the second half of + A's content (and stop A at the middle). + - If splitting up the work improves the transfer rate, it could then be done + again. Then again, etc up to a limit. + + This way, if transfer B fails (because Range: isn't supported) it will let + transfer A remain the single one. N and M could be set to some sensible + defaults. + + See https://github.com/curl/curl/issues/5774 + +19. Build + +19.1 roffit + + Consider extending 'roffit' to produce decent ASCII output, and use that + instead of (g)nroff when building src/tool_hugehelp.c + +19.2 Enable PIE and RELRO by default + + Especially when having programs that execute curl via the command line, PIE + renders the exploitation of memory corruption vulnerabilities a lot more + difficult. This can be attributed to the additional information leaks being + required to conduct a successful attack. RELRO, on the other hand, masks + different binary sections like the GOT as read-only and thus kills a handful + of techniques that come in handy when attackers are able to arbitrarily + overwrite memory. A few tests showed that enabling these features had close + to no impact, neither on the performance nor on the general functionality of + curl. + +19.3 Don't use GNU libtool on OpenBSD + When compiling curl on OpenBSD with "--enable-debug" it will give linking + errors when you use GNU libtool. This can be fixed by using the libtool + provided by OpenBSD itself. However for this the user always needs to invoke + make with "LIBTOOL=/usr/bin/libtool". It would be nice if the script could + have some magic to detect if this system is an OpenBSD host and then use the + OpenBSD libtool instead. + + See https://github.com/curl/curl/issues/5862 + +20. Test suite + +20.1 SSL tunnel + + Make our own version of stunnel for simple port forwarding to enable HTTPS + and FTP-SSL tests without the stunnel dependency, and it could allow us to + provide test tools built with either OpenSSL or GnuTLS + +20.2 nicer lacking perl message + + If perl wasn't found by the configure script, don't attempt to run the tests + but explain something nice why it doesn't. + +20.3 more protocols supported + + Extend the test suite to include more protocols. The telnet could just do FTP + or http operations (for which we have test servers). + +20.4 more platforms supported + + Make the test suite work on more platforms. OpenBSD and Mac OS. Remove + fork()s and it should become even more portable. + +20.5 Add support for concurrent connections + + Tests 836, 882 and 938 were designed to verify that separate connections + aren't used when using different login credentials in protocols that + shouldn't re-use a connection under such circumstances. + + Unfortunately, ftpserver.pl doesn't appear to support multiple concurrent + connections. The read while() loop seems to loop until it receives a + disconnect from the client, where it then enters the waiting for connections + loop. When the client opens a second connection to the server, the first + connection hasn't been dropped (unless it has been forced - which we + shouldn't do in these tests) and thus the wait for connections loop is never + entered to receive the second connection. + +20.6 Use the RFC6265 test suite + + A test suite made for HTTP cookies (RFC 6265) by Adam Barth is available at + https://github.com/abarth/http-state/tree/master/tests + + It'd be really awesome if someone would write a script/setup that would run + curl with that test suite and detect deviances. Ideally, that would even be + incorporated into our regular test suite. + +20.7 Support LD_PRELOAD on macOS + + LD_RELOAD doesn't work on macOS, but there are tests which require it to run + properly. Look into making the preload support in runtests.pl portable such + that it uses DYLD_INSERT_LIBRARIES on macOS. + +20.8 Run web-platform-tests url tests + + Run web-platform-tests url tests and compare results with browsers on wpt.fyi + + It would help us find issues to fix and help us document where our parser + differs from the WHATWG URL spec parsers. + + See https://github.com/curl/curl/issues/4477 + +20.9 Use "random" ports for the test servers + + Instead of insisting and using fixed port numbers for the tests (even though + they can be changed with a switch), consider letting each server pick a + random available one at start-up, store that info in a file and let the test + suite use that. + + We could then remove the "check that it is our server that's running"-check + and we would immediately detect when we write tests wrongly to use hard-coded + port numbers. + +21. Next SONAME bump + +21.1 http-style HEAD output for FTP + + #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers + from being output in NOBODY requests over FTP + +21.2 combine error codes + + Combine some of the error codes to remove duplicates. The original + numbering should not be changed, and the old identifiers would be + macroed to the new ones in an CURL_NO_OLDIES section to help with + backward compatibility. + + Candidates for removal and their replacements: + + CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND + + CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND + + CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR + + CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT + + CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT + + CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL + + CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND + + CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED + +21.3 extend CURLOPT_SOCKOPTFUNCTION prototype + + The current prototype only provides 'purpose' that tells what the + connection/socket is for, but not any protocol or similar. It makes it hard + for applications to differentiate on TCP vs UDP and even HTTP vs FTP and + similar. + +22. Next major release + +22.1 cleanup return codes + + curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a + CURLMcode. These should be changed to be the same. + +22.2 remove obsolete defines + + remove obsolete defines from curl/curl.h + +22.3 size_t + + make several functions use size_t instead of int in their APIs + +22.4 remove several functions + + remove the following functions from the public API: + + curl_getenv + + curl_mprintf (and variations) + + curl_strequal + + curl_strnequal + + They will instead become curlx_ - alternatives. That makes the curl app + still capable of using them, by building with them from source. + + These functions have no purpose anymore: + + curl_multi_socket + + curl_multi_socket_all + +22.5 remove CURLOPT_FAILONERROR + + Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird + internally. Let the app judge success or not for itself. + +22.7 remove progress meter from libcurl + + The internally provided progress meter output doesn't belong in the library. + Basically no application wants it (apart from curl) but instead applications + can and should do their own progress meters using the progress callback. + + The progress callback should then be bumped as well to get proper 64bit + variable types passed to it instead of doubles so that big files work + correctly. + +22.8 remove 'curl_httppost' from public + + curl_formadd() was made to fill in a public struct, but the fact that the + struct is public is never really used by application for their own advantage + but instead often restricts how the form functions can or can't be modified. + + Changing them to return a private handle will benefit the implementation and + allow us much greater freedoms while still maintaining a solid API and ABI. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TheArtOfHttpScripting.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TheArtOfHttpScripting.md new file mode 100644 index 00000000..8de00f0a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/TheArtOfHttpScripting.md @@ -0,0 +1,692 @@ +# The Art Of Scripting HTTP Requests Using Curl + +## Background + + This document assumes that you're familiar with HTML and general networking. + + The increasing amount of applications moving to the web has made "HTTP + Scripting" more frequently requested and wanted. To be able to automatically + extract information from the web, to fake users, to post or upload data to + web servers are all important tasks today. + + Curl is a command line tool for doing all sorts of URL manipulations and + transfers, but this particular document will focus on how to use it when + doing HTTP requests for fun and profit. I willl assume that you know how to + invoke `curl --help` or `curl --manual` to get basic information about it. + + Curl is not written to do everything for you. It makes the requests, it gets + the data, it sends data and it retrieves the information. You probably need + to glue everything together using some kind of script language or repeated + manual invokes. + +## The HTTP Protocol + + HTTP is the protocol used to fetch data from web servers. It is a very simple + protocol that is built upon TCP/IP. The protocol also allows information to + get sent to the server from the client using a few different methods, as will + be shown here. + + HTTP is plain ASCII text lines being sent by the client to a server to + request a particular action, and then the server replies a few text lines + before the actual requested content is sent to the client. + + The client, curl, sends a HTTP request. The request contains a method (like + GET, POST, HEAD etc), a number of request headers and sometimes a request + body. The HTTP server responds with a status line (indicating if things went + well), response headers and most often also a response body. The "body" part + is the plain data you requested, like the actual HTML or the image etc. + +## See the Protocol + + Using curl's option [`--verbose`](https://curl.haxx.se/docs/manpage.html#-v) + (`-v` as a short option) will display what kind of commands curl sends to the + server, as well as a few other informational texts. + + `--verbose` is the single most useful option when it comes to debug or even + understand the curl<->server interaction. + + Sometimes even `--verbose` is not enough. Then + [`--trace`](https://curl.haxx.se/docs/manpage.html#-trace) and + [`--trace-ascii`]((https://curl.haxx.se/docs/manpage.html#--trace-ascii) + offer even more details as they show **everything** curl sends and + receives. Use it like this: + + curl --trace-ascii debugdump.txt http://www.example.com/ + +## See the Timing + + Many times you may wonder what exactly is taking all the time, or you just + want to know the amount of milliseconds between two points in a transfer. For + those, and other similar situations, the + [`--trace-time`]((https://curl.haxx.se/docs/manpage.html#--trace-time) option + is what you need. It'll prepend the time to each trace output line: + + curl --trace-ascii d.txt --trace-time http://example.com/ + +## See the Response + + By default curl sends the response to stdout. You need to redirect it + somewhere to avoid that, most often that is done with ` -o` or `-O`. + +# URL + +## Spec + + The Uniform Resource Locator format is how you specify the address of a + particular resource on the Internet. You know these, you've seen URLs like + https://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the + canonical spec. And yeah, the formal name is not URL, it is URI. + +## Host + + The host name is usually resolved using DNS or your /etc/hosts file to an IP + address and that's what curl will communicate with. Alternatively you specify + the IP address directly in the URL instead of a name. + + For development and other trying out situations, you can point to a different + IP address for a host name than what would otherwise be used, by using curl's + [`--resolve`](https://curl.haxx.se/docs/manpage.html#--resolve) option: + + curl --resolve www.example.org:80:127.0.0.1 http://www.example.org/ + +## Port number + + Each protocol curl supports operates on a default port number, be it over TCP + or in some cases UDP. Normally you don't have to take that into + consideration, but at times you run test servers on other ports or + similar. Then you can specify the port number in the URL with a colon and a + number immediately following the host name. Like when doing HTTP to port + 1234: + + curl http://www.example.org:1234/ + + The port number you specify in the URL is the number that the server uses to + offer its services. Sometimes you may use a local proxy, and then you may + need to specify that proxy's port number separately for what curl needs to + connect to locally. Like when using a HTTP proxy on port 4321: + + curl --proxy http://proxy.example.org:4321 http://remote.example.org/ + +## User name and password + + Some services are setup to require HTTP authentication and then you need to + provide name and password which is then transferred to the remote site in + various ways depending on the exact authentication protocol used. + + You can opt to either insert the user and password in the URL or you can + provide them separately: + + curl http://user:password@example.org/ + + or + + curl -u user:password http://example.org/ + + You need to pay attention that this kind of HTTP authentication is not what + is usually done and requested by user-oriented websites these days. They tend + to use forms and cookies instead. + +## Path part + + The path part is just sent off to the server to request that it sends back + the associated response. The path is what is to the right side of the slash + that follows the host name and possibly port number. + +# Fetch a page + +## GET + + The simplest and most common request/operation made using HTTP is to GET a + URL. The URL could itself refer to a web page, an image or a file. The client + issues a GET request to the server and receives the document it asked for. + If you issue the command line + + curl https://curl.haxx.se + + you get a web page returned in your terminal window. The entire HTML document + that that URL holds. + + All HTTP replies contain a set of response headers that are normally hidden, + use curl's [`--include`](https://curl.haxx.se/docs/manpage.html#-i) (`-i`) + option to display them as well as the rest of the document. + +## HEAD + + You can ask the remote server for ONLY the headers by using the + [`--head`](https://curl.haxx.se/docs/manpage.html#-I) (`-I`) option which + will make curl issue a HEAD request. In some special cases servers deny the + HEAD method while others still work, which is a particular kind of annoyance. + + The HEAD method is defined and made so that the server returns the headers + exactly the way it would do for a GET, but without a body. It means that you + may see a `Content-Length:` in the response headers, but there must not be an + actual body in the HEAD response. + +## Multiple URLs in a single command line + + A single curl command line may involve one or many URLs. The most common case + is probably to just use one, but you can specify any amount of URLs. Yes + any. No limits. You'll then get requests repeated over and over for all the + given URLs. + + Example, send two GETs: + + curl http://url1.example.com http://url2.example.com + + If you use [`--data`](https://curl.haxx.se/docs/manpage.html#-d) to POST to + the URL, using multiple URLs means that you send that same POST to all the + given URLs. + + Example, send two POSTs: + + curl --data name=curl http://url1.example.com http://url2.example.com + + +## Multiple HTTP methods in a single command line + + Sometimes you need to operate on several URLs in a single command line and do + different HTTP methods on each. For this, you'll enjoy the + [`--next`](https://curl.haxx.se/docs/manpage.html#-:) option. It is basically + a separator that separates a bunch of options from the next. All the URLs + before `--next` will get the same method and will get all the POST data + merged into one. + + When curl reaches the `--next` on the command line, it'll sort of reset the + method and the POST data and allow a new set. + + Perhaps this is best shown with a few examples. To send first a HEAD and then + a GET: + + curl -I http://example.com --next http://example.com + + To first send a POST and then a GET: + + curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html + +# HTML forms + +## Forms explained + + Forms are the general way a website can present a HTML page with fields for + the user to enter data in, and then press some kind of 'OK' or 'Submit' + button to get that data sent to the server. The server then typically uses + the posted data to decide how to act. Like using the entered words to search + in a database, or to add the info in a bug tracking system, display the + entered address on a map or using the info as a login-prompt verifying that + the user is allowed to see what it is about to see. + + Of course there has to be some kind of program on the server end to receive + the data you send. You cannot just invent something out of the air. + +## GET + + A GET-form uses the method GET, as specified in HTML like: + +
+ + +
+ + In your favorite browser, this form will appear with a text box to fill in + and a press-button labeled "OK". If you fill in '1905' and press the OK + button, your browser will then create a new URL to get for you. The URL will + get `junk.cgi?birthyear=1905&press=OK` appended to the path part of the + previous URL. + + If the original form was seen on the page `www.example.com/when/birth.html`, + the second page you'll get will become + `www.example.com/when/junk.cgi?birthyear=1905&press=OK`. + + Most search engines work this way. + + To make curl do the GET form post for you, just enter the expected created + URL: + + curl "http://www.example.com/when/junk.cgi?birthyear=1905&press=OK" + +## POST + + The GET method makes all input field names get displayed in the URL field of + your browser. That's generally a good thing when you want to be able to + bookmark that page with your given data, but it is an obvious disadvantage if + you entered secret information in one of the fields or if there are a large + amount of fields creating a very long and unreadable URL. + + The HTTP protocol then offers the POST method. This way the client sends the + data separated from the URL and thus you won't see any of it in the URL + address field. + + The form would look very similar to the previous one: + +
+ + +
+ + And to use curl to post this form with the same data filled in as before, we + could do it like: + + curl --data "birthyear=1905&press=%20OK%20" http://www.example.com/when.cgi + + This kind of POST will use the Content-Type + `application/x-www-form-urlencoded' and is the most widely used POST kind. + + The data you send to the server MUST already be properly encoded, curl will + not do that for you. For example, if you want the data to contain a space, + you need to replace that space with %20 etc. Failing to comply with this will + most likely cause your data to be received wrongly and messed up. + + Recent curl versions can in fact url-encode POST data for you, like this: + + curl --data-urlencode "name=I am Daniel" http://www.example.com + + If you repeat `--data` several times on the command line, curl will + concatenate all the given data pieces - and put a `&` symbol between each + data segment. + +## File Upload POST + + Back in late 1995 they defined an additional way to post data over HTTP. It + is documented in the RFC 1867, why this method sometimes is referred to as + RFC1867-posting. + + This method is mainly designed to better support file uploads. A form that + allows a user to upload a file could be written like this in HTML: + +
+ + +
+ + This clearly shows that the Content-Type about to be sent is + `multipart/form-data`. + + To post to a form like this with curl, you enter a command line like: + + curl --form upload=@localfilename --form press=OK [URL] + +## Hidden Fields + + A very common way for HTML based applications to pass state information + between pages is to add hidden fields to the forms. Hidden fields are already + filled in, they aren't displayed to the user and they get passed along just + as all the other fields. + + A similar example form with one visible field, one hidden field and one + submit button could look like: + +
+ + + +
+ + To POST this with curl, you won't have to think about if the fields are + hidden or not. To curl they're all the same: + + curl --data "birthyear=1905&press=OK&person=daniel" [URL] + +## Figure Out What A POST Looks Like + + When you're about fill in a form and send to a server by using curl instead + of a browser, you're of course very interested in sending a POST exactly the + way your browser does. + + An easy way to get to see this, is to save the HTML page with the form on + your local disk, modify the 'method' to a GET, and press the submit button + (you could also change the action URL if you want to). + + You will then clearly see the data get appended to the URL, separated with a + `?`-letter as GET forms are supposed to. + +# HTTP upload + +## PUT + + Perhaps the best way to upload data to a HTTP server is to use PUT. Then + again, this of course requires that someone put a program or script on the + server end that knows how to receive a HTTP PUT stream. + + Put a file to a HTTP server with curl: + + curl --upload-file uploadfile http://www.example.com/receive.cgi + +# HTTP Authentication + +## Basic Authentication + + HTTP Authentication is the ability to tell the server your username and + password so that it can verify that you're allowed to do the request you're + doing. The Basic authentication used in HTTP (which is the type curl uses by + default) is **plain text** based, which means it sends username and password + only slightly obfuscated, but still fully readable by anyone that sniffs on + the network between you and the remote server. + + To tell curl to use a user and password for authentication: + + curl --user name:password http://www.example.com + +## Other Authentication + + The site might require a different authentication method (check the headers + returned by the server), and then + [`--ntlm`](https://curl.haxx.se/docs/manpage.html#--ntlm), + [`--digest`](https://curl.haxx.se/docs/manpage.html#--digest), + [`--negotiate`](https://curl.haxx.se/docs/manpage.html#--negotiate) or even + [`--anyauth`](https://curl.haxx.se/docs/manpage.html#--anyauth) might be + options that suit you. + +## Proxy Authentication + + Sometimes your HTTP access is only available through the use of a HTTP + proxy. This seems to be especially common at various companies. A HTTP proxy + may require its own user and password to allow the client to get through to + the Internet. To specify those with curl, run something like: + + curl --proxy-user proxyuser:proxypassword curl.haxx.se + + If your proxy requires the authentication to be done using the NTLM method, + use [`--proxy-ntlm`](https://curl.haxx.se/docs/manpage.html#--proxy-ntlm), if + it requires Digest use + [`--proxy-digest`](https://curl.haxx.se/docs/manpage.html#--proxy-digest). + + If you use any one of these user+password options but leave out the password + part, curl will prompt for the password interactively. + +## Hiding credentials + + Do note that when a program is run, its parameters might be possible to see + when listing the running processes of the system. Thus, other users may be + able to watch your passwords if you pass them as plain command line + options. There are ways to circumvent this. + + It is worth noting that while this is how HTTP Authentication works, very + many websites will not use this concept when they provide logins etc. See the + Web Login chapter further below for more details on that. + +# More HTTP Headers + +## Referer + + A HTTP request may include a 'referer' field (yes it is misspelled), which + can be used to tell from which URL the client got to this particular + resource. Some programs/scripts check the referer field of requests to verify + that this wasn't arriving from an external site or an unknown page. While + this is a stupid way to check something so easily forged, many scripts still + do it. Using curl, you can put anything you want in the referer-field and + thus more easily be able to fool the server into serving your request. + + Use curl to set the referer field with: + + curl --referer http://www.example.come http://www.example.com + +## User Agent + + Very similar to the referer field, all HTTP requests may set the User-Agent + field. It names what user agent (client) that is being used. Many + applications use this information to decide how to display pages. Silly web + programmers try to make different pages for users of different browsers to + make them look the best possible for their particular browsers. They usually + also do different kinds of javascript, vbscript etc. + + At times, you will see that getting a page with curl will not return the same + page that you see when getting the page with your browser. Then you know it + is time to set the User Agent field to fool the server into thinking you're + one of those browsers. + + To make curl look like Internet Explorer 5 on a Windows 2000 box: + + curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL] + + Or why not look like you're using Netscape 4.73 on an old Linux box: + + curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL] + +## Redirects + +## Location header + + When a resource is requested from a server, the reply from the server may + include a hint about where the browser should go next to find this page, or a + new page keeping newly generated output. The header that tells the browser to + redirect is `Location:`. + + Curl does not follow `Location:` headers by default, but will simply display + such pages in the same manner it displays all HTTP replies. It does however + feature an option that will make it attempt to follow the `Location:` + pointers. + + To tell curl to follow a Location: + + curl --location http://www.example.com + + If you use curl to POST to a site that immediately redirects you to another + page, you can safely use + [`--location`](https://curl.haxx.se/docs/manpage.html#-L) (`-L`) and + `--data`/`--form` together. curl will only use POST in the first request, and + then revert to GET in the following operations. + +## Other redirects + + Browser typically support at least two other ways of redirects that curl + doesn't: first the html may contain a meta refresh tag that asks the browser + to load a specific URL after a set number of seconds, or it may use + javascript to do it. + +# Cookies + +## Cookie Basics + + The way the web browsers do "client side state control" is by using + cookies. Cookies are just names with associated contents. The cookies are + sent to the client by the server. The server tells the client for what path + and host name it wants the cookie sent back, and it also sends an expiration + date and a few more properties. + + When a client communicates with a server with a name and path as previously + specified in a received cookie, the client sends back the cookies and their + contents to the server, unless of course they are expired. + + Many applications and servers use this method to connect a series of requests + into a single logical session. To be able to use curl in such occasions, we + must be able to record and send back cookies the way the web application + expects them. The same way browsers deal with them. + +## Cookie options + + The simplest way to send a few cookies to the server when getting a page with + curl is to add them on the command line like: + + curl --cookie "name=Daniel" http://www.example.com + + Cookies are sent as common HTTP headers. This is practical as it allows curl + to record cookies simply by recording headers. Record cookies with curl by + using the [`--dump-header`](https://curl.haxx.se/docs/manpage.html#-D) (`-D`) + option like: + + curl --dump-header headers_and_cookies http://www.example.com + + (Take note that the + [`--cookie-jar`](https://curl.haxx.se/docs/manpage.html#-c) option described + below is a better way to store cookies.) + + Curl has a full blown cookie parsing engine built-in that comes in use if you + want to reconnect to a server and use cookies that were stored from a + previous connection (or hand-crafted manually to fool the server into + believing you had a previous connection). To use previously stored cookies, + you run curl like: + + curl --cookie stored_cookies_in_file http://www.example.com + + Curl's "cookie engine" gets enabled when you use the + [`--cookie`](https://curl.haxx.se/docs/manpage.html#-b) option. If you only + want curl to understand received cookies, use `--cookie` with a file that + doesn't exist. Example, if you want to let curl understand cookies from a + page and follow a location (and thus possibly send back cookies it received), + you can invoke it like: + + curl --cookie nada --location http://www.example.com + + Curl has the ability to read and write cookie files that use the same file + format that Netscape and Mozilla once used. It is a convenient way to share + cookies between scripts or invokes. The `--cookie` (`-b`) switch + automatically detects if a given file is such a cookie file and parses it, + and by using the `--cookie-jar` (`-c`) option you'll make curl write a new + cookie file at the end of an operation: + + curl --cookie cookies.txt --cookie-jar newcookies.txt \ + http://www.example.com + +# HTTPS + +## HTTPS is HTTP secure + + There are a few ways to do secure HTTP transfers. By far the most common + protocol for doing this is what is generally known as HTTPS, HTTP over + SSL. SSL encrypts all the data that is sent and received over the network and + thus makes it harder for attackers to spy on sensitive information. + + SSL (or TLS as the latest version of the standard is called) offers a + truckload of advanced features to allow all those encryptions and key + infrastructure mechanisms encrypted HTTP requires. + + Curl supports encrypted fetches when built to use a TLS library and it can be + built to use one out of a fairly large set of libraries - `curl -V` will show + which one your curl was built to use (if any!). To get a page from a HTTPS + server, simply run curl like: + + curl https://secure.example.com + +## Certificates + + In the HTTPS world, you use certificates to validate that you are the one + you claim to be, as an addition to normal passwords. Curl supports client- + side certificates. All certificates are locked with a pass phrase, which you + need to enter before the certificate can be used by curl. The pass phrase + can be specified on the command line or if not, entered interactively when + curl queries for it. Use a certificate with curl on a HTTPS server like: + + curl --cert mycert.pem https://secure.example.com + + curl also tries to verify that the server is who it claims to be, by + verifying the server's certificate against a locally stored CA cert + bundle. Failing the verification will cause curl to deny the connection. You + must then use [`--insecure`](https://curl.haxx.se/docs/manpage.html#-k) + (`-k`) in case you want to tell curl to ignore that the server can't be + verified. + + More about server certificate verification and ca cert bundles can be read in + the [SSLCERTS document](https://curl.haxx.se/docs/sslcerts.html). + + At times you may end up with your own CA cert store and then you can tell + curl to use that to verify the server's certificate: + + curl --cacert ca-bundle.pem https://example.com/ + +# Custom Request Elements + +## Modify method and headers + + Doing fancy stuff, you may need to add or change elements of a single curl + request. + + For example, you can change the POST request to a PROPFIND and send the data + as `Content-Type: text/xml` (instead of the default Content-Type) like this: + + curl --data "" --header "Content-Type: text/xml" \ + --request PROPFIND example.com + + You can delete a default header by providing one without content. Like you + can ruin the request by chopping off the Host: header: + + curl --header "Host:" http://www.example.com + + You can add headers the same way. Your server may want a `Destination:` + header, and you can add it: + + curl --header "Destination: http://nowhere" http://example.com + +## More on changed methods + + It should be noted that curl selects which methods to use on its own + depending on what action to ask for. `-d` will do POST, `-I` will do HEAD and + so on. If you use the + [`--request`](https://curl.haxx.se/docs/manpage.html#-X) / `-X` option you + can change the method keyword curl selects, but you will not modify curl's + behavior. This means that if you for example use -d "data" to do a POST, you + can modify the method to a `PROPFIND` with `-X` and curl will still think it + sends a POST . You can change the normal GET to a POST method by simply + adding `-X POST` in a command line like: + + curl -X POST http://example.org/ + + ... but curl will still think and act as if it sent a GET so it won't send + any request body etc. + +# Web Login + +## Some login tricks + + While not strictly just HTTP related, it still causes a lot of people + problems so here's the executive run-down of how the vast majority of all + login forms work and how to login to them using curl. + + It can also be noted that to do this properly in an automated fashion, you + will most certainly need to script things and do multiple curl invokes etc. + + First, servers mostly use cookies to track the logged-in status of the + client, so you will need to capture the cookies you receive in the + responses. Then, many sites also set a special cookie on the login page (to + make sure you got there through their login page) so you should make a habit + of first getting the login-form page to capture the cookies set there. + + Some web-based login systems feature various amounts of javascript, and + sometimes they use such code to set or modify cookie contents. Possibly they + do that to prevent programmed logins, like this manual describes how to... + Anyway, if reading the code isn't enough to let you repeat the behavior + manually, capturing the HTTP requests done by your browsers and analyzing the + sent cookies is usually a working method to work out how to shortcut the + javascript need. + + In the actual `
` tag for the login, lots of sites fill-in + random/session or otherwise secretly generated hidden tags and you may need + to first capture the HTML code for the login form and extract all the hidden + fields to be able to do a proper login POST. Remember that the contents need + to be URL encoded when sent in a normal POST. + +# Debug + +## Some debug tricks + + Many times when you run curl on a site, you'll notice that the site doesn't + seem to respond the same way to your curl requests as it does to your + browser's. + + Then you need to start making your curl requests more similar to your + browser's requests: + + - Use the `--trace-ascii` option to store fully detailed logs of the requests + for easier analyzing and better understanding + + - Make sure you check for and use cookies when needed (both reading with + `--cookie` and writing with `--cookie-jar`) + + - Set user-agent (with [`-A`](https://curl.haxx.se/docs/manpage.html#-A)) to + one like a recent popular browser does + + - Set referer (with [`-E`](https://curl.haxx.se/docs/manpage.html#-E)) like + it is set by the browser + + - If you use POST, make sure you send all the fields and in the same order as + the browser does it. + +## Check what the browsers do + + A very good helper to make sure you do this right, is the web browsers' + developers tools that let you view all headers you send and receive (even + when using HTTPS). + + A more raw approach is to capture the HTTP traffic on the network with tools + such as Wireshark or tcpdump and check what headers that were sent and + received by the browser. (HTTPS forces you to use `SSLKEYLOGFILE` to do + that.) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/VERSIONS.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/VERSIONS.md new file mode 100644 index 00000000..72a45474 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/VERSIONS.md @@ -0,0 +1,56 @@ +Version Numbers and Releases +============================ + + Curl is not only curl. Curl is also libcurl. They're actually individually + versioned, but they mostly follow each other rather closely. + + The version numbering is always built up using the same system: + + X.Y.Z + + - X is main version number + - Y is release number + - Z is patch number + +## Bumping numbers + + One of these numbers will get bumped in each new release. The numbers to the + right of a bumped number will be reset to zero. If Z is zero, it may not be + included in the version number. + + The main version number will get bumped when *really* big, world colliding + changes are made. The release number is bumped when changes are performed or + things/features are added. The patch number is bumped when the changes are + mere bugfixes. + + It means that after release 1.2.3, we can release 2.0 if something really big + has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs + were fixed. + + Bumping, as in increasing the number with 1, is unconditionally only + affecting one of the numbers (except the ones to the right of it, that may be + set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99 + becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100 might come. + + All original curl source release archives are named according to the libcurl + version (not according to the curl client version that, as said before, might + differ). + + As a service to any application that might want to support new libcurl + features while still being able to build with older versions, all releases + have the libcurl version stored in the curl/curlver.h file using a static + numbering scheme that can be used for comparison. The version number is + defined as: + + #define LIBCURL_VERSION_NUM 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal. All three number fields are always represented using two digits + (eight bits each). 1.2 would appear as "0x010200" while version 9.11.7 + appears as "0x090b07". + + This 6-digit hexadecimal number is always a greater number in a more recent + release. It makes comparisons with greater than and less than work. + + This number is also available as three separate defines: + `LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/CMakeLists.txt b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/CMakeLists.txt new file mode 100644 index 00000000..a63f4edd --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/CMakeLists.txt @@ -0,0 +1,33 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +set(MANPAGE "${CURL_BINARY_DIR}/docs/curl.1") + +# Load DPAGES and OTHERPAGES from shared file +transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") + +add_custom_command(OUTPUT "${MANPAGE}" + COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/gen.pl" mainpage "${CMAKE_CURRENT_SOURCE_DIR}" > "${MANPAGE}" + DEPENDS ${DPAGES} ${OTHERPAGES} + VERBATIM +) +add_custom_target(generate-curl.1 DEPENDS "${MANPAGE}") diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/MANPAGE.md b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/MANPAGE.md new file mode 100644 index 00000000..3a8270b0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/MANPAGE.md @@ -0,0 +1,52 @@ +# curl man page generator + +This is the curl man page generator. It generates a single nroff man page +output from the set of sources files in this directory. + +There is one source file for each supported command line option. The format is +described below. + +## Option files + +Each command line option is described in a file named `.d`, where +option name is written without any prefixing dashes. Like the file name for +the -v, --verbose option is named `verbose.d`. + +Each file has a set of meta-data and a body of text. + +### Meta-data + + Short: (single letter, without dash) + Long: (long form name, without dashes) + Arg: (the argument the option takes) + Magic: (description of "magic" options) + Tags: (space separated list) + Protocols: (space separated list for which protocols this option works) + Added: (version number in which this was added) + Mutexed: (space separated list of options this overrides, no dashes) + Requires: (space separated list of features this requires, no dashes) + See-also: (space separated list of related options, no dashes) + Help: (short text for the --help output for this option) + --- (end of meta-data) + +### Body + +The body of the description. Only refer to options with their long form option +version, like --verbose. The output generator will replace such with the +correct markup that shows both short and long version. + +## Header + +`page-header` is the nroff formatted file that will be output before the +generated options output for the master man page. + +## Generate + +`./gen.pl mainpage` + +This command outputs a single huge nroff file, meant to become `curl.1`. The +full curl man page. + +`./gen.pl listhelp` + +Generates a full `curl --help` output for all known command line options. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.am b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.am new file mode 100644 index 00000000..0c81b623 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.am @@ -0,0 +1,35 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +AUTOMAKE_OPTIONS = foreign no-dependencies + +MANPAGE = $(top_builddir)/docs/curl.1 + +include Makefile.inc + +EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt + +all: $(MANPAGE) + +$(MANPAGE): $(DPAGES) $(OTHERPAGES) Makefile.inc + @echo "generate $(MANPAGE)" + @(cd $(srcdir) && @PERL@ ./gen.pl mainpage $(DPAGES)) > $(MANPAGE) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.in b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.in new file mode 100644 index 00000000..7c8b2e40 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.in @@ -0,0 +1,820 @@ +# Makefile.in generated by automake 1.16.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# Shared between Makefile.am and CMakeLists.txt +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = docs/cmdline-opts +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/curl-compilers.m4 \ + $(top_srcdir)/m4/curl-confopts.m4 \ + $(top_srcdir)/m4/curl-functions.m4 \ + $(top_srcdir)/m4/curl-openssl.m4 \ + $(top_srcdir)/m4/curl-override.m4 \ + $(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/xc-am-iface.m4 \ + $(top_srcdir)/m4/xc-cc-check.m4 \ + $(top_srcdir)/m4/xc-lt-iface.m4 \ + $(top_srcdir)/m4/xc-translit.m4 \ + $(top_srcdir)/m4/xc-val-flgs.m4 \ + $(top_srcdir)/m4/zz40-xc-ovr.m4 \ + $(top_srcdir)/m4/zz50-xc-ovr.m4 \ + $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/lib/curl_config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +depcomp = +am__maybe_remake_depfiles = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AR_FLAGS = @AR_FLAGS@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ +CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@ +CURLVERSION = @CURLVERSION@ +CURL_CA_BUNDLE = @CURL_CA_BUNDLE@ +CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@ +CURL_DISABLE_DICT = @CURL_DISABLE_DICT@ +CURL_DISABLE_FILE = @CURL_DISABLE_FILE@ +CURL_DISABLE_FTP = @CURL_DISABLE_FTP@ +CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@ +CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@ +CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@ +CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@ +CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@ +CURL_DISABLE_MQTT = @CURL_DISABLE_MQTT@ +CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@ +CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@ +CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@ +CURL_DISABLE_SMB = @CURL_DISABLE_SMB@ +CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@ +CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@ +CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@ +CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@ +CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@ +CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@ +CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_SHARED = @ENABLE_SHARED@ +ENABLE_STATIC = @ENABLE_STATIC@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@ +GCOV = @GCOV@ +GREP = @GREP@ +HAVE_BROTLI = @HAVE_BROTLI@ +HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@ +HAVE_LDAP_SSL = @HAVE_LDAP_SSL@ +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@ +HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@ +HAVE_ZSTD = @HAVE_ZSTD@ +IDN_ENABLED = @IDN_ENABLED@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IPV6_ENABLED = @IPV6_ENABLED@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBCURL_LIBS = @LIBCURL_LIBS@ +LIBCURL_NO_SHARED = @LIBCURL_NO_SHARED@ +LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@ +LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@ +LIBMETALINK_LIBS = @LIBMETALINK_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MANOPT = @MANOPT@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NROFF = @NROFF@ +NSS_LIBS = @NSS_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKGADD_NAME = @PKGADD_NAME@ +PKGADD_PKG = @PKGADD_PKG@ +PKGADD_VENDOR = @PKGADD_VENDOR@ +PKGCONFIG = @PKGCONFIG@ +RANDOM_FILE = @RANDOM_FILE@ +RANLIB = @RANLIB@ +REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL_BACKENDS = @SSL_BACKENDS@ +SSL_ENABLED = @SSL_ENABLED@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +SUPPORT_FEATURES = @SUPPORT_FEATURES@ +SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@ +USE_ARES = @USE_ARES@ +USE_BEARSSL = @USE_BEARSSL@ +USE_GNUTLS = @USE_GNUTLS@ +USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@ +USE_LIBRTMP = @USE_LIBRTMP@ +USE_LIBSSH = @USE_LIBSSH@ +USE_LIBSSH2 = @USE_LIBSSH2@ +USE_MBEDTLS = @USE_MBEDTLS@ +USE_MESALINK = @USE_MESALINK@ +USE_NGHTTP2 = @USE_NGHTTP2@ +USE_NGHTTP3 = @USE_NGHTTP3@ +USE_NGTCP2 = @USE_NGTCP2@ +USE_NGTCP2_CRYPTO_GNUTLS = @USE_NGTCP2_CRYPTO_GNUTLS@ +USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@ +USE_NSS = @USE_NSS@ +USE_OPENLDAP = @USE_OPENLDAP@ +USE_QUICHE = @USE_QUICHE@ +USE_SCHANNEL = @USE_SCHANNEL@ +USE_SECTRANSP = @USE_SECTRANSP@ +USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@ +USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@ +USE_WOLFSSH = @USE_WOLFSSH@ +USE_WOLFSSL = @USE_WOLFSSL@ +VERSION = @VERSION@ +VERSIONNUM = @VERSIONNUM@ +ZLIB_LIBS = @ZLIB_LIBS@ +ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libext = @libext@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign no-dependencies +MANPAGE = $(top_builddir)/docs/curl.1 +DPAGES = \ + abstract-unix-socket.d \ + alt-svc.d \ + anyauth.d \ + append.d basic.d \ + cacert.d capath.d \ + cert-status.d \ + cert-type.d \ + cert.d \ + ciphers.d \ + compressed-ssh.d \ + compressed.d \ + config.d \ + connect-timeout.d \ + connect-to.d \ + continue-at.d \ + cookie-jar.d \ + cookie.d \ + create-dirs.d \ + crlf.d crlfile.d \ + curves.d \ + data-ascii.d \ + data-binary.d \ + data-urlencode.d \ + data.d data-raw.d \ + delegation.d \ + digest.d \ + disable-eprt.d \ + disable-epsv.d \ + disable.d \ + disallow-username-in-url.d \ + dns-interface.d \ + dns-ipv4-addr.d \ + dns-ipv6-addr.d \ + dns-servers.d \ + doh-url.d \ + dump-header.d \ + egd-file.d \ + engine.d \ + etag-compare.d \ + etag-save.d \ + expect100-timeout.d \ + fail-early.d \ + fail.d \ + false-start.d \ + form-string.d \ + form.d \ + ftp-account.d \ + ftp-alternative-to-user.d \ + ftp-create-dirs.d \ + ftp-method.d \ + ftp-pasv.d \ + ftp-port.d \ + ftp-pret.d \ + ftp-skip-pasv-ip.d \ + ftp-ssl-ccc-mode.d \ + ftp-ssl-ccc.d \ + ftp-ssl-control.d \ + get.d globoff.d \ + happy-eyeballs-timeout-ms.d \ + haproxy-protocol.d \ + head.d header.d \ + help.d \ + hostpubmd5.d \ + http0.9.d \ + http1.0.d \ + http1.1.d http2.d \ + http2-prior-knowledge.d \ + http3.d \ + ignore-content-length.d \ + include.d \ + insecure.d \ + interface.d \ + ipv4.d ipv6.d \ + junk-session-cookies.d \ + keepalive-time.d \ + key.d key-type.d \ + krb.d libcurl.d \ + limit-rate.d \ + list-only.d \ + local-port.d \ + location-trusted.d \ + location.d \ + login-options.d \ + mail-auth.d \ + mail-from.d \ + mail-rcpt-allowfails.d \ + mail-rcpt.d \ + manual.d \ + max-filesize.d \ + max-redirs.d \ + max-time.d \ + metalink.d \ + negotiate.d \ + netrc-file.d \ + netrc-optional.d \ + netrc.d \ + next.d no-alpn.d \ + no-buffer.d \ + no-keepalive.d \ + no-npn.d \ + no-progress-meter.d \ + no-sessionid.d \ + noproxy.d \ + ntlm.d ntlm-wb.d \ + oauth2-bearer.d \ + output.d \ + output-dir.d \ + parallel-immediate.d \ + parallel-max.d \ + parallel.d \ + pass.d \ + path-as-is.d \ + pinnedpubkey.d \ + post301.d \ + post302.d \ + post303.d \ + preproxy.d \ + progress-bar.d \ + proto-default.d \ + proto-redir.d \ + proto.d \ + proxy-anyauth.d \ + proxy-basic.d \ + proxy-cacert.d \ + proxy-capath.d \ + proxy-cert-type.d \ + proxy-cert.d \ + proxy-ciphers.d \ + proxy-crlfile.d \ + proxy-digest.d \ + proxy-header.d \ + proxy-insecure.d \ + proxy-key-type.d \ + proxy-key.d \ + proxy-negotiate.d \ + proxy-ntlm.d \ + proxy-pass.d \ + proxy-pinnedpubkey.d \ + proxy-service-name.d \ + proxy-ssl-allow-beast.d \ + proxy-tls13-ciphers.d \ + proxy-tlsauthtype.d \ + proxy-tlspassword.d \ + proxy-tlsuser.d \ + proxy-tlsv1.d \ + proxy-user.d \ + proxy.d \ + proxy1.0.d \ + proxytunnel.d \ + pubkey.d quote.d \ + random-file.d \ + range.d raw.d \ + referer.d \ + remote-header-name.d \ + remote-name-all.d \ + remote-name.d \ + remote-time.d \ + request-target.d \ + request.d \ + resolve.d \ + retry-all-errors.d \ + retry-connrefused.d \ + retry-delay.d \ + retry-max-time.d \ + retry.d \ + sasl-authzid.d \ + sasl-ir.d \ + service-name.d \ + show-error.d \ + silent.d \ + socks4.d socks5.d \ + socks4a.d \ + socks5-basic.d \ + socks5-gssapi-nec.d \ + socks5-gssapi-service.d \ + socks5-gssapi.d \ + socks5-hostname.d \ + speed-limit.d \ + speed-time.d \ + ssl-allow-beast.d \ + ssl-no-revoke.d \ + ssl-reqd.d \ + ssl-revoke-best-effort.d \ + ssl.d \ + sslv2.d sslv3.d \ + stderr.d \ + styled-output.d \ + suppress-connect-headers.d \ + tcp-fastopen.d \ + tcp-nodelay.d \ + telnet-option.d \ + tftp-blksize.d \ + tftp-no-options.d \ + time-cond.d \ + tls-max.d \ + tls13-ciphers.d \ + tlsauthtype.d \ + tlspassword.d \ + tlsuser.d \ + tlsv1.0.d \ + tlsv1.1.d \ + tlsv1.2.d \ + tlsv1.3.d tlsv1.d \ + tr-encoding.d \ + trace-ascii.d \ + trace-time.d \ + trace.d \ + unix-socket.d \ + upload-file.d \ + url.d use-ascii.d \ + user-agent.d \ + user.d verbose.d \ + version.d \ + write-out.d \ + xattr.d + +OTHERPAGES = page-footer page-header +EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/cmdline-opts/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign docs/cmdline-opts/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; +$(srcdir)/Makefile.inc $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +all: $(MANPAGE) + +$(MANPAGE): $(DPAGES) $(OTHERPAGES) Makefile.inc + @echo "generate $(MANPAGE)" + @(cd $(srcdir) && @PERL@ ./gen.pl mainpage $(DPAGES)) > $(MANPAGE) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.inc b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.inc new file mode 100644 index 00000000..792cadb3 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/Makefile.inc @@ -0,0 +1,241 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# Shared between Makefile.am and CMakeLists.txt + +DPAGES = \ + abstract-unix-socket.d \ + alt-svc.d \ + anyauth.d \ + append.d basic.d \ + cacert.d capath.d \ + cert-status.d \ + cert-type.d \ + cert.d \ + ciphers.d \ + compressed-ssh.d \ + compressed.d \ + config.d \ + connect-timeout.d \ + connect-to.d \ + continue-at.d \ + cookie-jar.d \ + cookie.d \ + create-dirs.d \ + crlf.d crlfile.d \ + curves.d \ + data-ascii.d \ + data-binary.d \ + data-urlencode.d \ + data.d data-raw.d \ + delegation.d \ + digest.d \ + disable-eprt.d \ + disable-epsv.d \ + disable.d \ + disallow-username-in-url.d \ + dns-interface.d \ + dns-ipv4-addr.d \ + dns-ipv6-addr.d \ + dns-servers.d \ + doh-url.d \ + dump-header.d \ + egd-file.d \ + engine.d \ + etag-compare.d \ + etag-save.d \ + expect100-timeout.d \ + fail-early.d \ + fail.d \ + false-start.d \ + form-string.d \ + form.d \ + ftp-account.d \ + ftp-alternative-to-user.d \ + ftp-create-dirs.d \ + ftp-method.d \ + ftp-pasv.d \ + ftp-port.d \ + ftp-pret.d \ + ftp-skip-pasv-ip.d \ + ftp-ssl-ccc-mode.d \ + ftp-ssl-ccc.d \ + ftp-ssl-control.d \ + get.d globoff.d \ + happy-eyeballs-timeout-ms.d \ + haproxy-protocol.d \ + head.d header.d \ + help.d \ + hostpubmd5.d \ + http0.9.d \ + http1.0.d \ + http1.1.d http2.d \ + http2-prior-knowledge.d \ + http3.d \ + ignore-content-length.d \ + include.d \ + insecure.d \ + interface.d \ + ipv4.d ipv6.d \ + junk-session-cookies.d \ + keepalive-time.d \ + key.d key-type.d \ + krb.d libcurl.d \ + limit-rate.d \ + list-only.d \ + local-port.d \ + location-trusted.d \ + location.d \ + login-options.d \ + mail-auth.d \ + mail-from.d \ + mail-rcpt-allowfails.d \ + mail-rcpt.d \ + manual.d \ + max-filesize.d \ + max-redirs.d \ + max-time.d \ + metalink.d \ + negotiate.d \ + netrc-file.d \ + netrc-optional.d \ + netrc.d \ + next.d no-alpn.d \ + no-buffer.d \ + no-keepalive.d \ + no-npn.d \ + no-progress-meter.d \ + no-sessionid.d \ + noproxy.d \ + ntlm.d ntlm-wb.d \ + oauth2-bearer.d \ + output.d \ + output-dir.d \ + parallel-immediate.d \ + parallel-max.d \ + parallel.d \ + pass.d \ + path-as-is.d \ + pinnedpubkey.d \ + post301.d \ + post302.d \ + post303.d \ + preproxy.d \ + progress-bar.d \ + proto-default.d \ + proto-redir.d \ + proto.d \ + proxy-anyauth.d \ + proxy-basic.d \ + proxy-cacert.d \ + proxy-capath.d \ + proxy-cert-type.d \ + proxy-cert.d \ + proxy-ciphers.d \ + proxy-crlfile.d \ + proxy-digest.d \ + proxy-header.d \ + proxy-insecure.d \ + proxy-key-type.d \ + proxy-key.d \ + proxy-negotiate.d \ + proxy-ntlm.d \ + proxy-pass.d \ + proxy-pinnedpubkey.d \ + proxy-service-name.d \ + proxy-ssl-allow-beast.d \ + proxy-tls13-ciphers.d \ + proxy-tlsauthtype.d \ + proxy-tlspassword.d \ + proxy-tlsuser.d \ + proxy-tlsv1.d \ + proxy-user.d \ + proxy.d \ + proxy1.0.d \ + proxytunnel.d \ + pubkey.d quote.d \ + random-file.d \ + range.d raw.d \ + referer.d \ + remote-header-name.d \ + remote-name-all.d \ + remote-name.d \ + remote-time.d \ + request-target.d \ + request.d \ + resolve.d \ + retry-all-errors.d \ + retry-connrefused.d \ + retry-delay.d \ + retry-max-time.d \ + retry.d \ + sasl-authzid.d \ + sasl-ir.d \ + service-name.d \ + show-error.d \ + silent.d \ + socks4.d socks5.d \ + socks4a.d \ + socks5-basic.d \ + socks5-gssapi-nec.d \ + socks5-gssapi-service.d \ + socks5-gssapi.d \ + socks5-hostname.d \ + speed-limit.d \ + speed-time.d \ + ssl-allow-beast.d \ + ssl-no-revoke.d \ + ssl-reqd.d \ + ssl-revoke-best-effort.d \ + ssl.d \ + sslv2.d sslv3.d \ + stderr.d \ + styled-output.d \ + suppress-connect-headers.d \ + tcp-fastopen.d \ + tcp-nodelay.d \ + telnet-option.d \ + tftp-blksize.d \ + tftp-no-options.d \ + time-cond.d \ + tls-max.d \ + tls13-ciphers.d \ + tlsauthtype.d \ + tlspassword.d \ + tlsuser.d \ + tlsv1.0.d \ + tlsv1.1.d \ + tlsv1.2.d \ + tlsv1.3.d tlsv1.d \ + tr-encoding.d \ + trace-ascii.d \ + trace-time.d \ + trace.d \ + unix-socket.d \ + upload-file.d \ + url.d use-ascii.d \ + user-agent.d \ + user.d verbose.d \ + version.d \ + write-out.d \ + xattr.d + +OTHERPAGES = page-footer page-header diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/abstract-unix-socket.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/abstract-unix-socket.d new file mode 100644 index 00000000..8403cab9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/abstract-unix-socket.d @@ -0,0 +1,10 @@ +Long: abstract-unix-socket +Arg: +Help: Connect via abstract Unix domain socket +Added: 7.53.0 +Protocols: HTTP +Category: connection +--- +Connect through an abstract Unix domain socket, instead of using the network. +Note: netstat shows the path of an abstract socket prefixed with '@', however +the argument should not have this leading character. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/alt-svc.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/alt-svc.d new file mode 100644 index 00000000..5598b59b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/alt-svc.d @@ -0,0 +1,18 @@ +Long: alt-svc +Arg: +Protocols: HTTPS +Help: Enable alt-svc with this cache file +Added: 7.64.1 +Category: http +--- +WARNING: this option is experimental. Do not use in production. + +This option enables the alt-svc parser in curl. If the file name points to an +existing alt-svc cache file, that will be used. After a completed transfer, +the cache will be saved to the file name again if it has been modified. + +Specify a "" file name (zero length) to avoid loading/saving and make curl +just handle the cache in memory. + +If this option is used several times, curl will load contents from all the +files but the last one will be used for saving. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/anyauth.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/anyauth.d new file mode 100644 index 00000000..bec0c0c8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/anyauth.d @@ -0,0 +1,18 @@ +Long: anyauth +Help: Pick any authentication method +Protocols: HTTP +See-also: proxy-anyauth basic digest +Category: http proxy auth +--- +Tells curl to figure out authentication method by itself, and use the most +secure one the remote site claims to support. This is done by first doing a +request and checking the response-headers, thus possibly inducing an extra +network round-trip. This is used instead of setting a specific authentication +method, which you can do with --basic, --digest, --ntlm, and --negotiate. + +Using --anyauth is not recommended if you do uploads from stdin, since it may +require data to be sent twice and then the client must be able to rewind. If +the need should arise when uploading from stdin, the upload operation will +fail. + +Used together with --user. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/append.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/append.d new file mode 100644 index 00000000..8bdb2594 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/append.d @@ -0,0 +1,9 @@ +Short: a +Long: append +Help: Append to target file when uploading +Protocols: FTP SFTP +Category: ftp sftp +--- +When used in an upload, this makes curl append to the target file instead of +overwriting it. If the remote file doesn't exist, it will be created. Note +that this flag is ignored by some SFTP servers (including OpenSSH). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/basic.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/basic.d new file mode 100644 index 00000000..e222c51c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/basic.d @@ -0,0 +1,12 @@ +Long: basic +Help: Use HTTP Basic Authentication +See-also: proxy-basic +Protocols: HTTP +Category: auth +--- +Tells curl to use HTTP Basic authentication with the remote host. This is the +default and this option is usually pointless, unless you use it to override a +previously set option that sets a different authentication method (such as +--ntlm, --digest, or --negotiate). + +Used together with --user. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cacert.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cacert.d new file mode 100644 index 00000000..793d8c1b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cacert.d @@ -0,0 +1,34 @@ +Long: cacert +Arg: +Help: CA certificate to verify peer against +Protocols: TLS +Category: tls +--- +Tells curl to use the specified certificate file to verify the peer. The file +may contain multiple CA certificates. The certificate(s) must be in PEM +format. Normally curl is built to use a default file for this, so this option +is typically used to alter that default file. + +curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is +set, and uses the given path as a path to a CA cert bundle. This option +overrides that variable. + +The windows version of curl will automatically look for a CA certs file named +\'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the +Current Working Directory, or in any folder along your PATH. + +If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module +(libnsspem.so) needs to be available for this option to work properly. + +(iOS and macOS only) If curl is built against Secure Transport, then this +option is supported for backward compatibility with other SSL engines, but it +should not be set. If the option is not set, then curl will use the +certificates in the system and user Keychain to verify the peer, which is the +preferred method of verifying the peer's certificate chain. + +(Schannel only) This option is supported for Schannel in Windows 7 or later with +libcurl 7.60 or later. This option is supported for backward compatibility +with other SSL engines; instead it is recommended to use Windows' store of +root certificates (the default for Schannel). + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/capath.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/capath.d new file mode 100644 index 00000000..4ce077a1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/capath.d @@ -0,0 +1,16 @@ +Long: capath +Arg: +Help: CA directory to verify peer against +Protocols: TLS +Category: tls +--- +Tells curl to use the specified certificate directory to verify the +peer. Multiple paths can be provided by separating them with ":" (e.g. +\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is +built against OpenSSL, the directory must have been processed using the +c_rehash utility supplied with OpenSSL. Using --capath can allow +OpenSSL-powered curl to make SSL-connections much more efficiently than using +--cacert if the --cacert file contains many CA certificates. + +If this option is set, the default capath value will be ignored, and if it is +used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-status.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-status.d new file mode 100644 index 00000000..1342b092 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-status.d @@ -0,0 +1,14 @@ +Long: cert-status +Protocols: TLS +Added: 7.41.0 +Help: Verify the status of the server certificate +Category: tls +--- +Tells curl to verify the status of the server certificate by using the +Certificate Status Request (aka. OCSP stapling) TLS extension. + +If this option is enabled and the server sends an invalid (e.g. expired) +response, if the response suggests that the server certificate has been revoked, +or no response at all is received, the verification fails. + +This is currently only implemented in the OpenSSL, GnuTLS and NSS backends. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-type.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-type.d new file mode 100644 index 00000000..b041bcb0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert-type.d @@ -0,0 +1,11 @@ +Long: cert-type +Protocols: TLS +Arg: +Help: Certificate type (DER/PEM/ENG) +See-also: cert key key-type +Category: tls +--- +Tells curl what type the provided client certificate is using. PEM, DER, ENG +and P12 are recognized types. If not specified, PEM is assumed. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert.d new file mode 100644 index 00000000..2938e571 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cert.d @@ -0,0 +1,51 @@ +Short: E +Long: cert +Arg: +Help: Client certificate file and password +Protocols: TLS +See-also: cert-type key key-type +Category: tls +--- +Tells curl to use the specified client certificate file when getting a file +with HTTPS, FTPS or another SSL-based protocol. The certificate must be in +PKCS#12 format if using Secure Transport, or PEM format if using any other +engine. If the optional password isn't specified, it will be queried for on +the terminal. Note that this option assumes a \&"certificate" file that is the +private key and the client certificate concatenated! See --cert and --key to +specify them independently. + +If curl is built against the NSS SSL library then this option can tell +curl the nickname of the certificate to use within the NSS database defined +by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the +NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be +loaded. If you want to use a file from the current directory, please precede +it with "./" prefix, in order to avoid confusion with a nickname. If the +nickname contains ":", it needs to be preceded by "\\" so that it is not +recognized as password delimiter. If the nickname contains "\\", it needs to +be escaped as "\\\\" so that it is not recognized as an escape character. + +If curl is built against OpenSSL library, and the engine pkcs11 is available, +then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in +a PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a +PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set +as "pkcs11" if none was provided and the --cert-type option will be set as +"ENG" if none was provided. + +(iOS and macOS only) If curl is built against Secure Transport, then the +certificate string can either be the name of a certificate/private key in the +system or user keychain, or the path to a PKCS#12-encoded certificate and +private key. If you want to use a file from the current directory, please +precede it with "./" prefix, in order to avoid confusion with a nickname. + +(Schannel only) Client certificates must be specified by a path +expression to a certificate store. (Loading PFX is not supported; you can +import it to a store first). You can use +"\\\\" to refer to a certificate +in the system certificates store, for example, +"CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is +usually a SHA-1 hex string which you can see in certificate details. Following +store locations are supported: CurrentUser, LocalMachine, CurrentService, +Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy, +LocalMachineEnterprise. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ciphers.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ciphers.d new file mode 100644 index 00000000..ed7438a0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ciphers.d @@ -0,0 +1,12 @@ +Long: ciphers +Arg: +Help: SSL ciphers to use +Protocols: TLS +Category: tls +--- +Specifies which ciphers to use in the connection. The list of ciphers must +specify valid ciphers. Read up on SSL cipher list details on this URL: + + https://curl.haxx.se/docs/ssl-ciphers.html + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed-ssh.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed-ssh.d new file mode 100644 index 00000000..849fe18b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed-ssh.d @@ -0,0 +1,8 @@ +Long: compressed-ssh +Help: Enable SSH compression +Protocols: SCP SFTP +Added: 7.56.0 +Category: scp ssh +--- +Enables built-in SSH compression. +This is a request, not an order; the server may or may not do it. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed.d new file mode 100644 index 00000000..26bc1514 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/compressed.d @@ -0,0 +1,10 @@ +Long: compressed +Help: Request compressed response +Protocols: HTTP +Category: http +--- +Request a compressed response using one of the algorithms curl supports, and +automatically decompress the content. Headers are not modified. + +If this option is used and the server sends an unsupported encoding, curl will +report an error. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/config.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/config.d new file mode 100644 index 00000000..26346799 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/config.d @@ -0,0 +1,68 @@ +Long: config +Arg: +Help: Read config from a file +Short: K +Category: curl +--- + +Specify a text file to read curl arguments from. The command line arguments +found in the text file will be used as if they were provided on the command +line. + +Options and their parameters must be specified on the same line in the file, +separated by whitespace, colon, or the equals sign. Long option names can +optionally be given in the config file without the initial double dashes and +if so, the colon or equals characters can be used as separators. If the option +is specified with one or two dashes, there can be no colon or equals character +between the option and its parameter. + +If the parameter contains whitespace (or starts with : or =), the parameter +must be enclosed within quotes. Within double quotes, the following escape +sequences are available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash +preceding any other letter is ignored. If the first column of a config line is +a '#' character, the rest of the line will be treated as a comment. Only write +one option per physical line in the config file. + +Specify the filename to --config as '-' to make curl read the file from stdin. + +Note that to be able to specify a URL in the config file, you need to specify +it using the --url option, and not by simply writing the URL on its own +line. So, it could look similar to this: + +url = "https://curl.haxx.se/docs/" + +When curl is invoked, it (unless --disable is used) checks for a default +config file and uses it if found. The default config file is checked for in +the following places in this order: + +1) Use the CURL_HOME environment variable if set + +2) Use the XDG_CONFIG_HOME environment variable if set (Added in 7.73.0) + +3) Use the HOME environment variable if set + +4) Non-windows: use getpwuid to find the home directory + +5) Windows: use APPDATA if set + +6) Windows: use "USERPROFILE\Application Data" if set + +7) On windows, if there is no .curlrc file in the home dir, it checks for one +in the same dir the curl executable is placed. On Unix-like systems, it will +simply try to load .curlrc from the determined home dir. + +.nf +# --- Example file --- +# this is a comment +url = "example.com" +output = "curlhere.html" +user-agent = "superagent/1.0" + +# and fetch another URL too +url = "example.com/docs/manpage.html" +-O +referer = "http://nowhereatall.example.com/" +# --- End of example file --- +.fi + +This option can be used multiple times to load multiple config files. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-timeout.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-timeout.d new file mode 100644 index 00000000..fa327722 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-timeout.d @@ -0,0 +1,12 @@ +Long: connect-timeout +Arg: +Help: Maximum time allowed for connection +See-also: max-time +Category: connection +--- +Maximum time in seconds that you allow curl's connection to take. This only +limits the connection phase, so if curl connects within the given period it +will continue - if not it will exit. Since version 7.32.0, this option +accepts decimal values. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-to.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-to.d new file mode 100644 index 00000000..2f015f8a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/connect-to.d @@ -0,0 +1,22 @@ +Long: connect-to +Arg: +Help: Connect to host +Added: 7.49.0 +See-also: resolve header +Category: connection +--- + +For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead. +This option is suitable to direct requests at a specific server, e.g. at a +specific cluster node in a cluster of servers. This option is only used to +establish the network connection. It does NOT affect the hostname/port that is +used for TLS/SSL (e.g. SNI, certificate verification) or for the application +protocols. "HOST1" and "PORT1" may be the empty string, meaning "any +host/port". "HOST2" and "PORT2" may also be the empty string, meaning "use the +request's original host/port". + +A "host" specified to this option is compared as a string, so it needs to +match the name used in request URL. It can be either numerical such as +"127.0.0.1" or the full host name such as "example.org". + +This option can be used many times to add many connect rules. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/continue-at.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/continue-at.d new file mode 100644 index 00000000..c44d2f49 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/continue-at.d @@ -0,0 +1,16 @@ +Short: C +Long: continue-at +Arg: +Help: Resumed transfer offset +See-also: range +Category: connection +--- +Continue/Resume a previous file transfer at the given offset. The given offset +is the exact number of bytes that will be skipped, counting from the beginning +of the source file before it is transferred to the destination. If used with +uploads, the FTP server command SIZE will not be used by curl. + +Use "-C -" to tell curl to automatically find out where/how to resume the +transfer. It then uses the given output/input files to figure that out. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie-jar.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie-jar.d new file mode 100644 index 00000000..f11991f4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie-jar.d @@ -0,0 +1,25 @@ +Short: c +Long: cookie-jar +Arg: +Protocols: HTTP +Help: Write cookies to after operation +Category: http +--- +Specify to which file you want curl to write all cookies after a completed +operation. Curl writes all cookies from its in-memory cookie storage to the +given file at the end of operations. If no cookies are known, no data will be +written. The file will be written using the Netscape cookie file format. If +you set the file name to a single dash, "-", the cookies will be written to +stdout. + +This command line option will activate the cookie engine that makes curl +record and use cookies. Another way to activate it is to use the --cookie +option. + +If the cookie jar can't be created or written to, the whole curl operation +won't fail or even report an error clearly. Using --verbose will get a warning +displayed, but that is the only visible feedback you get about this possibly +lethal situation. + +If this option is used several times, the last specified file name will be +used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie.d new file mode 100644 index 00000000..5d2c9d78 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/cookie.d @@ -0,0 +1,38 @@ +Short: b +Long: cookie +Arg: +Protocols: HTTP +Help: Send cookies from string/file +Category: http +--- +Pass the data to the HTTP server in the Cookie header. It is supposedly +the data previously received from the server in a "Set-Cookie:" line. The +data should be in the format "NAME1=VALUE1; NAME2=VALUE2". + +If no '=' symbol is used in the argument, it is instead treated as a filename +to read previously stored cookie from. This option also activates the cookie +engine which will make curl record incoming cookies, which may be handy if +you're using this in combination with the --location option or do multiple URL +transfers on the same invoke. If the file name is exactly a minus ("-"), curl +will instead read the contents from stdin. + +The file format of the file to read cookies from should be plain HTTP headers +(Set-Cookie style) or the Netscape/Mozilla cookie file format. + +The file specified with --cookie is only used as input. No cookies will be +written to the file. To store cookies, use the --cookie-jar option. + +Exercise caution if you are using this option and multiple transfers may +occur. If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie +format and don't specify a domain, then the cookie is sent for any domain +(even after redirects are followed) and cannot be modified by a server-set +cookie. If the cookie engine is enabled and a server sets a cookie of the same +name then both will be sent on a future transfer to that server, likely not +what you intended. To address these issues set a domain in Set-Cookie (doing +that will include sub domains) or use the Netscape format. + +If this option is used several times, the last one will be used. + +Users very often want to both read cookies from a file and write updated +cookies back to a file, so using both --cookie and --cookie-jar in the same +command line is common. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/create-dirs.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/create-dirs.d new file mode 100644 index 00000000..48a8fd46 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/create-dirs.d @@ -0,0 +1,12 @@ +Long: create-dirs +Help: Create necessary local directory hierarchy +Category: curl +--- +When used in conjunction with the --output option, curl will create the +necessary local directory hierarchy as needed. This option creates the dirs +mentioned with the --output option, nothing else. If the --output file name +uses no dir or if the dirs it mentions already exist, no dir will be created. + +Created dirs are made with mode 0750 on unix style file systems. + +To create remote directories when using FTP or SFTP, try --ftp-create-dirs. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlf.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlf.d new file mode 100644 index 00000000..50c4bef8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlf.d @@ -0,0 +1,8 @@ +Long: crlf +Help: Convert LF to CRLF in upload +Protocols: FTP SMTP +Category: ftp smtp +--- +Convert LF to CRLF in upload. Useful for MVS (OS/390). + +(SMTP added in 7.40.0) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlfile.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlfile.d new file mode 100644 index 00000000..360e668d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/crlfile.d @@ -0,0 +1,11 @@ +Long: crlfile +Arg: +Protocols: TLS +Help: Get a CRL list in PEM format from the given file +Added: 7.19.7 +Category: tls +--- +Provide a file using PEM format with a Certificate Revocation List that may +specify peer certificates that are to be considered revoked. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/curves.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/curves.d new file mode 100644 index 00000000..47870a27 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/curves.d @@ -0,0 +1,18 @@ +Long: curves +Arg: +Help: (EC) TLS key exchange algorithm(s) to request +Protocols: TLS +Added: 7.73.0 +Category: tls +--- +Tells curl to request specific curves to use during SSL session establishment +according to RFC 8422, 5.1. Multiple algorithms can be provided by separating +them with ":" (e.g. "X25519:P-521"). The parameter is available identically +in the "openssl s_client/s_server" utilities. + +--curves allows a OpenSSL powered curl to make SSL-connections with exactly +the (EC) curve requested by the client, avoiding intransparent client/server +negotiations. + +If this option is set, the default curves list built into openssl will be +ignored. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-ascii.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-ascii.d new file mode 100644 index 00000000..3522f634 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-ascii.d @@ -0,0 +1,7 @@ +Long: data-ascii +Arg: +Help: HTTP POST ASCII data +Protocols: HTTP +Category: http post upload +--- +This is just an alias for --data. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-binary.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-binary.d new file mode 100644 index 00000000..c40785ec --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-binary.d @@ -0,0 +1,19 @@ +Long: data-binary +Arg: +Help: HTTP POST binary data +Protocols: HTTP +Category: http post upload +--- +This posts data exactly as specified with no extra processing whatsoever. + +If you start the data with the letter @, the rest should be a filename. Data +is posted in a similar manner as --data does, except that newlines and +carriage returns are preserved and conversions are never done. + +Like --data the default content-type sent to the server is +application/x-www-form-urlencoded. If you want the data to be treated as +arbitrary binary data by the server then set the content-type to octet-stream: +-H "Content-Type: application/octet-stream". + +If this option is used several times, the ones following the first will append +data as described in --data. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-raw.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-raw.d new file mode 100644 index 00000000..4db83aef --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-raw.d @@ -0,0 +1,10 @@ +Long: data-raw +Arg: +Protocols: HTTP +Help: HTTP POST data, '@' allowed +Added: 7.43.0 +See-also: data +Category: http post upload +--- +This posts data similarly to --data but without the special +interpretation of the @ character. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-urlencode.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-urlencode.d new file mode 100644 index 00000000..2f2a3645 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data-urlencode.d @@ -0,0 +1,34 @@ +Long: data-urlencode +Arg: +Help: HTTP POST data url encoded +Protocols: HTTP +See-also: data data-raw +Added: 7.18.0 +Category: http post upload +--- +This posts data, similar to the other --data options with the exception +that this performs URL-encoding. + +To be CGI-compliant, the part should begin with a \fIname\fP followed +by a separator and a content specification. The part can be passed to +curl using one of the following syntaxes: +.RS +.IP "content" +This will make curl URL-encode the content and pass that on. Just be careful +so that the content doesn't contain any = or @ symbols, as that will then make +the syntax match one of the other cases below! +.IP "=content" +This will make curl URL-encode the content and pass that on. The preceding = +symbol is not included in the data. +.IP "name=content" +This will make curl URL-encode the content part and pass that on. Note that +the name part is expected to be URL-encoded already. +.IP "@filename" +This will make curl load data from the given file (including any newlines), +URL-encode that data and pass it on in the POST. +.IP "name@filename" +This will make curl load data from the given file (including any newlines), +URL-encode that data and pass it on in the POST. The name part gets an equal +sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the +name is expected to be URL-encoded already. +.RE diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data.d new file mode 100644 index 00000000..53ba86b3 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/data.d @@ -0,0 +1,30 @@ +Long: data +Short: d +Arg: +Help: HTTP POST data +Protocols: HTTP MQTT +See-also: data-binary data-urlencode data-raw +Mutexed: form head upload-file +Category: important http post upload +--- +Sends the specified data in a POST request to the HTTP server, in the same way +that a browser does when a user has filled in an HTML form and presses the +submit button. This will cause curl to pass the data to the server using the +content-type application/x-www-form-urlencoded. Compare to --form. + +--data-raw is almost the same but does not have a special interpretation of +the @ character. To post data purely binary, you should instead use the +--data-binary option. To URL-encode the value of a form field you may use +--data-urlencode. + +If any of these options is used more than once on the same command line, the +data pieces specified will be merged together with a separating +&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post +chunk that looks like \&'name=daniel&skill=lousy'. + +If you start the data with the letter @, the rest should be a file name to +read the data from, or - if you want curl to read the data from stdin. Posting +data from a file named \&'foobar' would thus be done with --data @foobar. When +--data is told to read from a file like that, carriage returns and newlines +will be stripped out. If you don't want the @ character to have a special +interpretation use --data-raw instead. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/delegation.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/delegation.d new file mode 100644 index 00000000..fa2795f9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/delegation.d @@ -0,0 +1,17 @@ +Long: delegation +Arg: +Help: GSS-API delegation permission +Protocols: GSS/kerberos +Category: auth +--- +Set LEVEL to tell the server what it is allowed to delegate when it +comes to user credentials. +.RS +.IP "none" +Don't allow any delegation. +.IP "policy" +Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos +service ticket, which is a matter of realm policy. +.IP "always" +Unconditionally allow the server to delegate. +.RE diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/digest.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/digest.d new file mode 100644 index 00000000..da8c01e2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/digest.d @@ -0,0 +1,12 @@ +Long: digest +Help: Use HTTP Digest Authentication +Protocols: HTTP +Mutexed: basic ntlm negotiate +See-also: user proxy-digest anyauth +Category: proxy auth http +--- +Enables HTTP Digest authentication. This is an authentication scheme that +prevents the password from being sent over the wire in clear text. Use this in +combination with the normal --user option to set user name and password. + +If this option is used several times, only the first one is used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-eprt.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-eprt.d new file mode 100644 index 00000000..ffcf684e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-eprt.d @@ -0,0 +1,20 @@ +Long: disable-eprt +Help: Inhibit using EPRT or LPRT +Protocols: FTP +Category: ftp +--- +Tell curl to disable the use of the EPRT and LPRT commands when doing active +FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT +before using PORT, but with this option, it will use PORT right away. EPRT and +LPRT are extensions to the original FTP protocol, and may not work on all +servers, but they enable more functionality in a better way than the +traditional PORT command. + +--eprt can be used to explicitly enable EPRT again and --no-eprt is an alias +for --disable-eprt. + +If the server is accessed using IPv6, this option will have no effect as EPRT +is necessary then. + +Disabling EPRT only changes the active behavior. If you want to switch to +passive mode you need to not use --ftp-port or force it with --ftp-pasv. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-epsv.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-epsv.d new file mode 100644 index 00000000..df1de830 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable-epsv.d @@ -0,0 +1,17 @@ +Long: disable-epsv +Help: Inhibit using EPSV +Protocols: FTP +Category: ftp +--- +(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP +transfers. Curl will normally always first attempt to use EPSV before PASV, +but with this option, it will not try using EPSV. + +--epsv can be used to explicitly enable EPSV again and --no-epsv is an alias +for --disable-epsv. + +If the server is an IPv6 host, this option will have no effect as EPSV is +necessary then. + +Disabling EPSV only changes the passive behavior. If you want to switch to +active mode you need to use --ftp-port. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable.d new file mode 100644 index 00000000..688fc0c5 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disable.d @@ -0,0 +1,8 @@ +Long: disable +Short: q +Help: Disable .curlrc +Category: curl +--- +If used as the first parameter on the command line, the \fIcurlrc\fP config +file will not be read and used. See the --config for details on the default +config file search path. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disallow-username-in-url.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disallow-username-in-url.d new file mode 100644 index 00000000..e124f675 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/disallow-username-in-url.d @@ -0,0 +1,8 @@ +Long: disallow-username-in-url +Help: Disallow username in url +Protocols: HTTP +Added: 7.61.0 +See-also: proto +Category: curl http +--- +This tells curl to exit if passed a url containing a username. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-interface.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-interface.d new file mode 100644 index 00000000..3cb818ae --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-interface.d @@ -0,0 +1,12 @@ +Long: dns-interface +Arg: +Help: Interface to use for DNS requests +Protocols: DNS +See-also: dns-ipv4-addr dns-ipv6-addr +Added: 7.33.0 +Requires: c-ares +Category: dns +--- +Tell curl to send outgoing DNS requests through . This option is a +counterpart to --interface (which does not affect DNS). The supplied string +must be an interface name (not an address). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv4-addr.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv4-addr.d new file mode 100644 index 00000000..5ebdda5c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv4-addr.d @@ -0,0 +1,12 @@ +Long: dns-ipv4-addr +Arg:
+Help: IPv4 address to use for DNS requests +Protocols: DNS +See-also: dns-interface dns-ipv6-addr +Added: 7.33.0 +Requires: c-ares +Category: dns +--- +Tell curl to bind to when making IPv4 DNS requests, so that +the DNS requests originate from this address. The argument should be a +single IPv4 address. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv6-addr.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv6-addr.d new file mode 100644 index 00000000..10e80764 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-ipv6-addr.d @@ -0,0 +1,12 @@ +Long: dns-ipv6-addr +Arg:
+Help: IPv6 address to use for DNS requests +Protocols: DNS +See-also: dns-interface dns-ipv4-addr +Added: 7.33.0 +Requires: c-ares +Category: dns +--- +Tell curl to bind to when making IPv6 DNS requests, so that +the DNS requests originate from this address. The argument should be a +single IPv6 address. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-servers.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-servers.d new file mode 100644 index 00000000..8665426a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dns-servers.d @@ -0,0 +1,11 @@ +Long: dns-servers +Arg: +Help: DNS server addrs to use +Requires: c-ares +Added: 7.33.0 +Category: dns +--- +Set the list of DNS servers to be used instead of the system default. +The list of IP addresses should be separated with commas. Port numbers +may also optionally be given as \fI:\fP after each IP +address. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/doh-url.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/doh-url.d new file mode 100644 index 00000000..7fce4460 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/doh-url.d @@ -0,0 +1,11 @@ +Long: doh-url +Arg: +Help: Resolve host names over DOH +Protocols: all +Added: 7.62.0 +Category: dns +--- +Specifies which DNS-over-HTTPS (DOH) server to use to resolve hostnames, +instead of using the default name resolver mechanism. The URL must be HTTPS. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dump-header.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dump-header.d new file mode 100644 index 00000000..8449dfe8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/dump-header.d @@ -0,0 +1,21 @@ +Long: dump-header +Short: D +Arg: +Help: Write the received headers to +Protocols: HTTP FTP +See-also: output +Category: http ftp +--- +Write the received protocol headers to the specified file. + +This option is handy to use when you want to store the headers that an HTTP +site sends to you. Cookies from the headers could then be read in a second +curl invocation by using the --cookie option! The --cookie-jar option is a +better way to store cookies. + +If no headers are received, the use of this option will create an empty file. + +When used in FTP, the FTP server response lines are considered being "headers" +and thus are saved there. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/egd-file.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/egd-file.d new file mode 100644 index 00000000..05ede9ad --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/egd-file.d @@ -0,0 +1,9 @@ +Long: egd-file +Arg: +Help: EGD socket path for random data +Protocols: TLS +See-also: random-file +Category: tls +--- +Specify the path name to the Entropy Gathering Daemon socket. The socket is +used to seed the random engine for SSL connections. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/engine.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/engine.d new file mode 100644 index 00000000..9ed0cf1b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/engine.d @@ -0,0 +1,9 @@ +Long: engine +Arg: +Help: Crypto engine to use +Protocols: TLS +Category: tls +--- +Select the OpenSSL crypto engine to use for cipher operations. Use --engine +list to print a list of build-time supported engines. Note that not all (or +none) of the engines may be available at run-time. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-compare.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-compare.d new file mode 100644 index 00000000..cbf48ac5 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-compare.d @@ -0,0 +1,19 @@ +Long: etag-compare +Arg: +Help: Pass an ETag from a file as a custom header +Protocols: HTTP +Added: 7.68.0 +Category: http +--- +This option makes a conditional HTTP request for the specific +ETag read from the given file by sending a custom If-None-Match +header using the extracted ETag. + +For correct results, make sure that specified file contains only a single +line with a desired ETag. An empty file is parsed as an empty ETag. + +Use the option --etag-save to first save the ETag from a response, and +then use this option to compare using the saved ETag in a subsequent request. + +\fCOMPARISON\fP: There are 2 types of comparison or ETags, Weak and Strong. +This option expects, and uses a strong comparison. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-save.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-save.d new file mode 100644 index 00000000..82e6dfa8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/etag-save.d @@ -0,0 +1,17 @@ +Long: etag-save +Arg: +Help: Parse ETag from a request and save it to a file +Protocols: HTTP +Added: 7.68.0 +Category: http +--- +This option saves an HTTP ETag to the specified file. Etag is +usually part of headers returned by a request. When server sends an +ETag, it must be enveloped by a double quote. This option extracts the +ETag without the double quotes and saves it into the . + +A server can send a week ETag which is prefixed by "W/". This identifier +is not considered, and only relevant ETag between quotation marks is parsed. + +It an ETag wasn't send by the server or it cannot be parsed, and empty +file is created. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/expect100-timeout.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/expect100-timeout.d new file mode 100644 index 00000000..431a529c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/expect100-timeout.d @@ -0,0 +1,12 @@ +Long: expect100-timeout +Arg: +Help: How long to wait for 100-continue +Protocols: HTTP +Added: 7.47.0 +See-also: connect-timeout +Category: http +--- +Maximum time in seconds that you allow curl to wait for a 100-continue +response when curl emits an Expects: 100-continue header in its request. By +default curl will wait one second. This option accepts decimal values! When +curl stops waiting, it will continue as if the response has been received. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail-early.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail-early.d new file mode 100644 index 00000000..3fbe238a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail-early.d @@ -0,0 +1,22 @@ +Long: fail-early +Help: Fail on first transfer error, do not continue +Added: 7.52.0 +Category: curl +--- +Fail and exit on the first detected transfer error. + +When curl is used to do multiple transfers on the command line, it will +attempt to operate on each given URL, one by one. By default, it will ignore +errors if there are more URLs given and the last URL's success will determine +the error code curl returns. So early failures will be "hidden" by subsequent +successful transfers. + +Using this option, curl will instead return an error on the first transfer +that fails, independent of the amount of URLs that are given on the command +line. This way, no transfer failures go undetected by scripts and similar. + +This option is global and does not need to be specified for each use of --next. + +This option does not imply --fail, which causes transfers to fail due to the +server's HTTP status code. You can combine the two options, however note --fail +is not global and is therefore contained by --next. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail.d new file mode 100644 index 00000000..7fc76fb6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/fail.d @@ -0,0 +1,15 @@ +Long: fail +Short: f +Protocols: HTTP +Help: Fail silently (no output at all) on HTTP errors +Category: important http +--- +Fail silently (no output at all) on server errors. This is mostly done to +better enable scripts etc to better deal with failed attempts. In normal cases +when an HTTP server fails to deliver a document, it returns an HTML document +stating so (which often also describes why and more). This flag will prevent +curl from outputting that and return error 22. + +This method is not fail-safe and there are occasions where non-successful +response codes will slip through, especially when authentication is involved +(response codes 401 and 407). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/false-start.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/false-start.d new file mode 100644 index 00000000..abeff0eb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/false-start.d @@ -0,0 +1,13 @@ +Long: false-start +Help: Enable TLS False Start +Protocols: TLS +Added: 7.42.0 +Category: tls +--- +Tells curl to use false start during the TLS handshake. False start is a mode +where a TLS client will start sending application data before verifying the +server's Finished message, thus saving a round trip when performing a full +handshake. + +This is currently only implemented in the NSS and Secure Transport (on iOS 7.0 +or later, or OS X 10.9 or later) backends. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form-string.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form-string.d new file mode 100644 index 00000000..04d2578c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form-string.d @@ -0,0 +1,12 @@ +Long: form-string +Help: Specify multipart MIME data +Protocols: HTTP SMTP IMAP +Arg: +See-also: form +Category: http upload +--- +Similar to --form except that the value string for the named parameter is used +literally. Leading \&'@' and \&'<' characters, and the \&';type=' string in +the value have no special meaning. Use this in preference to --form if +there's any possibility that the string value may accidentally trigger the +\&'@' or \&'<' features of --form. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form.d new file mode 100644 index 00000000..3cd8dce7 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/form.d @@ -0,0 +1,139 @@ +Long: form +Short: F +Arg: +Help: Specify multipart MIME data +Protocols: HTTP SMTP IMAP +Mutexed: data head upload-file +Category: http upload +--- +For HTTP protocol family, this lets curl emulate a filled-in form in which a +user has pressed the submit button. This causes curl to POST data using the +Content-Type multipart/form-data according to RFC 2388. + +For SMTP and IMAP protocols, this is the mean to compose a multipart mail +message to transmit. + +This enables uploading of binary files etc. To force the 'content' part to be +a file, prefix the file name with an @ sign. To just get the content part from +a file, prefix the file name with the symbol <. The difference between @ and < +is then that @ makes a file get attached in the post as a file upload, while +the < makes a text field and just get the contents for that text field from a +file. + +Tell curl to read content from stdin instead of a file by using - as +filename. This goes for both @ and < constructs. When stdin is used, the +contents is buffered in memory first by curl to determine its size and allow a +possible resend. Defining a part's data from a named non-regular file (such +as a named pipe or similar) is unfortunately not subject to buffering and will +be effectively read at transmission time; since the full size is unknown +before the transfer starts, such data is sent as chunks by HTTP and rejected +by IMAP. + +Example: send an image to an HTTP server, where \&'profile' is the name of the +form-field to which the file portrait.jpg will be the input: + + curl -F profile=@portrait.jpg https://example.com/upload.cgi + +Example: send your name and shoe size in two text fields to the server: + + curl -F name=John -F shoesize=11 https://example.com/ + +Example: send your essay in a text field to the server. Send it as a plain +text field, but get the contents for it from a local file: + + curl -F "story=HTML message;type=text/html' \\ +.br + -F '=)' -F '=@textfile.txt' ... smtp://example.com + +Data can be encoded for transfer using encoder=. Available encodings are +\fIbinary\fP and \fI8bit\fP that do nothing else than adding the corresponding +Content-Transfer-Encoding header, \fI7bit\fP that only rejects 8-bit characters +with a transfer error, \fIquoted-printable\fP and \fIbase64\fP that encodes +data according to the corresponding schemes, limiting lines length to +76 characters. + +Example: send multipart mail with a quoted-printable text message and a +base64 attached file: + + curl -F '=text message;encoder=quoted-printable' \\ +.br + -F '=@localfile;encoder=base64' ... smtp://example.com + +See further examples and details in the MANUAL. + +This option can be used multiple times. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-account.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-account.d new file mode 100644 index 00000000..bc04ba04 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-account.d @@ -0,0 +1,11 @@ +Long: ftp-account +Arg: +Help: Account data string +Protocols: FTP +Added: 7.13.0 +Category: ftp auth +--- +When an FTP server asks for "account data" after user name and password has +been provided, this data is sent off using the ACCT command. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-alternative-to-user.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-alternative-to-user.d new file mode 100644 index 00000000..17148490 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-alternative-to-user.d @@ -0,0 +1,11 @@ +Long: ftp-alternative-to-user +Arg: +Help: String to replace USER [name] +Protocols: FTP +Added: 7.15.5 +Category: ftp +--- +If authenticating with the USER and PASS commands fails, send this command. +When connecting to Tumbleweed's Secure Transport server over FTPS using a +client certificate, using "SITE AUTH" will tell the server to retrieve the +username from the certificate. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-create-dirs.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-create-dirs.d new file mode 100644 index 00000000..5d9dfda4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-create-dirs.d @@ -0,0 +1,9 @@ +Long: ftp-create-dirs +Protocols: FTP SFTP +Help: Create the remote dirs if not present +See-also: create-dirs +Category: ftp sftp curl +--- +When an FTP or SFTP URL/operation uses a path that doesn't currently exist on +the server, the standard behavior of curl is to fail. Using this option, curl +will instead attempt to create missing directories. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-method.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-method.d new file mode 100644 index 00000000..149340b8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-method.d @@ -0,0 +1,22 @@ +Long: ftp-method +Arg: +Help: Control CWD usage +Protocols: FTP +Added: 7.15.1 +Category: ftp +--- +Control what method curl should use to reach a file on an FTP(S) +server. The method argument should be one of the following alternatives: +.RS +.IP multicwd +curl does a single CWD operation for each path part in the given URL. For deep +hierarchies this means very many commands. This is how RFC 1738 says it should +be done. This is the default but the slowest behavior. +.IP nocwd +curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full +path to the server for all these commands. This is the fastest behavior. +.IP singlecwd +curl does one CWD with the full target directory and then operates on the file +\&"normally" (like in the multicwd case). This is somewhat more standards +compliant than 'nocwd' but without the full penalty of 'multicwd'. +.RE diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pasv.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pasv.d new file mode 100644 index 00000000..cbd548de --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pasv.d @@ -0,0 +1,17 @@ +Long: ftp-pasv +Help: Use PASV/EPSV instead of PORT +Protocols: FTP +Added: 7.11.0 +See-also: disable-epsv +Category: ftp +--- +Use passive mode for the data connection. Passive is the internal default +behavior, but using this option can be used to override a previous --ftp-port +option. + +If this option is used several times, only the first one is used. Undoing an +enforced passive really isn't doable but you must then instead enforce the +correct --ftp-port again. + +Passive mode means that curl will try the EPSV command first and then PASV, +unless --disable-epsv is used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-port.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-port.d new file mode 100644 index 00000000..9bb1d43f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-port.d @@ -0,0 +1,33 @@ +Long: ftp-port +Arg:
+Help: Use PORT instead of PASV +Short: P +Protocols: FTP +See-also: ftp-pasv disable-eprt +Category: ftp +--- +Reverses the default initiator/listener roles when connecting with FTP. This +option makes curl use active mode. curl then tells the server to connect back +to the client's specified address and port, while passive mode asks the server +to setup an IP address and port for it to connect to.
should be one +of: +.RS +.IP interface +e.g. "eth0" to specify which interface's IP address you want to use (Unix only) +.IP "IP address" +e.g. "192.168.10.1" to specify the exact IP address +.IP "host name" +e.g. "my.host.domain" to specify the machine +.IP "-" +make curl pick the same IP address that is already used for the control +connection +.RE + +If this option is used several times, the last one will be used. Disable the +use of PORT with --ftp-pasv. Disable the attempt to use the EPRT command +instead of PORT by using --disable-eprt. EPRT is really PORT++. + +Since 7.19.5, you can append \&":[start]-[end]\&" to the right of the address, +to tell curl what TCP port range to use. That means you specify a port range, +from a lower to a higher number. A single number works as well, but do note +that it increases the risk of failure since the port may not be available. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pret.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pret.d new file mode 100644 index 00000000..e9c7d251 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-pret.d @@ -0,0 +1,9 @@ +Long: ftp-pret +Help: Send PRET before PASV +Protocols: FTP +Added: 7.20.0 +Category: ftp +--- +Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, +mainly drftpd, require this non-standard command for directory listings as +well as up and downloads in PASV mode. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-skip-pasv-ip.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-skip-pasv-ip.d new file mode 100644 index 00000000..d6fd4589 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-skip-pasv-ip.d @@ -0,0 +1,13 @@ +Long: ftp-skip-pasv-ip +Help: Skip the IP address for PASV +Protocols: FTP +Added: 7.14.2 +See-also: ftp-pasv +Category: ftp +--- +Tell curl to not use the IP address the server suggests in its response +to curl's PASV command when curl connects the data connection. Instead curl +will re-use the same IP address it already uses for the control +connection. + +This option has no effect if PORT, EPRT or EPSV is used instead of PASV. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc-mode.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc-mode.d new file mode 100644 index 00000000..6289e544 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc-mode.d @@ -0,0 +1,12 @@ +Long: ftp-ssl-ccc-mode +Arg: +Help: Set CCC mode +Protocols: FTP +Added: 7.16.2 +See-also: ftp-ssl-ccc +Category: ftp tls +--- +Sets the CCC mode. The passive mode will not initiate the shutdown, but +instead wait for the server to do it, and will not reply to the shutdown from +the server. The active mode initiates the shutdown and waits for a reply from +the server. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc.d new file mode 100644 index 00000000..33cab430 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-ccc.d @@ -0,0 +1,11 @@ +Long: ftp-ssl-ccc +Help: Send CCC after authenticating +Protocols: FTP +See-also: ssl ftp-ssl-ccc-mode +Added: 7.16.1 +Category: ftp tls +--- +Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after +authenticating. The rest of the control channel communication will be +unencrypted. This allows NAT routers to follow the FTP transaction. The +default mode is passive. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-control.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-control.d new file mode 100644 index 00000000..5191353d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ftp-ssl-control.d @@ -0,0 +1,9 @@ +Long: ftp-ssl-control +Help: Require SSL/TLS for FTP login, clear for transfer +Protocols: FTP +Added: 7.16.0 +Category: ftp tls +--- +Require SSL/TLS for the FTP login, clear for transfer. Allows secure +authentication, but non-encrypted data transfers for efficiency. Fails the +transfer if the server doesn't support SSL/TLS. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/gen.pl b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/gen.pl new file mode 100755 index 00000000..3fec1646 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/gen.pl @@ -0,0 +1,465 @@ +#!/usr/bin/env perl +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### + +=begin comment + +This script generates the manpage. + +Example: gen.pl [files] > curl.1 + +Dev notes: + +We open *input* files in :crlf translation (a no-op on many platforms) in +case we have CRLF line endings in Windows but a perl that defaults to LF. +Unfortunately it seems some perls like msysgit can't handle a global input-only +:crlf so it has to be specified on each file open for text input. + +=end comment +=cut + +my %optshort; +my %optlong; +my %helplong; +my %arglong; +my %redirlong; +my %protolong; +my %catlong; + +# get the long name version, return the man page string +sub manpageify { + my ($k)=@_; + my $l; + if($optlong{$k} ne "") { + # both short + long + $l = "\\fI-".$optlong{$k}.", --$k\\fP"; + } + else { + # only long + $l = "\\fI--$k\\fP"; + } + return $l; +} + +sub printdesc { + my @desc = @_; + for my $d (@desc) { + # skip lines starting with space (examples) + if($d =~ /^[^ ]/) { + for my $k (keys %optlong) { + my $l = manpageify($k); + $d =~ s/--$k([^a-z0-9_-])/$l$1/; + } + } + print $d; + } +} + +sub seealso { + my($standalone, $data)=@_; + if($standalone) { + return sprintf + ".SH \"SEE ALSO\"\n$data\n"; + } + else { + return "See also $data. "; + } +} + +sub overrides { + my ($standalone, $data)=@_; + if($standalone) { + return ".SH \"OVERRIDES\"\n$data\n"; + } + else { + return $data; + } +} + +sub protocols { + my ($standalone, $data)=@_; + if($standalone) { + return ".SH \"PROTOCOLS\"\n$data\n"; + } + else { + return "($data) "; + } +} + +sub added { + my ($standalone, $data)=@_; + if($standalone) { + return ".SH \"ADDED\"\nAdded in curl version $data\n"; + } + else { + return "Added in $data. "; + } +} + +sub single { + my ($f, $standalone)=@_; + open(F, "<:crlf", "$f") || + return 1; + my $short; + my $long; + my $tags; + my $added; + my $protocols; + my $arg; + my $mutexed; + my $requires; + my $category; + my $seealso; + my $magic; # cmdline special option + while() { + if(/^Short: *(.)/i) { + $short=$1; + } + elsif(/^Long: *(.*)/i) { + $long=$1; + } + elsif(/^Added: *(.*)/i) { + $added=$1; + } + elsif(/^Tags: *(.*)/i) { + $tags=$1; + } + elsif(/^Arg: *(.*)/i) { + $arg=$1; + } + elsif(/^Magic: *(.*)/i) { + $magic=$1; + } + elsif(/^Mutexed: *(.*)/i) { + $mutexed=$1; + } + elsif(/^Protocols: *(.*)/i) { + $protocols=$1; + } + elsif(/^See-also: *(.*)/i) { + $seealso=$1; + } + elsif(/^Requires: *(.*)/i) { + $requires=$1; + } + elsif(/^Category: *(.*)/i) { + $category=$1; + } + elsif(/^Help: *(.*)/i) { + ; + } + elsif(/^---/) { + if(!$long) { + print STDERR "WARN: no 'Long:' in $f\n"; + } + if(!$category) { + print STDERR "WARN: no 'Category:' in $f\n"; + } + last; + } + else { + chomp; + print STDERR "WARN: unrecognized line in $f, ignoring:\n:'$_';" + } + } + my @desc; + while() { + push @desc, $_; + } + close(F); + my $opt; + if(defined($short) && $long) { + $opt = "-$short, --$long"; + } + elsif($short && !$long) { + $opt = "-$short"; + } + elsif($long && !$short) { + $opt = "--$long"; + } + + if($arg) { + $opt .= " $arg"; + } + + if($standalone) { + print ".TH curl 1 \"30 Nov 2016\" \"curl 7.52.0\" \"curl manual\"\n"; + print ".SH OPTION\n"; + print "curl $opt\n"; + } + else { + print ".IP \"$opt\"\n"; + } + if($protocols) { + print protocols($standalone, $protocols); + } + + if($standalone) { + print ".SH DESCRIPTION\n"; + } + + printdesc(@desc); + undef @desc; + + my @foot; + if($seealso) { + my @m=split(/ /, $seealso); + my $mstr; + my $and = 0; + my $num = scalar(@m); + if($num > 2) { + # use commas up to this point + $and = $num - 1; + } + my $i = 0; + for my $k (@m) { + if(!$helplong{$k}) { + print STDERR "WARN: $f see-alsos a non-existing option: $k\n"; + } + my $l = manpageify($k); + my $sep = " and"; + if($and && ($i < $and)) { + $sep = ","; + } + $mstr .= sprintf "%s$l", $mstr?"$sep ":""; + $i++; + } + push @foot, seealso($standalone, $mstr); + } + if($requires) { + my $l = manpageify($long); + push @foot, "$l requires that the underlying libcurl". + " was built to support $requires. "; + } + if($mutexed) { + my @m=split(/ /, $mutexed); + my $mstr; + for my $k (@m) { + if(!$helplong{$k}) { + print STDERR "WARN: $f mutexes a non-existing option: $k\n"; + } + my $l = manpageify($k); + $mstr .= sprintf "%s$l", $mstr?" and ":""; + } + push @foot, overrides($standalone, "This option overrides $mstr. "); + } + if($added) { + push @foot, added($standalone, $added); + } + if($foot[0]) { + print "\n"; + my $f = join("", @foot); + $f =~ s/ +\z//; # remove trailing space + print "$f\n"; + } + return 0; +} + +sub getshortlong { + my ($f)=@_; + open(F, "<:crlf", "$f"); + my $short; + my $long; + my $help; + my $arg; + my $protocols; + my $category; + while() { + if(/^Short: (.)/i) { + $short=$1; + } + elsif(/^Long: (.*)/i) { + $long=$1; + } + elsif(/^Help: (.*)/i) { + $help=$1; + } + elsif(/^Arg: (.*)/i) { + $arg=$1; + } + elsif(/^Protocols: (.*)/i) { + $protocols=$1; + } + elsif(/^Category: (.*)/i) { + $category=$1; + } + elsif(/^---/) { + last; + } + } + close(F); + if($short) { + $optshort{$short}=$long; + } + if($long) { + $optlong{$long}=$short; + $helplong{$long}=$help; + $arglong{$long}=$arg; + $protolong{$long}=$protocols; + $catlong{$long}=$category; + } +} + +sub indexoptions { + my (@files) = @_; + foreach my $f (@files) { + getshortlong($f); + } +} + +sub header { + my ($f)=@_; + open(F, "<:crlf", "$f"); + my @d; + while() { + push @d, $_; + } + close(F); + printdesc(@d); +} + +sub listhelp { + foreach my $f (sort keys %helplong) { + my $long = $f; + my $short = $optlong{$long}; + my @categories = split ' ', $catlong{$long}; + my $bitmask; + my $opt; + + if(defined($short) && $long) { + $opt = "-$short, --$long"; + } + elsif($long && !$short) { + $opt = " --$long"; + } + for my $i (0 .. $#categories) { + $bitmask .= 'CURLHELP_' . uc $categories[$i]; + # If not last element, append | + if($i < $#categories) { + $bitmask .= ' | '; + } + } + my $arg = $arglong{$long}; + if($arg) { + $opt .= " $arg"; + } + my $desc = $helplong{$f}; + $desc =~ s/\"/\\\"/g; # escape double quotes + + my $line = sprintf " {\"%s\",\n \"%s\",\n %s},\n", $opt, $desc, $bitmask; + + if(length($opt) + length($desc) > 78) { + print STDERR "WARN: the --$long line is too long\n"; + } + print $line; + } +} + +sub listcats { + my %allcats; + foreach my $f (sort keys %helplong) { + my @categories = split ' ', $catlong{$f}; + foreach (@categories) { + $allcats{$_} = undef; + } + } + my @categories; + foreach my $key (keys %allcats) { + push @categories, $key; + } + @categories = sort @categories; + unshift @categories, 'hidden'; + for my $i (0..$#categories) { + print '#define ' . 'CURLHELP_' . uc($categories[$i]) . ' ' . "1u << " . $i . "u\n"; + } +} + +sub mainpage { + my (@files) = @_; + # show the page header + header("page-header"); + + # output docs for all options + foreach my $f (sort @files) { + if(single($f, 0)) { + print STDERR "Can't read $f?\n"; + } + } + + header("page-footer"); +} + +sub showonly { + my ($f) = @_; + if(single($f, 1)) { + print STDERR "$f: failed\n"; + } +} + +sub showprotocols { + my %prots; + foreach my $f (keys %optlong) { + my @p = split(/ /, $protolong{$f}); + for my $p (@p) { + $prots{$p}++; + } + } + for(sort keys %prots) { + printf "$_ (%d options)\n", $prots{$_}; + } +} + +sub getargs { + my ($f, @s) = @_; + if($f eq "mainpage") { + mainpage(@s); + return; + } + elsif($f eq "listhelp") { + listhelp(); + return; + } + elsif($f eq "single") { + showonly($s[0]); + return; + } + elsif($f eq "protos") { + showprotocols(); + return; + } + elsif($f eq "listcats") { + listcats(); + return; + } + + print "Usage: gen.pl [files]\n"; +} + +#------------------------------------------------------------------------ + +my $cmd = shift @ARGV; +my @files = @ARGV; # the rest are the files + +# learn all existing options +indexoptions(@files); + +getargs($cmd, @files); diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/get.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/get.d new file mode 100644 index 00000000..d529bb4e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/get.d @@ -0,0 +1,16 @@ +Long: get +Short: G +Help: Put the post data in the URL and use GET +Category: http upload +--- +When used, this option will make all data specified with --data, --data-binary +or --data-urlencode to be used in an HTTP GET request instead of the POST +request that otherwise would be used. The data will be appended to the URL +with a '?' separator. + +If used in combination with --head, the POST data will instead be appended to +the URL with a HEAD request. + +If this option is used several times, only the first one is used. This is +because undoing a GET doesn't make sense, but you should then instead enforce +the alternative method you prefer. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/globoff.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/globoff.d new file mode 100644 index 00000000..4b5f30de --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/globoff.d @@ -0,0 +1,9 @@ +Long: globoff +Short: g +Help: Disable URL sequences and ranges using {} and [] +Category: curl +--- +This option switches off the "URL globbing parser". When you set this option, +you can specify URLs that contain the letters {}[] without having them being +interpreted by curl itself. Note that these letters are not normal legal URL +contents but they should be encoded according to the URI standard. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/happy-eyeballs-timeout-ms.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/happy-eyeballs-timeout-ms.d new file mode 100644 index 00000000..ceff2a7d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/happy-eyeballs-timeout-ms.d @@ -0,0 +1,18 @@ +Long: happy-eyeballs-timeout-ms +Arg: +Help: Time for IPv6 before trying IPv4 +Added: 7.59.0 +Category: connection +--- +Happy eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6 +addresses for dual-stack hosts, preferring IPv6 first for the number of +milliseconds. If the IPv6 address cannot be connected to within that time then +a connection attempt is made to the IPv4 address in parallel. The first +connection to be established is the one that is used. + +The range of suggested useful values is limited. Happy Eyeballs RFC 6555 says +"It is RECOMMENDED that connection attempts be paced 150-250 ms apart to +balance human factors against network load." libcurl currently defaults to +200 ms. Firefox and Chrome currently default to 300 ms. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/haproxy-protocol.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/haproxy-protocol.d new file mode 100644 index 00000000..83582046 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/haproxy-protocol.d @@ -0,0 +1,12 @@ +Long: haproxy-protocol +Help: Send HAProxy PROXY protocol v1 header +Protocols: HTTP +Added: 7.60.0 +Category: http proxy +--- +Send a HAProxy PROXY protocol v1 header at the beginning of the connection. This +is used by some load balancers and reverse proxies to indicate the client's +true IP address and port. + +This option is primarily useful when sending test requests to a service that +expects this header. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/head.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/head.d new file mode 100644 index 00000000..6fe46851 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/head.d @@ -0,0 +1,9 @@ +Long: head +Short: I +Help: Show document info only +Protocols: HTTP FTP FILE +Category: http ftp file +--- +Fetch the headers only! HTTP-servers feature the command HEAD which this uses +to get nothing but the header of a document. When used on an FTP or FILE file, +curl displays the file size and last modification time only. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/header.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/header.d new file mode 100644 index 00000000..e8416899 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/header.d @@ -0,0 +1,42 @@ +Long: header +Short: H +Arg:
+Help: Pass custom header(s) to server +Protocols: HTTP +Category: http +--- +Extra header to include in the request when sending HTTP to a server. You may +specify any number of extra headers. Note that if you should add a custom +header that has the same name as one of the internal ones curl would use, your +externally set header will be used instead of the internal one. This allows +you to make even trickier stuff than curl would normally do. You should not +replace internally set headers without knowing perfectly well what you're +doing. Remove an internal header by giving a replacement without content on +the right side of the colon, as in: -H \&"Host:". If you send the custom +header with no-value then its header must be terminated with a semicolon, such +as \-H \&"X-Custom-Header;" to send "X-Custom-Header:". + +curl will make sure that each header you add/replace is sent with the proper +end-of-line marker, you should thus \fBnot\fP add that as a part of the header +content: do not add newlines or carriage returns, they will only mess things up +for you. + +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + +See also the --user-agent and --referer options. + +Starting in 7.37.0, you need --proxy-header to send custom headers intended +for a proxy. + +Example: + + curl -H "X-First-Name: Joe" http://example.com/ + +\fBWARNING\fP: headers set with this option will be set in all requests - even +after redirects are followed, like when told with --location. This can lead to +the header being sent to other hosts than the original host, so sensitive +headers should be used with caution combined with following redirects. + +This option can be used multiple times to add/replace/remove multiple headers. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/help.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/help.d new file mode 100644 index 00000000..bf80b781 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/help.d @@ -0,0 +1,12 @@ +Long: help +Arg: +Short: h +Help: Get help for commands +Category: important curl +--- +Usage help. This lists all commands of the . +If no arg was provided, curl will display the most important +command line arguments and the list of categories. +If the argument "all" was provided, curl will display all options available. +If the argument "category" was provided, curl will display all categories and +their meanings. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/hostpubmd5.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/hostpubmd5.d new file mode 100644 index 00000000..c926ed8b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/hostpubmd5.d @@ -0,0 +1,10 @@ +Long: hostpubmd5 +Arg: +Help: Acceptable MD5 hash of the host public key +Protocols: SFTP SCP +Added: 7.17.1 +Category: sftp scp +--- +Pass a string containing 32 hexadecimal digits. The string should +be the 128 bit MD5 checksum of the remote host's public key, curl will refuse +the connection with the host unless the md5sums match. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http0.9.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http0.9.d new file mode 100644 index 00000000..954c22a1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http0.9.d @@ -0,0 +1,14 @@ +Long: http0.9 +Tags: Versions +Protocols: HTTP +Added: +Help: Allow HTTP 0.9 responses +Category: http +--- +Tells curl to be fine with HTTP version 0.9 response. + +HTTP/0.9 is a completely headerless response and therefore you can also +connect with this to non-HTTP servers and still get a response since curl will +simply transparently downgrade - if allowed. + +Since curl 7.66.0, HTTP/0.9 is disabled by default. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.0.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.0.d new file mode 100644 index 00000000..a4059dbf --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.0.d @@ -0,0 +1,11 @@ +Short: 0 +Long: http1.0 +Tags: Versions +Protocols: HTTP +Added: +Mutexed: http1.1 http2 +Help: Use HTTP 1.0 +Category: http +--- +Tells curl to use HTTP version 1.0 instead of using its internally preferred +HTTP version. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.1.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.1.d new file mode 100644 index 00000000..a71a40ba --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http1.1.d @@ -0,0 +1,9 @@ +Long: http1.1 +Tags: Versions +Protocols: HTTP +Added: 7.33.0 +Mutexed: http1.0 http2 +Help: Use HTTP 1.1 +Category: http +--- +Tells curl to use HTTP version 1.1. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2-prior-knowledge.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2-prior-knowledge.d new file mode 100644 index 00000000..ea2906ed --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2-prior-knowledge.d @@ -0,0 +1,13 @@ +Long: http2-prior-knowledge +Tags: Versions +Protocols: HTTP +Added: 7.49.0 +Mutexed: http1.1 http1.0 http2 +Requires: HTTP/2 +Help: Use HTTP 2 without HTTP/1.1 Upgrade +Category: http +--- +Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1 +Upgrade. It requires prior knowledge that the server supports HTTP/2 straight +away. HTTPS requests will still do HTTP/2 the standard way with negotiated +protocol version in the TLS handshake. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2.d new file mode 100644 index 00000000..197515ee --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http2.d @@ -0,0 +1,12 @@ +Long: http2 +Tags: Versions +Protocols: HTTP +Added: 7.33.0 +Mutexed: http1.1 http1.0 http2-prior-knowledge +Requires: HTTP/2 +See-also: no-alpn +Help: Use HTTP 2 +See-also: http1.1 http3 +Category: http +--- +Tells curl to use HTTP version 2. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http3.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http3.d new file mode 100644 index 00000000..478b662a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/http3.d @@ -0,0 +1,20 @@ +Long: http3 +Tags: Versions +Protocols: HTTP +Added: 7.66.0 +Mutexed: http1.1 http1.0 http2 http2-prior-knowledge +Requires: HTTP/3 +Help: Use HTTP v3 +See-also: http1.1 http2 +Category: http +--- + +WARNING: this option is experimental. Do not use in production. + +Tells curl to use HTTP version 3 directly to the host and port number used in +the URL. A normal HTTP/3 transaction will be done to a host and then get +redirected via Alt-SVc, but this option allows a user to circumvent that when +you know that the target speaks HTTP/3 on the given host and port. + +This option will make curl fail if a QUIC connection cannot be established, it +cannot fall back to a lower HTTP version on its own. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ignore-content-length.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ignore-content-length.d new file mode 100644 index 00000000..82ac5da0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ignore-content-length.d @@ -0,0 +1,11 @@ +Long: ignore-content-length +Help: Ignore the size of the remote resource +Protocols: FTP HTTP +Category: http ftp +--- +For HTTP, Ignore the Content-Length header. This is particularly useful for +servers running Apache 1.x, which will report incorrect Content-Length for +files larger than 2 gigabytes. + +For FTP (since 7.46.0), skip the RETR command to figure out the size before +downloading a file. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/include.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/include.d new file mode 100644 index 00000000..250d4acc --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/include.d @@ -0,0 +1,11 @@ +Long: include +Short: i +Help: Include protocol response headers in the output +See-also: verbose +Category: important verbose +--- +Include the HTTP response headers in the output. The HTTP response headers can +include things like server name, cookies, date of the document, HTTP version +and more... + +To view the request headers, consider the --verbose option. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/insecure.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/insecure.d new file mode 100644 index 00000000..35f4a2e0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/insecure.d @@ -0,0 +1,17 @@ +Long: insecure +Short: k +Help: Allow insecure server connections when using SSL +Protocols: TLS +See-also: proxy-insecure cacert +Category: tls +--- + +By default, every SSL connection curl makes is verified to be secure. This +option allows curl to proceed and operate even for server connections +otherwise considered insecure. + +The server connection is verified by making sure the server's certificate +contains the right name and verifies successfully using the cert store. + +See this online resource for further details: + https://curl.haxx.se/docs/sslcerts.html diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/interface.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/interface.d new file mode 100644 index 00000000..196e7efa --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/interface.d @@ -0,0 +1,17 @@ +Long: interface +Arg: +Help: Use network INTERFACE (or address) +See-also: dns-interface +Category: connection +--- + +Perform an operation using a specified interface. You can enter interface +name, IP address or host name. An example could look like: + + curl --interface eth0:1 https://www.example.com/ + +If this option is used several times, the last one will be used. + +On Linux it can be used to specify a VRF, but the binary needs to either +have CAP_NET_RAW or to be run as root. More information about Linux VRF: +https://www.kernel.org/doc/Documentation/networking/vrf.txt diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv4.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv4.d new file mode 100644 index 00000000..a6691376 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv4.d @@ -0,0 +1,13 @@ +Short: 4 +Long: ipv4 +Tags: Versions +Protocols: +Added: +Mutexed: ipv6 +Requires: +See-also: http1.1 http2 +Help: Resolve names to IPv4 addresses +Category: connection dns +--- +This option tells curl to resolve names to IPv4 addresses only, and not for +example try IPv6. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv6.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv6.d new file mode 100644 index 00000000..ce0415ca --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ipv6.d @@ -0,0 +1,13 @@ +Short: 6 +Long: ipv6 +Tags: Versions +Protocols: +Added: +Mutexed: ipv4 +Requires: +See-also: http1.1 http2 +Help: Resolve names to IPv6 addresses +Category: connection dns +--- +This option tells curl to resolve names to IPv6 addresses only, and not for +example try IPv4. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/junk-session-cookies.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/junk-session-cookies.d new file mode 100644 index 00000000..993b77fa --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/junk-session-cookies.d @@ -0,0 +1,11 @@ +Long: junk-session-cookies +Short: j +Help: Ignore session cookies read from file +Protocols: HTTP +See-also: cookie cookie-jar +Category: http +--- +When curl is told to read cookies from a given file, this option will make it +discard all "session cookies". This will basically have the same effect as if +a new session is started. Typical browsers always discard session cookies when +they're closed down. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/keepalive-time.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/keepalive-time.d new file mode 100644 index 00000000..41261535 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/keepalive-time.d @@ -0,0 +1,14 @@ +Long: keepalive-time +Arg: +Help: Interval time for keepalive probes +Added: 7.18.0 +Category: connection +--- +This option sets the time a connection needs to remain idle before sending +keepalive probes and the time between individual keepalive probes. It is +currently effective on operating systems offering the TCP_KEEPIDLE and +TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This +option has no effect if --no-keepalive is used. + +If this option is used several times, the last one will be used. If +unspecified, the option defaults to 60 seconds. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key-type.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key-type.d new file mode 100644 index 00000000..50a06867 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key-type.d @@ -0,0 +1,10 @@ +Long: key-type +Arg: +Help: Private key file type (DER/PEM/ENG) +Protocols: TLS +Category: tls +--- +Private key file type. Specify which type your --key provided private key +is. DER, PEM, and ENG are supported. If not specified, PEM is assumed. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key.d new file mode 100644 index 00000000..a762e6fa --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/key.d @@ -0,0 +1,18 @@ +Long: key +Arg: +Protocols: TLS SSH +Help: Private key file name +Category: tls ssh +--- +Private key file name. Allows you to provide your private key in this separate +file. For SSH, if not specified, curl tries the following candidates in order: +\&'~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'. + +If curl is built against OpenSSL library, and the engine pkcs11 is available, +then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a +PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a +PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set +as "pkcs11" if none was provided and the --key-type option will be set as +"ENG" if none was provided. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/krb.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/krb.d new file mode 100644 index 00000000..7759cfb0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/krb.d @@ -0,0 +1,12 @@ +Long: krb +Arg: +Help: Enable Kerberos with security +Protocols: FTP +Requires: Kerberos +Category: ftp +--- +Enable Kerberos authentication and use. The level must be entered and should +be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a +level that is not one of these, 'private' will instead be used. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/libcurl.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/libcurl.d new file mode 100644 index 00000000..eb9850c6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/libcurl.d @@ -0,0 +1,12 @@ +Long: libcurl +Arg: +Help: Dump libcurl equivalent code of this command line +Added: 7.16.1 +Category: curl +--- +Append this option to any ordinary curl command line, and you will get a +libcurl-using C source code written to the file that does the equivalent +of what your command-line operation does! + +If this option is used several times, the last given file name will be +used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/limit-rate.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/limit-rate.d new file mode 100644 index 00000000..cb3a8607 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/limit-rate.d @@ -0,0 +1,19 @@ +Long: limit-rate +Arg: +Help: Limit transfer speed to RATE +Category: connection +--- +Specify the maximum transfer rate you want curl to use - for both downloads +and uploads. This feature is useful if you have a limited pipe and you'd like +your transfer not to use your entire bandwidth. To make it slower than it +otherwise would be. + +The given speed is measured in bytes/second, unless a suffix is appended. +Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it +megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. + +If you also use the --speed-limit option, that option will take precedence and +might cripple the rate-limiting slightly, to help keeping the speed-limit +logic working. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/list-only.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/list-only.d new file mode 100644 index 00000000..c6988580 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/list-only.d @@ -0,0 +1,25 @@ +Long: list-only +Short: l +Protocols: FTP POP3 +Help: List only mode +Added: 4.0 +Category: ftp pop3 +--- +(FTP) +When listing an FTP directory, this switch forces a name-only view. This is +especially useful if the user wants to machine-parse the contents of an FTP +directory since the normal directory view doesn't use a standard look or +format. When used like this, the option causes a NLST command to be sent to +the server instead of LIST. + +Note: Some FTP servers list only files in their response to NLST; they do not +include sub-directories and symbolic links. + +(POP3) +When retrieving a specific email from POP3, this switch forces a LIST command +to be performed instead of RETR. This is particularly useful if the user wants +to see if a specific message id exists on the server and what size it is. + +Note: When combined with --request, this option can be used to send an UIDL +command instead, so the user may use the email's unique identifier rather than +it's message id to make the request. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/local-port.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/local-port.d new file mode 100644 index 00000000..3f7a0e02 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/local-port.d @@ -0,0 +1,10 @@ +Long: local-port +Arg: +Help: Force use of RANGE for local port numbers +Added: 7.15.2 +Category: connection +--- +Set a preferred single number or range (FROM-TO) of local port numbers to use +for the connection(s). Note that port numbers by nature are a scarce resource +that will be busy at times so setting this range to something too narrow might +cause unnecessary connection setup failures. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location-trusted.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location-trusted.d new file mode 100644 index 00000000..f01d842b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location-trusted.d @@ -0,0 +1,10 @@ +Long: location-trusted +Help: Like --location, and send auth to other hosts +Protocols: HTTP +See-also: user +Category: http auth +--- +Like --location, but will allow sending the name + password to all hosts that +the site may redirect to. This may or may not introduce a security breach if +the site redirects you to a site to which you'll send your authentication info +(which is plaintext in the case of HTTP Basic authentication). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location.d new file mode 100644 index 00000000..c70b2eba --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/location.d @@ -0,0 +1,26 @@ +Long: location +Short: L +Help: Follow redirects +Protocols: HTTP +Category: http +--- +If the server reports that the requested page has moved to a different +location (indicated with a Location: header and a 3XX response code), this +option will make curl redo the request on the new place. If used together with +--include or --head, headers from all requested pages will be shown. When +authentication is used, curl only sends its credentials to the initial +host. If a redirect takes curl to a different host, it won't be able to +intercept the user+password. See also --location-trusted on how to change +this. You can limit the amount of redirects to follow by using the +--max-redirs option. + +When curl follows a redirect and if the request is a POST, it will do the +following request with a GET if the HTTP response was 301, 302, or 303. If the +response code was any other 3xx code, curl will re-send the following request +using the same unmodified method. + +You can tell curl to not change POST requests to GET after a 30x response by +using the dedicated options for that: --post301, --post302 and --post303. + +The method set with --request overrides the method curl would otherwise select +to use. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/login-options.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/login-options.d new file mode 100644 index 00000000..887d5d51 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/login-options.d @@ -0,0 +1,15 @@ +Long: login-options +Arg: +Protocols: IMAP POP3 SMTP +Help: Server login options +Added: 7.34.0 +Category: imap pop3 smtp auth +--- +Specify the login options to use during server authentication. + +You can use the login options to specify protocol specific options that may +be used during authentication. At present only IMAP, POP3 and SMTP support +login options. For more information about the login options please see +RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-auth.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-auth.d new file mode 100644 index 00000000..52999716 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-auth.d @@ -0,0 +1,11 @@ +Long: mail-auth +Arg:
+Protocols: SMTP +Help: Originator address of the original email +Added: 7.25.0 +See-also: mail-rcpt mail-from +Category: smtp +--- +Specify a single address. This will be used to specify the authentication +address (identity) of a submitted message that is being relayed to another +server. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-from.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-from.d new file mode 100644 index 00000000..faf48e2a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-from.d @@ -0,0 +1,9 @@ +Long: mail-from +Arg:
+Help: Mail from this address +Protocols: SMTP +Added: 7.20.0 +See-also: mail-rcpt mail-auth +Category: smtp +--- +Specify a single address that the given mail should get sent from. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt-allowfails.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt-allowfails.d new file mode 100644 index 00000000..76457c32 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt-allowfails.d @@ -0,0 +1,16 @@ +Long: mail-rcpt-allowfails +Help: Allow RCPT TO command to fail for some recipients +Protocols: SMTP +Added: 7.69.0 +Category: smtp +--- +When sending data to multiple recipients, by default curl will abort SMTP +conversation if at least one of the recipients causes RCPT TO command to +return an error. + +The default behavior can be changed by passing --mail-rcpt-allowfails +command-line option which will make curl ignore errors and proceed with the +remaining valid recipients. + +In case when all recipients cause RCPT TO command to fail, curl will abort SMTP +conversation and return the error received from to the last RCPT TO command. \ No newline at end of file diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt.d new file mode 100644 index 00000000..d8ae046e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/mail-rcpt.d @@ -0,0 +1,20 @@ +Long: mail-rcpt +Arg:
+Help: Mail to this address +Protocols: SMTP +Added: 7.20.0 +Category: smtp +--- +Specify a single address, user name or mailing list name. Repeat this +option several times to send to multiple recipients. + +When performing a mail transfer, the recipient should specify a valid email +address to send the mail to. + +When performing an address verification (VRFY command), the recipient should be +specified as the user name or user name and domain (as per Section 3.5 of +RFC5321). (Added in 7.34.0) + +When performing a mailing list expand (EXPN command), the recipient should be +specified using the mailing list name, such as "Friends" or "London-Office". +(Added in 7.34.0) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/manual.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/manual.d new file mode 100644 index 00000000..25ed08dd --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/manual.d @@ -0,0 +1,6 @@ +Long: manual +Short: M +Help: Display the full manual +Category: curl +--- +Manual. Display the huge help text. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-filesize.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-filesize.d new file mode 100644 index 00000000..1f6bdc66 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-filesize.d @@ -0,0 +1,17 @@ +Long: max-filesize +Arg: +Help: Maximum file size to download +See-also: limit-rate +Category: connection +--- +Specify the maximum size (in bytes) of a file to download. If the file +requested is larger than this value, the transfer will not start and curl will +return with exit code 63. + +A size modifier may be used. For example, Appending 'k' or 'K' will count the +number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it +gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0) + +\fBNOTE:\fP The file size is not always known prior to download, and for such +files this option has no effect even if the file transfer ends up being larger +than this given limit. This concerns both FTP and HTTP transfers. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-redirs.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-redirs.d new file mode 100644 index 00000000..ba16c43f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-redirs.d @@ -0,0 +1,11 @@ +Long: max-redirs +Arg: +Help: Maximum number of redirects allowed +Protocols: HTTP +Category: http +--- +Set maximum number of redirection-followings allowed. When --location is used, +is used to prevent curl from following redirections too much. By default, the +limit is set to 50 redirections. Set this option to -1 to make it unlimited. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-time.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-time.d new file mode 100644 index 00000000..c4e4ed7e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/max-time.d @@ -0,0 +1,14 @@ +Long: max-time +Short: m +Arg: +Help: Maximum time allowed for the transfer +See-also: connect-timeout +Category: connection +--- +Maximum time in seconds that you allow the whole operation to take. This is +useful for preventing your batch jobs from hanging for hours due to slow +networks or links going down. Since 7.32.0, this option accepts decimal +values, but the actual timeout will decrease in accuracy as the specified +timeout increases in decimal precision. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/metalink.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/metalink.d new file mode 100644 index 00000000..88376643 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/metalink.d @@ -0,0 +1,27 @@ +Long: metalink +Help: Process given URLs as metalink XML file +Added: 7.27.0 +Requires: metalink +Category: misc +--- +This option can tell curl to parse and process a given URI as Metalink file +(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors +listed within for failover if there are errors (such as the file or server not +being available). It will also verify the hash of the file after the download +completes. The Metalink file itself is downloaded and processed in memory and +not stored in the local file system. + +Example to use a remote Metalink file: + + curl --metalink http://www.example.com/example.metalink + +To use a Metalink file in the local file system, use FILE protocol (file://): + + curl --metalink file://example.metalink + +Please note that if FILE protocol is disabled, there is no way to use a local +Metalink file at the time of this writing. Also note that if --metalink and +--include are used together, --include will be ignored. This is because +including headers in the response will break Metalink parser and if the +headers are included in the file described in Metalink file, hash check will +fail. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/negotiate.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/negotiate.d new file mode 100644 index 00000000..e247bfbe --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/negotiate.d @@ -0,0 +1,16 @@ +Long: negotiate +Help: Use HTTP Negotiate (SPNEGO) authentication +Protocols: HTTP +See-also: basic ntlm anyauth proxy-negotiate +Category: auth http +--- +Enables Negotiate (SPNEGO) authentication. + +This option requires a library built with GSS-API or SSPI support. Use +--version to see if your curl supports GSS-API/SSPI or SPNEGO. + +When using this option, you must also provide a fake --user option to activate +the authentication code properly. Sending a '-u :' is enough as the user name +and password from the --user option aren't actually used. + +If this option is used several times, only the first one is used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-file.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-file.d new file mode 100644 index 00000000..95fb2654 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-file.d @@ -0,0 +1,13 @@ +Long: netrc-file +Help: Specify FILE for netrc +Arg: +Added: 7.21.5 +Mutexed: netrc +Category: curl +--- +This option is similar to --netrc, except that you provide the path (absolute +or relative) to the netrc file that curl should use. You can only specify one +netrc file per invocation. If several --netrc-file options are provided, +the last one will be used. + +It will abide by --netrc-optional if specified. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-optional.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-optional.d new file mode 100644 index 00000000..fa92032b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc-optional.d @@ -0,0 +1,8 @@ +Long: netrc-optional +Help: Use either .netrc or URL +Mutexed: netrc +See-also: netrc-file +Category: curl +--- +Very similar to --netrc, but this option makes the .netrc usage \fBoptional\fP +and not mandatory as the --netrc option does. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc.d new file mode 100644 index 00000000..6aac568a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/netrc.d @@ -0,0 +1,18 @@ +Long: netrc +Short: n +Help: Must read .netrc for user name and password +Category: curl +--- +Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's +home directory for login name and password. This is typically used for FTP on +Unix. If used with HTTP, curl will enable user authentication. See +\fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not +complain if that file doesn't have the right permissions (it should not be +either world- or group-readable). The environment variable "HOME" is used to +find the home directory. + +A quick and very simple example of how to setup a \fI.netrc\fP to allow curl +to FTP to the machine host.domain.com with user name \&'myself' and password +\&'secret' should look similar to: + +.B "machine host.domain.com login myself password secret" diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/next.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/next.d new file mode 100644 index 00000000..1adcc753 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/next.d @@ -0,0 +1,21 @@ +Short: : +Long: next +Tags: +Protocols: +Added: 7.36.0 +Magic: divider +Help: Make next URL use its separate set of options +Category: curl +--- +Tells curl to use a separate operation for the following URL and associated +options. This allows you to send several URL requests, each with their own +specific options, for example, such as different user names or custom requests +for each. + +--next will reset all local options and only global ones will have their +values survive over to the operation following the --next instruction. Global +options include --verbose, --trace, --trace-ascii and --fail-early. + +For example, you can do both a GET and a POST in a single command line: + + curl www1.example.com --next -d postthis www2.example.com diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-alpn.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-alpn.d new file mode 100644 index 00000000..8031b4f0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-alpn.d @@ -0,0 +1,12 @@ +Long: no-alpn +Tags: HTTP/2 +Protocols: HTTPS +Added: 7.36.0 +See-also: no-npn http2 +Requires: TLS +Help: Disable the ALPN TLS extension +Category: tls http +--- +Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built +with an SSL library that supports ALPN. ALPN is used by a libcurl that supports +HTTP/2 to negotiate HTTP/2 support with the server during https sessions. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-buffer.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-buffer.d new file mode 100644 index 00000000..1079f471 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-buffer.d @@ -0,0 +1,12 @@ +Long: no-buffer +Short: N +Help: Disable buffering of the output stream +Category: curl +--- +Disables the buffering of the output stream. In normal work situations, curl +will use a standard buffered output stream that will have the effect that it +will output the data in chunks, not necessarily exactly when the data arrives. +Using this option will disable that buffering. + +Note that this is the negated option name documented. You can thus use +--buffer to enforce the buffering. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-keepalive.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-keepalive.d new file mode 100644 index 00000000..72f3bc9a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-keepalive.d @@ -0,0 +1,9 @@ +Long: no-keepalive +Help: Disable TCP keepalive on the connection +Category: connection +--- +Disables the use of keepalive messages on the TCP connection. curl otherwise +enables them by default. + +Note that this is the negated option name documented. You can thus use +--keepalive to enforce keepalive. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-npn.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-npn.d new file mode 100644 index 00000000..27e5974b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-npn.d @@ -0,0 +1,13 @@ +Long: no-npn +Tags: Versions HTTP/2 +Protocols: HTTPS +Added: 7.36.0 +Mutexed: +See-also: no-alpn http2 +Requires: TLS +Help: Disable the NPN TLS extension +Category: tls http +--- +Disable the NPN TLS extension. NPN is enabled by default if libcurl was built +with an SSL library that supports NPN. NPN is used by a libcurl that supports +HTTP/2 to negotiate HTTP/2 support with the server during https sessions. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-progress-meter.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-progress-meter.d new file mode 100644 index 00000000..bf28d635 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-progress-meter.d @@ -0,0 +1,11 @@ +Long: no-progress-meter +Help: Do not show the progress meter +See-also: verbose silent +Added: 7.67.0 +Category: verbose +--- +Option to switch off the progress meter output without muting or otherwise +affecting warning and informational messages like --silent does. + +Note that this is the negated option name documented. You can thus use +--progress-meter to enable the progress meter again. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-sessionid.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-sessionid.d new file mode 100644 index 00000000..013ca4cb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/no-sessionid.d @@ -0,0 +1,14 @@ +Long: no-sessionid +Help: Disable SSL session-ID reusing +Protocols: TLS +Added: 7.16.0 +Category: tls +--- +Disable curl's use of SSL session-ID caching. By default all transfers are +done using the cache. Note that while nothing should ever get hurt by +attempting to reuse SSL session-IDs, there seem to be broken SSL +implementations in the wild that may require you to disable this in order for +you to succeed. + +Note that this is the negated option name documented. You can thus use +--sessionid to enforce session-ID caching. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/noproxy.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/noproxy.d new file mode 100644 index 00000000..12ce6d3e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/noproxy.d @@ -0,0 +1,16 @@ +Long: noproxy +Arg: +Help: List of hosts which do not use proxy +Added: 7.19.4 +Category: proxy +--- +Comma-separated list of hosts which do not use a proxy, if one is specified. +The only wildcard is a single * character, which matches all hosts, and +effectively disables the proxy. Each name in this list is matched as either +a domain which contains the hostname, or the hostname itself. For example, +local.com would match local.com, local.com:80, and www.local.com, but not +www.notlocal.com. + +Since 7.53.0, This option overrides the environment variables that disable the +proxy. If there's an environment variable disabling a proxy, you can set +noproxy list to \&"" to override it. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm-wb.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm-wb.d new file mode 100644 index 00000000..4a2f7e1e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm-wb.d @@ -0,0 +1,8 @@ +Long: ntlm-wb +Help: Use HTTP NTLM authentication with winbind +Protocols: HTTP +See-also: ntlm proxy-ntlm +Category: auth http +--- +Enables NTLM much in the style --ntlm does, but hand over the authentication +to the separate binary ntlmauth application that is executed when needed. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm.d new file mode 100644 index 00000000..c63c086e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ntlm.d @@ -0,0 +1,19 @@ +Long: ntlm +Help: Use HTTP NTLM authentication +Mutexed: basic negotiate digest anyauth +See-also: proxy-ntlm +Protocols: HTTP +Requires: TLS +Category: auth http +--- +Enables NTLM authentication. The NTLM authentication method was designed by +Microsoft and is used by IIS web servers. It is a proprietary protocol, +reverse-engineered by clever people and implemented in curl based on their +efforts. This kind of behavior should not be endorsed, you should encourage +everyone who uses NTLM to switch to a public and documented authentication +method instead, such as Digest. + +If you want to enable NTLM for your proxy authentication, then use +--proxy-ntlm. + +If this option is used several times, only the first one is used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/oauth2-bearer.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/oauth2-bearer.d new file mode 100644 index 00000000..e0ea210e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/oauth2-bearer.d @@ -0,0 +1,13 @@ +Long: oauth2-bearer +Help: OAuth 2 Bearer Token +Arg: +Protocols: IMAP POP3 SMTP HTTP +Category: auth +--- +Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token +is used in conjunction with the user name which can be specified as part of +the --url or --user options. + +The Bearer Token and user name are formatted according to RFC 6750. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output-dir.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output-dir.d new file mode 100644 index 00000000..d2ff7738 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output-dir.d @@ -0,0 +1,19 @@ +Long: output-dir +Arg: +Help: Directory to save files in +Added: 7.73.0 +See-also: remote-name remote-header-name +Category: curl +--- + +This option specifies the directory in which files should be stored, when +--remote-name or --output are used. + +The given output directory is used for all URLs and output options on the +command line, up until the first --next. + +If the specified target directory doesn't exist, the operation will fail +unless --create-dirs is also used. + +If this option is used multiple times, the last specified directory will be +used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output.d new file mode 100644 index 00000000..bf35bf4a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/output.d @@ -0,0 +1,33 @@ +Long: output +Arg: +Short: o +Help: Write to file instead of stdout +See-also: remote-name remote-name-all remote-header-name +Category: important curl +--- +Write output to instead of stdout. If you are using {} or [] to fetch +multiple documents, you should quote the URL and you can use '#' followed by a +number in the specifier. That variable will be replaced with the current +string for the URL being fetched. Like in: + + curl "http://{one,two}.example.com" -o "file_#1.txt" + +or use several variables like: + + curl "http://{site,host}.host[1-5].com" -o "#1_#2" + +You may use this option as many times as the number of URLs you have. For +example, if you specify two URLs on the same command line, you can use it like +this: + + curl -o aa example.com -o bb example.net + +and the order of the -o options and the URLs doesn't matter, just that the +first -o is for the first URL and so on, so the above command line can also be +written as + + curl example.com example.net -o aa -o bb + +See also the --create-dirs option to create the local directories +dynamically. Specifying the output as '-' (a single dash) will force the +output to be done to stdout. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-footer b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-footer new file mode 100644 index 00000000..479c712a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-footer @@ -0,0 +1,286 @@ +.SH FILES +.I ~/.curlrc +.RS +Default config file, see --config for details. +.SH ENVIRONMENT +The environment variables can be specified in lower case or upper case. The +lower case version has precedence. http_proxy is an exception as it is only +available in lower case. + +Using an environment variable to set the proxy has the same effect as using +the --proxy option. + +.IP "http_proxy [protocol://][:port]" +Sets the proxy server to use for HTTP. +.IP "HTTPS_PROXY [protocol://][:port]" +Sets the proxy server to use for HTTPS. +.IP "[url-protocol]_PROXY [protocol://][:port]" +Sets the proxy server to use for [url-protocol], where the protocol is a +protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP, +SMTP, LDAP etc. +.IP "ALL_PROXY [protocol://][:port]" +Sets the proxy server to use if no protocol-specific proxy is set. +.IP "NO_PROXY " +list of host names that shouldn't go through any proxy. If set to an asterisk +\&'*' only, it matches all hosts. Each name in this list is matched as either +a domain name which contains the hostname, or the hostname itself. + +This environment variable disables use of the proxy even when specified with +the --proxy option. That is +.B NO_PROXY=direct.example.com curl -x http://proxy.example.com +.B http://direct.example.com +accesses the target URL directly, and +.B NO_PROXY=direct.example.com curl -x http://proxy.example.com +.B http://somewhere.example.com +accesses the target URL through the proxy. + +The list of host names can also be include numerical IP addresses, and IPv6 +versions should then be given without enclosing brackets. + +IPv6 numerical addresses are compared as strings, so they will only match if +the representations are the same: "::1" is the same as "::0:1" but they don't +match. +.IP "CURL_SSL_BACKEND " +If curl was built with support for "MultiSSL", meaning that it has built-in +support for more than one TLS backend, this environment variable can be set to +the case insensitive name of the particular backend to use when curl is +invoked. Setting a name that isn't a built-in alternative, will make curl +stay with the default. +.IP "QLOGDIR " +If curl was built with HTTP/3 support, setting this environment variable to a +local directory will make curl produce qlogs in that directory, using file +names named after the destination connection id (in hex). Do note that these +files can become rather large. Works with both QUIC backends. +.IP "SSLKEYLOGFILE " +If you set this environment variable to a file name, curl will store TLS +secrets from its connections in that file when invoked to enable you to +analyze the TLS traffic in real time using network analyzing tools such as +Wireshark. This works with the following TLS backends: OpenSSL, libressl, +BoringSSL, GnuTLS, NSS and wolfSSL. +.SH "PROXY PROTOCOL PREFIXES" +Since curl version 7.21.7, the proxy string may be specified with a +protocol:// prefix to specify alternative proxy protocols. + +If no protocol is specified in the proxy string or if the string doesn't match +a supported one, the proxy will be treated as an HTTP proxy. + +The supported proxy protocol prefixes are as follows: +.IP "http://" +Makes it use it as an HTTP proxy. The default if no scheme prefix is used. +.IP "https://" +Makes it treated as an \fBHTTPS\fP proxy. +.IP "socks4://" +Makes it the equivalent of --socks4 +.IP "socks4a://" +Makes it the equivalent of --socks4a +.IP "socks5://" +Makes it the equivalent of --socks5 +.IP "socks5h://" +Makes it the equivalent of --socks5-hostname +.SH EXIT CODES +There are a bunch of different error codes and their corresponding error +messages that may appear during bad conditions. At the time of this writing, +the exit codes are: +.IP 1 +Unsupported protocol. This build of curl has no support for this protocol. +.IP 2 +Failed to initialize. +.IP 3 +URL malformed. The syntax was not correct. +.IP 4 +A feature or option that was needed to perform the desired request was not +enabled or was explicitly disabled at build-time. To make curl able to do +this, you probably need another build of libcurl! +.IP 5 +Couldn't resolve proxy. The given proxy host could not be resolved. +.IP 6 +Couldn't resolve host. The given remote host was not resolved. +.IP 7 +Failed to connect to host. +.IP 8 +Weird server reply. The server sent data curl couldn't parse. +.IP 9 +FTP access denied. The server denied login or denied access to the particular +resource or directory you wanted to reach. Most often you tried to change to a +directory that doesn't exist on the server. +.IP 10 +FTP accept failed. While waiting for the server to connect back when an active +FTP session is used, an error code was sent over the control connection or +similar. +.IP 11 +FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request. +.IP 12 +During an active FTP session while waiting for the server to connect back to +curl, the timeout expired. +.IP 13 +FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request. +.IP 14 +FTP weird 227 format. Curl couldn't parse the 227-line the server sent. +.IP 15 +FTP can't get host. Couldn't resolve the host IP we got in the 227-line. +.IP 16 +HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is +somewhat generic and can be one out of several problems, see the error message +for details. +.IP 17 +FTP couldn't set binary. Couldn't change transfer method to binary. +.IP 18 +Partial file. Only a part of the file was transferred. +.IP 19 +FTP couldn't download/access the given file, the RETR (or similar) command +failed. +.IP 21 +FTP quote error. A quote command returned error from the server. +.IP 22 +HTTP page not retrieved. The requested url was not found or returned another +error with the HTTP error code being 400 or above. This return code only +appears if --fail is used. +.IP 23 +Write error. Curl couldn't write data to a local filesystem or similar. +.IP 25 +FTP couldn't STOR file. The server denied the STOR operation, used for FTP +uploading. +.IP 26 +Read error. Various reading problems. +.IP 27 +Out of memory. A memory allocation request failed. +.IP 28 +Operation timeout. The specified time-out period was reached according to the +conditions. +.IP 30 +FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT +command, try doing a transfer using PASV instead! +.IP 31 +FTP couldn't use REST. The REST command failed. This command is used for +resumed FTP transfers. +.IP 33 +HTTP range error. The range "command" didn't work. +.IP 34 +HTTP post error. Internal post-request generation error. +.IP 35 +SSL connect error. The SSL handshaking failed. +.IP 36 +Bad download resume. Couldn't continue an earlier aborted download. +.IP 37 +FILE couldn't read file. Failed to open the file. Permissions? +.IP 38 +LDAP cannot bind. LDAP bind operation failed. +.IP 39 +LDAP search failed. +.IP 41 +Function not found. A required LDAP function was not found. +.IP 42 +Aborted by callback. An application told curl to abort the operation. +.IP 43 +Internal error. A function was called with a bad parameter. +.IP 45 +Interface error. A specified outgoing interface could not be used. +.IP 47 +Too many redirects. When following redirects, curl hit the maximum amount. +.IP 48 +Unknown option specified to libcurl. This indicates that you passed a weird +option to curl that was passed on to libcurl and rejected. Read up in the +manual! +.IP 49 +Malformed telnet option. +.IP 51 +The peer's SSL certificate or SSH MD5 fingerprint was not OK. +.IP 52 +The server didn't reply anything, which here is considered an error. +.IP 53 +SSL crypto engine not found. +.IP 54 +Cannot set SSL crypto engine as default. +.IP 55 +Failed sending network data. +.IP 56 +Failure in receiving network data. +.IP 58 +Problem with the local certificate. +.IP 59 +Couldn't use specified SSL cipher. +.IP 60 +Peer certificate cannot be authenticated with known CA certificates. +.IP 61 +Unrecognized transfer encoding. +.IP 62 +Invalid LDAP URL. +.IP 63 +Maximum file size exceeded. +.IP 64 +Requested FTP SSL level failed. +.IP 65 +Sending the data requires a rewind that failed. +.IP 66 +Failed to initialise SSL Engine. +.IP 67 +The user name, password, or similar was not accepted and curl failed to log in. +.IP 68 +File not found on TFTP server. +.IP 69 +Permission problem on TFTP server. +.IP 70 +Out of disk space on TFTP server. +.IP 71 +Illegal TFTP operation. +.IP 72 +Unknown TFTP transfer ID. +.IP 73 +File already exists (TFTP). +.IP 74 +No such user (TFTP). +.IP 75 +Character conversion failed. +.IP 76 +Character conversion functions required. +.IP 77 +Problem with reading the SSL CA cert (path? access rights?). +.IP 78 +The resource referenced in the URL does not exist. +.IP 79 +An unspecified error occurred during the SSH session. +.IP 80 +Failed to shut down the SSL connection. +.IP 82 +Could not load CRL file, missing or wrong format (added in 7.19.0). +.IP 83 +Issuer check failed (added in 7.19.0). +.IP 84 +The FTP PRET command failed +.IP 85 +RTSP: mismatch of CSeq numbers +.IP 86 +RTSP: mismatch of Session Identifiers +.IP 87 +unable to parse FTP file list +.IP 88 +FTP chunk callback reported error +.IP 89 +No connection available, the session will be queued +.IP 90 +SSL public key does not matched pinned public key +.IP 91 +Invalid SSL certificate status. +.IP 92 +Stream error in HTTP/2 framing layer. +.IP 93 +An API function was called from inside a callback. +.IP 94 +An authentication function returned an error. +.IP 95 +A problem was detected in the HTTP/3 layer. This is somewhat generic and can +be one out of several problems, see the error message for details. +.IP 96 +QUIC connection error. This error may be caused by an SSL library error. QUIC +is the protocol used for HTTP/3 transfers. +.IP XX +More error codes will appear here in future releases. The existing ones +are meant to never change. +.SH AUTHORS / CONTRIBUTORS +Daniel Stenberg is the main author, but the whole list of contributors is +found in the separate THANKS file. +.SH WWW +https://curl.haxx.se +.SH "SEE ALSO" +.BR ftp (1), +.BR wget (1) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-header b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-header new file mode 100644 index 00000000..a51e485b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/page-header @@ -0,0 +1,191 @@ +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at https://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** +.\" +.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator. +.\" +.TH curl 1 "16 Dec 2016" "Curl 7.52.0" "Curl Manual" +.SH NAME +curl \- transfer a URL +.SH SYNOPSIS +.B curl [options / URLs] +.SH DESCRIPTION +.B curl +is a tool to transfer data from or to a server, using one of the supported +protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, +LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, +SMTPS, TELNET and TFTP). The command is designed to work without user +interaction. + +curl offers a busload of useful tricks like proxy support, user +authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer +resume, Metalink, and more. As you will see below, the number of features will +make your head spin! + +curl is powered by libcurl for all transfer-related features. See +\fIlibcurl(3)\fP for details. +.SH URL +The URL syntax is protocol-dependent. You'll find a detailed description in +RFC 3986. + +You can specify multiple URLs or parts of URLs by writing part sets within +braces and quoting the URL as in: + + "http://site.{one,two,three}.com" + +or you can get sequences of alphanumeric series by using [] as in: + + "ftp://ftp.example.com/file[1-100].txt" + + "ftp://ftp.example.com/file[001-100].txt" (with leading zeros) + + "ftp://ftp.example.com/file[a-z].txt" + +Nested sequences are not supported, but you can use several ones next to each +other: + + "http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html" + +You can specify any amount of URLs on the command line. They will be fetched +in a sequential manner in the specified order. You can specify command line +options and URLs mixed and in any order on the command line. + +You can specify a step counter for the ranges to get every Nth number or +letter: + + "http://example.com/file[1-100:10].txt" + + "http://example.com/file[a-z:2].txt" + +When using [] or {} sequences when invoked from a command line prompt, you +probably have to put the full URL within double quotes to avoid the shell from +interfering with it. This also goes for other characters treated special, like +for example '&', '?' and '*'. + +Provide the IPv6 zone index in the URL with an escaped percentage sign and the +interface name. Like in + + "http://[fe80::3%25eth0]/" + +If you specify URL without protocol:// prefix, curl will attempt to guess what +protocol you might want. It will then default to HTTP but try other protocols +based on often-used host name prefixes. For example, for host names starting +with "ftp." curl will assume you want to speak FTP. + +curl will do its best to use what you pass to it as a URL. It is not trying to +validate it as a syntactically correct URL by any means but is instead +\fBvery\fP liberal with what it accepts. + +curl will attempt to re-use connections for multiple file transfers, so that +getting many files from the same server will not do multiple connects / +handshakes. This improves speed. Of course this is only done on files +specified on a single command line and cannot be used between separate curl +invokes. +.SH PROTOCOLS +curl supports numerous protocols, or put in URL terms: schemes. Your +particular build may not support them all. +.IP DICT +Lets you lookup words using online dictionaries. +.IP FILE +Read or write local files. curl does not support accessing file:// URL +remotely, but when running on Microsft Windows using the native UNC approach +will work. +.IP FTP(S) +curl supports the File Transfer Protocol with a lot of tweaks and levers. With +or without using TLS. +.IP GOPHER +Retrieve files. +.IP HTTP(S) +curl supports HTTP with numerous options and variations. It can speak HTTP +version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct +command line options. +.IP IMAP(S) +Using the mail reading protocol, curl can "download" emails for you. With or +without using TLS. +.IP LDAP(S) +curl can do directory lookups for you, with or without TLS. +.IP MQTT +curl supports MQTT version 3. Downloading over MQTT equals "subscribe" to a +topic while uploading/posting equals "publish" on a topic. MQTT support is +experimental and TLS based MQTT is not supported (yet). +.IP POP3(S) +Downloading from a pop3 server means getting a mail. With or without using +TLS. +.IP RTMP(S) +The Realtime Messaging Protocol is primarily used to server streaming media +and curl can download it. +.IP RTSP +curl supports RTSP 1.0 downloads. +.IP SCP +curl supports SSH version 2 scp transfers. +.IP SFTP +curl supports SFTP (draft 5) done over SSH version 2. +.IP SMB(S) +curl supports SMB version 1 for upload and download. +.IP SMTP(S) +Uploading contents to an SMTP server means sending an email. With or without +TLS. +.IP TELNET +Telling curl to fetch a telnet URL starts an interactive session where it +sends what it reads on stdin and outputs what the server sends it. +.IP TFTP +curl can do TFTP downloads and uploads. +.SH "PROGRESS METER" +curl normally displays a progress meter during operations, indicating the +amount of transferred data, transfer speeds and estimated time left, etc. The +progress meter displays number of bytes and the speeds are in bytes per +second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024 +bytes. 1M is 1048576 bytes. + +curl displays this data to the terminal by default, so if you invoke curl to +do an operation and it is about to write data to the terminal, it +\fIdisables\fP the progress meter as otherwise it would mess up the output +mixing progress meter and response data. + +If you want a progress meter for HTTP POST or PUT requests, you need to +redirect the response output to a file, using shell redirect (>), --output or +similar. + +It is not the same case for FTP upload as that operation does not spit out +any response data to the terminal. + +If you prefer a progress "bar" instead of the regular meter, --progress-bar is +your friend. You can also disable the progress meter completely with the +--silent option. +.SH OPTIONS +Options start with one or two dashes. Many of the options require an +additional value next to them. + +The short "single-dash" form of the options, -d for example, may be used with +or without a space between it and its value, although a space is a recommended +separator. The long "double-dash" form, --data for example, requires a space +between it and its value. + +Short version options that don't need any additional values can be used +immediately next to each other, like for example you can specify all the +options -O, -L and -v at once as -OLv. + +In general, all boolean options are enabled with --\fBoption\fP and yet again +disabled with --\fBno-\fPoption. That is, you use the exact same option name +but prefix it with "no-". However, in this list we mostly only list and show +the --option version of them. (This concept with --no options was added in +7.19.0. Previously most options were toggled on/off on repeated use of the +same command line option.) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-immediate.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-immediate.d new file mode 100644 index 00000000..95c8afc4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-immediate.d @@ -0,0 +1,10 @@ +Long: parallel-immediate +Help: Do not wait for multiplexing (with --parallel) +Added: 7.68.0 +See-also: parallel parallel-max +Category: connection curl +--- +When doing parallel transfers, this option will instruct curl that it should +rather prefer opening up more connections in parallel at once rather than +waiting to see if new transfers can be added as multiplexed streams on another +connection. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-max.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-max.d new file mode 100644 index 00000000..d49aeb7a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel-max.d @@ -0,0 +1,10 @@ +Long: parallel-max +Help: Maximum concurrency for parallel transfers +Added: 7.66.0 +See-also: parallel +Category: connection curl +--- +When asked to do parallel transfers, using --parallel, this option controls +the maximum amount of transfers to do simultaneously. + +The default is 50. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel.d new file mode 100644 index 00000000..d6b4affe --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/parallel.d @@ -0,0 +1,8 @@ +Short: Z +Long: parallel +Help: Perform transfers in parallel +Added: 7.66.0 +Category: connection curl +--- +Makes curl perform its transfers in parallel as compared to the regular serial +manner. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pass.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pass.d new file mode 100644 index 00000000..f6633d24 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pass.d @@ -0,0 +1,9 @@ +Long: pass +Arg: +Help: Pass phrase for the private key +Protocols: SSH TLS +Category: ssh tls auth +--- +Passphrase for the private key + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/path-as-is.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/path-as-is.d new file mode 100644 index 00000000..0bfaf663 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/path-as-is.d @@ -0,0 +1,8 @@ +Long: path-as-is +Help: Do not squash .. sequences in URL path +Added: 7.42.0 +Category: curl +--- +Tell curl to not handle sequences of /../ or /./ in the given URL +path. Normally curl will squash or merge them according to standards but with +this option set you tell it not to do that. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pinnedpubkey.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pinnedpubkey.d new file mode 100644 index 00000000..617252c6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pinnedpubkey.d @@ -0,0 +1,26 @@ +Long: pinnedpubkey +Arg: +Help: FILE/HASHES Public key to verify peer against +Protocols: TLS +Category: tls +--- +Tells curl to use the specified public key file (or hashes) to verify the +peer. This can be a path to a file which contains a single public key in PEM +or DER format, or any number of base64 encoded sha256 hashes preceded by +\'sha256//\' and separated by \';\' + +When negotiating a TLS or SSL connection, the server sends a certificate +indicating its identity. A public key is extracted from this certificate and +if it does not exactly match the public key provided to this option, curl will +abort the connection before sending or receiving any data. + +PEM/DER support: + 7.39.0: OpenSSL, GnuTLS and GSKit + 7.43.0: NSS and wolfSSL + 7.47.0: mbedtls +sha256 support: + 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL + 7.47.0: mbedtls +Other SSL backends not supported. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post301.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post301.d new file mode 100644 index 00000000..9cc2ad01 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post301.d @@ -0,0 +1,12 @@ +Long: post301 +Help: Do not switch to GET after following a 301 +Protocols: HTTP +See-also: post302 post303 location +Added: 7.17.1 +Category: http post +--- +Tells curl to respect RFC 7231/6.4.2 and not convert POST requests into GET +requests when following a 301 redirection. The non-RFC behaviour is ubiquitous +in web browsers, so curl does the conversion by default to maintain +consistency. However, a server may require a POST to remain a POST after such +a redirection. This option is meaningful only when using --location. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post302.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post302.d new file mode 100644 index 00000000..02749032 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post302.d @@ -0,0 +1,12 @@ +Long: post302 +Help: Do not switch to GET after following a 302 +Protocols: HTTP +See-also: post301 post303 location +Added: 7.19.1 +Category: http post +--- +Tells curl to respect RFC 7231/6.4.3 and not convert POST requests into GET +requests when following a 302 redirection. The non-RFC behaviour is ubiquitous +in web browsers, so curl does the conversion by default to maintain +consistency. However, a server may require a POST to remain a POST after such +a redirection. This option is meaningful only when using --location. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post303.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post303.d new file mode 100644 index 00000000..1a67e13e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/post303.d @@ -0,0 +1,11 @@ +Long: post303 +Help: Do not switch to GET after following a 303 +Protocols: HTTP +See-also: post302 post301 location +Added: 7.26.0 +Category: http post +--- +Tells curl to violate RFC 7231/6.4.4 and not convert POST requests into GET +requests when following 303 redirections. A server may require a POST to +remain a POST after a 303 redirection. This option is meaningful only when +using --location. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/preproxy.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/preproxy.d new file mode 100644 index 00000000..a917c16e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/preproxy.d @@ -0,0 +1,23 @@ +Long: preproxy +Arg: [protocol://]host[:port] +Help: Use this proxy first +Added: 7.52.0 +Category: proxy +--- +Use the specified SOCKS proxy before connecting to an HTTP or HTTPS --proxy. In +such a case curl first connects to the SOCKS proxy and then connects (through +SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy. + +The pre proxy string should be specified with a protocol:// prefix to specify +alternative proxy protocols. Use socks4://, socks4a://, socks5:// or +socks5h:// to request the specific SOCKS version to be used. No protocol +specified will make curl default to SOCKS4. + +If the port number is not specified in the proxy string, it is assumed to be +1080. + +User and password that might be provided in the proxy string are URL decoded +by curl. This allows you to pass in special characters such as @ by using %40 +or pass in a colon with %3a. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/progress-bar.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/progress-bar.d new file mode 100644 index 00000000..299d5384 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/progress-bar.d @@ -0,0 +1,13 @@ +Short: # +Long: progress-bar +Help: Display transfer progress as a bar +Category: verbose +--- +Make curl display transfer progress as a simple progress bar instead of the +standard, more informational, meter. + +This progress bar draws a single line of '#' characters across the screen and +shows a percentage if the transfer size is known. For transfers without a +known size, there will be space ship (-=o=-) that moves back and forth but +only while data is being transferred, with a set of flying hash sign symbols on +top. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-default.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-default.d new file mode 100644 index 00000000..1c2afea2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-default.d @@ -0,0 +1,19 @@ +Long: proto-default +Help: Use PROTOCOL for any URL missing a scheme +Arg: +Added: 7.45.0 +Category: connection curl +--- +Tells curl to use \fIprotocol\fP for any URL missing a scheme name. + +Example: + + curl --proto-default https ftp.mozilla.org + +An unknown or unsupported protocol causes error +\fICURLE_UNSUPPORTED_PROTOCOL\fP (1). + +This option does not change the default proxy protocol (http). + +Without this option curl would make a guess based on the host, see --url for +details. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-redir.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-redir.d new file mode 100644 index 00000000..9a096f53 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto-redir.d @@ -0,0 +1,19 @@ +Long: proto-redir +Arg: +Help: Enable/disable PROTOCOLS on redirect +Added: 7.20.2 +Category: connection curl +--- +Tells curl to limit what protocols it may use on redirect. Protocols denied by +--proto are not overridden by this option. See --proto for how protocols are +represented. + +Example, allow only HTTP and HTTPS on redirect: + + curl --proto-redir -all,http,https http://example.com + +By default curl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2). +Older versions of curl allowed all protocols on redirect except several +disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and +since 7.40.0 SMB and SMBS are also disabled. Specifying \fIall\fP or \fI+all\fP +enables all protocols on redirect, including those disabled for security. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto.d new file mode 100644 index 00000000..46c91225 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proto.d @@ -0,0 +1,44 @@ +Long: proto +Arg: +Help: Enable/disable PROTOCOLS +See-also: proto-redir proto-default +Added: 7.20.2 +Category: connection curl +--- +Tells curl to limit what protocols it may use in the transfer. Protocols are +evaluated left to right, are comma separated, and are each a protocol name or +\&'all', optionally prefixed by zero or more modifiers. Available modifiers are: +.RS +.TP 3 +.B + +Permit this protocol in addition to protocols already permitted (this is +the default if no modifier is used). +.TP +.B - +Deny this protocol, removing it from the list of protocols already permitted. +.TP +.B = +Permit only this protocol (ignoring the list already permitted), though +subject to later modification by subsequent entries in the comma separated +list. +.RE +.IP +For example: +.RS +.TP 15 +.B --proto -ftps +uses the default protocols, but disables ftps +.TP +.B --proto -all,https,+http +only enables http and https +.TP +.B --proto =http,https +also only enables http and https +.RE + +Unknown protocols produce a warning. This allows scripts to safely rely on +being able to disable potentially dangerous protocols, without relying upon +support for that protocol being built into curl to avoid an error. + +This option can be used multiple times, in which case the effect is the same +as concatenating the protocols into one instance of the option. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-anyauth.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-anyauth.d new file mode 100644 index 00000000..6410c0e6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-anyauth.d @@ -0,0 +1,8 @@ +Long: proxy-anyauth +Help: Pick any proxy authentication method +Added: 7.13.2 +See-also: proxy proxy-basic proxy-digest +Category: proxy auth +--- +Tells curl to pick a suitable authentication method when communicating with +the given HTTP proxy. This might cause an extra request/response round-trip. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-basic.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-basic.d new file mode 100644 index 00000000..e842f990 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-basic.d @@ -0,0 +1,8 @@ +Long: proxy-basic +Help: Use Basic authentication on the proxy +See-also: proxy proxy-anyauth proxy-digest +Category: proxy auth +--- +Tells curl to use HTTP Basic authentication when communicating with the given +proxy. Use --basic for enabling HTTP Basic with a remote host. Basic is the +default authentication method curl uses with proxies. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cacert.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cacert.d new file mode 100644 index 00000000..bbc731a2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cacert.d @@ -0,0 +1,8 @@ +Long: proxy-cacert +Help: CA certificate to verify peer against for proxy +Arg: +Added: 7.52.0 +See-also: proxy-capath cacert capath proxy +Category: proxy tls +--- +Same as --cacert but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-capath.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-capath.d new file mode 100644 index 00000000..cc342b75 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-capath.d @@ -0,0 +1,8 @@ +Long: proxy-capath +Help: CA directory to verify peer against for proxy +Arg: +Added: 7.52.0 +See-also: proxy-cacert proxy capath +Category: proxy tls +--- +Same as --capath but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert-type.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert-type.d new file mode 100644 index 00000000..fb7596c1 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert-type.d @@ -0,0 +1,7 @@ +Long: proxy-cert-type +Arg: +Added: 7.52.0 +Help: Client certificate type for HTTPS proxy +Category: proxy tls +--- +Same as --cert-type but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert.d new file mode 100644 index 00000000..7df2712f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-cert.d @@ -0,0 +1,7 @@ +Long: proxy-cert +Arg: +Help: Set client certificate for proxy +Added: 7.52.0 +Category: proxy tls +--- +Same as --cert but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ciphers.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ciphers.d new file mode 100644 index 00000000..36655567 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ciphers.d @@ -0,0 +1,7 @@ +Long: proxy-ciphers +Arg: +Help: SSL ciphers to use for proxy +Added: 7.52.0 +Category: proxy tls +--- +Same as --ciphers but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-crlfile.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-crlfile.d new file mode 100644 index 00000000..580dc50c --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-crlfile.d @@ -0,0 +1,7 @@ +Long: proxy-crlfile +Arg: +Help: Set a CRL list for proxy +Added: 7.52.0 +Category: proxy tls +--- +Same as --crlfile but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-digest.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-digest.d new file mode 100644 index 00000000..52f1fcc6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-digest.d @@ -0,0 +1,7 @@ +Long: proxy-digest +Help: Use Digest authentication on the proxy +See-also: proxy proxy-anyauth proxy-basic +Category: proxy tls +--- +Tells curl to use HTTP Digest authentication when communicating with the given +proxy. Use --digest for enabling HTTP Digest with a remote host. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-header.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-header.d new file mode 100644 index 00000000..9f1121d2 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-header.d @@ -0,0 +1,25 @@ +Long: proxy-header +Arg:
+Help: Pass custom header(s) to proxy +Protocols: HTTP +Added: 7.37.0 +Category: proxy +--- +Extra header to include in the request when sending HTTP to a proxy. You may +specify any number of extra headers. This is the equivalent option to --header +but is for proxy communication only like in CONNECT requests when you want a +separate header sent to the proxy to what is sent to the actual remote host. + +curl will make sure that each header you add/replace is sent with the proper +end-of-line marker, you should thus \fBnot\fP add that as a part of the header +content: do not add newlines or carriage returns, they will only mess things +up for you. + +Headers specified with this option will not be included in requests that curl +knows will not be sent to a proxy. + +Starting in 7.55.0, this option can take an argument in @filename style, which +then adds a header for each line in the input file. Using @- will make curl +read the header file from stdin. + +This option can be used multiple times to add/replace/remove multiple headers. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-insecure.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-insecure.d new file mode 100644 index 00000000..e123f401 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-insecure.d @@ -0,0 +1,6 @@ +Long: proxy-insecure +Help: Do HTTPS proxy connections without verifying the proxy +Added: 7.52.0 +Category: proxy tls +--- +Same as --insecure but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key-type.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key-type.d new file mode 100644 index 00000000..1906872e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key-type.d @@ -0,0 +1,7 @@ +Long: proxy-key-type +Arg: +Help: Private key file type for proxy +Added: 7.52.0 +Category: proxy tls +--- +Same as --key-type but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key.d new file mode 100644 index 00000000..57d469f4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-key.d @@ -0,0 +1,6 @@ +Long: proxy-key +Help: Private key for HTTPS proxy +Arg: +Category: proxy tls +--- +Same as --key but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-negotiate.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-negotiate.d new file mode 100644 index 00000000..72f35960 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-negotiate.d @@ -0,0 +1,9 @@ +Long: proxy-negotiate +Help: Use HTTP Negotiate (SPNEGO) authentication on the proxy +Added: 7.17.1 +See-also: proxy-anyauth proxy-basic +Category: proxy auth +--- +Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating +with the given proxy. Use --negotiate for enabling HTTP Negotiate (SPNEGO) +with a remote host. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ntlm.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ntlm.d new file mode 100644 index 00000000..cb1ba7b0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ntlm.d @@ -0,0 +1,7 @@ +Long: proxy-ntlm +Help: Use NTLM authentication on the proxy +See-also: proxy-negotiate proxy-anyauth +Category: proxy auth +--- +Tells curl to use HTTP NTLM authentication when communicating with the given +proxy. Use --ntlm for enabling NTLM with a remote host. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pass.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pass.d new file mode 100644 index 00000000..627451bb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pass.d @@ -0,0 +1,7 @@ +Long: proxy-pass +Arg: +Help: Pass phrase for the private key for HTTPS proxy +Added: 7.52.0 +Category: proxy tls auth +--- +Same as --pass but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pinnedpubkey.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pinnedpubkey.d new file mode 100644 index 00000000..2ab79f19 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-pinnedpubkey.d @@ -0,0 +1,17 @@ +Long: proxy-pinnedpubkey +Arg: +Help: FILE/HASHES public key to verify proxy with +Protocols: TLS +Category: proxy tls +--- +Tells curl to use the specified public key file (or hashes) to verify the +proxy. This can be a path to a file which contains a single public key in PEM +or DER format, or any number of base64 encoded sha256 hashes preceded by +\'sha256//\' and separated by \';\' + +When negotiating a TLS or SSL connection, the server sends a certificate +indicating its identity. A public key is extracted from this certificate and +if it does not exactly match the public key provided to this option, curl will +abort the connection before sending or receiving any data. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-service-name.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-service-name.d new file mode 100644 index 00000000..f7807290 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-service-name.d @@ -0,0 +1,7 @@ +Long: proxy-service-name +Arg: +Help: SPNEGO proxy service name +Added: 7.43.0 +Category: proxy tls +--- +This option allows you to change the service name for proxy negotiation. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ssl-allow-beast.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ssl-allow-beast.d new file mode 100644 index 00000000..138001b3 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-ssl-allow-beast.d @@ -0,0 +1,6 @@ +Long: proxy-ssl-allow-beast +Help: Allow security flaw for interop for HTTPS proxy +Added: 7.52.0 +Category: proxy tls +--- +Same as --ssl-allow-beast but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tls13-ciphers.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tls13-ciphers.d new file mode 100644 index 00000000..19add226 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tls13-ciphers.d @@ -0,0 +1,17 @@ +Long: proxy-tls13-ciphers +Arg: +help: TLS 1.3 proxy cipher suites +Protocols: TLS +Category: proxy tls +--- +Specifies which cipher suites to use in the connection to your HTTPS proxy +when it negotiates TLS 1.3. The list of ciphers suites must specify valid +ciphers. Read up on TLS 1.3 cipher suite details on this URL: + + https://curl.haxx.se/docs/ssl-ciphers.html + +This option is currently used only when curl is built to use OpenSSL 1.1.1 or +later. If you are using a different SSL backend you can try setting TLS 1.3 +cipher suites by using the --proxy-ciphers option. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsauthtype.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsauthtype.d new file mode 100644 index 00000000..5649a0f5 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsauthtype.d @@ -0,0 +1,7 @@ +Long: proxy-tlsauthtype +Arg: +Help: TLS authentication type for HTTPS proxy +Added: 7.52.0 +Category: proxy tls auth +--- +Same as --tlsauthtype but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlspassword.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlspassword.d new file mode 100644 index 00000000..38a33d45 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlspassword.d @@ -0,0 +1,7 @@ +Long: proxy-tlspassword +Arg: +Help: TLS password for HTTPS proxy +Added: 7.52.0 +Category: proxy tls auth +--- +Same as --tlspassword but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsuser.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsuser.d new file mode 100644 index 00000000..587f7f51 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsuser.d @@ -0,0 +1,7 @@ +Long: proxy-tlsuser +Arg: +Help: TLS username for HTTPS proxy +Added: 7.52.0 +Category: proxy tls auth +--- +Same as --tlsuser but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsv1.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsv1.d new file mode 100644 index 00000000..5003f5f7 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-tlsv1.d @@ -0,0 +1,6 @@ +Long: proxy-tlsv1 +Help: Use TLSv1 for HTTPS proxy +Added: 7.52.0 +Category: proxy tls auth +--- +Same as --tlsv1 but used in HTTPS proxy context. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-user.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-user.d new file mode 100644 index 00000000..82fc5170 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy-user.d @@ -0,0 +1,19 @@ +Long: proxy-user +Short: U +Arg: +Help: Proxy user and password +Category: proxy auth +--- +Specify the user name and password to use for proxy authentication. + +If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM +authentication then you can tell curl to select the user name and password +from your environment by specifying a single colon with this option: "-U :". + +On systems where it works, curl will hide the given option argument from +process listings. This is not enough to protect credentials from possibly +getting seen by other users on the same system as they will still be visible +for a brief moment before cleared. Such sensitive data should be retrieved +from a file instead or similar and never used in clear text in a command line. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy.d new file mode 100644 index 00000000..0592f13b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy.d @@ -0,0 +1,40 @@ +Long: proxy +Short: x +Arg: [protocol://]host[:port] +Help: Use this proxy +Category: proxy +--- +Use the specified proxy. + +The proxy string can be specified with a protocol:// prefix. No protocol +specified or http:// will be treated as HTTP proxy. Use socks4://, socks4a://, +socks5:// or socks5h:// to request a specific SOCKS version to be used. +(The protocol support was added in curl 7.21.7) + +HTTPS proxy support via https:// protocol prefix was added in 7.52.0 for +OpenSSL, GnuTLS and NSS. + +Unrecognized and unsupported proxy protocols cause an error since 7.52.0. +Prior versions may ignore the protocol and use http:// instead. + +If the port number is not specified in the proxy string, it is assumed to be +1080. + +This option overrides existing environment variables that set the proxy to +use. If there's an environment variable setting a proxy, you can set proxy to +\&"" to override it. + +All operations that are performed over an HTTP proxy will transparently be +converted to HTTP. It means that certain protocol specific operations might +not be available. This is not the case if you can tunnel through the proxy, as +one with the --proxytunnel option. + +User and password that might be provided in the proxy string are URL decoded +by curl. This allows you to pass in special characters such as @ by using %40 +or pass in a colon with %3a. + +The proxy host can be specified the exact same way as the proxy environment +variables, including the protocol prefix (http://) and the embedded user + +password. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy1.0.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy1.0.d new file mode 100644 index 00000000..b8a232bf --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxy1.0.d @@ -0,0 +1,11 @@ +Long: proxy1.0 +Arg: +Help: Use HTTP/1.0 proxy on given port +Category: proxy +--- +Use the specified HTTP 1.0 proxy. If the port number is not specified, it is +assumed at port 1080. + +The only difference between this and the HTTP proxy option --proxy, is that +attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol +instead of the default HTTP 1.1. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxytunnel.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxytunnel.d new file mode 100644 index 00000000..94dae992 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/proxytunnel.d @@ -0,0 +1,13 @@ +Long: proxytunnel +Short: p +Help: Operate through an HTTP proxy tunnel (using CONNECT) +See-also: proxy +Category: proxy +--- +When an HTTP proxy is used --proxy, this option will make curl tunnel through +the proxy. The tunnel approach is made with the HTTP proxy CONNECT request and +requires that the proxy allows direct connect to the remote port number curl +wants to tunnel through to. + +To suppress proxy CONNECT response headers when curl is set to output headers +use --suppress-connect-headers. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pubkey.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pubkey.d new file mode 100644 index 00000000..692daf6b --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/pubkey.d @@ -0,0 +1,15 @@ +Long: pubkey +Arg: +Protocols: SFTP SCP +Help: SSH Public key file name +Category: sftp scp auth +--- +Public key file name. Allows you to provide your public key in this separate +file. + +If this option is used several times, the last one will be used. + +(As of 7.39.0, curl attempts to automatically extract the public key from the +private key file, so passing this option is generally not required. Note that +this public key extraction requires libcurl to be linked against a copy of +libssh2 1.2.8 or higher that is itself linked against OpenSSL.) diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/quote.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/quote.d new file mode 100644 index 00000000..a33ed357 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/quote.d @@ -0,0 +1,66 @@ +Long: quote +Short: Q +Help: Send command(s) to server before transfer +Protocols: FTP SFTP +Category: ftp sftp +--- + +Send an arbitrary command to the remote FTP or SFTP server. Quote commands are +sent BEFORE the transfer takes place (just after the initial PWD command in an +FTP transfer, to be exact). To make commands take place after a successful +transfer, prefix them with a dash '-'. To make commands be sent after curl +has changed the working directory, just before the transfer command(s), prefix +the command with a '+' (this is only supported for FTP). You may specify any +number of commands. + +If the server returns failure for one of the commands, the entire operation +will be aborted. You must send syntactically correct FTP commands as RFC 959 +defines to FTP servers, or one of the commands listed below to SFTP servers. + +Prefix the command with an asterisk (*) to make curl continue even if the +command fails as by default curl will stop at first failure. + +This option can be used multiple times. + +SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands +itself before sending them to the server. File names may be quoted +shell-style to embed spaces or special characters. Following is the list of +all supported SFTP quote commands: +.RS +.IP "atime date file" +The atime command sets the last access time of the file named by the file +operand. The can be all sorts of date strings, see the +\fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0) +.IP "chgrp group file" +The chgrp command sets the group ID of the file named by the file operand to +the group ID specified by the group operand. The group operand is a decimal +integer group ID. +.IP "chmod mode file" +The chmod command modifies the file mode bits of the specified file. The +mode operand is an octal integer mode number. +.IP "chown user file" +The chown command sets the owner of the file named by the file operand to the +user ID specified by the user operand. The user operand is a decimal +integer user ID. +.IP "ln source_file target_file" +The ln and symlink commands create a symbolic link at the target_file location +pointing to the source_file location. +.IP "mkdir directory_name" +The mkdir command creates the directory named by the directory_name operand. +.IP "mtime date file" +The mtime command sets the last modification time of the file named by the +file operand. The can be all sorts of date strings, see the +\fIcurl_getdate(3)\fP man page for date expression details. (Added in 7.73.0) +.IP "pwd" +The pwd command returns the absolute pathname of the current working directory. +.IP "rename source target" +The rename command renames the file or directory named by the source +operand to the destination path named by the target operand. +.IP "rm file" +The rm command removes the file specified by the file operand. +.IP "rmdir directory" +The rmdir command removes the directory entry specified by the directory +operand, provided it is empty. +.IP "symlink source_file target_file" +See ln. +.RE diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/random-file.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/random-file.d new file mode 100644 index 00000000..c57f5236 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/random-file.d @@ -0,0 +1,8 @@ +Long: random-file +Arg: +Help: File for reading random data from +Category: misc +--- +Specify the path name to file containing what will be considered as random +data. The data may be used to seed the random engine for SSL connections. See +also the --egd-file option. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/range.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/range.d new file mode 100644 index 00000000..17c6c2ab --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/range.d @@ -0,0 +1,47 @@ +Long: range +Short: r +Help: Retrieve only the bytes within RANGE +Arg: +Protocols: HTTP FTP SFTP FILE +Category: http ftp sftp file +--- +Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP +server or a local FILE. Ranges can be specified in a number of ways. +.RS +.TP 10 +.B 0-499 +specifies the first 500 bytes +.TP +.B 500-999 +specifies the second 500 bytes +.TP +.B -500 +specifies the last 500 bytes +.TP +.B 9500- +specifies the bytes from offset 9500 and forward +.TP +.B 0-0,-1 +specifies the first and last byte only(*)(HTTP) +.TP +.B 100-199,500-599 +specifies two separate 100-byte ranges(*) (HTTP) +.RE +.IP +(*) = NOTE that this will cause the server to reply with a multipart +response! + +Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the +\&'start-stop' range syntax. If a non-digit character is given in the range, +the server's response will be unspecified, depending on the server's +configuration. + +You should also be aware that many HTTP/1.1 servers do not have this feature +enabled, so that when you attempt to get a range, you'll instead get the whole +document. + +FTP and SFTP range downloads only support the simple 'start-stop' syntax +(optionally with one of the numbers omitted). FTP use depends on the extended +FTP command SIZE. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/raw.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/raw.d new file mode 100644 index 00000000..90e77726 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/raw.d @@ -0,0 +1,8 @@ +Long: raw +Help: Do HTTP "raw"; no transfer decoding +Added: 7.16.2 +Protocols: HTTP +Category: http +--- +When used, it disables all internal HTTP decoding of content or transfer +encodings and instead makes them passed on unaltered, raw. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/referer.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/referer.d new file mode 100644 index 00000000..8b2057b9 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/referer.d @@ -0,0 +1,15 @@ +Long: referer +Short: e +Arg: +Protocols: HTTP +Help: Referrer URL +See-also: user-agent header +Category: http +--- +Sends the "Referrer Page" information to the HTTP server. This can also be set +with the --header flag of course. When used with --location you can append +";auto" to the --referer URL to make curl automatically set the previous URL +when it follows a Location: header. The \&";auto" string can be used alone, +even if you don't set an initial --referer. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-header-name.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-header-name.d new file mode 100644 index 00000000..700da69f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-header-name.d @@ -0,0 +1,20 @@ +Long: remote-header-name +Short: J +Protocols: HTTP +Help: Use the header-provided filename +Category: output +--- +This option tells the --remote-name option to use the server-specified +Content-Disposition filename instead of extracting a filename from the URL. + +If the server specifies a file name and a file with that name already exists +in the current working directory it will not be overwritten and an error will +occur. If the server doesn't specify a file name then this option has no +effect. + +There's no attempt to decode %-sequences (yet) in the provided file name, so +this option may provide you with rather unexpected file names. + +\fBWARNING\fP: Exercise judicious use of this option, especially on Windows. A +rogue server could send you the name of a DLL or other file that could possibly +be loaded automatically by Windows or some third party software. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name-all.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name-all.d new file mode 100644 index 00000000..299684c5 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name-all.d @@ -0,0 +1,9 @@ +Long: remote-name-all +Help: Use the remote file name for all URLs +Added: 7.19.0 +Category: output +--- +This option changes the default action for all given URLs to be dealt with as +if --remote-name were used for each one. So if you want to disable that for a +specific URL after --remote-name-all has been used, you must use "-o -" or +--no-remote-name. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name.d new file mode 100644 index 00000000..184c32e4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-name.d @@ -0,0 +1,22 @@ +Long: remote-name +Short: O +Help: Write output to a file named as the remote file +Category: important output +--- +Write output to a local file named like the remote file we get. (Only the file +part of the remote file is used, the path is cut off.) + +The file will be saved in the current working directory. If you want the file +saved in a different directory, make sure you change the current working +directory before invoking curl with this option. + +The remote file name to use for saving is extracted from the given URL, +nothing else, and if it already exists it will be overwritten. If you want the +server to be able to choose the file name refer to --remote-header-name which +can be used in addition to this option. If the server chooses a file name and +that name already exists it will not be overwritten. + +There is no URL decoding done on the file name. If it has %20 or other URL +encoded parts of the name, they will end up as-is as file name. + +You may use this option as many times as the number of URLs you have. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-time.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-time.d new file mode 100644 index 00000000..96fb4fbe --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/remote-time.d @@ -0,0 +1,8 @@ +Long: remote-time +Short: R +Help: Set the remote file's time on the local output +Category: output +--- +When used, this will make curl attempt to figure out the timestamp of the +remote file, and if that is available make the local file get that same +timestamp. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request-target.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request-target.d new file mode 100644 index 00000000..df423f87 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request-target.d @@ -0,0 +1,10 @@ +Long: request-target +Help: Specify the target for this request +Protocols: HTTP +Added: 7.55.0 +Category: http +--- +Tells curl to use an alternative "target" (path) instead of using the path as +provided in the URL. Particularly useful when wanting to issue HTTP requests +without leading slash or other data that doesn't follow the regular URL +pattern, like "OPTIONS *". diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request.d new file mode 100644 index 00000000..47c4c8b0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/request.d @@ -0,0 +1,40 @@ +Long: request +Short: X +Arg: +Help: Specify request command to use +Category: connection +--- +(HTTP) Specifies a custom request method to use when communicating with the +HTTP server. The specified request method will be used instead of the method +otherwise used (which defaults to GET). Read the HTTP 1.1 specification for +details and explanations. Common additional HTTP requests include PUT and +DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and +more. + +Normally you don't need this option. All sorts of GET, HEAD, POST and PUT +requests are rather invoked by using dedicated command line options. + +This option only changes the actual word used in the HTTP request, it does not +alter the way curl behaves. So for example if you want to make a proper HEAD +request, using -X HEAD will not suffice. You need to use the --head option. + +The method string you set with --request will be used for all requests, which +if you for example use --location may cause unintended side-effects when curl +doesn't change request method according to the HTTP 30x response codes - and +similar. + +(FTP) +Specifies a custom FTP command to use instead of LIST when doing file lists +with FTP. + +(POP3) +Specifies a custom POP3 command to use instead of LIST or RETR. (Added in +7.26.0) + +(IMAP) +Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0) + +(SMTP) +Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0) + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/resolve.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/resolve.d new file mode 100644 index 00000000..41f6a1bd --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/resolve.d @@ -0,0 +1,28 @@ +Long: resolve +Arg: +Help: Resolve the host+port to this address +Added: 7.21.3 +Category: connection +--- +Provide a custom address for a specific host and port pair. Using this, you +can make the curl requests(s) use a specified address and prevent the +otherwise normally resolved address to be used. Consider it a sort of +/etc/hosts alternative provided on the command line. The port number should be +the number used for the specific protocol the host will be used for. It means +you need several entries if you want to provide address for the same host but +different ports. + +By specifying '*' as host you can tell curl to resolve any host and specific +port pair to the specified address. Wildcard is resolved last so any --resolve +with a specific host and port will be used first. + +The provided address set by this option will be used even if --ipv4 or --ipv6 +is set to make curl use another IP version. + +Support for providing the IP address within [brackets] was added in 7.57.0. + +Support for providing multiple IP addresses per entry was added in 7.59.0. + +Support for resolving with wildcard was added in 7.64.0. + +This option can be used many times to add many host names to resolve. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-all-errors.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-all-errors.d new file mode 100644 index 00000000..6bda52b6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-all-errors.d @@ -0,0 +1,20 @@ +Long: retry-all-errors +Help: Retry all errors (use with --retry) +Added: 7.71.0 +Category: curl +--- +Retry on any error. This option is used together with --retry. + +This option is the "sledgehammer" of retrying. Do not use this option by +default (eg in curlrc), there may be unintended consequences such as sending or +receiving duplicate data. Do not use with redirected input or output. You'd be +much better off handling your unique problems in shell script. Please read the +example below. + +Warning: For server compatibility curl attempts to retry failed flaky transfers +as close as possible to how they were started, but this is not possible with +redirected input or output. For example, before retrying it removes output data +from a failed partial transfer that was written to an output file. However this +is not true of data redirected to a | pipe or > file, which are not reset. We +strongly suggest don't parse or record output via redirect in combination with +this option, since you may receive duplicate data. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-connrefused.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-connrefused.d new file mode 100644 index 00000000..be34f973 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-connrefused.d @@ -0,0 +1,7 @@ +Long: retry-connrefused +Help: Retry on connection refused (use with --retry) +Added: 7.52.0 +Category: curl +--- +In addition to the other conditions, consider ECONNREFUSED as a transient +error too for --retry. This option is used together with --retry. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-delay.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-delay.d new file mode 100644 index 00000000..5645c0e6 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-delay.d @@ -0,0 +1,12 @@ +Long: retry-delay +Arg: +Help: Wait time between retries +Added: 7.12.3 +Category: curl +--- +Make curl sleep this amount of time before each retry when a transfer has +failed with a transient error (it changes the default backoff time algorithm +between retries). This option is only interesting if --retry is also +used. Setting this delay to zero will make curl use the default backoff time. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-max-time.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-max-time.d new file mode 100644 index 00000000..9d6faf30 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry-max-time.d @@ -0,0 +1,14 @@ +Long: retry-max-time +Arg: +Help: Retry only within this period +Added: 7.12.3 +Category: curl +--- +The retry timer is reset before the first transfer attempt. Retries will be +done as usual (see --retry) as long as the timer hasn't reached this given +limit. Notice that if the timer hasn't reached the limit, the request will be +made and while performing, it may take longer than this given time period. To +limit a single request\'s maximum time, use --max-time. Set this option to +zero to not timeout retries. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry.d new file mode 100644 index 00000000..70f6e7bf --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/retry.d @@ -0,0 +1,21 @@ +Long: retry +Arg: +Added: 7.12.3 +Help: Retry request if transient problems occur +Category: curl +--- +If a transient error is returned when curl tries to perform a transfer, it +will retry this number of times before giving up. Setting the number to 0 +makes curl do no retries (which is the default). Transient error means either: +a timeout, an FTP 4xx response code or an HTTP 408 or 5xx response code. + +When curl is about to retry a transfer, it will first wait one second and then +for all forthcoming retries it will double the waiting time until it reaches +10 minutes which then will be the delay between the rest of the retries. By +using --retry-delay you disable this exponential backoff algorithm. See also +--retry-max-time to limit the total time allowed for retries. + +Since curl 7.66.0, curl will comply with the Retry-After: response header if +one was present to know when to issue the next retry. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-authzid.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-authzid.d new file mode 100644 index 00000000..e802c80a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-authzid.d @@ -0,0 +1,13 @@ +Long: sasl-authzid +Arg: +Help: Identity for SASL PLAIN authentication +Added: 7.66.0 +Category: auth +--- +Use this authorisation identity (authzid), during SASL PLAIN authentication, +in addition to the authentication identity (authcid) as specified by --user. + +If the option isn't specified, the server will derive the authzid from the +authcid, but if specified, and depending on the server implementation, it may +be used to access another user's inbox, that the user has been granted access +to, or a shared mailbox for example. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-ir.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-ir.d new file mode 100644 index 00000000..0041c3b4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sasl-ir.d @@ -0,0 +1,6 @@ +Long: sasl-ir +Help: Enable initial response in SASL authentication +Added: 7.31.0 +Category: auth +--- +Enable initial response in SASL authentication. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/service-name.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/service-name.d new file mode 100644 index 00000000..c64496b8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/service-name.d @@ -0,0 +1,9 @@ +Long: service-name +Help: SPNEGO service name +Arg: +Added: 7.43.0 +Category: misc +--- +This option allows you to change the service name for SPNEGO. + +Examples: --negotiate --service-name sockd would use sockd/server-name. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/show-error.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/show-error.d new file mode 100644 index 00000000..2124409e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/show-error.d @@ -0,0 +1,7 @@ +Long: show-error +Short: S +Help: Show error even when -s is used +See-also: no-progress-meter +Category: curl +--- +When used with --silent, it makes curl show an error message if it fails. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/silent.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/silent.d new file mode 100644 index 00000000..58a52233 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/silent.d @@ -0,0 +1,12 @@ +Long: silent +Short: s +Help: Silent mode +See-also: verbose stderr no-progress-meter +Category: important verbose +--- +Silent or quiet mode. Don't show progress meter or error messages. Makes Curl +mute. It will still output the data you ask for, potentially even to the +terminal/stdout unless you redirect it. + +Use --show-error in addition to this option to disable progress meter but +still show error messages. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4.d new file mode 100644 index 00000000..bc095d54 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4.d @@ -0,0 +1,20 @@ +Long: socks4 +Arg: +Help: SOCKS4 proxy on given host + port +Added: 7.15.2 +Category: proxy +--- +Use the specified SOCKS4 proxy. If the port number is not specified, it is +assumed at port 1080. + +This option overrides any previous use of --proxy, as they are mutually +exclusive. + +Since 7.21.7, this option is superfluous since you can specify a socks4 proxy +with --proxy using a socks4:// protocol prefix. + +Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time +--proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to +the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4a.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4a.d new file mode 100644 index 00000000..d3177a9d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks4a.d @@ -0,0 +1,20 @@ +Long: socks4a +Arg: +Help: SOCKS4a proxy on given host + port +Added: 7.18.0 +Category: proxy +--- +Use the specified SOCKS4a proxy. If the port number is not specified, it is +assumed at port 1080. + +This option overrides any previous use of --proxy, as they are mutually +exclusive. + +Since 7.21.7, this option is superfluous since you can specify a socks4a proxy +with --proxy using a socks4a:// protocol prefix. + +Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time +--proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to +the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-basic.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-basic.d new file mode 100644 index 00000000..52d1e661 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-basic.d @@ -0,0 +1,8 @@ +Long: socks5-basic +Help: Enable username/password auth for SOCKS5 proxies +Added: 7.55.0 +Category: proxy auth +--- +Tells curl to use username/password authentication when connecting to a SOCKS5 +proxy. The username/password authentication is enabled by default. Use +--socks5-gssapi to force GSS-API authentication to SOCKS5 proxies. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-nec.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-nec.d new file mode 100644 index 00000000..b538f33f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-nec.d @@ -0,0 +1,9 @@ +Long: socks5-gssapi-nec +Help: Compatibility with NEC SOCKS5 server +Added: 7.19.4 +Category: proxy auth +--- +As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961 +says in section 4.3/4.4 it should be protected, but the NEC reference +implementation does not. The option --socks5-gssapi-nec allows the +unprotected exchange of the protection mode negotiation. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-service.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-service.d new file mode 100644 index 00000000..e61d0f5a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi-service.d @@ -0,0 +1,13 @@ +Long: socks5-gssapi-service +Arg: +Help: SOCKS5 proxy service name for GSS-API +Added: 7.19.4 +Category: proxy auth +--- +The default service name for a socks server is rcmd/server-fqdn. This option +allows you to change it. + +Examples: --socks5 proxy-name --socks5-gssapi-service sockd would use +sockd/proxy-name --socks5 proxy-name --socks5-gssapi-service sockd/real-name +would use sockd/real-name for cases where the proxy-name does not match the +principal name. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi.d new file mode 100644 index 00000000..72ae7aeb --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-gssapi.d @@ -0,0 +1,9 @@ +Long: socks5-gssapi +Help: Enable GSS-API auth for SOCKS5 proxies +Added: 7.55.0 +Category: proxy auth +--- +Tells curl to use GSS-API authentication when connecting to a SOCKS5 proxy. +The GSS-API authentication is enabled by default (if curl is compiled with +GSS-API support). Use --socks5-basic to force username/password authentication +to SOCKS5 proxies. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-hostname.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-hostname.d new file mode 100644 index 00000000..247d7660 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5-hostname.d @@ -0,0 +1,20 @@ +Long: socks5-hostname +Arg: +Help: SOCKS5 proxy, pass host name to proxy +Added: 7.18.0 +Category: proxy +--- +Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If +the port number is not specified, it is assumed at port 1080. + +This option overrides any previous use of --proxy, as they are mutually +exclusive. + +Since 7.21.7, this option is superfluous since you can specify a socks5 +hostname proxy with --proxy using a socks5h:// protocol prefix. + +Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time +--proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to +the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5.d new file mode 100644 index 00000000..bbe92f0a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/socks5.d @@ -0,0 +1,22 @@ +Long: socks5 +Arg: +Help: SOCKS5 proxy on given host + port +Added: 7.18.0 +Category: proxy +--- +Use the specified SOCKS5 proxy - but resolve the host name locally. If the +port number is not specified, it is assumed at port 1080. + +This option overrides any previous use of --proxy, as they are mutually +exclusive. + +Since 7.21.7, this option is superfluous since you can specify a socks5 proxy +with --proxy using a socks5:// protocol prefix. + +Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at the same time +--proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects to +the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy. + +If this option is used several times, the last one will be used. + +This option (as well as --socks4) does not work with IPV6, FTPS or LDAP. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-limit.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-limit.d new file mode 100644 index 00000000..3f9ad3a4 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-limit.d @@ -0,0 +1,11 @@ +Long: speed-limit +Short: Y +Arg: +Help: Stop transfers slower than this +Category: connection +--- +If a download is slower than this given speed (in bytes per second) for +speed-time seconds it gets aborted. speed-time is set with --speed-time and is +30 if not set. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-time.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-time.d new file mode 100644 index 00000000..81acabec --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/speed-time.d @@ -0,0 +1,14 @@ +Long: speed-time +Short: y +Arg: +Help: Trigger 'speed-limit' abort after this time +Category: connection +--- +If a download is slower than speed-limit bytes per second during a speed-time +period, the download gets aborted. If speed-time is used, the default +speed-limit will be 1 unless set with --speed-limit. + +This option controls transfers and thus will not affect slow connects etc. If +this is a concern for you, try the --connect-timeout option. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-allow-beast.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-allow-beast.d new file mode 100644 index 00000000..f18fe747 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-allow-beast.d @@ -0,0 +1,10 @@ +Long: ssl-allow-beast +Help: Allow security flaw to improve interop +Added: 7.25.0 +Category: tls +--- +This option tells curl to not work around a security flaw in the SSL3 and +TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer may +use workarounds known to cause interoperability problems with some older SSL +implementations. WARNING: this option loosens the SSL security, and by using +this flag you ask for exactly that. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-no-revoke.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-no-revoke.d new file mode 100644 index 00000000..3b161424 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-no-revoke.d @@ -0,0 +1,8 @@ +Long: ssl-no-revoke +Help: Disable cert revocation checks (Schannel) +Added: 7.44.0 +Category: tls +--- +(Schannel) This option tells curl to disable certificate revocation checks. +WARNING: this option loosens the SSL security, and by using this flag you ask +for exactly that. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-reqd.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-reqd.d new file mode 100644 index 00000000..2e573e39 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-reqd.d @@ -0,0 +1,10 @@ +Long: ssl-reqd +Help: Require SSL/TLS +Protocols: FTP IMAP POP3 SMTP +Added: 7.20.0 +Category: tls +--- +Require SSL/TLS for the connection. Terminates the connection if the server +doesn't support SSL/TLS. + +This option was formerly known as --ftp-ssl-reqd. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-revoke-best-effort.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-revoke-best-effort.d new file mode 100644 index 00000000..af22da46 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl-revoke-best-effort.d @@ -0,0 +1,8 @@ +Long: ssl-revoke-best-effort +Help: Ignore missing/offline cert CRL dist points +Added: 7.70.0 +Category: tls +--- +(Schannel) This option tells curl to ignore certificate revocation checks when +they failed due to missing/offline distribution points for the revocation check +lists. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl.d new file mode 100644 index 00000000..8df46010 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/ssl.d @@ -0,0 +1,13 @@ +Long: ssl +Help: Try SSL/TLS +Protocols: FTP IMAP POP3 SMTP +Added: 7.20.0 +Category: tls +--- + +Try to use SSL/TLS for the connection. Reverts to a non-secure connection if +the server doesn't support SSL/TLS. See also --ftp-ssl-control and --ssl-reqd +for different levels of encryption required. + +This option was formerly known as --ftp-ssl (Added in 7.11.0). That option +name can still be used but will be removed in a future version. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv2.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv2.d new file mode 100644 index 00000000..773ab691 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv2.d @@ -0,0 +1,14 @@ +Short: 2 +Long: sslv2 +Tags: Versions +Protocols: SSL +Added: +Mutexed: sslv3 tlsv1 tlsv1.1 tlsv1.2 +Requires: TLS +See-also: http1.1 http2 +Help: Use SSLv2 +Category: tls +--- +Forces curl to use SSL version 2 when negotiating with a remote SSL +server. Sometimes curl is built without SSLv2 support. SSLv2 is widely +considered insecure (see RFC 6176). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv3.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv3.d new file mode 100644 index 00000000..7beed8f8 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/sslv3.d @@ -0,0 +1,14 @@ +Short: 3 +Long: sslv3 +Tags: Versions +Protocols: SSL +Added: +Mutexed: sslv2 tlsv1 tlsv1.1 tlsv1.2 +Requires: TLS +See-also: http1.1 http2 +Help: Use SSLv3 +Category: tls +--- +Forces curl to use SSL version 3 when negotiating with a remote SSL +server. Sometimes curl is built without SSLv3 support. SSLv3 is widely +considered insecure (see RFC 7568). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/stderr.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/stderr.d new file mode 100644 index 00000000..6da04015 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/stderr.d @@ -0,0 +1,9 @@ +Long: stderr +Help: Where to redirect stderr +See-also: verbose silent +Category: verbose +--- +Redirect all writes to stderr to the specified file instead. If the file name +is a plain '-', it is instead written to stdout. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/styled-output.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/styled-output.d new file mode 100644 index 00000000..8aa4a0f0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/styled-output.d @@ -0,0 +1,7 @@ +Long: styled-output +Help: Enable styled output for HTTP headers +Added: 7.61.0 +Category: verbose +--- +Enables the automatic use of bold font styles when writing HTTP headers to the +terminal. Use --no-styled-output to switch them off. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/suppress-connect-headers.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/suppress-connect-headers.d new file mode 100644 index 00000000..b4e2a17d --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/suppress-connect-headers.d @@ -0,0 +1,9 @@ +Long: suppress-connect-headers +Help: Suppress proxy CONNECT response headers +See-also: dump-header include proxytunnel +Category: proxy +--- +When --proxytunnel is used and a CONNECT request is made don't output proxy +CONNECT response headers. This option is meant to be used with --dump-header or +--include which are used to show protocol headers in the output. It has no +effect on debug options such as --verbose or --trace, or any statistics. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-fastopen.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-fastopen.d new file mode 100644 index 00000000..faef499f --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-fastopen.d @@ -0,0 +1,6 @@ +Long: tcp-fastopen +Added: 7.49.0 +Help: Use TCP Fast Open +Category: connection +--- +Enable use of TCP Fast Open (RFC7413). diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-nodelay.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-nodelay.d new file mode 100644 index 00000000..f1cf644a --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tcp-nodelay.d @@ -0,0 +1,10 @@ +Long: tcp-nodelay +Help: Use the TCP_NODELAY option +Added: 7.11.2 +Category: connection +--- +Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for +details about this option. + +Since 7.50.2, curl sets this option by default and you need to explicitly +switch it off if you don't want it on. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/telnet-option.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/telnet-option.d new file mode 100644 index 00000000..789de3ea --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/telnet-option.d @@ -0,0 +1,13 @@ +Long: telnet-option +Short: t +Arg: +Help: Set telnet option +Category: telnet +--- +Pass options to the telnet protocol. Supported options are: + +TTYPE= Sets the terminal type. + +XDISPLOC= Sets the X display location. + +NEW_ENV= Sets an environment variable. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-blksize.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-blksize.d new file mode 100644 index 00000000..6e67ed2e --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-blksize.d @@ -0,0 +1,12 @@ +Long: tftp-blksize +Arg: +Help: Set TFTP BLKSIZE option +Protocols: TFTP +Added: 7.20.0 +Category: tftp +--- +Set TFTP BLKSIZE option (must be >512). This is the block size that curl will +try to use when transferring data to or from a TFTP server. By default 512 +bytes will be used. + +If this option is used several times, the last one will be used. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-no-options.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-no-options.d new file mode 100644 index 00000000..02332730 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/tftp-no-options.d @@ -0,0 +1,11 @@ +Long: tftp-no-options +Help: Do not send any TFTP options +Protocols: TFTP +Added: 7.48.0 +Category: tftp +--- +Tells curl not to send TFTP options requests. + +This option improves interop with some legacy servers that do not acknowledge +or properly implement TFTP options. When this option is used --tftp-blksize is +ignored. diff --git a/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/time-cond.d b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/time-cond.d new file mode 100644 index 00000000..f733eeb0 --- /dev/null +++ b/aws-lambda-java-runtime-interface-client/src/main/jni/deps/curl-7.73.0/docs/cmdline-opts/time-cond.d @@ -0,0 +1,18 @@ +Long: time-cond +Short: z +Arg: