diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/libs/aws-sdk-cpp | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/libs/aws-sdk-cpp')
12 files changed, 0 insertions, 1867 deletions
diff --git a/contrib/libs/aws-sdk-cpp/LICENSE b/contrib/libs/aws-sdk-cpp/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/contrib/libs/aws-sdk-cpp/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/contrib/libs/aws-sdk-cpp/README.md b/contrib/libs/aws-sdk-cpp/README.md deleted file mode 100644 index b80b18c836..0000000000 --- a/contrib/libs/aws-sdk-cpp/README.md +++ /dev/null @@ -1,124 +0,0 @@ -# AWS SDK for C++ -The AWS SDK for C++ provides a modern C++ (version C++ 11 or later) interface for Amazon Web Services (AWS). It is meant to be performant and fully functioning with low- and high-level SDKs, while minimizing dependencies and providing platform portability (Windows, OSX, Linux, and mobile). - -AWS SDK for C++ is in now in General Availability and recommended for production use. We invite our customers to join -the development efforts by submitting pull requests and sending us feedback and ideas via GitHub Issues. - -## Version 1.8 is now Available! - -Version 1.8 introduces much asked for new features and changes to the SDK but, because this might also cause compatibility issues with previous versions we've decided to keep it as a seperate branch to make the transition less jarring. - -For more information see the [What’s New in AWS SDK for CPP Version 1.8](https://github.com/aws/aws-sdk-cpp/wiki/What%E2%80%99s-New-in-AWS-SDK-for-CPP-Version-1.8) entry of the wiki, and also please provide any feedback you may have of these changes on our pinned [issue](https://github.com/aws/aws-sdk-cpp/issues/1373). - - -__Jump To:__ -* [Getting Started](#Getting-Started) -* [Issues and Contributions](#issues-and-contributions) -* [Getting Help](#Getting-Help) -* [Using the SDK and Other Topics](#Using-the-SDK-and-Other-Topics) - -# Getting Started - -## Building the SDK: - -### Minimum Requirements: -* Visual Studio 2015 or later -* OR GNU Compiler Collection (GCC) 4.9 or later -* OR Clang 3.3 or later -* 4GB of RAM - * 4GB of RAM is required to build some of the larger clients. The SDK build may fail on EC2 instance types t2.micro, t2.small and other small instance types due to insufficient memory. - -### Building From Source: - -#### To create an **out-of-source build**: -1. Install CMake and the relevant build tools for your platform. Ensure these are available in your executable path. -2. Create your build directory. Replace <BUILD_DIR> with your build directory name: - -3. Build the project: - - * For Auto Make build systems: - ```sh - cd <BUILD_DIR> - cmake <path-to-root-of-this-source-code> -DCMAKE_BUILD_TYPE=Debug - make - sudo make install - ``` - - * For Visual Studio: - ```sh - cd <BUILD_DIR> - cmake <path-to-root-of-this-source-code> -G "Visual Studio 15 Win64" -DCMAKE_BUILD_TYPE=Debug - msbuild ALL_BUILD.vcxproj /p:Configuration=Debug - ``` - - * For macOS - Xcode: - ```sh - cmake <path-to-root-of-this-source-code> -G Xcode -DTARGET_ARCH="APPLE" -DCMAKE_BUILD_TYPE=Debug - xcodebuild -target ALL_BUILD - ``` -#### Other Dependencies: -To compile in Linux, you must have the header files for libcurl, libopenssl. The packages are typically available in your package manager. - -Debian example: - `sudo apt-get install libcurl-dev` - -### Building for Android -To build for Android, add `-DTARGET_ARCH=ANDROID` to your cmake command line. Currently we support Android APIs from 19 to 28 with Android NDK 19c and we are using build-in cmake toolchain file supplied by Android NDK, assuming you have the appropriate environment variables (ANDROID_NDK) set. - -##### Android on Windows -Building for Android on Windows requires some additional setup. In particular, you will need to run cmake from a Visual Studio developer command prompt (2015 or higher). Additionally, you will need 'git' and 'patch' in your path. If you have git installed on a Windows system, then patch is likely found in a sibling directory (.../Git/usr/bin/). Once you've verified these requirements, your cmake command line will change slightly to use nmake: - - ```sh - cmake -G "NMake Makefiles" `-DTARGET_ARCH=ANDROID` <other options> .. - ``` - -Nmake builds targets in a serial fashion. To make things quicker, we recommend installing JOM as an alternative to nmake and then changing the cmake invocation to: - - ```sh - cmake -G "NMake Makefiles JOM" `-DTARGET_ARCH=ANDROID` <other options> .. - ``` - -### Building for Docker - -To build for Docker, ensure your container meets the [minimum requirements](#minimum-requirements). By default, Docker Desktop is set to use 2 GB runtime memory. We have provided [Dockerfiles](https://github.com/aws/aws-sdk-cpp/tree/master/CI/docker-file) as templates for building the SDK in a container. - - -### Building and running an app on EC2 -Checkout this walkthrough on how to set up an enviroment and build the [AWS SDK for C++ on an EC2 instance](https://github.com/aws/aws-sdk-cpp/wiki/Building-the-SDK-from-source-on-EC2). - -# Issues and Contributions -We welcome all kinds of contributions, check [this guideline](./CONTRIBUTING.md) to learn how you can contribute or report issues. - -# Maintenance and support for SDK major versions - -For information about maintenance and support for SDK major versions and our underlying dependencies, see the following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide - -* [AWS SDKs and Tools Maintenance Policy](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html) -* [AWS SDKs and Tools Version Support Matrix](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html) - - -# Getting Help - -The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-sdk-cpp/issues/new/choose) and choose from one of our templates for guidance, bug reports, or feature requests. - -You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/) with the tag [#aws-sdk-cpp](https://stackoverflow.com/questions/tagged/aws-cli) or on the [AWS Discussion Forum for CPP](https://forums.aws.amazon.com/forum.jspa?forumID=245). If you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case. - -Please make sure to check out our resources too before opening an issue: -* Our [Developer Guide](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/welcome.html) and [API reference](http://sdk.amazonaws.com/cpp/api/LATEST/index.html) -* Our [Changelog](./CHANGELOG.md) for recent breaking changes. -* Our [Contribute](./CONTRIBUTING.md) guide. -* Our [samples repo](https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/cpp). - - -# Using the SDK and Other Topics -* [Using the SDK](./Docs/SDK_usage_guide.md) -* [CMake Parameters](./Docs/CMake_Parameters.md) -* [Credentials Providers](./Docs/Credentials_Providers.md) -* [Client Configuration Parameters](./Docs/ClientConfiguration_Parameters.md) -* [Service Client](./Docs/Service_Client.md) -* [Memory Management](./Docs/Memory_Management.md) -* [Advanced Topics](./Docs/Advanced_topics.md) -* [Add as CMake external project](./Docs/CMake_External_Project.md) -* [Coding Standards](./Docs/CODING_STANDARDS.md) -* [License](./LICENSE) -* [Code of Conduct](./CODE_OF_CONDUCT.md) diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/.yandex_meta/licenses.list.txt b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/.yandex_meta/licenses.list.txt deleted file mode 100644 index 7bb262fe60..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/.yandex_meta/licenses.list.txt +++ /dev/null @@ -1,254 +0,0 @@ -====================Apache-2.0==================== - 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. - -====================Apache-2.0==================== - * SPDX-License-Identifier: Apache-2.0. - - -====================COPYRIGHT==================== - Copyright (c) 2009-2017 Dave Gamble and cJSON contributors - - -====================COPYRIGHT==================== - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - - -====================MIT==================== - 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. - - -====================Zlib==================== -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/ratelimiter/DefaultRateLimiter.h b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/ratelimiter/DefaultRateLimiter.h deleted file mode 100644 index 974dbefb02..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/include/aws/core/utils/ratelimiter/DefaultRateLimiter.h +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#pragma once - -#include <aws/core/Core_EXPORTS.h> - -#include <aws/core/utils/ratelimiter/RateLimiterInterface.h> - -#include <algorithm> -#include <mutex> -#include <thread> -#include <functional> - -namespace Aws -{ - namespace Utils - { - namespace RateLimits - { - /** - * High precision rate limiter. If you need to limit your bandwidth by a budget, this is very likely the implementation you want. - */ - template<typename CLOCK = std::chrono::high_resolution_clock, typename DUR = std::chrono::seconds, bool RENORMALIZE_RATE_CHANGES = true> - class DefaultRateLimiter : public RateLimiterInterface - { - public: - using Base = RateLimiterInterface; - - using InternalTimePointType = std::chrono::time_point<CLOCK>; - using ElapsedTimeFunctionType = std::function< InternalTimePointType() >; - - /** - * Initializes state, starts counts, does some basic validation. - */ - DefaultRateLimiter(int64_t maxRate, ElapsedTimeFunctionType elapsedTimeFunction = CLOCK::now) : - m_elapsedTimeFunction(elapsedTimeFunction), - m_maxRate(0), - m_accumulatorLock(), - m_accumulator(0), - m_accumulatorFraction(0), - m_accumulatorUpdated(), - m_replenishNumerator(0), - m_replenishDenominator(0), - m_delayNumerator(0), - m_delayDenominator(0) - { - // verify we're not going to divide by zero due to goofy type parameterization - static_assert(DUR::period::num > 0, "Rate duration must have positive numerator"); - static_assert(DUR::period::den > 0, "Rate duration must have positive denominator"); - static_assert(CLOCK::duration::period::num > 0, "RateLimiter clock duration must have positive numerator"); - static_assert(CLOCK::duration::period::den > 0, "RateLimiter clock duration must have positive denominator"); - - DefaultRateLimiter::SetRate(maxRate, true); - } - - virtual ~DefaultRateLimiter() = default; - - /** - * Calculates time in milliseconds that should be delayed before letting anymore data through. - */ - virtual DelayType ApplyCost(int64_t cost) override - { - std::lock_guard<std::recursive_mutex> lock(m_accumulatorLock); - - auto now = m_elapsedTimeFunction(); - auto elapsedTime = (now - m_accumulatorUpdated).count(); - - // replenish the accumulator based on how much time has passed - auto temp = elapsedTime * m_replenishNumerator + m_accumulatorFraction; - m_accumulator += temp / m_replenishDenominator; - m_accumulatorFraction = temp % m_replenishDenominator; - - // the accumulator is capped based on the maximum rate - m_accumulator = (std::min)(m_accumulator, m_maxRate); - if (m_accumulator == m_maxRate) - { - m_accumulatorFraction = 0; - } - - // if the accumulator is still negative, then we'll have to wait - DelayType delay(0); - if (m_accumulator < 0) - { - delay = DelayType(-m_accumulator * m_delayDenominator / m_delayNumerator); - } - - // apply the cost to the accumulator after the delay has been calculated; the next call will end up paying for our cost - m_accumulator -= cost; - m_accumulatorUpdated = now; - - return delay; - } - - /** - * Same as ApplyCost() but then goes ahead and sleeps the current thread. - */ - virtual void ApplyAndPayForCost(int64_t cost) override - { - auto costInMilliseconds = ApplyCost(cost); - if(costInMilliseconds.count() > 0) - { - std::this_thread::sleep_for(costInMilliseconds); - } - } - - /** - * Update the bandwidth rate to allow. - */ - virtual void SetRate(int64_t rate, bool resetAccumulator = false) override - { - std::lock_guard<std::recursive_mutex> lock(m_accumulatorLock); - - // rate must always be positive - rate = (std::max)(static_cast<int64_t>(1), rate); - - if (resetAccumulator) - { - m_accumulator = rate; - m_accumulatorFraction = 0; - m_accumulatorUpdated = m_elapsedTimeFunction(); - } - else - { - // sync the accumulator to current time - ApplyCost(0); // this call is why we need a recursive mutex - - if (ShouldRenormalizeAccumulatorOnRateChange()) - { - // now renormalize the accumulator and its fractional part against the new rate - // the idea here is we want to preserve the desired wait based on the previous rate - // - // As an example: - // Say we had a rate of 100/s and our accumulator was -500 (ie the next ApplyCost would incur a 5 second delay) - // If we change the rate to 1000/s and want to preserve that delay, we need to scale the accumulator to -5000 - m_accumulator = m_accumulator * rate / m_maxRate; - m_accumulatorFraction = m_accumulatorFraction * rate / m_maxRate; - } - } - - m_maxRate = rate; - - // Helper constants that represent the amount replenished per CLOCK time period; use the gcd to reduce them in order to try and minimize the chance of integer overflow - m_replenishNumerator = m_maxRate * DUR::period::den * CLOCK::duration::period::num; - m_replenishDenominator = DUR::period::num * CLOCK::duration::period::den; - auto gcd = ComputeGCD(m_replenishNumerator, m_replenishDenominator); - m_replenishNumerator /= gcd; - m_replenishDenominator /= gcd; - - // Helper constants that represent the delay per unit of costAccumulator; use the gcd to reduce them in order to try and minimize the chance of integer overflow - m_delayNumerator = m_maxRate * DelayType::period::num * DUR::period::den; - m_delayDenominator = DelayType::period::den * DUR::period::num; - gcd = ComputeGCD(m_delayNumerator, m_delayDenominator); - m_delayNumerator /= gcd; - m_delayDenominator /= gcd; - } - - private: - - int64_t ComputeGCD(int64_t num1, int64_t num2) const - { - // Euclid's - while (num2 != 0) - { - int64_t rem = num1 % num2; - num1 = num2; - num2 = rem; - } - - return num1; - } - - bool ShouldRenormalizeAccumulatorOnRateChange() const { return RENORMALIZE_RATE_CHANGES; } - - /// Function that returns the current time - ElapsedTimeFunctionType m_elapsedTimeFunction; - - /// The rate we want to limit to - int64_t m_maxRate; - - /// We need to pretty much lock everything while either setting the rate or applying a cost - std::recursive_mutex m_accumulatorLock; - - /// Tracks how much "rate" we currently have to give; if this drops below zero then we start having to wait in order to perform operations and maintain the rate - /// Replenishes over time based on m_maxRate - int64_t m_accumulator; - - /// Updates can occur at any time, leading to a fractional accumulation; represents the fraction (m_accumulatorFraction / m_replenishDenominator) - int64_t m_accumulatorFraction; - - /// Last time point the accumulator was updated - InternalTimePointType m_accumulatorUpdated; - - /// Some helper constants that represents fixed (per m_maxRate) ratios used in the delay and replenishment calculations - int64_t m_replenishNumerator; - int64_t m_replenishDenominator; - int64_t m_delayNumerator; - int64_t m_delayDenominator; - }; - - } // namespace RateLimits - } // namespace Utils -} // namespace Aws diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp deleted file mode 100644 index b1ec65b5df..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/Net.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <WinSock2.h> -#include <cassert> -#include <aws/core/utils/logging/LogMacros.h> - -namespace Aws -{ - namespace Net - { - static bool s_globalNetworkInitiated = false; - - bool IsNetworkInitiated() - { - return s_globalNetworkInitiated; - } - - void InitNetwork() - { - if (IsNetworkInitiated()) - { - return; - } - // Initialize Winsock( requires winsock version 2.2) - WSADATA wsaData; - int result = WSAStartup(MAKEWORD(2, 2), &wsaData); - assert(result == NO_ERROR); - if (result != NO_ERROR) - { - AWS_LOGSTREAM_ERROR("WinSock2", "Failed to Initate WinSock2.2"); - s_globalNetworkInitiated = false; - } - else - { - s_globalNetworkInitiated = true; - } - } - - void CleanupNetwork() - { - WSACleanup(); - s_globalNetworkInitiated = false; - } - } -} diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp deleted file mode 100644 index f6e36077ec..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/net/windows/SimpleUDP.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <WinSock2.h> -#include <Ws2ipdef.h> -#include <Ws2tcpip.h> -#include <cassert> -#include <aws/core/net/SimpleUDP.h> -#include <aws/core/utils/logging/LogMacros.h> -namespace Aws -{ - namespace Net - { - static const char ALLOC_TAG[] = "SimpleUDP"; - static const char IPV4_LOOP_BACK_ADDRESS[] = "127.0.0.1"; - static const char IPV6_LOOP_BACK_ADDRESS[] = "::1"; - - static inline bool IsValidIPAddress(const char* ip, int addressFamily/*AF_INET or AF_INET6*/) - { - char buffer[128]; - return inet_pton(addressFamily, ip, (void*)buffer) == 1 ?true :false; - } - - static bool GetASockAddrFromHostName(const char* hostName, void* sockAddrBuffer, size_t& addrLength, int& addressFamily) - { - struct addrinfo hints, *res; - - memset(&hints, 0, sizeof(hints)); - - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_DGRAM; - if (getaddrinfo(hostName, nullptr, &hints, &res)) - { - return false; - } - - memcpy(sockAddrBuffer, res->ai_addr, res->ai_addrlen); - addrLength = res->ai_addrlen; - addressFamily = res->ai_family; - freeaddrinfo(res); - return true; - } - - static sockaddr_in BuildAddrInfoIPV4(const char* hostIP, short port) - { - sockaddr_in addrinfo {}; - addrinfo.sin_family = AF_INET; - addrinfo.sin_port = htons(port); - inet_pton(AF_INET, hostIP, &addrinfo.sin_addr); - return addrinfo; - } - - static sockaddr_in6 BuildAddrInfoIPV6(const char* hostIP, short port) - { - sockaddr_in6 addrinfo {}; - addrinfo.sin6_family = AF_INET6; - addrinfo.sin6_port = htons(port); - inet_pton(AF_INET6, hostIP, &addrinfo.sin6_addr); - return addrinfo; - } - - SimpleUDP::SimpleUDP(int addressFamily, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking): - m_addressFamily(addressFamily), m_connected(false), m_socket(-1), m_port(0) - { - CreateSocket(addressFamily, sendBufSize, receiveBufSize, nonBlocking); - } - - SimpleUDP::SimpleUDP(bool IPV4, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking) : - m_addressFamily(IPV4 ? AF_INET : AF_INET6), m_connected(false), m_socket(-1), m_port(0) - { - CreateSocket(m_addressFamily, sendBufSize, receiveBufSize, nonBlocking); - } - - SimpleUDP::SimpleUDP(const char* host, unsigned short port, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking) : - m_addressFamily(AF_INET), m_connected(false), m_socket(-1), m_port(port) - { - if (IsValidIPAddress(host, AF_INET)) - { - m_addressFamily = AF_INET; - m_hostIP = Aws::String(host); - } - else if (IsValidIPAddress(host, AF_INET6)) - { - m_addressFamily = AF_INET6; - m_hostIP = Aws::String(host); - } - else - { - char sockAddrBuffer[100]; - char hostBuffer[100]; - size_t addrLength = 0; - if (GetASockAddrFromHostName(host, (void*)sockAddrBuffer, addrLength, m_addressFamily)) - { - if (m_addressFamily == AF_INET) - { - struct sockaddr_in* sockaddr = reinterpret_cast<struct sockaddr_in*>(sockAddrBuffer); - inet_ntop(m_addressFamily, &(sockaddr->sin_addr), hostBuffer, sizeof(hostBuffer)); - } - else - { - struct sockaddr_in6* sockaddr = reinterpret_cast<struct sockaddr_in6*>(sockAddrBuffer); - inet_ntop(m_addressFamily, &(sockaddr->sin6_addr), hostBuffer, sizeof(hostBuffer)); - } - m_hostIP = Aws::String(hostBuffer); - } - else - { - AWS_LOGSTREAM_ERROR(ALLOC_TAG, "Can't retrieve a valid ip address based on provided host: " << host); - } - } - CreateSocket(m_addressFamily, sendBufSize, receiveBufSize, nonBlocking); - } - - SimpleUDP::~SimpleUDP() - { - closesocket(GetUnderlyingSocket()); - } - - void SimpleUDP::CreateSocket(int addressFamily, size_t sendBufSize, size_t receiveBufSize, bool nonBlocking) - { - SOCKET sock = socket(addressFamily, SOCK_DGRAM, IPPROTO_UDP); - assert(sock != INVALID_SOCKET); - - // Try to set sock to nonblocking mode. - if (nonBlocking) - { - u_long enable = 1; - ioctlsocket(sock, FIONBIO, &enable); - } - - // if sendBufSize is not zero, try to set send buffer size - if (sendBufSize) - { - int ret = setsockopt(sock, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<const char*>(&sendBufSize), sizeof(sendBufSize)); - if (ret) - { - AWS_LOGSTREAM_WARN(ALLOC_TAG, "Failed to set UDP send buffer size to " << sendBufSize << " for socket " << sock << " error code: " << WSAGetLastError()); - } - assert(ret == 0); - } - - // if receiveBufSize is not zero, try to set receive buffer size - if (receiveBufSize) - { - int ret = setsockopt(sock, SOL_SOCKET, SO_RCVBUF, reinterpret_cast<const char*>(&receiveBufSize), sizeof(receiveBufSize)); - if (ret) - { - AWS_LOGSTREAM_WARN(ALLOC_TAG, "Failed to set UDP receive buffer size to " << receiveBufSize << " for socket " << sock << " error code: " << WSAGetLastError()); - } - assert(ret == 0); - } - - SetUnderlyingSocket(static_cast<int>(sock)); - } - - int SimpleUDP::Connect(const sockaddr* address, size_t addressLength) - { - int ret = connect(GetUnderlyingSocket(), address, static_cast<socklen_t>(addressLength)); - m_connected = ret ? false : true; - return ret; - } - - int SimpleUDP::ConnectToHost(const char* hostIP, unsigned short port) const - { - int ret; - if (m_addressFamily == AF_INET6) - { - sockaddr_in6 addrinfo = BuildAddrInfoIPV6(hostIP, port); - ret = connect(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in6)); - } - else - { - sockaddr_in addrinfo = BuildAddrInfoIPV4(hostIP, port); - ret = connect(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in)); - } - m_connected = ret ? false : true; - return ret; - } - - int SimpleUDP::ConnectToLocalHost(unsigned short port) const - { - if (m_addressFamily == AF_INET6) - { - return ConnectToHost(IPV6_LOOP_BACK_ADDRESS, port); - } - else - { - return ConnectToHost(IPV4_LOOP_BACK_ADDRESS, port); - } - } - - int SimpleUDP::Bind(const sockaddr* address, size_t addressLength) const - { - return bind(GetUnderlyingSocket(), address, static_cast<socklen_t>(addressLength)); - } - - int SimpleUDP::BindToLocalHost(unsigned short port) const - { - if (m_addressFamily == AF_INET6) - { - sockaddr_in6 addrinfo = BuildAddrInfoIPV6(IPV6_LOOP_BACK_ADDRESS, port); - return bind(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in6)); - } - else - { - sockaddr_in addrinfo = BuildAddrInfoIPV4(IPV4_LOOP_BACK_ADDRESS, port); - return bind(GetUnderlyingSocket(), reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in)); - } - } - - int SimpleUDP::SendData(const uint8_t* data, size_t dataLen) const - { - if (!m_connected) - { - ConnectToHost(m_hostIP.c_str(), m_port); - } - return send(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0); - } - - int SimpleUDP::SendDataTo(const sockaddr* address, size_t addressLength, const uint8_t* data, size_t dataLen) const - { - if (m_connected) - { - return send(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0); - } - else - { - return sendto(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0, address, static_cast<socklen_t>(addressLength)); - } - } - - int SimpleUDP::SendDataToLocalHost(const uint8_t* data, size_t dataLen, unsigned short port) const - { - if (m_connected) - { - return send(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0); - } - else if (m_addressFamily == AF_INET6) - { - sockaddr_in6 addrinfo = BuildAddrInfoIPV6(IPV6_LOOP_BACK_ADDRESS, port); - return sendto(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0, reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in6)); - } - else - { - sockaddr_in addrinfo = BuildAddrInfoIPV4(IPV4_LOOP_BACK_ADDRESS, port); - return sendto(GetUnderlyingSocket(), reinterpret_cast<const char*>(data), static_cast<int>(dataLen), 0, reinterpret_cast<sockaddr*>(&addrinfo), sizeof(sockaddr_in)); - } - } - - int SimpleUDP::ReceiveData(uint8_t* buffer, size_t bufferLen) const - { - return recv(GetUnderlyingSocket(), reinterpret_cast<char*>(buffer), static_cast<int>(bufferLen), 0); - } - - - int SimpleUDP::ReceiveDataFrom(sockaddr* address, size_t* addressLength, uint8_t* buffer, size_t bufferLen) const - { - return recvfrom(GetUnderlyingSocket(), reinterpret_cast<char*>(buffer), static_cast<int>(bufferLen), 0, address, reinterpret_cast<socklen_t*>(addressLength)); - } - } -} diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp deleted file mode 100644 index d8b5403123..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Environment.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <aws/core/platform/Environment.h> - -#include <stdio.h> -#include <utility> - -namespace Aws -{ -namespace Environment -{ - -/* -using std::getenv generates a warning on windows so we use _dupenv_s instead. The character array returned by this function is our responsibility to clean up, so rather than returning raw strings -that would need to be manually freed in all the client functions, just copy it into a Aws::String instead, freeing it here. -*/ -Aws::String GetEnv(const char *variableName) -{ - char* variableValue = nullptr; - std::size_t valueSize = 0; - auto queryResult = _dupenv_s(&variableValue, &valueSize, variableName); - - Aws::String result; - if(queryResult == 0 && variableValue != nullptr && valueSize > 0) - { - result.assign(variableValue, valueSize - 1); // don't copy the c-string terminator byte - free(variableValue); - } - - return result; -} - -} // namespace Environment -} // namespace Aws diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp deleted file mode 100644 index 2ea82de6f8..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp +++ /dev/null @@ -1,336 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ -#include <aws/core/platform/FileSystem.h> - -#include <aws/core/platform/Environment.h> -#include <aws/core/utils/logging/LogMacros.h> -#include <aws/core/utils/StringUtils.h> -#include <cassert> -#include <iostream> -#include <Userenv.h> - -#pragma warning( disable : 4996) - -using namespace Aws::Utils; -namespace Aws -{ -namespace FileSystem -{ - -static const char* FILE_SYSTEM_UTILS_LOG_TAG = "FileSystem"; - -/** - * See - * https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx - * to understand how could we pass long path (over 260 chars) to WinAPI - */ -static inline Aws::WString ToLongPath(const Aws::WString& path) -{ - if (path.size() > MAX_PATH - 12/*8.3 file name*/) - { - return L"\\\\?\\" + path; - } - return path; -} - -class User32Directory : public Directory -{ -public: - User32Directory(const Aws::String& path, const Aws::String& relativePath) : Directory(path, relativePath), m_find(INVALID_HANDLE_VALUE), m_lastError(0) - { - WIN32_FIND_DATAW ffd; - AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Entering directory " << m_directoryEntry.path); - - m_find = FindFirstFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(m_directoryEntry.path.c_str())).c_str(), &ffd); - if (m_find != INVALID_HANDLE_VALUE) - { - m_directoryEntry = ParseFileInfo(ffd, false); - FindClose(m_find); - auto seachPath = Join(m_directoryEntry.path, "*"); - m_find = FindFirstFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(seachPath.c_str())).c_str(), &m_ffd); - } - else - { - AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, "Could not load directory " << m_directoryEntry.path << " with error code " << GetLastError()); - } - } - - ~User32Directory() - { - if (m_find != INVALID_HANDLE_VALUE) - { - FindClose(m_find); - } - } - - operator bool() const override { return m_directoryEntry.operator bool() && m_find != INVALID_HANDLE_VALUE; } - - DirectoryEntry Next() override - { - assert(m_find != INVALID_HANDLE_VALUE); - DirectoryEntry entry; - bool invalidEntry = true; - - while(invalidEntry && !m_lastError) - { - //due to the way the FindFirstFile api works, - //the first entry will already be loaded by the time we get here. - entry = ParseFileInfo(m_ffd, true); - - Aws::String fileName = Aws::Utils::StringUtils::FromWString(m_ffd.cFileName); - if (fileName != ".." && fileName != ".") - { - AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Found entry " << entry.path); - invalidEntry = false; - } - else - { - entry.fileType = FileType::None; - AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Skipping . or .. entries."); - } - - if(!FindNextFileW(m_find, &m_ffd)) - { - m_lastError = GetLastError(); - AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, "Could not fetch next entry from " << m_directoryEntry.path << " with error code " << m_lastError); - break; - } - } - - return entry; - } - -private: - DirectoryEntry ParseFileInfo(WIN32_FIND_DATAW& ffd, bool computePath) - { - DirectoryEntry entry; - LARGE_INTEGER fileSize; - fileSize.HighPart = ffd.nFileSizeHigh; - fileSize.LowPart = ffd.nFileSizeLow; - entry.fileSize = static_cast<int64_t>(fileSize.QuadPart); - - if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - { - entry.fileType = FileType::Directory; - } - else - { - entry.fileType = FileType::File; - } - - if(computePath) - { - entry.path = Join(m_directoryEntry.path, Aws::Utils::StringUtils::FromWString(ffd.cFileName)); - entry.relativePath = m_directoryEntry.relativePath.empty() ? Aws::Utils::StringUtils::FromWString(ffd.cFileName) : Join(m_directoryEntry.relativePath, Aws::Utils::StringUtils::FromWString(ffd.cFileName)); - } - else - { - entry.path = m_directoryEntry.path; - entry.relativePath = m_directoryEntry.relativePath; - } - - return entry; - } - - HANDLE m_find; - WIN32_FIND_DATAW m_ffd; - DWORD m_lastError; -}; - -Aws::String GetHomeDirectory() -{ - static const char* HOME_DIR_ENV_VAR = "USERPROFILE"; - - AWS_LOGSTREAM_TRACE(FILE_SYSTEM_UTILS_LOG_TAG, "Checking " << HOME_DIR_ENV_VAR << " for the home directory."); - Aws::String homeDir = Aws::Environment::GetEnv(HOME_DIR_ENV_VAR); - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Environment value for variable " << HOME_DIR_ENV_VAR << " is " << homeDir); - if(homeDir.empty()) - { - AWS_LOGSTREAM_WARN(FILE_SYSTEM_UTILS_LOG_TAG, "Home dir not stored in environment, trying to fetch manually from the OS."); - HANDLE hToken; - - if (OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &hToken)) - { - DWORD len = MAX_PATH; - WCHAR path[MAX_PATH]; - if (GetUserProfileDirectoryW(hToken, path, &len)) - { - homeDir = Aws::Utils::StringUtils::FromWString(path); - } - CloseHandle(hToken); - } - - AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Pulled " << homeDir << " as home directory from the OS."); - } - - Aws::String retVal = (homeDir.size() > 0) ? Aws::Utils::StringUtils::Trim(homeDir.c_str()) : ""; - - if (!retVal.empty()) - { - if (retVal.at(retVal.length() - 1) != Aws::FileSystem::PATH_DELIM) - { - retVal += Aws::FileSystem::PATH_DELIM; - } - } - - return retVal; -} - -Aws::String GetExecutableDirectory() -{ - static const unsigned long long bufferSize = 256; - WCHAR buffer[bufferSize]; - - memset(buffer, 0, sizeof(buffer)); - - if (GetModuleFileNameW(nullptr, buffer, static_cast<DWORD>(sizeof(buffer)))) - { - Aws::String bufferStr(Aws::Utils::StringUtils::FromWString(buffer)); - auto fileNameStart = bufferStr.find_last_of(PATH_DELIM); - if (fileNameStart != std::string::npos) - { - bufferStr = bufferStr.substr(0, fileNameStart); - } - - return bufferStr; - } - - return ""; -} - -bool CreateDirectoryIfNotExists(const char* path, bool createParentDirs) -{ - Aws::String directoryName = path; - AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Creating directory " << directoryName); - - // Create intermediate directories or create the target directory once. - for (size_t i = createParentDirs ? 0 : directoryName.size() - 1; i < directoryName.size(); i++) - { - // Create the intermediate directory if we find a delimiter and the delimiter is not the first char, or if this is the target directory. - if (i != 0 && (directoryName[i] == FileSystem::PATH_DELIM || i == directoryName.size() - 1)) - { - // the last delimeter can be removed safely. - if (directoryName[i] == FileSystem::PATH_DELIM) - { - directoryName[i] = '\0'; - } - if (CreateDirectoryW(ToLongPath(StringUtils::ToWString(directoryName.c_str())).c_str(), nullptr)) - { - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Creation of directory " << directoryName.c_str() << " succeeded."); - } - else - { - DWORD errorCode = GetLastError(); - if (errorCode != ERROR_ALREADY_EXISTS && errorCode != NO_ERROR) // in vs2013 the errorCode is NO_ERROR - { - AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, " Creation of directory " << directoryName.c_str() << " returned code: " << errorCode); - return false; - } - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, " Creation of directory " << directoryName.c_str() << " returned code: " << errorCode); - } - // Restore the path. We are good even if we didn't change that char to '\0', because we are ready to return. - directoryName[i] = FileSystem::PATH_DELIM; - } - } - return true; -} - -bool RemoveFileIfExists(const char* path) -{ - AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Deleting file: " << path); - - if (DeleteFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(path)).c_str())) - { - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Successfully deleted file: " << path); - return true; - } - else - { - DWORD errorCode = GetLastError(); - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "Deletion of file: " << path << " Returned error code: " << errorCode); - return errorCode == ERROR_FILE_NOT_FOUND; - } -} - -bool RelocateFileOrDirectory(const char* from, const char* to) -{ - AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Moving file at " << from << " to " << to); - - if(MoveFileW(ToLongPath(Aws::Utils::StringUtils::ToWString(from)).c_str(), Aws::Utils::StringUtils::ToWString(to).c_str())) - { - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The moving operation of file at " << from << " to " << to << " Succeeded."); - return true; - } - else - { - int errorCode = GetLastError(); - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The moving operation of file at " << from << " to " << to << " Returned error code of " << errorCode); - return false; - } -} - -bool RemoveDirectoryIfExists(const char* path) -{ - AWS_LOGSTREAM_INFO(FILE_SYSTEM_UTILS_LOG_TAG, "Removing directory at " << path); - - if(RemoveDirectoryW(ToLongPath(Aws::Utils::StringUtils::ToWString(path)).c_str())) - { - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The remove operation of file at " << path << " Succeeded."); - return true; - } - else - { - int errorCode = GetLastError(); - if (errorCode == ERROR_DIR_NOT_EMPTY) - { - AWS_LOGSTREAM_ERROR(FILE_SYSTEM_UTILS_LOG_TAG, "The remove operation of file at " << path << " failed. with error code because it was not empty."); - } - - else if(errorCode == ERROR_DIRECTORY) - { - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The deletion of directory at " << path << " failed because it doesn't exist."); - return true; - - } - - AWS_LOGSTREAM_DEBUG(FILE_SYSTEM_UTILS_LOG_TAG, "The remove operation of file at " << path << " failed. with error code " << errorCode); - return false; - } -} - -Aws::String CreateTempFilePath() -{ -#ifdef _MSC_VER -#pragma warning(disable: 4996) // _CRT_SECURE_NO_WARNINGS -#endif - char s_tempName[L_tmpnam_s+1]; - - /* - Prior to VS 2014, tmpnam/tmpnam_s generated root level files ("\filename") which were not appropriate for our usage, so for the windows version, we prepended a '.' to make it a - tempfile in the current directory. Starting with VS2014, the behavior of tmpnam/tmpnam_s was changed to be a full, valid filepath based on the - current user ("C:\Users\username\AppData\Local\Temp\..."). - - See the tmpnam section in http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx - for more details. - */ - -#if _MSC_VER >= 1900 - tmpnam_s(s_tempName, L_tmpnam_s); -#else - s_tempName[0] = '.'; - tmpnam_s(s_tempName + 1, L_tmpnam_s); -#endif // _MSC_VER - - - return s_tempName; -} - -Aws::UniquePtr<Directory> OpenDirectory(const Aws::String& path, const Aws::String& relativePath) -{ - return Aws::MakeUnique<User32Directory>(FILE_SYSTEM_UTILS_LOG_TAG, path, relativePath); -} - -} // namespace FileSystem -} // namespace Aws diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp deleted file mode 100644 index 0180f7fbf6..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <aws/core/platform/OSVersionInfo.h> -#include <aws/core/utils/StringUtils.h> -#include <aws/core/utils/memory/stl/AWSStringStream.h> - -#include <iomanip> - -#pragma warning(disable: 4996) -#include <windows.h> -#include <stdio.h> -namespace Aws -{ -namespace OSVersionInfo -{ - -Aws::String GetSysCommandOutput(const char* command) -{ - Aws::String outputStr; - FILE* outputStream; - const int maxBufferSize = 256; - char outputBuffer[maxBufferSize]; - - outputStream = _popen(command, "r"); - - if (outputStream) - { - while (!feof(outputStream)) - { - if (fgets(outputBuffer, maxBufferSize, outputStream) != nullptr) - { - outputStr.append(outputBuffer); - } - } - - _pclose(outputStream); - - return Aws::Utils::StringUtils::Trim(outputStr.c_str()); - } - - return {}; -} - -Aws::String ComputeOSVersionString() -{ - // With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the operating system version. - // The value returned by the GetVersionEx function now depends on how the application is manifested. - // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 - // - // This only works when the application is manifested for Windows 8.1 or 10, which we don't actually care about. - // Also, this will cause build headaches for folks not building with VS2015, and is overall an unusable API for us. - // The following is the least painful but most reliable hack I can come up with. - // - // From this article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724429.aspx - // we will do the following: - // - // To obtain the full version number for the operating system, call the GetFileVersionInfo function on one of the system DLLs, such as Kernel32.dll, - // then call VerQueryValue to obtain the \\StringFileInfo\\<lang><codepage>\\ProductVersion subblock of the file version information. - // - Aws::StringStream ss; - ss << "Windows/"; - - DWORD uselessParameter(0); - static const char* FILE_TO_CHECK = "Kernel32.dll"; - DWORD fileVersionSize = GetFileVersionInfoSizeA(FILE_TO_CHECK, &uselessParameter); - void* blob = Aws::Malloc("OSVersionInfo", static_cast<size_t>(fileVersionSize)); - bool versionFound(false); - - if (GetFileVersionInfoA(FILE_TO_CHECK, 0, fileVersionSize, blob)) - { - struct LANGANDCODEPAGE { - WORD wLanguage; - WORD wCodePage; - } *lpTranslate; - - UINT sizeOfCodePage(0); - - if (VerQueryValueA(blob, "\\VarFileInfo\\Translation", (LPVOID*)&lpTranslate, &sizeOfCodePage)) - { - //we don't actually care which language pack we get, they should all have the same windows version attached. - Aws::StringStream codePageSS; - codePageSS << "\\StringFileInfo\\"; - codePageSS << std::setfill('0') << std::setw(4) << std::nouppercase << std::hex << lpTranslate[0].wLanguage; - codePageSS << std::setfill('0') << std::setw(4) << std::nouppercase << std::hex << lpTranslate[0].wCodePage; - codePageSS << "\\ProductVersion"; - - void* subBlock(nullptr); - UINT subBlockSize(0); - - if (VerQueryValueA(blob, codePageSS.str().c_str(), &subBlock, &subBlockSize)) - { - ss << static_cast<const char*>(subBlock); - versionFound = true; - } - } - } - - Aws::Free(blob); - - if (!versionFound) - { - ss << "Unknown Version"; - } - - - - SYSTEM_INFO sysInfo; - ZeroMemory(&sysInfo, sizeof(SYSTEM_INFO)); - GetSystemInfo(&sysInfo); - - switch (sysInfo.wProcessorArchitecture) - { - //PROCESSOR_ARCHITECTURE_AMD64 - case 0x09: - ss << " AMD64"; - break; - //PROCESSOR_ARCHITECTURE_IA64 - case 0x06: - ss << " IA64"; - break; - //PROCESSOR_ARCHITECTURE_INTEL - case 0x00: - ss << " x86"; - break; - default: - ss << " Unknown Processor Architecture"; - break; - } - - return ss.str(); -} - - -} // namespace OSVersionInfo -} // namespace Aws diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp deleted file mode 100644 index fbf9a4e679..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Security.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <aws/core/platform/Security.h> - -#include <windows.h> - -namespace Aws -{ -namespace Security -{ - -void SecureMemClear(unsigned char *data, size_t length) -{ - SecureZeroMemory(data, length); -} - -} // namespace Security -} // namespace Aws diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp deleted file mode 100644 index e186d21c81..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/platform/windows/Time.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ - -#include <aws/core/platform/Time.h> - -#include <time.h> - -namespace Aws -{ -namespace Time -{ - -time_t TimeGM(struct tm* const t) -{ - return _mkgmtime(t); -} - -void LocalTime(tm* t, std::time_t time) -{ - localtime_s(t, &time); -} - -void GMTime(tm* t, std::time_t time) -{ - gmtime_s(t, &time); -} - -} // namespace Time -} // namespace Aws diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/.yandex_meta/licenses.list.txt b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/.yandex_meta/licenses.list.txt deleted file mode 100644 index 884b6d0848..0000000000 --- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/.yandex_meta/licenses.list.txt +++ /dev/null @@ -1,209 +0,0 @@ -====================Apache-2.0==================== - 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. - -====================Apache-2.0==================== - * SPDX-License-Identifier: Apache-2.0. - - -====================COPYRIGHT==================== - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |