/* Copyright <2018-2024> 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 INCLUDE_COMMON_HPP_ #define INCLUDE_COMMON_HPP_ #if defined(__GNUC__) // clang-format off #define REPERTORY_IGNORE_WARNINGS_ENABLE() \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wconversion\"") \ _Pragma("GCC diagnostic ignored \"-Wdouble-promotion\"") \ _Pragma("GCC diagnostic ignored \"-Wduplicated-branches\"") \ _Pragma("GCC diagnostic ignored \"-Wfloat-conversion\"") \ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") \ _Pragma("GCC diagnostic ignored \"-Wnull-dereference\"") \ _Pragma("GCC diagnostic ignored \"-Wsign-conversion\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \ _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"") #define REPERTORY_IGNORE_WARNINGS_DISABLE() \ _Pragma("GCC diagnostic pop") #else #define REPERTORY_IGNORE_WARNINGS_ENABLE() #define REPERTORY_IGNORE_WARNINGS_DISABLE() #endif // defined(__GNUC__) // clang-format on #ifdef __cplusplus REPERTORY_IGNORE_WARNINGS_ENABLE() #ifdef _WIN32 #include #include #include #include #include #include #include #include #include #include #else #include #include #include #include #include #include #include #include #ifdef __linux__ #include #endif #include #ifdef HAS_SETXATTR #include #include #endif #ifdef __APPLE__ #include #include #include #endif #if __APPLE__ #include #include #endif #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include template [[nodiscard]] inline auto repertory_rand() -> data_type { data_type ret{}; randombytes_buf(&ret, sizeof(ret)); return ret; } #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef _WIN32 #include #include #else #if FUSE_USE_VERSION >= 30 #include #include #else #include #endif #endif #include #define CPPHTTPLIB_TCP_NODELAY true #define CPPHTTPLIB_OPENSSL_SUPPORT #include using json = nlohmann::json; using namespace std::chrono_literals; REPERTORY_IGNORE_WARNINGS_DISABLE() namespace repertory { auto get_repertory_git_revision() -> const std::string &; auto get_repertory_version() -> const std::string &; void repertory_init(); void repertory_shutdown(); } // namespace repertory #endif // __cplusplus #endif // INCLUDE_COMMON_HPP_