From 396d0d9bdcf96f8b0573feea7c9c9580a87d8c3d Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sun, 2 Jun 2019 20:46:20 -0700 Subject: [PATCH] Feature/ws windows (#86) * try to build ws on window on travis :postbox: * cmake invocation fixed on windows :honeybee: * Can use mbedtls to calculate hmac + no openssl config option * build only windows on travis :clock730: * run msbuild :pound: * proper command to build :clock12: * some build fixes * change weird sizeof call :octopus: * warning and missing includes fixes :white_flower: * ifdef out statsd code on windows :snake: * logic invertion in ifdef :lips: * bring back makefile :scroll: * command line tool is built with mbedtls :hospital: --- .travis.yml | 30 +- CMakeLists.txt | 2 +- docker-compose.yml | 10 + ixwebsocket/IXHttpClient.cpp | 4 +- makefile | 2 +- third_party/jsoncpp/json/json-forwards.h | 160 +- third_party/jsoncpp/json/json.h | 530 ++--- third_party/jsoncpp/jsoncpp.cpp | 1180 +++------- third_party/mbedtls/Makefile | 298 ++- third_party/mbedtls/crypto/library/Makefile | 2267 +++++++++++++++++-- third_party/mbedtls/library/Makefile | 881 +++++-- ws/CMakeLists.txt | 8 +- ws/IXSentryClient.cpp | 6 +- ws/ixcrypto/IXHMac.cpp | 13 +- ws/snake/IXSnakeProtocol.h | 1 + ws/ws.cpp | 2 +- ws/ws_cobra_to_statsd.cpp | 11 +- ws/ws_send.cpp | 2 +- ws/ws_snake.cpp | 2 +- 19 files changed, 3716 insertions(+), 1693 deletions(-) diff --git a/.travis.yml b/.travis.yml index abb854cf..37fc6a3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,23 +12,23 @@ matrix: - python test/run.py - make ws - # Linux - - os: linux - dist: xenial - script: - - python test/run.py - - make ws - env: - - CC=gcc - - CXX=g++ - - # Clang + Linux disabled for now + # # Linux # - os: linux # dist: xenial - # script: python test/run.py + # script: + # - python test/run.py + # - make ws # env: - # - CC=clang - # - CXX=clang++ + # - CC=gcc + # - CXX=g++ + + # Clang + Linux disabled for now + - os: linux + dist: xenial + script: python test/run.py + env: + - CC=clang + - CXX=clang++ # Windows - os: windows @@ -36,4 +36,6 @@ matrix: - CMAKE_PATH="/c/Program Files/CMake/bin" script: - export PATH=$CMAKE_PATH:$PATH + - cmake -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 . + - cmake --build --parallel . - python test/run.py diff --git a/CMakeLists.txt b/CMakeLists.txt index ff4bce96..66c3c517 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,7 +124,7 @@ add_library( ixwebsocket STATIC ${IXWEBSOCKET_HEADERS} ) -if (APPLE AND USE_TLS) +if (APPLE AND USE_TLS AND NOT USE_MBED_TLS) target_link_libraries(ixwebsocket "-framework foundation" "-framework security") endif() diff --git a/docker-compose.yml b/docker-compose.yml index 574928f0..39268775 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,5 +29,15 @@ services: networks: - ws-net + statsd: + image: jaconel/statsd + ports: + - "8125:8125" + environment: + - STATSD_DUMP_MSG=true + - GRAPHITE_HOST=127.0.0.1 + networks: + - ws-net + networks: ws-net: diff --git a/ixwebsocket/IXHttpClient.cpp b/ixwebsocket/IXHttpClient.cpp index 9e142c7c..18a1ec7b 100644 --- a/ixwebsocket/IXHttpClient.cpp +++ b/ixwebsocket/IXHttpClient.cpp @@ -272,10 +272,10 @@ namespace ix log(oss.str(), args); } - payload.reserve(payload.size() + chunkSize); + payload.reserve(payload.size() + (size_t) chunkSize); // Read a chunk - auto chunkResult = _socket->readBytes(chunkSize, + auto chunkResult = _socket->readBytes((size_t) chunkSize, args.onProgressCallback, isCancellationRequested); if (!chunkResult.first) diff --git a/makefile b/makefile index b9aa3df5..a03f4a2f 100644 --- a/makefile +++ b/makefile @@ -12,7 +12,7 @@ brew: mkdir -p build && (cd build ; cmake -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .. ; make -j install) ws: - mkdir -p build && (cd build ; cmake -DUSE_TLS=1 -DUSE_WS=1 .. ; make -j) + mkdir -p build && (cd build ; cmake -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .. ; make -j) uninstall: xargs rm -fv < build/install_manifest.txt diff --git a/third_party/jsoncpp/json/json-forwards.h b/third_party/jsoncpp/json/json-forwards.h index 7f0e8082..61d08880 100644 --- a/third_party/jsoncpp/json/json-forwards.h +++ b/third_party/jsoncpp/json/json-forwards.h @@ -7,32 +7,32 @@ // ////////////////////////////////////////////////////////////////////// /* -The JsonCpp library's source code, including accompanying documentation, +The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... -Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and -The JsonCpp Authors, and is released under the terms of the MIT License (see below). +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License - + The full text of the MIT License follows: ======================================================================== -Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -83,16 +83,13 @@ license you like. // Beginning of content of file: include/json/config.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_CONFIG_H_INCLUDED #define JSON_CONFIG_H_INCLUDED -#include -#include //typedef String -#include //typedef int64_t, uint64_t /// If defined, indicates that json library is embedded in CppTL library. //# define JSON_IN_CPPTL 1 @@ -125,12 +122,12 @@ license you like. #ifdef JSON_IN_CPPTL #define JSON_API CPPTL_API #elif defined(JSON_DLL_BUILD) -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define JSON_API __declspec(dllexport) #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING #endif // if defined(_MSC_VER) #elif defined(JSON_DLL) -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define JSON_API __declspec(dllimport) #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING #endif // if defined(_MSC_VER) @@ -139,101 +136,49 @@ license you like. #define JSON_API #endif +#if !defined(JSON_HAS_UNIQUE_PTR) +#if __cplusplus >= 201103L +#define JSON_HAS_UNIQUE_PTR (1) +#elif _MSC_VER >= 1600 +#define JSON_HAS_UNIQUE_PTR (1) +#else +#define JSON_HAS_UNIQUE_PTR (0) +#endif +#endif + // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for // integer // Storages, and 64 bits integer support is disabled. // #define JSON_NO_INT64 1 -#if defined(_MSC_VER) // MSVC -# if _MSC_VER <= 1200 // MSVC 6 - // Microsoft Visual Studio 6 only support conversion from __int64 to double - // (no conversion from unsigned __int64). -# define JSON_USE_INT64_DOUBLE_CONVERSION 1 - // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' - // characters in the debug information) - // All projects I've ever seen with VS6 were using this globally (not bothering - // with pragma push/pop). -# pragma warning(disable : 4786) -# endif // MSVC 6 +#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 +// Microsoft Visual Studio 6 only support conversion from __int64 to double +// (no conversion from unsigned __int64). +#define JSON_USE_INT64_DOUBLE_CONVERSION 1 +// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' +// characters in the debug information) +// All projects I've ever seen with VS6 were using this globally (not bothering +// with pragma push/pop). +#pragma warning(disable : 4786) +#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 -# if _MSC_VER >= 1500 // MSVC 2008 - /// Indicates that the following function is deprecated. -# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) -# endif - -#endif // defined(_MSC_VER) - -// In c++11 the override keyword allows you to explicity define that a function -// is intended to override the base-class version. This makes the code more -// managable and fixes a set of common hard-to-find bugs. -#if __cplusplus >= 201103L -# define JSONCPP_OVERRIDE override -# define JSONCPP_NOEXCEPT noexcept -#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900 -# define JSONCPP_OVERRIDE override -# define JSONCPP_NOEXCEPT throw() -#elif defined(_MSC_VER) && _MSC_VER >= 1900 -# define JSONCPP_OVERRIDE override -# define JSONCPP_NOEXCEPT noexcept -#else -# define JSONCPP_OVERRIDE -# define JSONCPP_NOEXCEPT throw() +#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 +/// Indicates that the following function is deprecated. +#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) +#elif defined(__clang__) && defined(__has_feature) +#if __has_feature(attribute_deprecated_with_message) +#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) #endif - -#ifndef JSON_HAS_RVALUE_REFERENCES - -#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 -#define JSON_HAS_RVALUE_REFERENCES 1 -#endif // MSVC >= 2010 - -#ifdef __clang__ -#if __has_feature(cxx_rvalue_references) -#define JSON_HAS_RVALUE_REFERENCES 1 -#endif // has_feature - -#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) -#define JSON_HAS_RVALUE_REFERENCES 1 -#endif // GXX_EXPERIMENTAL - -#endif // __clang__ || __GNUC__ - -#endif // not defined JSON_HAS_RVALUE_REFERENCES - -#ifndef JSON_HAS_RVALUE_REFERENCES -#define JSON_HAS_RVALUE_REFERENCES 0 +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) +#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) #endif -#ifdef __clang__ -# if __has_extension(attribute_deprecated_with_message) -# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) -# endif -#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) -# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) -# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) -# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) -# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) -# endif // GNUC version -#endif // __clang__ || __GNUC__ - #if !defined(JSONCPP_DEPRECATED) #define JSONCPP_DEPRECATED(message) #endif // if !defined(JSONCPP_DEPRECATED) -#if __GNUC__ >= 6 -# define JSON_USE_INT64_DOUBLE_CONVERSION 1 -#endif - -#if !defined(JSON_IS_AMALGAMATION) - -# include "version.h" - -# if JSONCPP_USING_SECURE_MEMORY -# include "allocator.h" //typedef Allocator -# endif - -#endif // if !defined(JSON_IS_AMALGAMATION) - namespace Json { typedef int Int; typedef unsigned int UInt; @@ -247,26 +192,13 @@ typedef unsigned int LargestUInt; typedef __int64 Int64; typedef unsigned __int64 UInt64; #else // if defined(_MSC_VER) // Other platforms, use long long -typedef int64_t Int64; -typedef uint64_t UInt64; +typedef long long int Int64; +typedef unsigned long long int UInt64; #endif // if defined(_MSC_VER) typedef Int64 LargestInt; typedef UInt64 LargestUInt; #define JSON_HAS_INT64 #endif // if defined(JSON_NO_INT64) -#if JSONCPP_USING_SECURE_MEMORY -#define JSONCPP_STRING std::basic_string, Json::SecureAllocator > -#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream, Json::SecureAllocator > -#define JSONCPP_OSTREAM std::basic_ostream> -#define JSONCPP_ISTRINGSTREAM std::basic_istringstream, Json::SecureAllocator > -#define JSONCPP_ISTREAM std::istream -#else -#define JSONCPP_STRING std::string -#define JSONCPP_OSTRINGSTREAM std::ostringstream -#define JSONCPP_OSTREAM std::ostream -#define JSONCPP_ISTRINGSTREAM std::istringstream -#define JSONCPP_ISTREAM std::istream -#endif // if JSONCPP_USING_SECURE_MEMORY } // end namespace Json #endif // JSON_CONFIG_H_INCLUDED @@ -284,7 +216,7 @@ typedef UInt64 LargestUInt; // Beginning of content of file: include/json/forwards.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE diff --git a/third_party/jsoncpp/json/json.h b/third_party/jsoncpp/json/json.h index 4311e90e..347b5731 100644 --- a/third_party/jsoncpp/json/json.h +++ b/third_party/jsoncpp/json/json.h @@ -6,32 +6,32 @@ // ////////////////////////////////////////////////////////////////////// /* -The JsonCpp library's source code, including accompanying documentation, +The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... -Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and -The JsonCpp Authors, and is released under the terms of the MIT License (see below). +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License - + The full text of the MIT License follows: ======================================================================== -Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -87,20 +87,13 @@ license you like. #ifndef JSON_VERSION_H_INCLUDED # define JSON_VERSION_H_INCLUDED -# define JSONCPP_VERSION_STRING "1.8.1" -# define JSONCPP_VERSION_MAJOR 1 -# define JSONCPP_VERSION_MINOR 8 -# define JSONCPP_VERSION_PATCH 1 +# define JSONCPP_VERSION_STRING "0.10.6" +# define JSONCPP_VERSION_MAJOR 0 +# define JSONCPP_VERSION_MINOR 10 +# define JSONCPP_VERSION_PATCH 6 # define JSONCPP_VERSION_QUALIFIER # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) -#ifdef JSONCPP_USING_SECURE_MEMORY -#undef JSONCPP_USING_SECURE_MEMORY -#endif -#define JSONCPP_USING_SECURE_MEMORY 0 -// If non-zero, the library zeroes any memory that it has allocated before -// it frees its memory. - #endif // JSON_VERSION_H_INCLUDED // ////////////////////////////////////////////////////////////////////// @@ -116,16 +109,13 @@ license you like. // Beginning of content of file: include/json/config.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_CONFIG_H_INCLUDED #define JSON_CONFIG_H_INCLUDED -#include -#include //typedef String -#include //typedef int64_t, uint64_t /// If defined, indicates that json library is embedded in CppTL library. //# define JSON_IN_CPPTL 1 @@ -158,12 +148,12 @@ license you like. #ifdef JSON_IN_CPPTL #define JSON_API CPPTL_API #elif defined(JSON_DLL_BUILD) -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define JSON_API __declspec(dllexport) #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING #endif // if defined(_MSC_VER) #elif defined(JSON_DLL) -#if defined(_MSC_VER) || defined(__MINGW32__) +#if defined(_MSC_VER) #define JSON_API __declspec(dllimport) #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING #endif // if defined(_MSC_VER) @@ -172,101 +162,49 @@ license you like. #define JSON_API #endif +#if !defined(JSON_HAS_UNIQUE_PTR) +#if __cplusplus >= 201103L +#define JSON_HAS_UNIQUE_PTR (1) +#elif _MSC_VER >= 1600 +#define JSON_HAS_UNIQUE_PTR (1) +#else +#define JSON_HAS_UNIQUE_PTR (0) +#endif +#endif + // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for // integer // Storages, and 64 bits integer support is disabled. // #define JSON_NO_INT64 1 -#if defined(_MSC_VER) // MSVC -# if _MSC_VER <= 1200 // MSVC 6 - // Microsoft Visual Studio 6 only support conversion from __int64 to double - // (no conversion from unsigned __int64). -# define JSON_USE_INT64_DOUBLE_CONVERSION 1 - // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' - // characters in the debug information) - // All projects I've ever seen with VS6 were using this globally (not bothering - // with pragma push/pop). -# pragma warning(disable : 4786) -# endif // MSVC 6 +#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 +// Microsoft Visual Studio 6 only support conversion from __int64 to double +// (no conversion from unsigned __int64). +#define JSON_USE_INT64_DOUBLE_CONVERSION 1 +// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' +// characters in the debug information) +// All projects I've ever seen with VS6 were using this globally (not bothering +// with pragma push/pop). +#pragma warning(disable : 4786) +#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 -# if _MSC_VER >= 1500 // MSVC 2008 - /// Indicates that the following function is deprecated. -# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) -# endif - -#endif // defined(_MSC_VER) - -// In c++11 the override keyword allows you to explicity define that a function -// is intended to override the base-class version. This makes the code more -// managable and fixes a set of common hard-to-find bugs. -#if __cplusplus >= 201103L -# define JSONCPP_OVERRIDE override -# define JSONCPP_NOEXCEPT noexcept -#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900 -# define JSONCPP_OVERRIDE override -# define JSONCPP_NOEXCEPT throw() -#elif defined(_MSC_VER) && _MSC_VER >= 1900 -# define JSONCPP_OVERRIDE override -# define JSONCPP_NOEXCEPT noexcept -#else -# define JSONCPP_OVERRIDE -# define JSONCPP_NOEXCEPT throw() +#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 +/// Indicates that the following function is deprecated. +#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) +#elif defined(__clang__) && defined(__has_feature) +#if __has_feature(attribute_deprecated_with_message) +#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) #endif - -#ifndef JSON_HAS_RVALUE_REFERENCES - -#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 -#define JSON_HAS_RVALUE_REFERENCES 1 -#endif // MSVC >= 2010 - -#ifdef __clang__ -#if __has_feature(cxx_rvalue_references) -#define JSON_HAS_RVALUE_REFERENCES 1 -#endif // has_feature - -#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) -#define JSON_HAS_RVALUE_REFERENCES 1 -#endif // GXX_EXPERIMENTAL - -#endif // __clang__ || __GNUC__ - -#endif // not defined JSON_HAS_RVALUE_REFERENCES - -#ifndef JSON_HAS_RVALUE_REFERENCES -#define JSON_HAS_RVALUE_REFERENCES 0 +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) +#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) #endif -#ifdef __clang__ -# if __has_extension(attribute_deprecated_with_message) -# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) -# endif -#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) -# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) -# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) -# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) -# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) -# endif // GNUC version -#endif // __clang__ || __GNUC__ - #if !defined(JSONCPP_DEPRECATED) #define JSONCPP_DEPRECATED(message) #endif // if !defined(JSONCPP_DEPRECATED) -#if __GNUC__ >= 6 -# define JSON_USE_INT64_DOUBLE_CONVERSION 1 -#endif - -#if !defined(JSON_IS_AMALGAMATION) - -# include "version.h" - -# if JSONCPP_USING_SECURE_MEMORY -# include "allocator.h" //typedef Allocator -# endif - -#endif // if !defined(JSON_IS_AMALGAMATION) - namespace Json { typedef int Int; typedef unsigned int UInt; @@ -280,26 +218,13 @@ typedef unsigned int LargestUInt; typedef __int64 Int64; typedef unsigned __int64 UInt64; #else // if defined(_MSC_VER) // Other platforms, use long long -typedef int64_t Int64; -typedef uint64_t UInt64; +typedef long long int Int64; +typedef unsigned long long int UInt64; #endif // if defined(_MSC_VER) typedef Int64 LargestInt; typedef UInt64 LargestUInt; #define JSON_HAS_INT64 #endif // if defined(JSON_NO_INT64) -#if JSONCPP_USING_SECURE_MEMORY -#define JSONCPP_STRING std::basic_string, Json::SecureAllocator > -#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream, Json::SecureAllocator > -#define JSONCPP_OSTREAM std::basic_ostream> -#define JSONCPP_ISTRINGSTREAM std::basic_istringstream, Json::SecureAllocator > -#define JSONCPP_ISTREAM std::istream -#else -#define JSONCPP_STRING std::string -#define JSONCPP_OSTRINGSTREAM std::ostringstream -#define JSONCPP_OSTREAM std::ostream -#define JSONCPP_ISTRINGSTREAM std::istringstream -#define JSONCPP_ISTREAM std::istream -#endif // if JSONCPP_USING_SECURE_MEMORY } // end namespace Json #endif // JSON_CONFIG_H_INCLUDED @@ -317,7 +242,7 @@ typedef UInt64 LargestUInt; // Beginning of content of file: include/json/forwards.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -368,7 +293,7 @@ class ValueConstIterator; // Beginning of content of file: include/json/features.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -380,8 +305,6 @@ class ValueConstIterator; #include "forwards.h" #endif // if !defined(JSON_IS_AMALGAMATION) -#pragma pack(push, 8) - namespace Json { /** \brief Configuration passed to reader and writer. @@ -416,18 +339,10 @@ public: /// \c true if root must be either an array or an object value. Default: \c /// false. bool strictRoot_; - - /// \c true if dropped null placeholders are allowed. Default: \c false. - bool allowDroppedNullPlaceholders_; - - /// \c true if numeric object key are allowed. Default: \c false. - bool allowNumericKeys_; }; } // namespace Json -#pragma pack(pop) - #endif // CPPTL_JSON_FEATURES_H_INCLUDED // ////////////////////////////////////////////////////////////////////// @@ -443,7 +358,7 @@ public: // Beginning of content of file: include/json/value.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -467,8 +382,15 @@ public: #include #endif +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + //Conditional NORETURN attribute on the throw functions would: -// a) suppress false positives from static code analysis +// a) suppress false positives from static code analysis // b) possibly improve optimization opportunities. #if !defined(JSONCPP_NORETURN) # if defined(_MSC_VER) @@ -480,15 +402,6 @@ public: # endif #endif -// Disable warning C4251: : needs to have dll-interface to -// be used by... -#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) -#pragma warning(push) -#pragma warning(disable : 4251) -#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) - -#pragma pack(push, 8) - /** \brief JSON (JavaScript Object Notation). */ namespace Json { @@ -499,39 +412,39 @@ namespace Json { */ class JSON_API Exception : public std::exception { public: - Exception(JSONCPP_STRING const& msg); - ~Exception() JSONCPP_NOEXCEPT JSONCPP_OVERRIDE; - char const* what() const JSONCPP_NOEXCEPT JSONCPP_OVERRIDE; + Exception(std::string const& msg); + virtual ~Exception() throw(); + virtual char const* what() const throw(); protected: - JSONCPP_STRING msg_; + std::string const msg_; }; /** Exceptions which the user cannot easily avoid. * * E.g. out-of-memory (when we use malloc), stack-overflow, malicious input - * + * * \remark derived from Json::Exception */ class JSON_API RuntimeError : public Exception { public: - RuntimeError(JSONCPP_STRING const& msg); + RuntimeError(std::string const& msg); }; /** Exceptions thrown by JSON_ASSERT/JSON_FAIL macros. * * These are precondition-violations (user bugs) and internal errors (our bugs). - * + * * \remark derived from Json::Exception */ class JSON_API LogicError : public Exception { public: - LogicError(JSONCPP_STRING const& msg); + LogicError(std::string const& msg); }; /// used internally -JSONCPP_NORETURN void throwRuntimeError(JSONCPP_STRING const& msg); +JSONCPP_NORETURN void throwRuntimeError(std::string const& msg); /// used internally -JSONCPP_NORETURN void throwLogicError(JSONCPP_STRING const& msg); +JSONCPP_NORETURN void throwLogicError(std::string const& msg); /** \brief Type of the value held by a Value object. */ @@ -622,7 +535,7 @@ private: class JSON_API Value { friend class ValueIteratorBase; public: - typedef std::vector Members; + typedef std::vector Members; typedef ValueIterator iterator; typedef ValueConstIterator const_iterator; typedef Json::UInt UInt; @@ -635,10 +548,11 @@ public: typedef Json::LargestUInt LargestUInt; typedef Json::ArrayIndex ArrayIndex; - static const Value& null; ///< We regret this reference to a global instance; prefer the simpler Value(). - static const Value& nullRef; ///< just a kludge for binary-compatibility; same as null - static Value const& nullSingleton(); ///< Prefer this to null or nullRef. - + static const Value& nullRef; +#if !defined(__ARMEL__) + /// \deprecated This exists for binary compatibility only. Use nullRef. + static const Value null; +#endif /// Minimum signed integer value that can be stored in a Json::Value. static const LargestInt minLargestInt; /// Maximum signed integer value that can be stored in a Json::Value. @@ -662,7 +576,12 @@ public: static const UInt64 maxUInt64; #endif // defined(JSON_HAS_INT64) +//MW: workaround for bug in NVIDIAs CUDA 7.5 nvcc compiler +#ifdef __NVCC__ +public: +#else private: +#endif //__NVCC__ #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION class CZString { public: @@ -674,16 +593,8 @@ private: CZString(ArrayIndex index); CZString(char const* str, unsigned length, DuplicationPolicy allocate); CZString(CZString const& other); -#if JSON_HAS_RVALUE_REFERENCES - CZString(CZString&& other); -#endif ~CZString(); - CZString& operator=(const CZString& other); - -#if JSON_HAS_RVALUE_REFERENCES - CZString& operator=(CZString&& other); -#endif - + CZString& operator=(CZString other); bool operator<(CZString const& other) const; bool operator==(CZString const& other) const; ArrayIndex index() const; @@ -757,33 +668,23 @@ Json::Value obj_value(Json::objectValue); // {} * \endcode */ Value(const StaticString& value); - Value(const JSONCPP_STRING& value); ///< Copy data() til size(). Embedded zeroes too. + Value(const std::string& value); ///< Copy data() til size(). Embedded zeroes too. #ifdef JSON_USE_CPPTL Value(const CppTL::ConstString& value); #endif Value(bool value); /// Deep copy. Value(const Value& other); -#if JSON_HAS_RVALUE_REFERENCES - /// Move constructor - Value(Value&& other); -#endif ~Value(); /// Deep copy, then swap(other). /// \note Over-write existing comments. To preserve comments, use #swapPayload(). - Value& operator=(Value other); - + Value &operator=(const Value &other); /// Swap everything. void swap(Value& other); /// Swap values but leave comments and source offsets in place. void swapPayload(Value& other); - /// copy everything. - void copy(const Value& other); - /// copy values but leave comments and source offsets in place. - void copyPayload(const Value& other); - ValueType type() const; /// Compare payload only, not comments etc. @@ -796,10 +697,7 @@ Json::Value obj_value(Json::objectValue); // {} int compare(const Value& other) const; const char* asCString() const; ///< Embedded zeroes could cause you trouble! -#if JSONCPP_USING_SECURE_MEMORY - unsigned getCStringLength() const; //Allows you to understand the length of the CString -#endif - JSONCPP_STRING asString() const; ///< Embedded zeroes are possible. + std::string asString() const; ///< Embedded zeroes are possible. /** Get raw char* of string-value. * \return false if !string. (Seg-fault if str or end are NULL.) */ @@ -894,10 +792,6 @@ Json::Value obj_value(Json::objectValue); // {} /// Equivalent to jsonvalue[jsonvalue.size()] = value; Value& append(const Value& value); -#if JSON_HAS_RVALUE_REFERENCES - Value& append(Value&& value); -#endif - /// Access an object value by name, create a null member if it does not exist. /// \note Because of our implementation, keys are limited to 2^30 -1 chars. /// Exceeding that will cause an exception. @@ -907,11 +801,11 @@ Json::Value obj_value(Json::objectValue); // {} const Value& operator[](const char* key) const; /// Access an object value by name, create a null member if it does not exist. /// \param key may contain embedded nulls. - Value& operator[](const JSONCPP_STRING& key); + Value& operator[](const std::string& key); /// Access an object value by name, returns null if there is no member with /// that name. /// \param key may contain embedded nulls. - const Value& operator[](const JSONCPP_STRING& key) const; + const Value& operator[](const std::string& key) const; /** \brief Access an object value by name, create a null member if it does not exist. @@ -942,7 +836,7 @@ Json::Value obj_value(Json::objectValue); // {} /// Return the member named key if it exist, defaultValue otherwise. /// \note deep copy /// \param key may contain embedded nulls. - Value get(const JSONCPP_STRING& key, const Value& defaultValue) const; + Value get(const std::string& key, const Value& defaultValue) const; #ifdef JSON_USE_CPPTL /// Return the member named key if it exist, defaultValue otherwise. /// \note deep copy @@ -963,13 +857,11 @@ Json::Value obj_value(Json::objectValue); // {} /// \pre type() is objectValue or nullValue /// \post type() is unchanged /// \deprecated - JSONCPP_DEPRECATED("") Value removeMember(const char* key); /// Same as removeMember(const char*) /// \param key may contain embedded nulls. /// \deprecated - JSONCPP_DEPRECATED("") - Value removeMember(const JSONCPP_STRING& key); + Value removeMember(const std::string& key); /// Same as removeMember(const char* begin, const char* end, Value* removed), /// but 'key' is null-terminated. bool removeMember(const char* key, Value* removed); @@ -979,8 +871,8 @@ Json::Value obj_value(Json::objectValue); // {} \param key may contain embedded nulls. \return true iff removed (no exceptions) */ - bool removeMember(JSONCPP_STRING const& key, Value* removed); - /// Same as removeMember(JSONCPP_STRING const& key, Value* removed) + bool removeMember(std::string const& key, Value* removed); + /// Same as removeMember(std::string const& key, Value* removed) bool removeMember(const char* begin, const char* end, Value* removed); /** \brief Remove the indexed array element. @@ -995,8 +887,8 @@ Json::Value obj_value(Json::objectValue); // {} bool isMember(const char* key) const; /// Return true if the object has a member named key. /// \param key may contain embedded nulls. - bool isMember(const JSONCPP_STRING& key) const; - /// Same as isMember(JSONCPP_STRING const& key)const + bool isMember(const std::string& key) const; + /// Same as isMember(std::string const& key)const bool isMember(const char* begin, const char* end) const; #ifdef JSON_USE_CPPTL /// Return true if the object has a member named key. @@ -1016,17 +908,17 @@ Json::Value obj_value(Json::objectValue); // {} //# endif /// \deprecated Always pass len. - JSONCPP_DEPRECATED("Use setComment(JSONCPP_STRING const&) instead.") + JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.") void setComment(const char* comment, CommentPlacement placement); /// Comments must be //... or /* ... */ void setComment(const char* comment, size_t len, CommentPlacement placement); /// Comments must be //... or /* ... */ - void setComment(const JSONCPP_STRING& comment, CommentPlacement placement); + void setComment(const std::string& comment, CommentPlacement placement); bool hasComment(CommentPlacement placement) const; /// Include delimiters and embedded newlines. - JSONCPP_STRING getComment(CommentPlacement placement) const; + std::string getComment(CommentPlacement placement) const; - JSONCPP_STRING toStyledString() const; + std::string toStyledString() const; const_iterator begin() const; const_iterator end() const; @@ -1034,13 +926,6 @@ Json::Value obj_value(Json::objectValue); // {} iterator begin(); iterator end(); - // Accessors for the [start, limit) range of bytes within the JSON text from - // which this value was parsed, if any. - void setOffsetStart(ptrdiff_t start); - void setOffsetLimit(ptrdiff_t limit); - ptrdiff_t getOffsetStart() const; - ptrdiff_t getOffsetLimit() const; - private: void initBasic(ValueType type, bool allocated = false); @@ -1077,11 +962,6 @@ private: unsigned int allocated_ : 1; // Notes: if declared as bool, bitfield is useless. // If not allocated_, string_ must be null-terminated. CommentInfo* comments_; - - // [start, limit) byte offsets in the source JSON text from which this Value - // was extracted. - ptrdiff_t start_; - ptrdiff_t limit_; }; /** \brief Experimental and untested: represents an element of the "path" to @@ -1094,7 +974,7 @@ public: PathArgument(); PathArgument(ArrayIndex index); PathArgument(const char* key); - PathArgument(const JSONCPP_STRING& key); + PathArgument(const std::string& key); private: enum Kind { @@ -1102,7 +982,7 @@ private: kindIndex, kindKey }; - JSONCPP_STRING key_; + std::string key_; ArrayIndex index_; Kind kind_; }; @@ -1120,7 +1000,7 @@ private: */ class JSON_API Path { public: - Path(const JSONCPP_STRING& path, + Path(const std::string& path, const PathArgument& a1 = PathArgument(), const PathArgument& a2 = PathArgument(), const PathArgument& a3 = PathArgument(), @@ -1137,12 +1017,12 @@ private: typedef std::vector InArgs; typedef std::vector Args; - void makePath(const JSONCPP_STRING& path, const InArgs& in); - void addPathInArg(const JSONCPP_STRING& path, + void makePath(const std::string& path, const InArgs& in); + void addPathInArg(const std::string& path, const InArgs& in, InArgs::const_iterator& itInArg, PathArgument::Kind kind); - void invalidPath(const JSONCPP_STRING& path, int location); + void invalidPath(const std::string& path, int location); Args args_; }; @@ -1175,7 +1055,7 @@ public: /// Return the member name of the referenced Value, or "" if it is not an /// objectValue. /// \note Avoid `c_str()` on result, as embedded zeroes are possible. - JSONCPP_STRING name() const; + std::string name() const; /// Return the member name of the referenced Value. "" if it is not an /// objectValue. @@ -1227,7 +1107,6 @@ public: typedef ValueConstIterator SelfType; ValueConstIterator(); - ValueConstIterator(ValueIterator const& other); private: /*! \internal Use by Value to create an iterator. @@ -1277,7 +1156,7 @@ public: typedef ValueIterator SelfType; ValueIterator(); - explicit ValueIterator(const ValueConstIterator& other); + ValueIterator(const ValueConstIterator& other); ValueIterator(const ValueIterator& other); private: @@ -1323,7 +1202,6 @@ template<> inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); } } -#pragma pack(pop) #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) #pragma warning(pop) @@ -1344,7 +1222,7 @@ inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); } // Beginning of content of file: include/json/reader.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -1369,8 +1247,6 @@ inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); } #pragma warning(disable : 4251) #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) -#pragma pack(push, 8) - namespace Json { /** \brief Unserialize a JSON document into a @@ -1383,18 +1259,6 @@ public: typedef char Char; typedef const Char* Location; - /** \brief An error tagged with where in the JSON text it was encountered. - * - * The offsets give the [start, limit) range of bytes within the text. Note - * that this is bytes, not codepoints. - * - */ - struct StructuredError { - ptrdiff_t offset_start; - ptrdiff_t offset_limit; - JSONCPP_STRING message; - }; - /** \brief Constructs a Reader allowing all features * for parsing. */ @@ -1447,7 +1311,7 @@ public: /// \brief Parse from input stream. /// \see Json::operator>>(std::istream&, Json::Value&). - bool parse(JSONCPP_ISTREAM& is, Value& root, bool collectComments = true); + bool parse(std::istream& is, Value& root, bool collectComments = true); /** \brief Returns a user friendly string that list errors in the parsed * document. @@ -1459,7 +1323,7 @@ public: * \deprecated Use getFormattedErrorMessages() instead (typo fix). */ JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.") - JSONCPP_STRING getFormatedErrorMessages() const; + std::string getFormatedErrorMessages() const; /** \brief Returns a user friendly string that list errors in the parsed * document. @@ -1469,39 +1333,7 @@ public: * occurred * during parsing. */ - JSONCPP_STRING getFormattedErrorMessages() const; - - /** \brief Returns a vector of structured erros encounted while parsing. - * \return A (possibly empty) vector of StructuredError objects. Currently - * only one error can be returned, but the caller should tolerate - * multiple - * errors. This can occur if the parser recovers from a non-fatal - * parse error and then encounters additional errors. - */ - std::vector getStructuredErrors() const; - - /** \brief Add a semantic error message. - * \param value JSON Value location associated with the error - * \param message The error message. - * \return \c true if the error was successfully added, \c false if the - * Value offset exceeds the document size. - */ - bool pushError(const Value& value, const JSONCPP_STRING& message); - - /** \brief Add a semantic error message with extra context. - * \param value JSON Value location associated with the error - * \param message The error message. - * \param extra Additional JSON Value location to contextualize the error - * \return \c true if the error was successfully added, \c false if either - * Value offset exceeds the document size. - */ - bool pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra); - - /** \brief Return whether there are any errors. - * \return \c true if there are no errors to report \c false if - * errors have occurred. - */ - bool good() const; + std::string getFormattedErrorMessages() const; private: enum TokenType { @@ -1531,7 +1363,7 @@ private: class ErrorInfo { public: Token token_; - JSONCPP_STRING message_; + std::string message_; Location extra_; }; @@ -1551,7 +1383,7 @@ private: bool decodeNumber(Token& token); bool decodeNumber(Token& token, Value& decoded); bool decodeString(Token& token); - bool decodeString(Token& token, JSONCPP_STRING& decoded); + bool decodeString(Token& token, std::string& decoded); bool decodeDouble(Token& token); bool decodeDouble(Token& token, Value& decoded); bool decodeUnicodeCodePoint(Token& token, @@ -1562,9 +1394,9 @@ private: Location& current, Location end, unsigned int& unicode); - bool addError(const JSONCPP_STRING& message, Token& token, Location extra = 0); + bool addError(const std::string& message, Token& token, Location extra = 0); bool recoverFromError(TokenType skipUntilToken); - bool addErrorAndRecover(const JSONCPP_STRING& message, + bool addErrorAndRecover(const std::string& message, Token& token, TokenType skipUntilToken); void skipUntilSpace(); @@ -1572,23 +1404,20 @@ private: Char getNextChar(); void getLocationLineAndColumn(Location location, int& line, int& column) const; - JSONCPP_STRING getLocationLineAndColumn(Location location) const; + std::string getLocationLineAndColumn(Location location) const; void addComment(Location begin, Location end, CommentPlacement placement); void skipCommentTokens(Token& token); - static bool containsNewLine(Location begin, Location end); - static JSONCPP_STRING normalizeEOL(Location begin, Location end); - typedef std::stack Nodes; Nodes nodes_; Errors errors_; - JSONCPP_STRING document_; + std::string document_; Location begin_; Location end_; Location current_; Location lastValueEnd_; Value* lastValue_; - JSONCPP_STRING commentsBefore_; + std::string commentsBefore_; Features features_; bool collectComments_; }; // Reader @@ -1617,9 +1446,9 @@ public: */ virtual bool parse( char const* beginDoc, char const* endDoc, - Value* root, JSONCPP_STRING* errs) = 0; + Value* root, std::string* errs) = 0; - class JSON_API Factory { + class Factory { public: virtual ~Factory() {} /** \brief Allocate a CharReader via operator new(). @@ -1637,7 +1466,7 @@ Usage: CharReaderBuilder builder; builder["collectComments"] = false; Value value; - JSONCPP_STRING errs; + std::string errs; bool ok = parseFromStream(builder, std::cin, &value, &errs); \endcode */ @@ -1673,7 +1502,7 @@ public: - `"rejectDupKeys": false or true` - If true, `parse()` returns false when a key is duplicated within an object. - `"allowSpecialFloats": false or true` - - If true, special float values (NaNs and infinities) are allowed + - If true, special float values (NaNs and infinities) are allowed and their values are lossfree restorable. You can examine 'settings_` yourself @@ -1684,9 +1513,9 @@ public: Json::Value settings_; CharReaderBuilder(); - ~CharReaderBuilder() JSONCPP_OVERRIDE; + virtual ~CharReaderBuilder(); - CharReader* newCharReader() const JSONCPP_OVERRIDE; + virtual CharReader* newCharReader() const; /** \return true if 'settings' are legal and consistent; * otherwise, indicate bad settings via 'invalid'. @@ -1695,7 +1524,7 @@ public: /** A simple way to update a specific setting. */ - Value& operator[](JSONCPP_STRING key); + Value& operator[](std::string key); /** Called by ctor, but you can use this to reset settings_. * \pre 'settings' != NULL (but Json::null is fine) @@ -1717,7 +1546,7 @@ public: */ bool JSON_API parseFromStream( CharReader::Factory const&, - JSONCPP_ISTREAM&, + std::istream&, Value* root, std::string* errs); /** \brief Read from 'sin' into 'root'. @@ -1744,12 +1573,10 @@ bool JSON_API parseFromStream( \throw std::exception on parse error. \see Json::operator<<() */ -JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&); +JSON_API std::istream& operator>>(std::istream&, Value&); } // namespace Json -#pragma pack(pop) - #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) #pragma warning(pop) #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) @@ -1769,7 +1596,7 @@ JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&); // Beginning of content of file: include/json/writer.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -1791,8 +1618,6 @@ JSON_API JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM&, Value&); #pragma warning(disable : 4251) #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) -#pragma pack(push, 8) - namespace Json { class Value; @@ -1812,7 +1637,7 @@ Usage: */ class JSON_API StreamWriter { protected: - JSONCPP_OSTREAM* sout_; // not owned; will not delete + std::ostream* sout_; // not owned; will not delete public: StreamWriter(); virtual ~StreamWriter(); @@ -1822,7 +1647,7 @@ public: \return zero on success (For now, we always return zero, so check the stream instead.) \throw std::exception possibly, depending on configuration */ - virtual int write(Value const& root, JSONCPP_OSTREAM* sout) = 0; + virtual int write(Value const& root, std::ostream* sout) = 0; /** \brief A simple abstract factory. */ @@ -1839,7 +1664,7 @@ public: /** \brief Write into stringstream, then return string, for convenience. * A StreamWriter will be created from the factory, used, and then deleted. */ -JSONCPP_STRING JSON_API writeString(StreamWriter::Factory const& factory, Value const& root); +std::string JSON_API writeString(StreamWriter::Factory const& factory, Value const& root); /** \brief Build a StreamWriter implementation. @@ -1885,12 +1710,12 @@ public: Json::Value settings_; StreamWriterBuilder(); - ~StreamWriterBuilder() JSONCPP_OVERRIDE; + virtual ~StreamWriterBuilder(); /** * \throw std::exception if something goes wrong (e.g. invalid settings) */ - StreamWriter* newStreamWriter() const JSONCPP_OVERRIDE; + virtual StreamWriter* newStreamWriter() const; /** \return true if 'settings' are legal and consistent; * otherwise, indicate bad settings via 'invalid'. @@ -1898,7 +1723,7 @@ public: bool validate(Json::Value* invalid) const; /** A simple way to update a specific setting. */ - Value& operator[](JSONCPP_STRING key); + Value& operator[](std::string key); /** Called by ctor, but you can use this to reset settings_. * \pre 'settings' != NULL (but Json::null is fine) @@ -1915,7 +1740,7 @@ class JSON_API Writer { public: virtual ~Writer(); - virtual JSONCPP_STRING write(const Value& root) = 0; + virtual std::string write(const Value& root) = 0; }; /** \brief Outputs a Value in JSON format @@ -1931,29 +1756,18 @@ class JSON_API FastWriter : public Writer { public: FastWriter(); - ~FastWriter() JSONCPP_OVERRIDE {} + virtual ~FastWriter() {} void enableYAMLCompatibility(); - /** \brief Drop the "null" string from the writer's output for nullValues. - * Strictly speaking, this is not valid JSON. But when the output is being - * fed to a browser's Javascript, it makes for smaller output and the - * browser can handle the output just fine. - */ - void dropNullPlaceholders(); - - void omitEndingLineFeed(); - public: // overridden from Writer - JSONCPP_STRING write(const Value& root) JSONCPP_OVERRIDE; + virtual std::string write(const Value& root); private: void writeValue(const Value& value); - JSONCPP_STRING document_; + std::string document_; bool yamlCompatiblityEnabled_; - bool dropNullPlaceholders_; - bool omitEndingLineFeed_; }; /** \brief Writes a Value in JSON format in a @@ -1980,39 +1794,39 @@ private: * \sa Reader, Value, Value::setComment() * \deprecated Use StreamWriterBuilder. */ -class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API StyledWriter : public Writer { +class JSON_API StyledWriter : public Writer { public: StyledWriter(); - ~StyledWriter() JSONCPP_OVERRIDE {} + virtual ~StyledWriter() {} public: // overridden from Writer /** \brief Serialize a Value in JSON format. * \param root Value to serialize. * \return String containing the JSON document that represents the root value. */ - JSONCPP_STRING write(const Value& root) JSONCPP_OVERRIDE; + virtual std::string write(const Value& root); private: void writeValue(const Value& value); void writeArrayValue(const Value& value); bool isMultineArray(const Value& value); - void pushValue(const JSONCPP_STRING& value); + void pushValue(const std::string& value); void writeIndent(); - void writeWithIndent(const JSONCPP_STRING& value); + void writeWithIndent(const std::string& value); void indent(); void unindent(); void writeCommentBeforeValue(const Value& root); void writeCommentAfterValueOnSameLine(const Value& root); bool hasCommentForValue(const Value& value); - static JSONCPP_STRING normalizeEOL(const JSONCPP_STRING& text); + static std::string normalizeEOL(const std::string& text); - typedef std::vector ChildValues; + typedef std::vector ChildValues; ChildValues childValues_; - JSONCPP_STRING document_; - JSONCPP_STRING indentString_; - unsigned int rightMargin_; - unsigned int indentSize_; + std::string document_; + std::string indentString_; + int rightMargin_; + int indentSize_; bool addChildValues_; }; @@ -2038,15 +1852,13 @@ private: * If the Value have comments then they are outputed according to their #CommentPlacement. * + * \param indentation Each level will be indented by this amount extra. * \sa Reader, Value, Value::setComment() * \deprecated Use StreamWriterBuilder. */ -class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API StyledStreamWriter { +class JSON_API StyledStreamWriter { public: -/** - * \param indentation Each level will be indented by this amount extra. - */ - StyledStreamWriter(JSONCPP_STRING indentation = "\t"); + StyledStreamWriter(std::string indentation = "\t"); ~StyledStreamWriter() {} public: @@ -2056,51 +1868,49 @@ public: * \note There is no point in deriving from Writer, since write() should not * return a value. */ - void write(JSONCPP_OSTREAM& out, const Value& root); + void write(std::ostream& out, const Value& root); private: void writeValue(const Value& value); void writeArrayValue(const Value& value); bool isMultineArray(const Value& value); - void pushValue(const JSONCPP_STRING& value); + void pushValue(const std::string& value); void writeIndent(); - void writeWithIndent(const JSONCPP_STRING& value); + void writeWithIndent(const std::string& value); void indent(); void unindent(); void writeCommentBeforeValue(const Value& root); void writeCommentAfterValueOnSameLine(const Value& root); bool hasCommentForValue(const Value& value); - static JSONCPP_STRING normalizeEOL(const JSONCPP_STRING& text); + static std::string normalizeEOL(const std::string& text); - typedef std::vector ChildValues; + typedef std::vector ChildValues; ChildValues childValues_; - JSONCPP_OSTREAM* document_; - JSONCPP_STRING indentString_; - unsigned int rightMargin_; - JSONCPP_STRING indentation_; + std::ostream* document_; + std::string indentString_; + int rightMargin_; + std::string indentation_; bool addChildValues_ : 1; bool indented_ : 1; }; #if defined(JSON_HAS_INT64) -JSONCPP_STRING JSON_API valueToString(Int value); -JSONCPP_STRING JSON_API valueToString(UInt value); +std::string JSON_API valueToString(Int value); +std::string JSON_API valueToString(UInt value); #endif // if defined(JSON_HAS_INT64) -JSONCPP_STRING JSON_API valueToString(LargestInt value); -JSONCPP_STRING JSON_API valueToString(LargestUInt value); -JSONCPP_STRING JSON_API valueToString(double value); -JSONCPP_STRING JSON_API valueToString(bool value); -JSONCPP_STRING JSON_API valueToQuotedString(const char* value); +std::string JSON_API valueToString(LargestInt value); +std::string JSON_API valueToString(LargestUInt value); +std::string JSON_API valueToString(double value); +std::string JSON_API valueToString(bool value); +std::string JSON_API valueToQuotedString(const char* value); /// \brief Output using the StyledStreamWriter. /// \see Json::operator>>() -JSON_API JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM&, const Value& root); +JSON_API std::ostream& operator<<(std::ostream&, const Value& root); } // namespace Json -#pragma pack(pop) - #if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) #pragma warning(pop) #endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) @@ -2120,7 +1930,7 @@ JSON_API JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM&, const Value& root); // Beginning of content of file: include/json/assertions.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -2147,7 +1957,7 @@ JSON_API JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM&, const Value& root); # define JSON_FAIL_MESSAGE(message) \ { \ - JSONCPP_OSTRINGSTREAM oss; oss << message; \ + std::ostringstream oss; oss << message; \ Json::throwLogicError(oss.str()); \ abort(); \ } @@ -2160,7 +1970,7 @@ JSON_API JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM&, const Value& root); // release builds we abort, for a core-dump or debugger. # define JSON_FAIL_MESSAGE(message) \ { \ - JSONCPP_OSTRINGSTREAM oss; oss << message; \ + std::ostringstream oss; oss << message; \ assert(false && oss.str().c_str()); \ abort(); \ } diff --git a/third_party/jsoncpp/jsoncpp.cpp b/third_party/jsoncpp/jsoncpp.cpp index dafdba3e..bf5b8c7e 100644 --- a/third_party/jsoncpp/jsoncpp.cpp +++ b/third_party/jsoncpp/jsoncpp.cpp @@ -6,32 +6,32 @@ // ////////////////////////////////////////////////////////////////////// /* -The JsonCpp library's source code, including accompanying documentation, +The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... -Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and -The JsonCpp Authors, and is released under the terms of the MIT License (see below). +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License - + The full text of the MIT License follows: ======================================================================== -Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -84,7 +84,7 @@ license you like. // Beginning of content of file: src/lib_json/json_tool.h // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -92,16 +92,6 @@ license you like. #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED #define LIB_JSONCPP_JSON_TOOL_H_INCLUDED - -// Also support old flag NO_LOCALE_SUPPORT -#ifdef NO_LOCALE_SUPPORT -#define JSONCPP_NO_LOCALE_SUPPORT -#endif - -#ifndef JSONCPP_NO_LOCALE_SUPPORT -#include -#endif - /* This header provides common string manipulation support, such as UTF-8, * portable conversion from/to string... * @@ -109,18 +99,10 @@ license you like. */ namespace Json { -static char getDecimalPoint() { -#ifdef JSONCPP_NO_LOCALE_SUPPORT - return '\0'; -#else - struct lconv* lc = localeconv(); - return lc ? *(lc->decimal_point) : '\0'; -#endif -} /// Converts a unicode code-point to UTF-8. -static inline JSONCPP_STRING codePointToUTF8(unsigned int cp) { - JSONCPP_STRING result; +static inline std::string codePointToUTF8(unsigned int cp) { + std::string result; // based on description from http://en.wikipedia.org/wiki/UTF-8 @@ -167,7 +149,7 @@ typedef char UIntToStringBuffer[uintToStringBufferSize]; static inline void uintToString(LargestUInt value, char*& current) { *--current = 0; do { - *--current = static_cast(value % 10U + static_cast('0')); + *--current = static_cast(value % 10U + static_cast('0')); value /= 10; } while (value != 0); } @@ -186,18 +168,6 @@ static inline void fixNumericLocale(char* begin, char* end) { } } -static inline void fixNumericLocaleInput(char* begin, char* end) { - char decimalPoint = getDecimalPoint(); - if (decimalPoint != '\0' && decimalPoint != '.') { - while (begin < end) { - if (*begin == '.') { - *begin = decimalPoint; - } - ++begin; - } - } -} - } // namespace Json { #endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED @@ -215,8 +185,7 @@ static inline void fixNumericLocaleInput(char* begin, char* end) { // Beginning of content of file: src/lib_json/json_reader.cpp // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2011 Baptiste Lepilleur and The JsonCpp Authors -// Copyright (C) 2016 InfoTeCS JSC. All rights reserved. +// Copyright 2007-2011 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -236,69 +205,58 @@ static inline void fixNumericLocaleInput(char* begin, char* end) { #include #include #include - +#if defined(__BORLANDC__) +#include +#endif #if defined(_MSC_VER) -#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above +#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above #define snprintf sprintf_s #elif _MSC_VER >= 1900 // VC++ 14.0 and above #define snprintf std::snprintf #else #define snprintf _snprintf #endif -#elif defined(__ANDROID__) || defined(__QNXNTO__) +#elif defined(__ANDROID__) #define snprintf snprintf #elif __cplusplus >= 201103L -#if !defined(__MINGW32__) && !defined(__CYGWIN__) #define snprintf std::snprintf #endif -#endif - -#if defined(__QNXNTO__) -#define sscanf std::sscanf -#endif #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 // Disable warning about strdup being deprecated. #pragma warning(disable : 4996) #endif -// Define JSONCPP_DEPRECATED_STACK_LIMIT as an appropriate integer at compile time to change the stack limit -#if !defined(JSONCPP_DEPRECATED_STACK_LIMIT) -#define JSONCPP_DEPRECATED_STACK_LIMIT 1000 -#endif - -static size_t const stackLimit_g = JSONCPP_DEPRECATED_STACK_LIMIT; // see readValue() +static int const stackLimit_g = 1000; +static int stackDepth_g = 0; // see readValue() namespace Json { -#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) -typedef std::unique_ptr CharReaderPtr; +#if JSON_HAS_UNIQUE_PTR +typedef std::unique_ptr const CharReaderPtr; #else -typedef std::auto_ptr CharReaderPtr; +typedef std::auto_ptr CharReaderPtr; #endif // Implementation of class Features // //////////////////////////////// Features::Features() - : allowComments_(true), strictRoot_(false), - allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) {} - + : allowComments_(true), strictRoot_(false) +{} Features Features::all() { return Features(); } Features Features::strictMode() { Features features; features.allowComments_ = false; features.strictRoot_ = true; - features.allowDroppedNullPlaceholders_ = false; - features.allowNumericKeys_ = false; return features; } // Implementation of class Reader // //////////////////////////////// -bool Reader::containsNewLine(Reader::Location begin, Reader::Location end) { +static bool containsNewLine(Reader::Location begin, Reader::Location end) { for (; begin < end; ++begin) if (*begin == '\n' || *begin == '\r') return true; @@ -310,7 +268,7 @@ bool Reader::containsNewLine(Reader::Location begin, Reader::Location end) { Reader::Reader() : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), - lastValue_(), commentsBefore_(), features_(Features::strictMode()), + lastValue_(), commentsBefore_(), features_(Features::all()), collectComments_() {} Reader::Reader(const Features& features) @@ -320,8 +278,7 @@ Reader::Reader(const Features& features) bool Reader::parse(const std::string& document, Value& root, bool collectComments) { - JSONCPP_STRING documentCopy(document.data(), document.data() + document.capacity()); - std::swap(documentCopy, document_); + document_ = document; const char* begin = document_.c_str(); const char* end = begin + document_.length(); return parse(begin, end, root, collectComments); @@ -333,11 +290,11 @@ bool Reader::parse(std::istream& sin, Value& root, bool collectComments) { // Those would allow streamed input from a file, if parse() were a // template function. - // Since JSONCPP_STRING is reference-counted, this at least does not + // Since std::string is reference-counted, this at least does not // create an extra copy. - JSONCPP_STRING doc; + std::string doc; std::getline(sin, doc, (char)EOF); - return parse(doc.data(), doc.data() + doc.size(), root, collectComments); + return parse(doc, root, collectComments); } bool Reader::parse(const char* beginDoc, @@ -354,12 +311,13 @@ bool Reader::parse(const char* beginDoc, current_ = begin_; lastValueEnd_ = 0; lastValue_ = 0; - commentsBefore_.clear(); + commentsBefore_ = ""; errors_.clear(); while (!nodes_.empty()) nodes_.pop(); nodes_.push(&root); + stackDepth_g = 0; // Yes, this is bad coding, but options are limited. bool successful = readValue(); Token token; skipCommentTokens(token); @@ -382,10 +340,12 @@ bool Reader::parse(const char* beginDoc, } bool Reader::readValue() { - // readValue() may call itself only if it calls readObject() or ReadArray(). - // These methods execute nodes_.push() just before and nodes_.pop)() just after calling readValue(). - // parse() executes one nodes_.push(), so > instead of >=. - if (nodes_.size() > stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue()."); + // This is a non-reentrant way to support a stackLimit. Terrible! + // But this deprecated class has a security problem: Bad input can + // cause a seg-fault. This seems like a fair, binary-compatible way + // to prevent the problem. + if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue()."); + ++stackDepth_g; Token token; skipCommentTokens(token); @@ -393,17 +353,15 @@ bool Reader::readValue() { if (collectComments_ && !commentsBefore_.empty()) { currentValue().setComment(commentsBefore_, commentBefore); - commentsBefore_.clear(); + commentsBefore_ = ""; } switch (token.type_) { case tokenObjectBegin: successful = readObject(token); - currentValue().setOffsetLimit(current_ - begin_); break; case tokenArrayBegin: successful = readArray(token); - currentValue().setOffsetLimit(current_ - begin_); break; case tokenNumber: successful = decodeNumber(token); @@ -415,42 +373,22 @@ bool Reader::readValue() { { Value v(true); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenFalse: { Value v(false); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenNull: { Value v; currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; - case tokenArraySeparator: - case tokenObjectEnd: - case tokenArrayEnd: - if (features_.allowDroppedNullPlaceholders_) { - // "Un-read" the current token and mark the current value as a null - // token. - current_--; - Value v; - currentValue().swapPayload(v); - currentValue().setOffsetStart(current_ - begin_ - 1); - currentValue().setOffsetLimit(current_ - begin_); - break; - } // Else, fall through... + // Else, fall through... default: - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return addError("Syntax error: value, object or array expected.", token); } @@ -459,6 +397,7 @@ bool Reader::readValue() { lastValue_ = ¤tValue(); } + --stackDepth_g; return successful; } @@ -587,9 +526,9 @@ bool Reader::readComment() { return true; } -JSONCPP_STRING Reader::normalizeEOL(Reader::Location begin, Reader::Location end) { - JSONCPP_STRING normalized; - normalized.reserve(static_cast(end - begin)); +static std::string normalizeEOL(Reader::Location begin, Reader::Location end) { + std::string normalized; + normalized.reserve(end - begin); Reader::Location current = begin; while (current != end) { char c = *current++; @@ -609,7 +548,7 @@ JSONCPP_STRING Reader::normalizeEOL(Reader::Location begin, Reader::Location end void Reader::addComment(Location begin, Location end, CommentPlacement placement) { assert(collectComments_); - const JSONCPP_STRING& normalized = normalizeEOL(begin, end); + const std::string& normalized = normalizeEOL(begin, end); if (placement == commentAfterOnSameLine) { assert(lastValue_ != 0); lastValue_->setComment(normalized, placement); @@ -619,7 +558,7 @@ Reader::addComment(Location begin, Location end, CommentPlacement placement) { } bool Reader::readCStyleComment() { - while ((current_ + 1) < end_) { + while (current_ != end_) { Char c = getNextChar(); if (c == '*' && *current_ == '/') break; @@ -648,25 +587,25 @@ void Reader::readNumber() { char c = '0'; // stopgap for already consumed character // integral part while (c >= '0' && c <= '9') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; // fractional part if (c == '.') { - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; while (c >= '0' && c <= '9') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; } // exponential part if (c == 'e' || c == 'E') { - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; if (c == '+' || c == '-') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; while (c >= '0' && c <= '9') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; } } bool Reader::readString() { - Char c = '\0'; + Char c = 0; while (current_ != end_) { c = getNextChar(); if (c == '\\') @@ -677,12 +616,11 @@ bool Reader::readString() { return c == '"'; } -bool Reader::readObject(Token& tokenStart) { +bool Reader::readObject(Token& /*tokenStart*/) { Token tokenName; - JSONCPP_STRING name; + std::string name; Value init(objectValue); currentValue().swapPayload(init); - currentValue().setOffsetStart(tokenStart.start_ - begin_); while (readToken(tokenName)) { bool initialTokenOk = true; while (tokenName.type_ == tokenComment && initialTokenOk) @@ -691,15 +629,10 @@ bool Reader::readObject(Token& tokenStart) { break; if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object return true; - name.clear(); + name = ""; if (tokenName.type_ == tokenString) { if (!decodeString(tokenName, name)) return recoverFromError(tokenObjectEnd); - } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) { - Value numberName; - if (!decodeNumber(tokenName, numberName)) - return recoverFromError(tokenObjectEnd); - name = JSONCPP_STRING(numberName.asCString()); } else { break; } @@ -733,12 +666,11 @@ bool Reader::readObject(Token& tokenStart) { "Missing '}' or object member name", tokenName, tokenObjectEnd); } -bool Reader::readArray(Token& tokenStart) { +bool Reader::readArray(Token& /*tokenStart*/) { Value init(arrayValue); currentValue().swapPayload(init); - currentValue().setOffsetStart(tokenStart.start_ - begin_); skipSpaces(); - if (current_ != end_ && *current_ == ']') // empty array + if (*current_ == ']') // empty array { Token endArray; readToken(endArray); @@ -776,8 +708,6 @@ bool Reader::decodeNumber(Token& token) { if (!decodeNumber(token, decoded)) return false; currentValue().swapPayload(decoded); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return true; } @@ -799,7 +729,7 @@ bool Reader::decodeNumber(Token& token, Value& decoded) { Char c = *current++; if (c < '0' || c > '9') return decodeDouble(token, decoded); - Value::UInt digit(static_cast(c - '0')); + Value::UInt digit(c - '0'); if (value >= threshold) { // We've hit or exceeded the max value divided by 10 (rounded down). If // a) we've only just touched the limit, b) this is the last digit, and @@ -828,17 +758,15 @@ bool Reader::decodeDouble(Token& token) { if (!decodeDouble(token, decoded)) return false; currentValue().swapPayload(decoded); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return true; } bool Reader::decodeDouble(Token& token, Value& decoded) { double value = 0; - JSONCPP_STRING buffer(token.start_, token.end_); - JSONCPP_ISTRINGSTREAM is(buffer); + std::string buffer(token.start_, token.end_); + std::istringstream is(buffer); if (!(is >> value)) - return addError("'" + JSONCPP_STRING(token.start_, token.end_) + + return addError("'" + std::string(token.start_, token.end_) + "' is not a number.", token); decoded = value; @@ -846,18 +774,16 @@ bool Reader::decodeDouble(Token& token, Value& decoded) { } bool Reader::decodeString(Token& token) { - JSONCPP_STRING decoded_string; + std::string decoded_string; if (!decodeString(token, decoded_string)) return false; Value decoded(decoded_string); currentValue().swapPayload(decoded); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return true; } -bool Reader::decodeString(Token& token, JSONCPP_STRING& decoded) { - decoded.reserve(static_cast(token.end_ - token.start_ - 2)); +bool Reader::decodeString(Token& token, std::string& decoded) { + decoded.reserve(token.end_ - token.start_ - 2); Location current = token.start_ + 1; // skip '"' Location end = token.end_ - 1; // do not include '"' while (current != end) { @@ -941,13 +867,13 @@ bool Reader::decodeUnicodeCodePoint(Token& token, bool Reader::decodeUnicodeEscapeSequence(Token& token, Location& current, Location end, - unsigned int& ret_unicode) { + unsigned int& unicode) { if (end - current < 4) return addError( "Bad unicode escape sequence in string: four digits expected.", token, current); - int unicode = 0; + unicode = 0; for (int index = 0; index < 4; ++index) { Char c = *current++; unicode *= 16; @@ -963,12 +889,11 @@ bool Reader::decodeUnicodeEscapeSequence(Token& token, token, current); } - ret_unicode = static_cast(unicode); return true; } bool -Reader::addError(const JSONCPP_STRING& message, Token& token, Location extra) { +Reader::addError(const std::string& message, Token& token, Location extra) { ErrorInfo info; info.token_ = token; info.message_ = message; @@ -978,7 +903,7 @@ Reader::addError(const JSONCPP_STRING& message, Token& token, Location extra) { } bool Reader::recoverFromError(TokenType skipUntilToken) { - size_t const errorCount = errors_.size(); + int errorCount = int(errors_.size()); Token skip; for (;;) { if (!readToken(skip)) @@ -990,7 +915,7 @@ bool Reader::recoverFromError(TokenType skipUntilToken) { return false; } -bool Reader::addErrorAndRecover(const JSONCPP_STRING& message, +bool Reader::addErrorAndRecover(const std::string& message, Token& token, TokenType skipUntilToken) { addError(message, token); @@ -1028,7 +953,7 @@ void Reader::getLocationLineAndColumn(Location location, ++line; } -JSONCPP_STRING Reader::getLocationLineAndColumn(Location location) const { +std::string Reader::getLocationLineAndColumn(Location location) const { int line, column; getLocationLineAndColumn(location, line, column); char buffer[18 + 16 + 16 + 1]; @@ -1037,12 +962,12 @@ JSONCPP_STRING Reader::getLocationLineAndColumn(Location location) const { } // Deprecated. Preserved for backward compatibility -JSONCPP_STRING Reader::getFormatedErrorMessages() const { +std::string Reader::getFormatedErrorMessages() const { return getFormattedErrorMessages(); } -JSONCPP_STRING Reader::getFormattedErrorMessages() const { - JSONCPP_STRING formattedMessage; +std::string Reader::getFormattedErrorMessages() const { + std::string formattedMessage; for (Errors::const_iterator itError = errors_.begin(); itError != errors_.end(); ++itError) { @@ -1057,64 +982,14 @@ JSONCPP_STRING Reader::getFormattedErrorMessages() const { return formattedMessage; } -std::vector Reader::getStructuredErrors() const { - std::vector allErrors; - for (Errors::const_iterator itError = errors_.begin(); - itError != errors_.end(); - ++itError) { - const ErrorInfo& error = *itError; - Reader::StructuredError structured; - structured.offset_start = error.token_.start_ - begin_; - structured.offset_limit = error.token_.end_ - begin_; - structured.message = error.message_; - allErrors.push_back(structured); - } - return allErrors; -} - -bool Reader::pushError(const Value& value, const JSONCPP_STRING& message) { - ptrdiff_t const length = end_ - begin_; - if(value.getOffsetStart() > length - || value.getOffsetLimit() > length) - return false; - Token token; - token.type_ = tokenError; - token.start_ = begin_ + value.getOffsetStart(); - token.end_ = end_ + value.getOffsetLimit(); - ErrorInfo info; - info.token_ = token; - info.message_ = message; - info.extra_ = 0; - errors_.push_back(info); - return true; -} - -bool Reader::pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra) { - ptrdiff_t const length = end_ - begin_; - if(value.getOffsetStart() > length - || value.getOffsetLimit() > length - || extra.getOffsetLimit() > length) - return false; - Token token; - token.type_ = tokenError; - token.start_ = begin_ + value.getOffsetStart(); - token.end_ = begin_ + value.getOffsetLimit(); - ErrorInfo info; - info.token_ = token; - info.message_ = message; - info.extra_ = begin_ + extra.getOffsetStart(); - errors_.push_back(info); - return true; -} - -bool Reader::good() const { - return !errors_.size(); -} +// Reader +///////////////////////// // exact copy of Features class OurFeatures { public: static OurFeatures all(); + OurFeatures(); bool allowComments_; bool strictRoot_; bool allowDroppedNullPlaceholders_; @@ -1129,6 +1004,15 @@ public: // exact copy of Implementation of class Features // //////////////////////////////// +OurFeatures::OurFeatures() + : allowComments_(true), strictRoot_(false) + , allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) + , allowSingleQuotes_(false) + , failIfExtra_(false) + , allowSpecialFloats_(false) +{ +} + OurFeatures OurFeatures::all() { return OurFeatures(); } // Implementation of class Reader @@ -1140,9 +1024,9 @@ public: typedef char Char; typedef const Char* Location; struct StructuredError { - ptrdiff_t offset_start; - ptrdiff_t offset_limit; - JSONCPP_STRING message; + size_t offset_start; + size_t offset_limit; + std::string message; }; OurReader(OurFeatures const& features); @@ -1150,11 +1034,7 @@ public: const char* endDoc, Value& root, bool collectComments = true); - JSONCPP_STRING getFormattedErrorMessages() const; - std::vector getStructuredErrors() const; - bool pushError(const Value& value, const JSONCPP_STRING& message); - bool pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra); - bool good() const; + std::string getFormattedErrorMessages() const; private: OurReader(OurReader const&); // no impl @@ -1190,7 +1070,7 @@ private: class ErrorInfo { public: Token token_; - JSONCPP_STRING message_; + std::string message_; Location extra_; }; @@ -1211,7 +1091,7 @@ private: bool decodeNumber(Token& token); bool decodeNumber(Token& token, Value& decoded); bool decodeString(Token& token); - bool decodeString(Token& token, JSONCPP_STRING& decoded); + bool decodeString(Token& token, std::string& decoded); bool decodeDouble(Token& token); bool decodeDouble(Token& token, Value& decoded); bool decodeUnicodeCodePoint(Token& token, @@ -1222,9 +1102,9 @@ private: Location& current, Location end, unsigned int& unicode); - bool addError(const JSONCPP_STRING& message, Token& token, Location extra = 0); + bool addError(const std::string& message, Token& token, Location extra = 0); bool recoverFromError(TokenType skipUntilToken); - bool addErrorAndRecover(const JSONCPP_STRING& message, + bool addErrorAndRecover(const std::string& message, Token& token, TokenType skipUntilToken); void skipUntilSpace(); @@ -1232,23 +1112,21 @@ private: Char getNextChar(); void getLocationLineAndColumn(Location location, int& line, int& column) const; - JSONCPP_STRING getLocationLineAndColumn(Location location) const; + std::string getLocationLineAndColumn(Location location) const; void addComment(Location begin, Location end, CommentPlacement placement); void skipCommentTokens(Token& token); - static JSONCPP_STRING normalizeEOL(Location begin, Location end); - static bool containsNewLine(Location begin, Location end); - typedef std::stack Nodes; Nodes nodes_; Errors errors_; - JSONCPP_STRING document_; + std::string document_; Location begin_; Location end_; Location current_; Location lastValueEnd_; Value* lastValue_; - JSONCPP_STRING commentsBefore_; + std::string commentsBefore_; + int stackDepth_; OurFeatures const features_; bool collectComments_; @@ -1256,17 +1134,9 @@ private: // complete copy of Read impl, for OurReader -bool OurReader::containsNewLine(OurReader::Location begin, OurReader::Location end) { - for (; begin < end; ++begin) - if (*begin == '\n' || *begin == '\r') - return true; - return false; -} - OurReader::OurReader(OurFeatures const& features) : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), - lastValue_(), commentsBefore_(), - features_(features), collectComments_() { + lastValue_(), commentsBefore_(), features_(features), collectComments_() { } bool OurReader::parse(const char* beginDoc, @@ -1283,17 +1153,18 @@ bool OurReader::parse(const char* beginDoc, current_ = begin_; lastValueEnd_ = 0; lastValue_ = 0; - commentsBefore_.clear(); + commentsBefore_ = ""; errors_.clear(); while (!nodes_.empty()) nodes_.pop(); nodes_.push(&root); + stackDepth_ = 0; bool successful = readValue(); Token token; skipCommentTokens(token); if (features_.failIfExtra_) { - if ((features_.strictRoot_ || token.type_ != tokenError) && token.type_ != tokenEndOfStream) { + if (token.type_ != tokenError && token.type_ != tokenEndOfStream) { addError("Extra non-whitespace after JSON value.", token); return false; } @@ -1317,25 +1188,23 @@ bool OurReader::parse(const char* beginDoc, } bool OurReader::readValue() { - // To preserve the old behaviour we cast size_t to int. - if (static_cast(nodes_.size()) > features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue()."); + if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue()."); + ++stackDepth_; Token token; skipCommentTokens(token); bool successful = true; if (collectComments_ && !commentsBefore_.empty()) { currentValue().setComment(commentsBefore_, commentBefore); - commentsBefore_.clear(); + commentsBefore_ = ""; } switch (token.type_) { case tokenObjectBegin: successful = readObject(token); - currentValue().setOffsetLimit(current_ - begin_); break; case tokenArrayBegin: successful = readArray(token); - currentValue().setOffsetLimit(current_ - begin_); break; case tokenNumber: successful = decodeNumber(token); @@ -1347,48 +1216,36 @@ bool OurReader::readValue() { { Value v(true); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenFalse: { Value v(false); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenNull: { Value v; currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenNaN: { Value v(std::numeric_limits::quiet_NaN()); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenPosInf: { Value v(std::numeric_limits::infinity()); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenNegInf: { Value v(-std::numeric_limits::infinity()); currentValue().swapPayload(v); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); } break; case tokenArraySeparator: @@ -1400,13 +1257,9 @@ bool OurReader::readValue() { current_--; Value v; currentValue().swapPayload(v); - currentValue().setOffsetStart(current_ - begin_ - 1); - currentValue().setOffsetLimit(current_ - begin_); break; } // else, fall through ... default: - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return addError("Syntax error: value, object or array expected.", token); } @@ -1415,6 +1268,7 @@ bool OurReader::readValue() { lastValue_ = ¤tValue(); } + --stackDepth_; return successful; } @@ -1572,29 +1426,10 @@ bool OurReader::readComment() { return true; } -JSONCPP_STRING OurReader::normalizeEOL(OurReader::Location begin, OurReader::Location end) { - JSONCPP_STRING normalized; - normalized.reserve(static_cast(end - begin)); - OurReader::Location current = begin; - while (current != end) { - char c = *current++; - if (c == '\r') { - if (current != end && *current == '\n') - // convert dos EOL - ++current; - // convert Mac EOL - normalized += '\n'; - } else { - normalized += c; - } - } - return normalized; -} - void OurReader::addComment(Location begin, Location end, CommentPlacement placement) { assert(collectComments_); - const JSONCPP_STRING& normalized = normalizeEOL(begin, end); + const std::string& normalized = normalizeEOL(begin, end); if (placement == commentAfterOnSameLine) { assert(lastValue_ != 0); lastValue_->setComment(normalized, placement); @@ -1604,7 +1439,7 @@ OurReader::addComment(Location begin, Location end, CommentPlacement placement) } bool OurReader::readCStyleComment() { - while ((current_ + 1) < end_) { + while (current_ != end_) { Char c = getNextChar(); if (c == '*' && *current_ == '/') break; @@ -1637,20 +1472,20 @@ bool OurReader::readNumber(bool checkInf) { char c = '0'; // stopgap for already consumed character // integral part while (c >= '0' && c <= '9') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; // fractional part if (c == '.') { - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; while (c >= '0' && c <= '9') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; } // exponential part if (c == 'e' || c == 'E') { - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; if (c == '+' || c == '-') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; while (c >= '0' && c <= '9') - c = (current_ = p) < end_ ? *p++ : '\0'; + c = (current_ = p) < end_ ? *p++ : 0; } return true; } @@ -1679,12 +1514,11 @@ bool OurReader::readStringSingleQuote() { return c == '\''; } -bool OurReader::readObject(Token& tokenStart) { +bool OurReader::readObject(Token& /*tokenStart*/) { Token tokenName; - JSONCPP_STRING name; + std::string name; Value init(objectValue); currentValue().swapPayload(init); - currentValue().setOffsetStart(tokenStart.start_ - begin_); while (readToken(tokenName)) { bool initialTokenOk = true; while (tokenName.type_ == tokenComment && initialTokenOk) @@ -1693,7 +1527,7 @@ bool OurReader::readObject(Token& tokenStart) { break; if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object return true; - name.clear(); + name = ""; if (tokenName.type_ == tokenString) { if (!decodeString(tokenName, name)) return recoverFromError(tokenObjectEnd); @@ -1713,7 +1547,7 @@ bool OurReader::readObject(Token& tokenStart) { } if (name.length() >= (1U<<30)) throwRuntimeError("keylength >= 2^30"); if (features_.rejectDupKeys_ && currentValue().isMember(name)) { - JSONCPP_STRING msg = "Duplicate key: '" + name + "'"; + std::string msg = "Duplicate key: '" + name + "'"; return addErrorAndRecover( msg, tokenName, tokenObjectEnd); } @@ -1741,12 +1575,11 @@ bool OurReader::readObject(Token& tokenStart) { "Missing '}' or object member name", tokenName, tokenObjectEnd); } -bool OurReader::readArray(Token& tokenStart) { +bool OurReader::readArray(Token& /*tokenStart*/) { Value init(arrayValue); currentValue().swapPayload(init); - currentValue().setOffsetStart(tokenStart.start_ - begin_); skipSpaces(); - if (current_ != end_ && *current_ == ']') // empty array + if (*current_ == ']') // empty array { Token endArray; readToken(endArray); @@ -1784,8 +1617,6 @@ bool OurReader::decodeNumber(Token& token) { if (!decodeNumber(token, decoded)) return false; currentValue().swapPayload(decoded); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return true; } @@ -1807,7 +1638,7 @@ bool OurReader::decodeNumber(Token& token, Value& decoded) { Char c = *current++; if (c < '0' || c > '9') return decodeDouble(token, decoded); - Value::UInt digit(static_cast(c - '0')); + Value::UInt digit(c - '0'); if (value >= threshold) { // We've hit or exceeded the max value divided by 10 (rounded down). If // a) we've only just touched the limit, b) this is the last digit, and @@ -1834,43 +1665,15 @@ bool OurReader::decodeDouble(Token& token) { if (!decodeDouble(token, decoded)) return false; currentValue().swapPayload(decoded); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return true; } bool OurReader::decodeDouble(Token& token, Value& decoded) { double value = 0; - const int bufferSize = 32; - int count; - ptrdiff_t const length = token.end_ - token.start_; - - // Sanity check to avoid buffer overflow exploits. - if (length < 0) { - return addError("Unable to parse token length", token); - } - size_t const ulength = static_cast(length); - - // Avoid using a string constant for the format control string given to - // sscanf, as this can cause hard to debug crashes on OS X. See here for more - // info: - // - // http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0.1/gcc/Incompatibilities.html - char format[] = "%lf"; - - if (length <= bufferSize) { - Char buffer[bufferSize + 1]; - memcpy(buffer, token.start_, ulength); - buffer[length] = 0; - fixNumericLocaleInput(buffer, buffer + length); - count = sscanf(buffer, format, &value); - } else { - JSONCPP_STRING buffer(token.start_, token.end_); - count = sscanf(buffer.c_str(), format, &value); - } - - if (count != 1) - return addError("'" + JSONCPP_STRING(token.start_, token.end_) + + std::string buffer( token.start_, token.end_ ); + std::istringstream is(buffer); + if (!(is >> value)) + return addError("'" + std::string(token.start_, token.end_) + "' is not a number.", token); decoded = value; @@ -1878,18 +1681,16 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) { } bool OurReader::decodeString(Token& token) { - JSONCPP_STRING decoded_string; + std::string decoded_string; if (!decodeString(token, decoded_string)) return false; Value decoded(decoded_string); currentValue().swapPayload(decoded); - currentValue().setOffsetStart(token.start_ - begin_); - currentValue().setOffsetLimit(token.end_ - begin_); return true; } -bool OurReader::decodeString(Token& token, JSONCPP_STRING& decoded) { - decoded.reserve(static_cast(token.end_ - token.start_ - 2)); +bool OurReader::decodeString(Token& token, std::string& decoded) { + decoded.reserve(token.end_ - token.start_ - 2); Location current = token.start_ + 1; // skip '"' Location end = token.end_ - 1; // do not include '"' while (current != end) { @@ -1973,13 +1774,13 @@ bool OurReader::decodeUnicodeCodePoint(Token& token, bool OurReader::decodeUnicodeEscapeSequence(Token& token, Location& current, Location end, - unsigned int& ret_unicode) { + unsigned int& unicode) { if (end - current < 4) return addError( "Bad unicode escape sequence in string: four digits expected.", token, current); - int unicode = 0; + unicode = 0; for (int index = 0; index < 4; ++index) { Char c = *current++; unicode *= 16; @@ -1995,12 +1796,11 @@ bool OurReader::decodeUnicodeEscapeSequence(Token& token, token, current); } - ret_unicode = static_cast(unicode); return true; } bool -OurReader::addError(const JSONCPP_STRING& message, Token& token, Location extra) { +OurReader::addError(const std::string& message, Token& token, Location extra) { ErrorInfo info; info.token_ = token; info.message_ = message; @@ -2010,7 +1810,7 @@ OurReader::addError(const JSONCPP_STRING& message, Token& token, Location extra) } bool OurReader::recoverFromError(TokenType skipUntilToken) { - size_t errorCount = errors_.size(); + int errorCount = int(errors_.size()); Token skip; for (;;) { if (!readToken(skip)) @@ -2022,7 +1822,7 @@ bool OurReader::recoverFromError(TokenType skipUntilToken) { return false; } -bool OurReader::addErrorAndRecover(const JSONCPP_STRING& message, +bool OurReader::addErrorAndRecover(const std::string& message, Token& token, TokenType skipUntilToken) { addError(message, token); @@ -2060,7 +1860,7 @@ void OurReader::getLocationLineAndColumn(Location location, ++line; } -JSONCPP_STRING OurReader::getLocationLineAndColumn(Location location) const { +std::string OurReader::getLocationLineAndColumn(Location location) const { int line, column; getLocationLineAndColumn(location, line, column); char buffer[18 + 16 + 16 + 1]; @@ -2068,8 +1868,8 @@ JSONCPP_STRING OurReader::getLocationLineAndColumn(Location location) const { return buffer; } -JSONCPP_STRING OurReader::getFormattedErrorMessages() const { - JSONCPP_STRING formattedMessage; +std::string OurReader::getFormattedErrorMessages() const { + std::string formattedMessage; for (Errors::const_iterator itError = errors_.begin(); itError != errors_.end(); ++itError) { @@ -2084,60 +1884,6 @@ JSONCPP_STRING OurReader::getFormattedErrorMessages() const { return formattedMessage; } -std::vector OurReader::getStructuredErrors() const { - std::vector allErrors; - for (Errors::const_iterator itError = errors_.begin(); - itError != errors_.end(); - ++itError) { - const ErrorInfo& error = *itError; - OurReader::StructuredError structured; - structured.offset_start = error.token_.start_ - begin_; - structured.offset_limit = error.token_.end_ - begin_; - structured.message = error.message_; - allErrors.push_back(structured); - } - return allErrors; -} - -bool OurReader::pushError(const Value& value, const JSONCPP_STRING& message) { - ptrdiff_t length = end_ - begin_; - if(value.getOffsetStart() > length - || value.getOffsetLimit() > length) - return false; - Token token; - token.type_ = tokenError; - token.start_ = begin_ + value.getOffsetStart(); - token.end_ = end_ + value.getOffsetLimit(); - ErrorInfo info; - info.token_ = token; - info.message_ = message; - info.extra_ = 0; - errors_.push_back(info); - return true; -} - -bool OurReader::pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra) { - ptrdiff_t length = end_ - begin_; - if(value.getOffsetStart() > length - || value.getOffsetLimit() > length - || extra.getOffsetLimit() > length) - return false; - Token token; - token.type_ = tokenError; - token.start_ = begin_ + value.getOffsetStart(); - token.end_ = begin_ + value.getOffsetLimit(); - ErrorInfo info; - info.token_ = token; - info.message_ = message; - info.extra_ = begin_ + extra.getOffsetStart(); - errors_.push_back(info); - return true; -} - -bool OurReader::good() const { - return !errors_.size(); -} - class OurCharReader : public CharReader { bool const collectComments_; @@ -2149,9 +1895,9 @@ public: : collectComments_(collectComments) , reader_(features) {} - bool parse( + virtual bool parse( char const* beginDoc, char const* endDoc, - Value* root, JSONCPP_STRING* errs) JSONCPP_OVERRIDE { + Value* root, std::string* errs) { bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_); if (errs) { *errs = reader_.getFormattedErrorMessages(); @@ -2181,7 +1927,7 @@ CharReader* CharReaderBuilder::newCharReader() const features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); return new OurCharReader(collectComments, features); } -static void getValidReaderKeys(std::set* valid_keys) +static void getValidReaderKeys(std::set* valid_keys) { valid_keys->clear(); valid_keys->insert("collectComments"); @@ -2200,19 +1946,19 @@ bool CharReaderBuilder::validate(Json::Value* invalid) const Json::Value my_invalid; if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL Json::Value& inv = *invalid; - std::set valid_keys; + std::set valid_keys; getValidReaderKeys(&valid_keys); Value::Members keys = settings_.getMemberNames(); size_t n = keys.size(); for (size_t i = 0; i < n; ++i) { - JSONCPP_STRING const& key = keys[i]; + std::string const& key = keys[i]; if (valid_keys.find(key) == valid_keys.end()) { inv[key] = settings_[key]; } } return 0u == inv.size(); } -Value& CharReaderBuilder::operator[](JSONCPP_STRING key) +Value& CharReaderBuilder::operator[](std::string key) { return settings_[key]; } @@ -2225,7 +1971,6 @@ void CharReaderBuilder::strictMode(Json::Value* settings) (*settings)["allowDroppedNullPlaceholders"] = false; (*settings)["allowNumericKeys"] = false; (*settings)["allowSingleQuotes"] = false; - (*settings)["stackLimit"] = 1000; (*settings)["failIfExtra"] = true; (*settings)["rejectDupKeys"] = true; (*settings)["allowSpecialFloats"] = false; @@ -2252,12 +1997,12 @@ void CharReaderBuilder::setDefaults(Json::Value* settings) // global functions bool parseFromStream( - CharReader::Factory const& fact, JSONCPP_ISTREAM& sin, - Value* root, JSONCPP_STRING* errs) + CharReader::Factory const& fact, std::istream& sin, + Value* root, std::string* errs) { - JSONCPP_OSTRINGSTREAM ssin; + std::ostringstream ssin; ssin << sin.rdbuf(); - JSONCPP_STRING doc = ssin.str(); + std::string doc = ssin.str(); char const* begin = doc.data(); char const* end = begin + doc.size(); // Note that we do not actually need a null-terminator. @@ -2265,16 +2010,16 @@ bool parseFromStream( return reader->parse(begin, end, root, errs); } -JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) { +std::istream& operator>>(std::istream& sin, Value& root) { CharReaderBuilder b; - JSONCPP_STRING errs; + std::string errs; bool ok = parseFromStream(b, sin, &root, &errs); if (!ok) { fprintf(stderr, "Error from reader: %s", errs.c_str()); - throwRuntimeError(errs); + throwRuntimeError("reader error"); } return sin; } @@ -2294,7 +2039,7 @@ JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) { // Beginning of content of file: src/lib_json/json_valueiterator.inl // ////////////////////////////////////////////////////////////////////// -// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -2388,12 +2133,12 @@ UInt ValueIteratorBase::index() const { return Value::UInt(-1); } -JSONCPP_STRING ValueIteratorBase::name() const { +std::string ValueIteratorBase::name() const { char const* keey; char const* end; keey = memberName(&end); - if (!keey) return JSONCPP_STRING(); - return JSONCPP_STRING(keey, end); + if (!keey) return std::string(); + return std::string(keey, end); } char const* ValueIteratorBase::memberName() const { @@ -2425,9 +2170,6 @@ ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator& current) : ValueIteratorBase(current) {} -ValueConstIterator::ValueConstIterator(ValueIterator const& other) - : ValueIteratorBase(other) {} - ValueConstIterator& ValueConstIterator:: operator=(const ValueIteratorBase& other) { copy(other); @@ -2448,9 +2190,7 @@ ValueIterator::ValueIterator(const Value::ObjectValues::iterator& current) : ValueIteratorBase(current) {} ValueIterator::ValueIterator(const ValueConstIterator& other) - : ValueIteratorBase(other) { - throwRuntimeError("ConstIterator to Iterator should never be allowed."); -} + : ValueIteratorBase(other) {} ValueIterator::ValueIterator(const ValueIterator& other) : ValueIteratorBase(other) {} @@ -2475,7 +2215,7 @@ ValueIterator& ValueIterator::operator=(const SelfType& other) { // Beginning of content of file: src/lib_json/json_value.cpp // ////////////////////////////////////////////////////////////////////// -// Copyright 2011 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2011 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -2495,7 +2235,9 @@ ValueIterator& ValueIterator::operator=(const SelfType& other) { #endif #include // size_t #include // min() - +#if defined(__BORLANDC__) +#include +#endif #define JSON_ASSERT_UNREACHABLE assert(false) namespace Json { @@ -2506,24 +2248,13 @@ namespace Json { #if defined(__ARMEL__) #define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) #else +// This exists for binary compatibility only. Use nullRef. +const Value Value::null; #define ALIGNAS(byte_alignment) #endif -//static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = { 0 }; -//const unsigned char& kNullRef = kNull[0]; -//const Value& Value::null = reinterpret_cast(kNullRef); -//const Value& Value::nullRef = null; - -// static -Value const& Value::nullSingleton() -{ - static Value const nullStatic; - return nullStatic; -} - -// for backwards compatibility, we'll leave these global references around, but DO NOT -// use them in JSONCPP library code any more! -Value const& Value::null = Value::nullSingleton(); -Value const& Value::nullRef = Value::nullSingleton(); +static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = { 0 }; +const unsigned char& kNullRef = kNull[0]; +const Value& Value::nullRef = reinterpret_cast(kNullRef); const Int Value::minInt = Int(~(UInt(-1) / 2)); const Int Value::maxInt = Int(UInt(-1) / 2); @@ -2544,14 +2275,11 @@ const LargestUInt Value::maxLargestUInt = LargestUInt(-1); #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) template static inline bool InRange(double d, T min, U max) { - // The casts can lose precision, but we are looking only for - // an approximate range. Might fail on edge cases though. ~cdunn - //return d >= static_cast(min) && d <= static_cast(max); return d >= min && d <= max; } #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) static inline double integerToDouble(Json::UInt64 value) { - return static_cast(Int64(value / 2)) * 2.0 + static_cast(Int64(value & 1)); + return static_cast(Int64(value / 2)) * 2.0 + Int64(value & 1); } template static inline double integerToDouble(T value) { @@ -2572,11 +2300,10 @@ static inline bool InRange(double d, T min, U max) { * @return Pointer on the duplicate instance of string. */ static inline char* duplicateStringValue(const char* value, - size_t length) -{ + size_t length) { // Avoid an integer overflow in the call to malloc below by limiting length // to a sane value. - if (length >= static_cast(Value::maxInt)) + if (length >= (size_t)Value::maxInt) length = Value::maxInt - 1; char* newString = static_cast(malloc(length + 1)); @@ -2598,7 +2325,7 @@ static inline char* duplicateAndPrefixStringValue( { // Avoid an integer overflow in the call to malloc below by limiting length // to a sane value. - JSON_ASSERT_MESSAGE(length <= static_cast(Value::maxInt) - sizeof(unsigned) - 1U, + JSON_ASSERT_MESSAGE(length <= (unsigned)Value::maxInt - sizeof(unsigned) - 1U, "in Json::Value::duplicateAndPrefixStringValue(): " "length too big for prefixing"); unsigned actualLength = length + static_cast(sizeof(unsigned)) + 1U; @@ -2627,29 +2354,7 @@ inline static void decodePrefixedString( } /** Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue(). */ -#if JSONCPP_USING_SECURE_MEMORY -static inline void releasePrefixedStringValue(char* value) { - unsigned length = 0; - char const* valueDecoded; - decodePrefixedString(true, value, &length, &valueDecoded); - size_t const size = sizeof(unsigned) + length + 1U; - memset(value, 0, size); - free(value); -} -static inline void releaseStringValue(char* value, unsigned length) { - // length==0 => we allocated the strings memory - size_t size = (length==0) ? strlen(value) : length; - memset(value, 0, size); - free(value); -} -#else // !JSONCPP_USING_SECURE_MEMORY -static inline void releasePrefixedStringValue(char* value) { - free(value); -} -static inline void releaseStringValue(char* value, unsigned) { - free(value); -} -#endif // JSONCPP_USING_SECURE_MEMORY +static inline void releaseStringValue(char* value) { free(value); } } // namespace Json @@ -2667,26 +2372,26 @@ static inline void releaseStringValue(char* value, unsigned) { namespace Json { -Exception::Exception(JSONCPP_STRING const& msg) +Exception::Exception(std::string const& msg) : msg_(msg) {} -Exception::~Exception() JSONCPP_NOEXCEPT +Exception::~Exception() throw() {} -char const* Exception::what() const JSONCPP_NOEXCEPT +char const* Exception::what() const throw() { return msg_.c_str(); } -RuntimeError::RuntimeError(JSONCPP_STRING const& msg) +RuntimeError::RuntimeError(std::string const& msg) : Exception(msg) {} -LogicError::LogicError(JSONCPP_STRING const& msg) +LogicError::LogicError(std::string const& msg) : Exception(msg) {} -JSONCPP_NORETURN void throwRuntimeError(JSONCPP_STRING const& msg) +JSONCPP_NORETURN void throwRuntimeError(std::string const& msg) { throw RuntimeError(msg); } -JSONCPP_NORETURN void throwLogicError(JSONCPP_STRING const& msg) +JSONCPP_NORETURN void throwLogicError(std::string const& msg) { throw LogicError(msg); } @@ -2699,17 +2404,16 @@ JSONCPP_NORETURN void throwLogicError(JSONCPP_STRING const& msg) // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// -Value::CommentInfo::CommentInfo() : comment_(0) -{} +Value::CommentInfo::CommentInfo() : comment_(0) {} Value::CommentInfo::~CommentInfo() { if (comment_) - releaseStringValue(comment_, 0u); + releaseStringValue(comment_); } void Value::CommentInfo::setComment(const char* text, size_t len) { if (comment_) { - releaseStringValue(comment_, 0u); + releaseStringValue(comment_); comment_ = 0; } JSON_ASSERT(text != 0); @@ -2734,34 +2438,28 @@ void Value::CommentInfo::setComment(const char* text, size_t len) { Value::CZString::CZString(ArrayIndex aindex) : cstr_(0), index_(aindex) {} Value::CZString::CZString(char const* str, unsigned ulength, DuplicationPolicy allocate) - : cstr_(str) { + : cstr_(str) +{ // allocate != duplicate storage_.policy_ = allocate & 0x3; storage_.length_ = ulength & 0x3FFFFFFF; } -Value::CZString::CZString(const CZString& other) { - cstr_ = (other.storage_.policy_ != noDuplication && other.cstr_ != 0 - ? duplicateStringValue(other.cstr_, other.storage_.length_) - : other.cstr_); - storage_.policy_ = static_cast(other.cstr_ +Value::CZString::CZString(const CZString& other) + : cstr_(other.storage_.policy_ != noDuplication && other.cstr_ != 0 + ? duplicateStringValue(other.cstr_, other.storage_.length_) + : other.cstr_) +{ + storage_.policy_ = (other.cstr_ ? (static_cast(other.storage_.policy_) == noDuplication ? noDuplication : duplicate) - : static_cast(other.storage_.policy_)) & 3U; + : static_cast(other.storage_.policy_)); storage_.length_ = other.storage_.length_; } -#if JSON_HAS_RVALUE_REFERENCES -Value::CZString::CZString(CZString&& other) - : cstr_(other.cstr_), index_(other.index_) { - other.cstr_ = nullptr; -} -#endif - Value::CZString::~CZString() { - if (cstr_ && storage_.policy_ == duplicate) { - releaseStringValue(const_cast(cstr_), storage_.length_ + 1u); //+1 for null terminating character for sake of completeness but not actually necessary - } + if (cstr_ && storage_.policy_ == duplicate) + releaseStringValue(const_cast(cstr_)); } void Value::CZString::swap(CZString& other) { @@ -2769,29 +2467,18 @@ void Value::CZString::swap(CZString& other) { std::swap(index_, other.index_); } -Value::CZString& Value::CZString::operator=(const CZString& other) { - cstr_ = other.cstr_; - index_ = other.index_; +Value::CZString& Value::CZString::operator=(CZString other) { + swap(other); return *this; } -#if JSON_HAS_RVALUE_REFERENCES -Value::CZString& Value::CZString::operator=(CZString&& other) { - cstr_ = other.cstr_; - index_ = other.index_; - other.cstr_ = nullptr; - return *this; -} -#endif - bool Value::CZString::operator<(const CZString& other) const { if (!cstr_) return index_ < other.index_; //return strcmp(cstr_, other.cstr_) < 0; // Assume both are strings. unsigned this_len = this->storage_.length_; unsigned other_len = other.storage_.length_; - unsigned min_len = std::min(this_len, other_len); - JSON_ASSERT(this->cstr_ && other.cstr_); + unsigned min_len = std::min(this_len, other_len); int comp = memcmp(this->cstr_, other.cstr_, min_len); if (comp < 0) return true; if (comp > 0) return false; @@ -2805,7 +2492,6 @@ bool Value::CZString::operator==(const CZString& other) const { unsigned this_len = this->storage_.length_; unsigned other_len = other.storage_.length_; if (this_len != other_len) return false; - JSON_ASSERT(this->cstr_ && other.cstr_); int comp = memcmp(this->cstr_, other.cstr_, this_len); return comp == 0; } @@ -2830,7 +2516,6 @@ bool Value::CZString::isStaticString() const { return storage_.policy_ == noDupl * This optimization is used in ValueInternalMap fast allocator. */ Value::Value(ValueType vtype) { - static char const emptyString[] = ""; initBasic(vtype); switch (vtype) { case nullValue: @@ -2843,8 +2528,7 @@ Value::Value(ValueType vtype) { value_.real_ = 0.0; break; case stringValue: - // allocated_ == false, so this is safe. - value_.string_ = const_cast(static_cast(emptyString)); + value_.string_ = 0; break; case arrayValue: case objectValue: @@ -2885,7 +2569,6 @@ Value::Value(double value) { Value::Value(const char* value) { initBasic(stringValue, true); - JSON_ASSERT_MESSAGE(value != NULL, "Null Value Passed to Value Constructor"); value_.string_ = duplicateAndPrefixStringValue(value, static_cast(strlen(value))); } @@ -2895,7 +2578,7 @@ Value::Value(const char* beginValue, const char* endValue) { duplicateAndPrefixStringValue(beginValue, static_cast(endValue - beginValue)); } -Value::Value(const JSONCPP_STRING& value) { +Value::Value(const std::string& value) { initBasic(stringValue, true); value_.string_ = duplicateAndPrefixStringValue(value.data(), static_cast(value.length())); @@ -2921,7 +2604,7 @@ Value::Value(bool value) { Value::Value(Value const& other) : type_(other.type_), allocated_(false) , - comments_(0), start_(other.start_), limit_(other.limit_) + comments_(0) { switch (type_) { case nullValue: @@ -2962,14 +2645,6 @@ Value::Value(Value const& other) } } -#if JSON_HAS_RVALUE_REFERENCES -// Move constructor -Value::Value(Value&& other) { - initBasic(nullValue); - swap(other); -} -#endif - Value::~Value() { switch (type_) { case nullValue: @@ -2980,7 +2655,7 @@ Value::~Value() { break; case stringValue: if (allocated_) - releasePrefixedStringValue(value_.string_); + releaseStringValue(value_.string_); break; case arrayValue: case objectValue: @@ -2990,13 +2665,13 @@ Value::~Value() { JSON_ASSERT_UNREACHABLE; } - delete[] comments_; - - value_.uint_ = 0; + if (comments_) + delete[] comments_; } -Value& Value::operator=(Value other) { - swap(other); +Value &Value::operator=(const Value &other) { + Value temp(other); + swap(temp); return *this; } @@ -3010,24 +2685,9 @@ void Value::swapPayload(Value& other) { other.allocated_ = temp2 & 0x1; } -void Value::copyPayload(const Value& other) { - type_ = other.type_; - value_ = other.value_; - allocated_ = other.allocated_; -} - void Value::swap(Value& other) { swapPayload(other); std::swap(comments_, other.comments_); - std::swap(start_, other.start_); - std::swap(limit_, other.limit_); -} - -void Value::copy(const Value& other) { - copyPayload(other); - comments_ = other.comments_; - start_ = other.start_; - limit_ = other.limit_; } ValueType Value::type() const { return type_; } @@ -3067,8 +2727,7 @@ bool Value::operator<(const Value& other) const { char const* other_str; decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str); - unsigned min_len = std::min(this_len, other_len); - JSON_ASSERT(this_str && other_str); + unsigned min_len = std::min(this_len, other_len); int comp = memcmp(this_str, other_str, min_len); if (comp < 0) return true; if (comp > 0) return false; @@ -3124,7 +2783,6 @@ bool Value::operator==(const Value& other) const { decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str); if (this_len != other_len) return false; - JSON_ASSERT(this_str && other_str); int comp = memcmp(this_str, other_str, this_len); return comp == 0; } @@ -3150,18 +2808,6 @@ const char* Value::asCString() const { return this_str; } -#if JSONCPP_USING_SECURE_MEMORY -unsigned Value::getCStringLength() const { - JSON_ASSERT_MESSAGE(type_ == stringValue, - "in Json::Value::asCString(): requires stringValue"); - if (value_.string_ == 0) return 0; - unsigned this_len; - char const* this_str; - decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); - return this_len; -} -#endif - bool Value::getString(char const** str, char const** cend) const { if (type_ != stringValue) return false; if (value_.string_ == 0) return false; @@ -3171,7 +2817,7 @@ bool Value::getString(char const** str, char const** cend) const { return true; } -JSONCPP_STRING Value::asString() const { +std::string Value::asString() const { switch (type_) { case nullValue: return ""; @@ -3181,7 +2827,7 @@ JSONCPP_STRING Value::asString() const { unsigned this_len; char const* this_str; decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); - return JSONCPP_STRING(this_str, this_len); + return std::string(this_str, this_len); } case booleanValue: return value_.bool_ ? "true" : "false"; @@ -3341,8 +2987,7 @@ float Value::asFloat() const { #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) return static_cast(value_.uint_); #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) - // This can fail (silently?) if the value is bigger than MAX_FLOAT. - return static_cast(integerToDouble(value_.uint_)); + return integerToDouble(value_.uint_); #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) case realValue: return static_cast(value_.real_); @@ -3380,7 +3025,7 @@ bool Value::isConvertibleTo(ValueType other) const { case nullValue: return (isNumeric() && asDouble() == 0.0) || (type_ == booleanValue && value_.bool_ == false) || - (type_ == stringValue && asString().empty()) || + (type_ == stringValue && asString() == "") || (type_ == arrayValue && value_.map_->size() == 0) || (type_ == objectValue && value_.map_->size() == 0) || type_ == nullValue; @@ -3445,8 +3090,6 @@ void Value::clear() { JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue || type_ == objectValue, "in Json::Value::clear(): requires complex value"); - start_ = 0; - limit_ = 0; switch (type_) { case arrayValue: case objectValue: @@ -3471,7 +3114,7 @@ void Value::resize(ArrayIndex newSize) { for (ArrayIndex index = newSize; index < oldSize; ++index) { value_.map_->erase(index); } - JSON_ASSERT(size() == newSize); + assert(size() == newSize); } } @@ -3486,7 +3129,7 @@ Value& Value::operator[](ArrayIndex index) { if (it != value_.map_->end() && (*it).first == key) return (*it).second; - ObjectValues::value_type defaultValue(key, nullSingleton()); + ObjectValues::value_type defaultValue(key, nullRef); it = value_.map_->insert(it, defaultValue); return (*it).second; } @@ -3503,11 +3146,11 @@ const Value& Value::operator[](ArrayIndex index) const { type_ == nullValue || type_ == arrayValue, "in Json::Value::operator[](ArrayIndex)const: requires arrayValue"); if (type_ == nullValue) - return nullSingleton(); + return nullRef; CZString key(index); ObjectValues::const_iterator it = value_.map_->find(key); if (it == value_.map_->end()) - return nullSingleton(); + return nullRef; return (*it).second; } @@ -3522,8 +3165,6 @@ void Value::initBasic(ValueType vtype, bool allocated) { type_ = vtype; allocated_ = allocated; comments_ = 0; - start_ = 0; - limit_ = 0; } // Access an object value by name, create a null member if it does not exist. @@ -3541,7 +3182,7 @@ Value& Value::resolveReference(const char* key) { if (it != value_.map_->end() && (*it).first == actualKey) return (*it).second; - ObjectValues::value_type defaultValue(actualKey, nullSingleton()); + ObjectValues::value_type defaultValue(actualKey, nullRef); it = value_.map_->insert(it, defaultValue); Value& value = (*it).second; return value; @@ -3561,7 +3202,7 @@ Value& Value::resolveReference(char const* key, char const* cend) if (it != value_.map_->end() && (*it).first == actualKey) return (*it).second; - ObjectValues::value_type defaultValue(actualKey, nullSingleton()); + ObjectValues::value_type defaultValue(actualKey, nullRef); it = value_.map_->insert(it, defaultValue); Value& value = (*it).second; return value; @@ -3569,7 +3210,7 @@ Value& Value::resolveReference(char const* key, char const* cend) Value Value::get(ArrayIndex index, const Value& defaultValue) const { const Value* value = &((*this)[index]); - return value == &nullSingleton() ? defaultValue : *value; + return value == &nullRef ? defaultValue : *value; } bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } @@ -3588,13 +3229,13 @@ Value const* Value::find(char const* key, char const* cend) const const Value& Value::operator[](const char* key) const { Value const* found = find(key, key + strlen(key)); - if (!found) return nullSingleton(); + if (!found) return nullRef; return *found; } -Value const& Value::operator[](JSONCPP_STRING const& key) const +Value const& Value::operator[](std::string const& key) const { Value const* found = find(key.data(), key.data() + key.length()); - if (!found) return nullSingleton(); + if (!found) return nullRef; return *found; } @@ -3602,7 +3243,7 @@ Value& Value::operator[](const char* key) { return resolveReference(key, key + strlen(key)); } -Value& Value::operator[](const JSONCPP_STRING& key) { +Value& Value::operator[](const std::string& key) { return resolveReference(key.data(), key.data() + key.length()); } @@ -3617,17 +3258,13 @@ Value& Value::operator[](const CppTL::ConstString& key) { Value const& Value::operator[](CppTL::ConstString const& key) const { Value const* found = find(key.c_str(), key.end_c_str()); - if (!found) return nullSingleton(); + if (!found) return nullRef; return *found; } #endif Value& Value::append(const Value& value) { return (*this)[size()] = value; } -#if JSON_HAS_RVALUE_REFERENCES - Value& Value::append(Value&& value) { return (*this)[size()] = value; } -#endif - Value Value::get(char const* key, char const* cend, Value const& defaultValue) const { Value const* found = find(key, cend); @@ -3637,7 +3274,7 @@ Value Value::get(char const* key, Value const& defaultValue) const { return get(key, key + strlen(key), defaultValue); } -Value Value::get(JSONCPP_STRING const& key, Value const& defaultValue) const +Value Value::get(std::string const& key, Value const& defaultValue) const { return get(key.data(), key.data() + key.length(), defaultValue); } @@ -3660,7 +3297,7 @@ bool Value::removeMember(const char* key, Value* removed) { return removeMember(key, key + strlen(key), removed); } -bool Value::removeMember(JSONCPP_STRING const& key, Value* removed) +bool Value::removeMember(std::string const& key, Value* removed) { return removeMember(key.data(), key.data() + key.length(), removed); } @@ -3669,13 +3306,13 @@ Value Value::removeMember(const char* key) JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue, "in Json::Value::removeMember(): requires objectValue"); if (type_ == nullValue) - return nullSingleton(); + return nullRef; Value removed; // null removeMember(key, key + strlen(key), &removed); return removed; // still null if removeMember() did nothing } -Value Value::removeMember(const JSONCPP_STRING& key) +Value Value::removeMember(const std::string& key) { return removeMember(key.c_str()); } @@ -3719,7 +3356,7 @@ bool Value::isMember(char const* key) const { return isMember(key, key + strlen(key)); } -bool Value::isMember(JSONCPP_STRING const& key) const +bool Value::isMember(std::string const& key) const { return isMember(key.data(), key.data() + key.length()); } @@ -3741,7 +3378,7 @@ Value::Members Value::getMemberNames() const { ObjectValues::const_iterator it = value_.map_->begin(); ObjectValues::const_iterator itEnd = value_.map_->end(); for (; it != itEnd; ++it) { - members.push_back(JSONCPP_STRING((*it).first.data(), + members.push_back(std::string((*it).first.data(), (*it).first.length())); } return members; @@ -3784,11 +3421,7 @@ bool Value::isBool() const { return type_ == booleanValue; } bool Value::isInt() const { switch (type_) { case intValue: -#if defined(JSON_HAS_INT64) return value_.int_ >= minInt && value_.int_ <= maxInt; -#else - return true; -#endif case uintValue: return value_.uint_ <= UInt(maxInt); case realValue: @@ -3803,17 +3436,9 @@ bool Value::isInt() const { bool Value::isUInt() const { switch (type_) { case intValue: -#if defined(JSON_HAS_INT64) return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt); -#else - return value_.int_ >= 0; -#endif case uintValue: -#if defined(JSON_HAS_INT64) return value_.uint_ <= maxUInt; -#else - return true; -#endif case realValue: return value_.real_ >= 0 && value_.real_ <= maxUInt && IsIntegral(value_.real_); @@ -3864,28 +3489,16 @@ bool Value::isUInt64() const { } bool Value::isIntegral() const { - switch (type_) { - case intValue: - case uintValue: - return true; - case realValue: #if defined(JSON_HAS_INT64) - // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a - // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we - // require the value to be strictly less than the limit. - return value_.real_ >= double(minInt64) && value_.real_ < maxUInt64AsDouble && IsIntegral(value_.real_); + return isInt64() || isUInt64(); #else - return value_.real_ >= minInt && value_.real_ <= maxUInt && IsIntegral(value_.real_); -#endif // JSON_HAS_INT64 - default: - break; - } - return false; + return isInt() || isUInt(); +#endif } -bool Value::isDouble() const { return type_ == intValue || type_ == uintValue || type_ == realValue; } +bool Value::isDouble() const { return type_ == realValue || isIntegral(); } -bool Value::isNumeric() const { return isDouble(); } +bool Value::isNumeric() const { return isIntegral() || isDouble(); } bool Value::isString() const { return type_ == stringValue; } @@ -3907,7 +3520,7 @@ void Value::setComment(const char* comment, CommentPlacement placement) { setComment(comment, strlen(comment), placement); } -void Value::setComment(const JSONCPP_STRING& comment, CommentPlacement placement) { +void Value::setComment(const std::string& comment, CommentPlacement placement) { setComment(comment.c_str(), comment.length(), placement); } @@ -3915,28 +3528,15 @@ bool Value::hasComment(CommentPlacement placement) const { return comments_ != 0 && comments_[placement].comment_ != 0; } -JSONCPP_STRING Value::getComment(CommentPlacement placement) const { +std::string Value::getComment(CommentPlacement placement) const { if (hasComment(placement)) return comments_[placement].comment_; return ""; } -void Value::setOffsetStart(ptrdiff_t start) { start_ = start; } - -void Value::setOffsetLimit(ptrdiff_t limit) { limit_ = limit; } - -ptrdiff_t Value::getOffsetStart() const { return start_; } - -ptrdiff_t Value::getOffsetLimit() const { return limit_; } - -JSONCPP_STRING Value::toStyledString() const { - StreamWriterBuilder builder; - - JSONCPP_STRING out = this->hasComment(commentBefore) ? "\n" : ""; - out += Json::writeString(builder, *this); - out += "\n"; - - return out; +std::string Value::toStyledString() const { + StyledWriter writer; + return writer.write(*this); } Value::const_iterator Value::begin() const { @@ -4002,20 +3602,19 @@ PathArgument::PathArgument(ArrayIndex index) PathArgument::PathArgument(const char* key) : key_(key), index_(), kind_(kindKey) {} -PathArgument::PathArgument(const JSONCPP_STRING& key) +PathArgument::PathArgument(const std::string& key) : key_(key.c_str()), index_(), kind_(kindKey) {} // class Path // ////////////////////////////////////////////////////////////////// -Path::Path(const JSONCPP_STRING& path, +Path::Path(const std::string& path, const PathArgument& a1, const PathArgument& a2, const PathArgument& a3, const PathArgument& a4, const PathArgument& a5) { InArgs in; - in.reserve(5); in.push_back(&a1); in.push_back(&a2); in.push_back(&a3); @@ -4024,7 +3623,7 @@ Path::Path(const JSONCPP_STRING& path, makePath(path, in); } -void Path::makePath(const JSONCPP_STRING& path, const InArgs& in) { +void Path::makePath(const std::string& path, const InArgs& in) { const char* current = path.c_str(); const char* end = current + path.length(); InArgs::const_iterator itInArg = in.begin(); @@ -4039,23 +3638,23 @@ void Path::makePath(const JSONCPP_STRING& path, const InArgs& in) { index = index * 10 + ArrayIndex(*current - '0'); args_.push_back(index); } - if (current == end || *++current != ']') + if (current == end || *current++ != ']') invalidPath(path, int(current - path.c_str())); } else if (*current == '%') { addPathInArg(path, in, itInArg, PathArgument::kindKey); ++current; - } else if (*current == '.' || *current == ']') { + } else if (*current == '.') { ++current; } else { const char* beginName = current; while (current != end && !strchr("[.", *current)) ++current; - args_.push_back(JSONCPP_STRING(beginName, current)); + args_.push_back(std::string(beginName, current)); } } } -void Path::addPathInArg(const JSONCPP_STRING& /*path*/, +void Path::addPathInArg(const std::string& /*path*/, const InArgs& in, InArgs::const_iterator& itInArg, PathArgument::Kind kind) { @@ -4064,11 +3663,11 @@ void Path::addPathInArg(const JSONCPP_STRING& /*path*/, } else if ((*itInArg)->kind_ != kind) { // Error: bad argument type } else { - args_.push_back(**itInArg++); + args_.push_back(**itInArg); } } -void Path::invalidPath(const JSONCPP_STRING& /*path*/, int /*location*/) { +void Path::invalidPath(const std::string& /*path*/, int /*location*/) { // Error: invalid path. } @@ -4079,19 +3678,16 @@ const Value& Path::resolve(const Value& root) const { if (arg.kind_ == PathArgument::kindIndex) { if (!node->isArray() || !node->isValidIndex(arg.index_)) { // Error: unable to resolve path (array value expected at position... - return Value::null; } node = &((*node)[arg.index_]); } else if (arg.kind_ == PathArgument::kindKey) { if (!node->isObject()) { // Error: unable to resolve path (object value expected at position...) - return Value::null; } node = &((*node)[arg.key_]); - if (node == &Value::nullSingleton()) { + if (node == &Value::nullRef) { // Error: unable to resolve path (object has no member named '' at // position...) - return Value::null; } } } @@ -4110,7 +3706,7 @@ Value Path::resolve(const Value& root, const Value& defaultValue) const { if (!node->isObject()) return defaultValue; node = &((*node)[arg.key_]); - if (node == &Value::nullSingleton()) + if (node == &Value::nullRef) return defaultValue; } } @@ -4151,7 +3747,7 @@ Value& Path::make(Value& root) const { // Beginning of content of file: src/lib_json/json_writer.cpp // ////////////////////////////////////////////////////////////////////// -// Copyright 2011 Baptiste Lepilleur and The JsonCpp Authors +// Copyright 2011 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE @@ -4169,53 +3765,35 @@ Value& Path::make(Value& root) const { #include #include +#if defined(__BORLANDC__) +#include +#endif #if defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1800 // Between VC++ 6.0 and VC++ 11.0 #include #define isfinite _finite #elif defined(__sun) && defined(__SVR4) //Solaris -#if !defined(isfinite) #include #define isfinite finite -#endif -#elif defined(_AIX) -#if !defined(isfinite) -#include -#define isfinite finite -#endif -#elif defined(__hpux) -#if !defined(isfinite) -#if defined(__ia64) && !defined(finite) -#define isfinite(x) ((sizeof(x) == sizeof(float) ? \ - _Isfinitef(x) : _IsFinite(x))) -#else -#include -#define isfinite finite -#endif -#endif #else #include -#if !(defined(__QNXNTO__)) // QNX already defines isfinite #define isfinite std::isfinite #endif -#endif #if defined(_MSC_VER) -#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above +#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above #define snprintf sprintf_s #elif _MSC_VER >= 1900 // VC++ 14.0 and above #define snprintf std::snprintf #else #define snprintf _snprintf #endif -#elif defined(__ANDROID__) || defined(__QNXNTO__) +#elif defined(__ANDROID__) #define snprintf snprintf #elif __cplusplus >= 201103L -#if !defined(__MINGW32__) && !defined(__CYGWIN__) #define snprintf std::snprintf #endif -#endif -#if defined(__BORLANDC__) +#if defined(__BORLANDC__) #include #define isfinite _finite #define snprintf _snprintf @@ -4228,10 +3806,10 @@ Value& Path::make(Value& root) const { namespace Json { -#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) -typedef std::unique_ptr StreamWriterPtr; +#if JSON_HAS_UNIQUE_PTR +typedef std::unique_ptr const StreamWriterPtr; #else -typedef std::auto_ptr StreamWriterPtr; +typedef std::auto_ptr StreamWriterPtr; #endif static bool containsControlCharacter(const char* str) { @@ -4252,7 +3830,7 @@ static bool containsControlCharacter0(const char* str, unsigned len) { return false; } -JSONCPP_STRING valueToString(LargestInt value) { +std::string valueToString(LargestInt value) { UIntToStringBuffer buffer; char* current = buffer + sizeof(buffer); if (value == Value::minLargestInt) { @@ -4268,7 +3846,7 @@ JSONCPP_STRING valueToString(LargestInt value) { return current; } -JSONCPP_STRING valueToString(LargestUInt value) { +std::string valueToString(LargestUInt value) { UIntToStringBuffer buffer; char* current = buffer + sizeof(buffer); uintToString(value, current); @@ -4278,39 +3856,30 @@ JSONCPP_STRING valueToString(LargestUInt value) { #if defined(JSON_HAS_INT64) -JSONCPP_STRING valueToString(Int value) { +std::string valueToString(Int value) { return valueToString(LargestInt(value)); } -JSONCPP_STRING valueToString(UInt value) { +std::string valueToString(UInt value) { return valueToString(LargestUInt(value)); } #endif // # if defined(JSON_HAS_INT64) -namespace { -JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int precision) { +std::string valueToString(double value, bool useSpecialFloats, unsigned int precision) { // Allocate a buffer that is more than large enough to store the 16 digits of // precision requested below. - char buffer[36]; - __attribute__((unused)) + char buffer[32]; int len = -1; - char formatString[15]; - snprintf(formatString, sizeof(formatString), "%%.%dg", precision); + char formatString[6]; + sprintf(formatString, "%%.%dg", precision); // Print into the buffer. We need not request the alternative representation // that always has a decimal point because JSON doesn't distingish the // concepts of reals and integers. if (isfinite(value)) { len = snprintf(buffer, sizeof(buffer), formatString, value); - fixNumericLocale(buffer, buffer + len); - - // try to ensure we preserve the fact that this was given to us as a double on input - if (!strchr(buffer, '.') && !strchr(buffer, 'e')) { - strcat(buffer, ".0"); - } - } else { // IEEE standard states that NaN values will not compare to themselves if (value != value) { @@ -4320,29 +3889,30 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p } else { len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "Infinity" : "1e+9999"); } + // For those, we do not need to call fixNumLoc, but it is fast. } assert(len >= 0); + fixNumericLocale(buffer, buffer + len); return buffer; } -} -JSONCPP_STRING valueToString(double value) { return valueToString(value, false, 17); } +std::string valueToString(double value) { return valueToString(value, false, 17); } -JSONCPP_STRING valueToString(bool value) { return value ? "true" : "false"; } +std::string valueToString(bool value) { return value ? "true" : "false"; } -JSONCPP_STRING valueToQuotedString(const char* value) { +std::string valueToQuotedString(const char* value) { if (value == NULL) return ""; // Not sure how to handle unicode... if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter(value)) - return JSONCPP_STRING("\"") + value + "\""; + return std::string("\"") + value + "\""; // We have to walk value and escape any special characters. - // Appending to JSONCPP_STRING is not efficient, but this should be rare. + // Appending to std::string is not efficient, but this should be rare. // (Note: forward slashes are *not* rare, but I am not escaping them.) - JSONCPP_STRING::size_type maxsize = + std::string::size_type maxsize = strlen(value) * 2 + 3; // allescaped+quotes+NULL - JSONCPP_STRING result; + std::string result; result.reserve(maxsize); // to avoid lots of mallocs result += "\""; for (const char* c = value; *c != 0; ++c) { @@ -4378,7 +3948,7 @@ JSONCPP_STRING valueToQuotedString(const char* value) { // sequence from occurring. default: if (isControlCharacter(*c)) { - JSONCPP_OSTRINGSTREAM oss; + std::ostringstream oss; oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast(*c); result += oss.str(); @@ -4407,19 +3977,19 @@ static char const* strnpbrk(char const* s, char const* accept, size_t n) { } return NULL; } -static JSONCPP_STRING valueToQuotedStringN(const char* value, unsigned length) { +static std::string valueToQuotedStringN(const char* value, unsigned length) { if (value == NULL) return ""; // Not sure how to handle unicode... if (strnpbrk(value, "\"\\\b\f\n\r\t", length) == NULL && !containsControlCharacter0(value, length)) - return JSONCPP_STRING("\"") + value + "\""; + return std::string("\"") + value + "\""; // We have to walk value and escape any special characters. - // Appending to JSONCPP_STRING is not efficient, but this should be rare. + // Appending to std::string is not efficient, but this should be rare. // (Note: forward slashes are *not* rare, but I am not escaping them.) - JSONCPP_STRING::size_type maxsize = + std::string::size_type maxsize = length * 2 + 3; // allescaped+quotes+NULL - JSONCPP_STRING result; + std::string result; result.reserve(maxsize); // to avoid lots of mallocs result += "\""; char const* end = value + length; @@ -4456,7 +4026,7 @@ static JSONCPP_STRING valueToQuotedStringN(const char* value, unsigned length) { // sequence from occurring. default: if ((isControlCharacter(*c)) || (*c == 0)) { - JSONCPP_OSTRINGSTREAM oss; + std::ostringstream oss; oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast(*c); result += oss.str(); @@ -4478,28 +4048,21 @@ Writer::~Writer() {} // ////////////////////////////////////////////////////////////////// FastWriter::FastWriter() - : yamlCompatiblityEnabled_(false), dropNullPlaceholders_(false), - omitEndingLineFeed_(false) {} + : yamlCompatiblityEnabled_(false) {} void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; } -void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; } - -void FastWriter::omitEndingLineFeed() { omitEndingLineFeed_ = true; } - -JSONCPP_STRING FastWriter::write(const Value& root) { - document_.clear(); +std::string FastWriter::write(const Value& root) { + document_ = ""; writeValue(root); - if (!omitEndingLineFeed_) - document_ += "\n"; + document_ += "\n"; return document_; } void FastWriter::writeValue(const Value& value) { switch (value.type()) { case nullValue: - if (!dropNullPlaceholders_) - document_ += "null"; + document_ += "null"; break; case intValue: document_ += valueToString(value.asLargestInt()); @@ -4512,7 +4075,7 @@ void FastWriter::writeValue(const Value& value) { break; case stringValue: { - // Is NULL possible for value.string_? No. + // Is NULL possible for value.string_? char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -4524,8 +4087,8 @@ void FastWriter::writeValue(const Value& value) { break; case arrayValue: { document_ += '['; - ArrayIndex size = value.size(); - for (ArrayIndex index = 0; index < size; ++index) { + int size = value.size(); + for (int index = 0; index < size; ++index) { if (index > 0) document_ += ','; writeValue(value[index]); @@ -4537,7 +4100,7 @@ void FastWriter::writeValue(const Value& value) { document_ += '{'; for (Value::Members::iterator it = members.begin(); it != members.end(); ++it) { - const JSONCPP_STRING& name = *it; + const std::string& name = *it; if (it != members.begin()) document_ += ','; document_ += valueToQuotedStringN(name.data(), static_cast(name.length())); @@ -4555,10 +4118,10 @@ void FastWriter::writeValue(const Value& value) { StyledWriter::StyledWriter() : rightMargin_(74), indentSize_(3), addChildValues_() {} -JSONCPP_STRING StyledWriter::write(const Value& root) { - document_.clear(); +std::string StyledWriter::write(const Value& root) { + document_ = ""; addChildValues_ = false; - indentString_.clear(); + indentString_ = ""; writeCommentBeforeValue(root); writeValue(root); writeCommentAfterValueOnSameLine(root); @@ -4582,7 +4145,7 @@ void StyledWriter::writeValue(const Value& value) { break; case stringValue: { - // Is NULL possible for value.string_? No. + // Is NULL possible for value.string_? char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -4605,7 +4168,7 @@ void StyledWriter::writeValue(const Value& value) { indent(); Value::Members::iterator it = members.begin(); for (;;) { - const JSONCPP_STRING& name = *it; + const std::string& name = *it; const Value& childValue = value[name]; writeCommentBeforeValue(childValue); writeWithIndent(valueToQuotedString(name.c_str())); @@ -4669,25 +4232,26 @@ void StyledWriter::writeArrayValue(const Value& value) { } bool StyledWriter::isMultineArray(const Value& value) { - ArrayIndex const size = value.size(); + int size = value.size(); bool isMultiLine = size * 3 >= rightMargin_; childValues_.clear(); - for (ArrayIndex index = 0; index < size && !isMultiLine; ++index) { + for (int index = 0; index < size && !isMultiLine; ++index) { const Value& childValue = value[index]; - isMultiLine = ((childValue.isArray() || childValue.isObject()) && + isMultiLine = + isMultiLine || ((childValue.isArray() || childValue.isObject()) && childValue.size() > 0); } if (!isMultiLine) // check if line length > max line length { childValues_.reserve(size); addChildValues_ = true; - ArrayIndex lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' - for (ArrayIndex index = 0; index < size; ++index) { + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { if (hasCommentForValue(value[index])) { isMultiLine = true; } writeValue(value[index]); - lineLength += static_cast(childValues_[index].length()); + lineLength += int(childValues_[index].length()); } addChildValues_ = false; isMultiLine = isMultiLine || lineLength >= rightMargin_; @@ -4695,7 +4259,7 @@ bool StyledWriter::isMultineArray(const Value& value) { return isMultiLine; } -void StyledWriter::pushValue(const JSONCPP_STRING& value) { +void StyledWriter::pushValue(const std::string& value) { if (addChildValues_) childValues_.push_back(value); else @@ -4713,15 +4277,15 @@ void StyledWriter::writeIndent() { document_ += indentString_; } -void StyledWriter::writeWithIndent(const JSONCPP_STRING& value) { +void StyledWriter::writeWithIndent(const std::string& value) { writeIndent(); document_ += value; } -void StyledWriter::indent() { indentString_ += JSONCPP_STRING(indentSize_, ' '); } +void StyledWriter::indent() { indentString_ += std::string(indentSize_, ' '); } void StyledWriter::unindent() { - assert(indentString_.size() >= indentSize_); + assert(int(indentString_.size()) >= indentSize_); indentString_.resize(indentString_.size() - indentSize_); } @@ -4731,8 +4295,8 @@ void StyledWriter::writeCommentBeforeValue(const Value& root) { document_ += "\n"; writeIndent(); - const JSONCPP_STRING& comment = root.getComment(commentBefore); - JSONCPP_STRING::const_iterator iter = comment.begin(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); while (iter != comment.end()) { document_ += *iter; if (*iter == '\n' && @@ -4765,14 +4329,14 @@ bool StyledWriter::hasCommentForValue(const Value& value) { // Class StyledStreamWriter // ////////////////////////////////////////////////////////////////// -StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation) +StyledStreamWriter::StyledStreamWriter(std::string indentation) : document_(NULL), rightMargin_(74), indentation_(indentation), addChildValues_() {} -void StyledStreamWriter::write(JSONCPP_OSTREAM& out, const Value& root) { +void StyledStreamWriter::write(std::ostream& out, const Value& root) { document_ = &out; addChildValues_ = false; - indentString_.clear(); + indentString_ = ""; indented_ = true; writeCommentBeforeValue(root); if (!indented_) writeIndent(); @@ -4799,7 +4363,7 @@ void StyledStreamWriter::writeValue(const Value& value) { break; case stringValue: { - // Is NULL possible for value.string_? No. + // Is NULL possible for value.string_? char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -4822,7 +4386,7 @@ void StyledStreamWriter::writeValue(const Value& value) { indent(); Value::Members::iterator it = members.begin(); for (;;) { - const JSONCPP_STRING& name = *it; + const std::string& name = *it; const Value& childValue = value[name]; writeCommentBeforeValue(childValue); writeWithIndent(valueToQuotedString(name.c_str())); @@ -4888,25 +4452,26 @@ void StyledStreamWriter::writeArrayValue(const Value& value) { } bool StyledStreamWriter::isMultineArray(const Value& value) { - ArrayIndex const size = value.size(); + int size = value.size(); bool isMultiLine = size * 3 >= rightMargin_; childValues_.clear(); - for (ArrayIndex index = 0; index < size && !isMultiLine; ++index) { + for (int index = 0; index < size && !isMultiLine; ++index) { const Value& childValue = value[index]; - isMultiLine = ((childValue.isArray() || childValue.isObject()) && + isMultiLine = + isMultiLine || ((childValue.isArray() || childValue.isObject()) && childValue.size() > 0); } if (!isMultiLine) // check if line length > max line length { childValues_.reserve(size); addChildValues_ = true; - ArrayIndex lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' - for (ArrayIndex index = 0; index < size; ++index) { + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { if (hasCommentForValue(value[index])) { isMultiLine = true; } writeValue(value[index]); - lineLength += static_cast(childValues_[index].length()); + lineLength += int(childValues_[index].length()); } addChildValues_ = false; isMultiLine = isMultiLine || lineLength >= rightMargin_; @@ -4914,7 +4479,7 @@ bool StyledStreamWriter::isMultineArray(const Value& value) { return isMultiLine; } -void StyledStreamWriter::pushValue(const JSONCPP_STRING& value) { +void StyledStreamWriter::pushValue(const std::string& value) { if (addChildValues_) childValues_.push_back(value); else @@ -4929,7 +4494,7 @@ void StyledStreamWriter::writeIndent() { *document_ << '\n' << indentString_; } -void StyledStreamWriter::writeWithIndent(const JSONCPP_STRING& value) { +void StyledStreamWriter::writeWithIndent(const std::string& value) { if (!indented_) writeIndent(); *document_ << value; indented_ = false; @@ -4947,8 +4512,8 @@ void StyledStreamWriter::writeCommentBeforeValue(const Value& root) { return; if (!indented_) writeIndent(); - const JSONCPP_STRING& comment = root.getComment(commentBefore); - JSONCPP_STRING::const_iterator iter = comment.begin(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); while (iter != comment.end()) { *document_ << *iter; if (*iter == '\n' && @@ -4993,48 +4558,48 @@ struct CommentStyle { struct BuiltStyledStreamWriter : public StreamWriter { BuiltStyledStreamWriter( - JSONCPP_STRING const& indentation, + std::string const& indentation, CommentStyle::Enum cs, - JSONCPP_STRING const& colonSymbol, - JSONCPP_STRING const& nullSymbol, - JSONCPP_STRING const& endingLineFeedSymbol, + std::string const& colonSymbol, + std::string const& nullSymbol, + std::string const& endingLineFeedSymbol, bool useSpecialFloats, unsigned int precision); - int write(Value const& root, JSONCPP_OSTREAM* sout) JSONCPP_OVERRIDE; + virtual int write(Value const& root, std::ostream* sout); private: void writeValue(Value const& value); void writeArrayValue(Value const& value); bool isMultineArray(Value const& value); - void pushValue(JSONCPP_STRING const& value); + void pushValue(std::string const& value); void writeIndent(); - void writeWithIndent(JSONCPP_STRING const& value); + void writeWithIndent(std::string const& value); void indent(); void unindent(); void writeCommentBeforeValue(Value const& root); void writeCommentAfterValueOnSameLine(Value const& root); static bool hasCommentForValue(const Value& value); - typedef std::vector ChildValues; + typedef std::vector ChildValues; ChildValues childValues_; - JSONCPP_STRING indentString_; - unsigned int rightMargin_; - JSONCPP_STRING indentation_; + std::string indentString_; + int rightMargin_; + std::string indentation_; CommentStyle::Enum cs_; - JSONCPP_STRING colonSymbol_; - JSONCPP_STRING nullSymbol_; - JSONCPP_STRING endingLineFeedSymbol_; + std::string colonSymbol_; + std::string nullSymbol_; + std::string endingLineFeedSymbol_; bool addChildValues_ : 1; bool indented_ : 1; bool useSpecialFloats_ : 1; unsigned int precision_; }; BuiltStyledStreamWriter::BuiltStyledStreamWriter( - JSONCPP_STRING const& indentation, + std::string const& indentation, CommentStyle::Enum cs, - JSONCPP_STRING const& colonSymbol, - JSONCPP_STRING const& nullSymbol, - JSONCPP_STRING const& endingLineFeedSymbol, + std::string const& colonSymbol, + std::string const& nullSymbol, + std::string const& endingLineFeedSymbol, bool useSpecialFloats, unsigned int precision) : rightMargin_(74) @@ -5049,12 +4614,12 @@ BuiltStyledStreamWriter::BuiltStyledStreamWriter( , precision_(precision) { } -int BuiltStyledStreamWriter::write(Value const& root, JSONCPP_OSTREAM* sout) +int BuiltStyledStreamWriter::write(Value const& root, std::ostream* sout) { sout_ = sout; addChildValues_ = false; indented_ = true; - indentString_.clear(); + indentString_ = ""; writeCommentBeforeValue(root); if (!indented_) writeIndent(); indented_ = true; @@ -5080,7 +4645,7 @@ void BuiltStyledStreamWriter::writeValue(Value const& value) { break; case stringValue: { - // Is NULL is possible for value.string_? No. + // Is NULL is possible for value.string_? char const* str; char const* end; bool ok = value.getString(&str, &end); @@ -5103,7 +4668,7 @@ void BuiltStyledStreamWriter::writeValue(Value const& value) { indent(); Value::Members::iterator it = members.begin(); for (;;) { - JSONCPP_STRING const& name = *it; + std::string const& name = *it; Value const& childValue = value[name]; writeCommentBeforeValue(childValue); writeWithIndent(valueToQuotedStringN(name.data(), static_cast(name.length()))); @@ -5161,7 +4726,7 @@ void BuiltStyledStreamWriter::writeArrayValue(Value const& value) { if (!indentation_.empty()) *sout_ << " "; for (unsigned index = 0; index < size; ++index) { if (index > 0) - *sout_ << ((!indentation_.empty()) ? ", " : ","); + *sout_ << ", "; *sout_ << childValues_[index]; } if (!indentation_.empty()) *sout_ << " "; @@ -5171,25 +4736,26 @@ void BuiltStyledStreamWriter::writeArrayValue(Value const& value) { } bool BuiltStyledStreamWriter::isMultineArray(Value const& value) { - ArrayIndex const size = value.size(); + int size = value.size(); bool isMultiLine = size * 3 >= rightMargin_; childValues_.clear(); - for (ArrayIndex index = 0; index < size && !isMultiLine; ++index) { + for (int index = 0; index < size && !isMultiLine; ++index) { Value const& childValue = value[index]; - isMultiLine = ((childValue.isArray() || childValue.isObject()) && + isMultiLine = + isMultiLine || ((childValue.isArray() || childValue.isObject()) && childValue.size() > 0); } if (!isMultiLine) // check if line length > max line length { childValues_.reserve(size); addChildValues_ = true; - ArrayIndex lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' - for (ArrayIndex index = 0; index < size; ++index) { + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { if (hasCommentForValue(value[index])) { isMultiLine = true; } writeValue(value[index]); - lineLength += static_cast(childValues_[index].length()); + lineLength += int(childValues_[index].length()); } addChildValues_ = false; isMultiLine = isMultiLine || lineLength >= rightMargin_; @@ -5197,7 +4763,7 @@ bool BuiltStyledStreamWriter::isMultineArray(Value const& value) { return isMultiLine; } -void BuiltStyledStreamWriter::pushValue(JSONCPP_STRING const& value) { +void BuiltStyledStreamWriter::pushValue(std::string const& value) { if (addChildValues_) childValues_.push_back(value); else @@ -5216,7 +4782,7 @@ void BuiltStyledStreamWriter::writeIndent() { } } -void BuiltStyledStreamWriter::writeWithIndent(JSONCPP_STRING const& value) { +void BuiltStyledStreamWriter::writeWithIndent(std::string const& value) { if (!indented_) writeIndent(); *sout_ << value; indented_ = false; @@ -5235,8 +4801,8 @@ void BuiltStyledStreamWriter::writeCommentBeforeValue(Value const& root) { return; if (!indented_) writeIndent(); - const JSONCPP_STRING& comment = root.getComment(commentBefore); - JSONCPP_STRING::const_iterator iter = comment.begin(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); while (iter != comment.end()) { *sout_ << *iter; if (*iter == '\n' && @@ -5286,11 +4852,11 @@ StreamWriterBuilder::~StreamWriterBuilder() {} StreamWriter* StreamWriterBuilder::newStreamWriter() const { - JSONCPP_STRING indentation = settings_["indentation"].asString(); - JSONCPP_STRING cs_str = settings_["commentStyle"].asString(); + std::string indentation = settings_["indentation"].asString(); + std::string cs_str = settings_["commentStyle"].asString(); bool eyc = settings_["enableYAMLCompatibility"].asBool(); bool dnp = settings_["dropNullPlaceholders"].asBool(); - bool usf = settings_["useSpecialFloats"].asBool(); + bool usf = settings_["useSpecialFloats"].asBool(); unsigned int pre = settings_["precision"].asUInt(); CommentStyle::Enum cs = CommentStyle::All; if (cs_str == "All") { @@ -5300,23 +4866,23 @@ StreamWriter* StreamWriterBuilder::newStreamWriter() const } else { throwRuntimeError("commentStyle must be 'All' or 'None'"); } - JSONCPP_STRING colonSymbol = " : "; + std::string colonSymbol = " : "; if (eyc) { colonSymbol = ": "; } else if (indentation.empty()) { colonSymbol = ":"; } - JSONCPP_STRING nullSymbol = "null"; + std::string nullSymbol = "null"; if (dnp) { - nullSymbol.clear(); + nullSymbol = ""; } if (pre > 17) pre = 17; - JSONCPP_STRING endingLineFeedSymbol; + std::string endingLineFeedSymbol = ""; return new BuiltStyledStreamWriter( indentation, cs, colonSymbol, nullSymbol, endingLineFeedSymbol, usf, pre); } -static void getValidWriterKeys(std::set* valid_keys) +static void getValidWriterKeys(std::set* valid_keys) { valid_keys->clear(); valid_keys->insert("indentation"); @@ -5331,19 +4897,19 @@ bool StreamWriterBuilder::validate(Json::Value* invalid) const Json::Value my_invalid; if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL Json::Value& inv = *invalid; - std::set valid_keys; + std::set valid_keys; getValidWriterKeys(&valid_keys); Value::Members keys = settings_.getMemberNames(); size_t n = keys.size(); for (size_t i = 0; i < n; ++i) { - JSONCPP_STRING const& key = keys[i]; + std::string const& key = keys[i]; if (valid_keys.find(key) == valid_keys.end()) { inv[key] = settings_[key]; } } return 0u == inv.size(); } -Value& StreamWriterBuilder::operator[](JSONCPP_STRING key) +Value& StreamWriterBuilder::operator[](std::string key) { return settings_[key]; } @@ -5360,14 +4926,14 @@ void StreamWriterBuilder::setDefaults(Json::Value* settings) //! [StreamWriterBuilderDefaults] } -JSONCPP_STRING writeString(StreamWriter::Factory const& builder, Value const& root) { - JSONCPP_OSTRINGSTREAM sout; +std::string writeString(StreamWriter::Factory const& builder, Value const& root) { + std::ostringstream sout; StreamWriterPtr const writer(builder.newStreamWriter()); writer->write(root, &sout); return sout.str(); } -JSONCPP_OSTREAM& operator<<(JSONCPP_OSTREAM& sout, Value const& root) { +std::ostream& operator<<(std::ostream& sout, Value const& root) { StreamWriterBuilder builder; StreamWriterPtr const writer(builder.newStreamWriter()); writer->write(root, &sout); diff --git a/third_party/mbedtls/Makefile b/third_party/mbedtls/Makefile index e898975d..14d7bf45 100644 --- a/third_party/mbedtls/Makefile +++ b/third_party/mbedtls/Makefile @@ -1,140 +1,200 @@ -# export the submodule flag so that crypto knows it's being built as a submodule -export USE_CRYPTO_SUBMODULE=1 -DESTDIR=/usr/local -PREFIX=mbedtls_ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.12 -.SILENT: +# Default target executed when no arguments are given to make. +default_target: all -.PHONY: all no_test programs lib tests install uninstall clean test check covtest lcov apidoc apidoc_clean +.PHONY : default_target -all: programs tests - $(MAKE) post_build - -no_test: programs - -programs: lib - $(MAKE) -C programs - -lib: - $(MAKE) -C library - -tests: lib - $(MAKE) -C tests - $(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C crypto/tests - -ifndef WINDOWS -install: no_test - mkdir -p $(DESTDIR)/include/mbedtls - cp -rp include/mbedtls $(DESTDIR)/include - - mkdir -p $(DESTDIR)/lib - cp -RP library/libmbedtls.* $(DESTDIR)/lib - cp -RP library/libmbedx509.* $(DESTDIR)/lib - - mkdir -p $(DESTDIR)/include/psa - cp -rp crypto/include/psa $(DESTDIR)/include - cp -RP crypto/library/libmbedcrypto.* $(DESTDIR)/lib - - mkdir -p $(DESTDIR)/bin - for p in programs/*/* ; do \ - if [ -x $$p ] && [ ! -d $$p ] ; \ - then \ - f=$(PREFIX)`basename $$p` ; \ - cp $$p $(DESTDIR)/bin/$$f ; \ - fi \ - done - -uninstall: - rm -rf $(DESTDIR)/include/mbedtls - rm -f $(DESTDIR)/lib/libmbedtls.* - rm -f $(DESTDIR)/lib/libmbedx509.* - rm -f $(DESTDIR)/lib/libmbedcrypto.* - $(MAKE) -C crypto uninstall +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: - for p in programs/*/* ; do \ - if [ -x $$p ] && [ ! -d $$p ] ; \ - then \ - f=$(PREFIX)`basename $$p` ; \ - rm -f $(DESTDIR)/bin/$$f ; \ - fi \ - done -endif +#============================================================================= +# Special targets provided by cmake. -WARNING_BORDER =*******************************************************\n -NULL_ENTROPY_WARN_L1=**** WARNING! MBEDTLS_TEST_NULL_ENTROPY defined! ****\n -NULL_ENTROPY_WARN_L2=**** THIS BUILD HAS NO DEFINED ENTROPY SOURCES ****\n -NULL_ENTROPY_WARN_L3=**** AND IS *NOT* SUITABLE FOR PRODUCTION USE ****\n +# Disable implicit rules so canonical targets will work. +.SUFFIXES: -NULL_ENTROPY_WARNING=\n$(WARNING_BORDER)$(NULL_ENTROPY_WARN_L1)$(NULL_ENTROPY_WARN_L2)$(NULL_ENTROPY_WARN_L3)$(WARNING_BORDER) -WARNING_BORDER_LONG =**********************************************************************************\n -CTR_DRBG_128_BIT_KEY_WARN_L1=**** WARNING! MBEDTLS_CTR_DRBG_USE_128_BIT_KEY defined! ****\n -CTR_DRBG_128_BIT_KEY_WARN_L2=**** Using 128-bit keys for CTR_DRBG limits the security of generated ****\n -CTR_DRBG_128_BIT_KEY_WARN_L3=**** keys and operations that use random values generated to 128-bit security ****\n +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = -CTR_DRBG_128_BIT_KEY_WARNING=\n$(WARNING_BORDER_LONG)$(CTR_DRBG_128_BIT_KEY_WARN_L1)$(CTR_DRBG_128_BIT_KEY_WARN_L2)$(CTR_DRBG_128_BIT_KEY_WARN_L3)$(WARNING_BORDER_LONG) +.SUFFIXES: .hpux_make_needs_suffix_list -# Post build steps -post_build: -ifndef WINDOWS - # If 128-bit keys are configured for CTR_DRBG, display an appropriate warning - -scripts/config.pl get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY && ([ $$? -eq 0 ]) && \ - echo '$(CTR_DRBG_128_BIT_KEY_WARNING)' +# Suppress display of executed commands. +$(VERBOSE).SILENT: - # If NULL Entropy is configured, display an appropriate warning - -scripts/config.pl get MBEDTLS_TEST_NULL_ENTROPY && ([ $$? -eq 0 ]) && \ - echo '$(NULL_ENTROPY_WARNING)' -endif +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake + +# The command to remove a file. +RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /Users/bsergeant/src/foss/ixwebsocket + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /Users/bsergeant/src/foss/ixwebsocket + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components + +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles /Users/bsergeant/src/foss/ixwebsocket/third_party/mbedtls/CMakeFiles/progress.marks + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/all + $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles 0 +.PHONY : all + +# The main clean target clean: - $(MAKE) -C library clean - $(MAKE) -C programs clean - $(MAKE) -C tests clean - $(MAKE) -C crypto clean -ifndef WINDOWS - find . \( -name \*.gcno -o -name \*.gcda -o -name \*.info \) -exec rm {} + -endif + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/clean +.PHONY : clean -check: lib tests - $(MAKE) -C tests check - $(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C crypto/tests check +# The main clean target +clean/fast: clean -test: check +.PHONY : clean/fast -ifndef WINDOWS -# note: for coverage testing, build with: -# make CFLAGS='--coverage -g3 -O0' -covtest: - $(MAKE) check - programs/test/selftest - tests/compat.sh - tests/ssl-opt.sh +# Prepare targets for installation. +preinstall: all + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/preinstall +.PHONY : preinstall -lcov: - rm -rf Coverage - lcov --capture --initial --directory library -o files.info - lcov --capture --directory library -o tests.info - lcov --add-tracefile files.info --add-tracefile tests.info -o all.info - lcov --remove all.info -o final.info '*.h' - gendesc tests/Descriptions.txt -o descriptions - genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info - rm -f files.info tests.info all.info final.info descriptions +# Prepare targets for installation. +preinstall/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/preinstall +.PHONY : preinstall/fast -apidoc: - mkdir -p apidoc - cd doxygen && doxygen mbedtls.doxyfile +# clear depends +depend: + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend -apidoc_clean: - rm -rf apidoc -endif +# Convenience name for target. +third_party/mbedtls/CMakeFiles/apidoc.dir/rule: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/CMakeFiles/apidoc.dir/rule +.PHONY : third_party/mbedtls/CMakeFiles/apidoc.dir/rule + +# Convenience name for target. +apidoc: third_party/mbedtls/CMakeFiles/apidoc.dir/rule + +.PHONY : apidoc + +# fast build rule for target. +apidoc/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/CMakeFiles/apidoc.dir/build.make third_party/mbedtls/CMakeFiles/apidoc.dir/build +.PHONY : apidoc/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... install/local" + @echo "... install/strip" + @echo "... install" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... apidoc" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system -## Editor navigation files -C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function) -tags: $(C_SOURCE_FILES) - ctags -o $@ $(C_SOURCE_FILES) -TAGS: $(C_SOURCE_FILES) - etags -o $@ $(C_SOURCE_FILES) -GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES) - ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc diff --git a/third_party/mbedtls/crypto/library/Makefile b/third_party/mbedtls/crypto/library/Makefile index 921b68ec..aea755b6 100644 --- a/third_party/mbedtls/crypto/library/Makefile +++ b/third_party/mbedtls/crypto/library/Makefile @@ -1,155 +1,2166 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.12 -# Also see "include/mbedtls/config.h" +# Default target executed when no arguments are given to make. +default_target: all -CFLAGS ?= -O2 -WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement -LDFLAGS ?= +.PHONY : default_target -CRYPTO_INCLUDES ?= -I../include -LOCAL_CFLAGS = $(WARNING_CFLAGS) $(CRYPTO_INCLUDES) -D_FILE_OFFSET_BITS=64 -LOCAL_LDFLAGS = +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: -ifdef DEBUG -LOCAL_CFLAGS += -g3 -endif -# MicroBlaze specific options: -# CFLAGS += -mno-xl-soft-mul -mxl-barrel-shift +#============================================================================= +# Special targets provided by cmake. -# To compile on Plan9: -# CFLAGS += -D_BSD_EXTENSION +# Disable implicit rules so canonical targets will work. +.SUFFIXES: -# if were running on Windows build for Windows -ifdef WINDOWS -WINDOWS_BUILD=1 -else ifeq ($(shell uname -s),Darwin) -ifeq ($(AR),ar) -APPLE_BUILD ?= 1 -endif -endif -# To compile as a shared library: -ifdef SHARED -# all code is position-indep with mingw, avoid warning about useless flag -ifndef WINDOWS_BUILD -LOCAL_CFLAGS += -fPIC -fpic -endif -endif +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = -SOEXT_CRYPTO=so.3 +.SUFFIXES: .hpux_make_needs_suffix_list -# Set AR_DASH= (empty string) to use an ar implementation that does not accept -# the - prefix for command line options (e.g. llvm-ar) -AR_DASH ?= - -ARFLAGS = $(AR_DASH)src -ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) -ARFLAGS = $(AR_DASH)Src -RLFLAGS = -no_warning_for_no_symbols -c -RL ?= ranlib -endif -endif +# Suppress display of executed commands. +$(VERBOSE).SILENT: -DLEXT ?= so -ifdef WINDOWS_BUILD -# Windows shared library extension: -DLEXT = dll -else ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) -# Mac OS X shared library extension: -DLEXT = dylib -endif -endif -OBJS_CRYPTO= aes.o aesni.o arc4.o \ - aria.o asn1parse.o asn1write.o \ - base64.o bignum.o blowfish.o \ - camellia.o ccm.o chacha20.o \ - chachapoly.o cipher.o cipher_wrap.o \ - cmac.o ctr_drbg.o des.o \ - dhm.o ecdh.o ecdsa.o \ - ecjpake.o ecp.o \ - ecp_curves.o entropy.o entropy_poll.o \ - gcm.o havege.o \ - hkdf.o \ - hmac_drbg.o md.o md2.o \ - md4.o md5.o md_wrap.o \ - memory_buffer_alloc.o nist_kw.o \ - oid.o padlock.o pem.o \ - pk.o pk_wrap.o pkcs12.o \ - pkcs5.o pkparse.o pkwrite.o \ - platform.o platform_util.o poly1305.o \ - psa_crypto.o \ - psa_crypto_slot_management.o \ - psa_crypto_storage.o \ - psa_its_file.o \ - ripemd160.o rsa_internal.o rsa.o \ - sha1.o sha256.o sha512.o \ - threading.o timing.o \ - xtea.o +# A target that is always out of date. +cmake_force: -# For files generated by the parent project (Mbed TLS) when building Mbed -# Crypto as a submodule, ensure that the parent project instance is used. -ifeq ($(USE_CRYPTO_SUBMODULE), 1) -OBJS_CRYPTO += $(patsubst %.c,%.o, $(realpath ../../library/error.c)) -OBJS_CRYPTO += $(patsubst %.c,%.o, $(realpath ../../library/version.c)) -OBJS_CRYPTO += $(patsubst %.c,%.o, $(realpath ../../library/version_features.c)) -else -OBJS_CRYPTO += error.o -OBJS_CRYPTO += version.o -OBJS_CRYPTO += version_features.o -endif +.PHONY : cmake_force -.SILENT: +#============================================================================= +# Set environment variables for the build. -.PHONY: all static shared clean +# The shell in which to execute make rules. +SHELL = /bin/sh -ifndef SHARED -all: static -else -all: shared static -endif +# The CMake executable. +CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake -static: libmbedcrypto.a +# The command to remove a file. +RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f -shared: libmbedcrypto.$(DLEXT) +# Escaping for special characters. +EQUALS = = -# crypto -libmbedcrypto.a: $(OBJS_CRYPTO) - echo " AR $@" - $(AR) $(ARFLAGS) $@ $(OBJS_CRYPTO) -ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) - echo " RL $@" - $(RL) $(RLFLAGS) $@ -endif -endif +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /Users/bsergeant/src/foss/ixwebsocket -libmbedcrypto.$(SOEXT_CRYPTO): $(OBJS_CRYPTO) - echo " LD $@" - $(CC) -shared -Wl,-soname,$@ $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_CRYPTO) +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /Users/bsergeant/src/foss/ixwebsocket -libmbedcrypto.so: libmbedcrypto.$(SOEXT_CRYPTO) - echo " LN $@ -> $<" - ln -sf $< $@ +#============================================================================= +# Targets provided globally by CMake. -libmbedcrypto.dylib: $(OBJS_CRYPTO) - echo " LD $@" - $(CC) -dynamiclib $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_CRYPTO) +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local -libmbedcrypto.dll: $(OBJS_CRYPTO) - echo " LD $@" - $(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_CRYPTO) -lws2_32 -lwinmm -lgdi32 -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS) +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast -.c.o: - echo " CC $<" - $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c $< -o $@ +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components + +.PHONY : list_install_components/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles /Users/bsergeant/src/foss/ixwebsocket/third_party/mbedtls/crypto/library/CMakeFiles/progress.marks + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/crypto/library/all + $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles 0 +.PHONY : all + +# The main clean target clean: -ifndef WINDOWS - rm -f *.o libmbed* -else - if exist *.o del /Q /F *.o - if exist libmbed* del /Q /F libmbed* -endif + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/crypto/library/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/crypto/library/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/crypto/library/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +third_party/mbedtls/crypto/library/CMakeFiles/crypto_lib.dir/rule: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/crypto/library/CMakeFiles/crypto_lib.dir/rule +.PHONY : third_party/mbedtls/crypto/library/CMakeFiles/crypto_lib.dir/rule + +# Convenience name for target. +crypto_lib: third_party/mbedtls/crypto/library/CMakeFiles/crypto_lib.dir/rule + +.PHONY : crypto_lib + +# fast build rule for target. +crypto_lib/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/crypto_lib.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/crypto_lib.dir/build +.PHONY : crypto_lib/fast + +# Convenience name for target. +third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rule: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rule +.PHONY : third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rule + +# Convenience name for target. +mbedcrypto: third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rule + +.PHONY : mbedcrypto + +# fast build rule for target. +mbedcrypto/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build +.PHONY : mbedcrypto/fast + +__/__/library/error.o: __/__/library/error.c.o + +.PHONY : __/__/library/error.o + +# target to build an object file +__/__/library/error.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/error.c.o +.PHONY : __/__/library/error.c.o + +__/__/library/error.i: __/__/library/error.c.i + +.PHONY : __/__/library/error.i + +# target to preprocess a source file +__/__/library/error.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/error.c.i +.PHONY : __/__/library/error.c.i + +__/__/library/error.s: __/__/library/error.c.s + +.PHONY : __/__/library/error.s + +# target to generate assembly for a file +__/__/library/error.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/error.c.s +.PHONY : __/__/library/error.c.s + +__/__/library/version.o: __/__/library/version.c.o + +.PHONY : __/__/library/version.o + +# target to build an object file +__/__/library/version.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/version.c.o +.PHONY : __/__/library/version.c.o + +__/__/library/version.i: __/__/library/version.c.i + +.PHONY : __/__/library/version.i + +# target to preprocess a source file +__/__/library/version.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/version.c.i +.PHONY : __/__/library/version.c.i + +__/__/library/version.s: __/__/library/version.c.s + +.PHONY : __/__/library/version.s + +# target to generate assembly for a file +__/__/library/version.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/version.c.s +.PHONY : __/__/library/version.c.s + +__/__/library/version_features.o: __/__/library/version_features.c.o + +.PHONY : __/__/library/version_features.o + +# target to build an object file +__/__/library/version_features.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/version_features.c.o +.PHONY : __/__/library/version_features.c.o + +__/__/library/version_features.i: __/__/library/version_features.c.i + +.PHONY : __/__/library/version_features.i + +# target to preprocess a source file +__/__/library/version_features.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/version_features.c.i +.PHONY : __/__/library/version_features.c.i + +__/__/library/version_features.s: __/__/library/version_features.c.s + +.PHONY : __/__/library/version_features.s + +# target to generate assembly for a file +__/__/library/version_features.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/__/__/library/version_features.c.s +.PHONY : __/__/library/version_features.c.s + +aes.o: aes.c.o + +.PHONY : aes.o + +# target to build an object file +aes.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aes.c.o +.PHONY : aes.c.o + +aes.i: aes.c.i + +.PHONY : aes.i + +# target to preprocess a source file +aes.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aes.c.i +.PHONY : aes.c.i + +aes.s: aes.c.s + +.PHONY : aes.s + +# target to generate assembly for a file +aes.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aes.c.s +.PHONY : aes.c.s + +aesni.o: aesni.c.o + +.PHONY : aesni.o + +# target to build an object file +aesni.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aesni.c.o +.PHONY : aesni.c.o + +aesni.i: aesni.c.i + +.PHONY : aesni.i + +# target to preprocess a source file +aesni.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aesni.c.i +.PHONY : aesni.c.i + +aesni.s: aesni.c.s + +.PHONY : aesni.s + +# target to generate assembly for a file +aesni.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aesni.c.s +.PHONY : aesni.c.s + +arc4.o: arc4.c.o + +.PHONY : arc4.o + +# target to build an object file +arc4.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/arc4.c.o +.PHONY : arc4.c.o + +arc4.i: arc4.c.i + +.PHONY : arc4.i + +# target to preprocess a source file +arc4.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/arc4.c.i +.PHONY : arc4.c.i + +arc4.s: arc4.c.s + +.PHONY : arc4.s + +# target to generate assembly for a file +arc4.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/arc4.c.s +.PHONY : arc4.c.s + +aria.o: aria.c.o + +.PHONY : aria.o + +# target to build an object file +aria.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aria.c.o +.PHONY : aria.c.o + +aria.i: aria.c.i + +.PHONY : aria.i + +# target to preprocess a source file +aria.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aria.c.i +.PHONY : aria.c.i + +aria.s: aria.c.s + +.PHONY : aria.s + +# target to generate assembly for a file +aria.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/aria.c.s +.PHONY : aria.c.s + +asn1parse.o: asn1parse.c.o + +.PHONY : asn1parse.o + +# target to build an object file +asn1parse.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1parse.c.o +.PHONY : asn1parse.c.o + +asn1parse.i: asn1parse.c.i + +.PHONY : asn1parse.i + +# target to preprocess a source file +asn1parse.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1parse.c.i +.PHONY : asn1parse.c.i + +asn1parse.s: asn1parse.c.s + +.PHONY : asn1parse.s + +# target to generate assembly for a file +asn1parse.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1parse.c.s +.PHONY : asn1parse.c.s + +asn1write.o: asn1write.c.o + +.PHONY : asn1write.o + +# target to build an object file +asn1write.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1write.c.o +.PHONY : asn1write.c.o + +asn1write.i: asn1write.c.i + +.PHONY : asn1write.i + +# target to preprocess a source file +asn1write.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1write.c.i +.PHONY : asn1write.c.i + +asn1write.s: asn1write.c.s + +.PHONY : asn1write.s + +# target to generate assembly for a file +asn1write.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/asn1write.c.s +.PHONY : asn1write.c.s + +base64.o: base64.c.o + +.PHONY : base64.o + +# target to build an object file +base64.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/base64.c.o +.PHONY : base64.c.o + +base64.i: base64.c.i + +.PHONY : base64.i + +# target to preprocess a source file +base64.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/base64.c.i +.PHONY : base64.c.i + +base64.s: base64.c.s + +.PHONY : base64.s + +# target to generate assembly for a file +base64.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/base64.c.s +.PHONY : base64.c.s + +bignum.o: bignum.c.o + +.PHONY : bignum.o + +# target to build an object file +bignum.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/bignum.c.o +.PHONY : bignum.c.o + +bignum.i: bignum.c.i + +.PHONY : bignum.i + +# target to preprocess a source file +bignum.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/bignum.c.i +.PHONY : bignum.c.i + +bignum.s: bignum.c.s + +.PHONY : bignum.s + +# target to generate assembly for a file +bignum.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/bignum.c.s +.PHONY : bignum.c.s + +blowfish.o: blowfish.c.o + +.PHONY : blowfish.o + +# target to build an object file +blowfish.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/blowfish.c.o +.PHONY : blowfish.c.o + +blowfish.i: blowfish.c.i + +.PHONY : blowfish.i + +# target to preprocess a source file +blowfish.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/blowfish.c.i +.PHONY : blowfish.c.i + +blowfish.s: blowfish.c.s + +.PHONY : blowfish.s + +# target to generate assembly for a file +blowfish.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/blowfish.c.s +.PHONY : blowfish.c.s + +camellia.o: camellia.c.o + +.PHONY : camellia.o + +# target to build an object file +camellia.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/camellia.c.o +.PHONY : camellia.c.o + +camellia.i: camellia.c.i + +.PHONY : camellia.i + +# target to preprocess a source file +camellia.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/camellia.c.i +.PHONY : camellia.c.i + +camellia.s: camellia.c.s + +.PHONY : camellia.s + +# target to generate assembly for a file +camellia.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/camellia.c.s +.PHONY : camellia.c.s + +ccm.o: ccm.c.o + +.PHONY : ccm.o + +# target to build an object file +ccm.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ccm.c.o +.PHONY : ccm.c.o + +ccm.i: ccm.c.i + +.PHONY : ccm.i + +# target to preprocess a source file +ccm.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ccm.c.i +.PHONY : ccm.c.i + +ccm.s: ccm.c.s + +.PHONY : ccm.s + +# target to generate assembly for a file +ccm.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ccm.c.s +.PHONY : ccm.c.s + +chacha20.o: chacha20.c.o + +.PHONY : chacha20.o + +# target to build an object file +chacha20.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/chacha20.c.o +.PHONY : chacha20.c.o + +chacha20.i: chacha20.c.i + +.PHONY : chacha20.i + +# target to preprocess a source file +chacha20.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/chacha20.c.i +.PHONY : chacha20.c.i + +chacha20.s: chacha20.c.s + +.PHONY : chacha20.s + +# target to generate assembly for a file +chacha20.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/chacha20.c.s +.PHONY : chacha20.c.s + +chachapoly.o: chachapoly.c.o + +.PHONY : chachapoly.o + +# target to build an object file +chachapoly.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/chachapoly.c.o +.PHONY : chachapoly.c.o + +chachapoly.i: chachapoly.c.i + +.PHONY : chachapoly.i + +# target to preprocess a source file +chachapoly.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/chachapoly.c.i +.PHONY : chachapoly.c.i + +chachapoly.s: chachapoly.c.s + +.PHONY : chachapoly.s + +# target to generate assembly for a file +chachapoly.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/chachapoly.c.s +.PHONY : chachapoly.c.s + +cipher.o: cipher.c.o + +.PHONY : cipher.o + +# target to build an object file +cipher.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cipher.c.o +.PHONY : cipher.c.o + +cipher.i: cipher.c.i + +.PHONY : cipher.i + +# target to preprocess a source file +cipher.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cipher.c.i +.PHONY : cipher.c.i + +cipher.s: cipher.c.s + +.PHONY : cipher.s + +# target to generate assembly for a file +cipher.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cipher.c.s +.PHONY : cipher.c.s + +cipher_wrap.o: cipher_wrap.c.o + +.PHONY : cipher_wrap.o + +# target to build an object file +cipher_wrap.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cipher_wrap.c.o +.PHONY : cipher_wrap.c.o + +cipher_wrap.i: cipher_wrap.c.i + +.PHONY : cipher_wrap.i + +# target to preprocess a source file +cipher_wrap.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cipher_wrap.c.i +.PHONY : cipher_wrap.c.i + +cipher_wrap.s: cipher_wrap.c.s + +.PHONY : cipher_wrap.s + +# target to generate assembly for a file +cipher_wrap.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cipher_wrap.c.s +.PHONY : cipher_wrap.c.s + +cmac.o: cmac.c.o + +.PHONY : cmac.o + +# target to build an object file +cmac.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cmac.c.o +.PHONY : cmac.c.o + +cmac.i: cmac.c.i + +.PHONY : cmac.i + +# target to preprocess a source file +cmac.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cmac.c.i +.PHONY : cmac.c.i + +cmac.s: cmac.c.s + +.PHONY : cmac.s + +# target to generate assembly for a file +cmac.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/cmac.c.s +.PHONY : cmac.c.s + +ctr_drbg.o: ctr_drbg.c.o + +.PHONY : ctr_drbg.o + +# target to build an object file +ctr_drbg.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ctr_drbg.c.o +.PHONY : ctr_drbg.c.o + +ctr_drbg.i: ctr_drbg.c.i + +.PHONY : ctr_drbg.i + +# target to preprocess a source file +ctr_drbg.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ctr_drbg.c.i +.PHONY : ctr_drbg.c.i + +ctr_drbg.s: ctr_drbg.c.s + +.PHONY : ctr_drbg.s + +# target to generate assembly for a file +ctr_drbg.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ctr_drbg.c.s +.PHONY : ctr_drbg.c.s + +des.o: des.c.o + +.PHONY : des.o + +# target to build an object file +des.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/des.c.o +.PHONY : des.c.o + +des.i: des.c.i + +.PHONY : des.i + +# target to preprocess a source file +des.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/des.c.i +.PHONY : des.c.i + +des.s: des.c.s + +.PHONY : des.s + +# target to generate assembly for a file +des.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/des.c.s +.PHONY : des.c.s + +dhm.o: dhm.c.o + +.PHONY : dhm.o + +# target to build an object file +dhm.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/dhm.c.o +.PHONY : dhm.c.o + +dhm.i: dhm.c.i + +.PHONY : dhm.i + +# target to preprocess a source file +dhm.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/dhm.c.i +.PHONY : dhm.c.i + +dhm.s: dhm.c.s + +.PHONY : dhm.s + +# target to generate assembly for a file +dhm.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/dhm.c.s +.PHONY : dhm.c.s + +ecdh.o: ecdh.c.o + +.PHONY : ecdh.o + +# target to build an object file +ecdh.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecdh.c.o +.PHONY : ecdh.c.o + +ecdh.i: ecdh.c.i + +.PHONY : ecdh.i + +# target to preprocess a source file +ecdh.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecdh.c.i +.PHONY : ecdh.c.i + +ecdh.s: ecdh.c.s + +.PHONY : ecdh.s + +# target to generate assembly for a file +ecdh.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecdh.c.s +.PHONY : ecdh.c.s + +ecdsa.o: ecdsa.c.o + +.PHONY : ecdsa.o + +# target to build an object file +ecdsa.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecdsa.c.o +.PHONY : ecdsa.c.o + +ecdsa.i: ecdsa.c.i + +.PHONY : ecdsa.i + +# target to preprocess a source file +ecdsa.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecdsa.c.i +.PHONY : ecdsa.c.i + +ecdsa.s: ecdsa.c.s + +.PHONY : ecdsa.s + +# target to generate assembly for a file +ecdsa.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecdsa.c.s +.PHONY : ecdsa.c.s + +ecjpake.o: ecjpake.c.o + +.PHONY : ecjpake.o + +# target to build an object file +ecjpake.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecjpake.c.o +.PHONY : ecjpake.c.o + +ecjpake.i: ecjpake.c.i + +.PHONY : ecjpake.i + +# target to preprocess a source file +ecjpake.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecjpake.c.i +.PHONY : ecjpake.c.i + +ecjpake.s: ecjpake.c.s + +.PHONY : ecjpake.s + +# target to generate assembly for a file +ecjpake.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecjpake.c.s +.PHONY : ecjpake.c.s + +ecp.o: ecp.c.o + +.PHONY : ecp.o + +# target to build an object file +ecp.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecp.c.o +.PHONY : ecp.c.o + +ecp.i: ecp.c.i + +.PHONY : ecp.i + +# target to preprocess a source file +ecp.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecp.c.i +.PHONY : ecp.c.i + +ecp.s: ecp.c.s + +.PHONY : ecp.s + +# target to generate assembly for a file +ecp.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecp.c.s +.PHONY : ecp.c.s + +ecp_curves.o: ecp_curves.c.o + +.PHONY : ecp_curves.o + +# target to build an object file +ecp_curves.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecp_curves.c.o +.PHONY : ecp_curves.c.o + +ecp_curves.i: ecp_curves.c.i + +.PHONY : ecp_curves.i + +# target to preprocess a source file +ecp_curves.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecp_curves.c.i +.PHONY : ecp_curves.c.i + +ecp_curves.s: ecp_curves.c.s + +.PHONY : ecp_curves.s + +# target to generate assembly for a file +ecp_curves.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ecp_curves.c.s +.PHONY : ecp_curves.c.s + +entropy.o: entropy.c.o + +.PHONY : entropy.o + +# target to build an object file +entropy.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/entropy.c.o +.PHONY : entropy.c.o + +entropy.i: entropy.c.i + +.PHONY : entropy.i + +# target to preprocess a source file +entropy.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/entropy.c.i +.PHONY : entropy.c.i + +entropy.s: entropy.c.s + +.PHONY : entropy.s + +# target to generate assembly for a file +entropy.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/entropy.c.s +.PHONY : entropy.c.s + +entropy_poll.o: entropy_poll.c.o + +.PHONY : entropy_poll.o + +# target to build an object file +entropy_poll.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/entropy_poll.c.o +.PHONY : entropy_poll.c.o + +entropy_poll.i: entropy_poll.c.i + +.PHONY : entropy_poll.i + +# target to preprocess a source file +entropy_poll.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/entropy_poll.c.i +.PHONY : entropy_poll.c.i + +entropy_poll.s: entropy_poll.c.s + +.PHONY : entropy_poll.s + +# target to generate assembly for a file +entropy_poll.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/entropy_poll.c.s +.PHONY : entropy_poll.c.s + +gcm.o: gcm.c.o + +.PHONY : gcm.o + +# target to build an object file +gcm.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/gcm.c.o +.PHONY : gcm.c.o + +gcm.i: gcm.c.i + +.PHONY : gcm.i + +# target to preprocess a source file +gcm.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/gcm.c.i +.PHONY : gcm.c.i + +gcm.s: gcm.c.s + +.PHONY : gcm.s + +# target to generate assembly for a file +gcm.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/gcm.c.s +.PHONY : gcm.c.s + +havege.o: havege.c.o + +.PHONY : havege.o + +# target to build an object file +havege.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/havege.c.o +.PHONY : havege.c.o + +havege.i: havege.c.i + +.PHONY : havege.i + +# target to preprocess a source file +havege.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/havege.c.i +.PHONY : havege.c.i + +havege.s: havege.c.s + +.PHONY : havege.s + +# target to generate assembly for a file +havege.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/havege.c.s +.PHONY : havege.c.s + +hkdf.o: hkdf.c.o + +.PHONY : hkdf.o + +# target to build an object file +hkdf.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/hkdf.c.o +.PHONY : hkdf.c.o + +hkdf.i: hkdf.c.i + +.PHONY : hkdf.i + +# target to preprocess a source file +hkdf.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/hkdf.c.i +.PHONY : hkdf.c.i + +hkdf.s: hkdf.c.s + +.PHONY : hkdf.s + +# target to generate assembly for a file +hkdf.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/hkdf.c.s +.PHONY : hkdf.c.s + +hmac_drbg.o: hmac_drbg.c.o + +.PHONY : hmac_drbg.o + +# target to build an object file +hmac_drbg.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/hmac_drbg.c.o +.PHONY : hmac_drbg.c.o + +hmac_drbg.i: hmac_drbg.c.i + +.PHONY : hmac_drbg.i + +# target to preprocess a source file +hmac_drbg.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/hmac_drbg.c.i +.PHONY : hmac_drbg.c.i + +hmac_drbg.s: hmac_drbg.c.s + +.PHONY : hmac_drbg.s + +# target to generate assembly for a file +hmac_drbg.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/hmac_drbg.c.s +.PHONY : hmac_drbg.c.s + +md.o: md.c.o + +.PHONY : md.o + +# target to build an object file +md.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md.c.o +.PHONY : md.c.o + +md.i: md.c.i + +.PHONY : md.i + +# target to preprocess a source file +md.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md.c.i +.PHONY : md.c.i + +md.s: md.c.s + +.PHONY : md.s + +# target to generate assembly for a file +md.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md.c.s +.PHONY : md.c.s + +md2.o: md2.c.o + +.PHONY : md2.o + +# target to build an object file +md2.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md2.c.o +.PHONY : md2.c.o + +md2.i: md2.c.i + +.PHONY : md2.i + +# target to preprocess a source file +md2.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md2.c.i +.PHONY : md2.c.i + +md2.s: md2.c.s + +.PHONY : md2.s + +# target to generate assembly for a file +md2.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md2.c.s +.PHONY : md2.c.s + +md4.o: md4.c.o + +.PHONY : md4.o + +# target to build an object file +md4.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md4.c.o +.PHONY : md4.c.o + +md4.i: md4.c.i + +.PHONY : md4.i + +# target to preprocess a source file +md4.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md4.c.i +.PHONY : md4.c.i + +md4.s: md4.c.s + +.PHONY : md4.s + +# target to generate assembly for a file +md4.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md4.c.s +.PHONY : md4.c.s + +md5.o: md5.c.o + +.PHONY : md5.o + +# target to build an object file +md5.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md5.c.o +.PHONY : md5.c.o + +md5.i: md5.c.i + +.PHONY : md5.i + +# target to preprocess a source file +md5.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md5.c.i +.PHONY : md5.c.i + +md5.s: md5.c.s + +.PHONY : md5.s + +# target to generate assembly for a file +md5.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md5.c.s +.PHONY : md5.c.s + +md_wrap.o: md_wrap.c.o + +.PHONY : md_wrap.o + +# target to build an object file +md_wrap.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md_wrap.c.o +.PHONY : md_wrap.c.o + +md_wrap.i: md_wrap.c.i + +.PHONY : md_wrap.i + +# target to preprocess a source file +md_wrap.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md_wrap.c.i +.PHONY : md_wrap.c.i + +md_wrap.s: md_wrap.c.s + +.PHONY : md_wrap.s + +# target to generate assembly for a file +md_wrap.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/md_wrap.c.s +.PHONY : md_wrap.c.s + +memory_buffer_alloc.o: memory_buffer_alloc.c.o + +.PHONY : memory_buffer_alloc.o + +# target to build an object file +memory_buffer_alloc.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/memory_buffer_alloc.c.o +.PHONY : memory_buffer_alloc.c.o + +memory_buffer_alloc.i: memory_buffer_alloc.c.i + +.PHONY : memory_buffer_alloc.i + +# target to preprocess a source file +memory_buffer_alloc.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/memory_buffer_alloc.c.i +.PHONY : memory_buffer_alloc.c.i + +memory_buffer_alloc.s: memory_buffer_alloc.c.s + +.PHONY : memory_buffer_alloc.s + +# target to generate assembly for a file +memory_buffer_alloc.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/memory_buffer_alloc.c.s +.PHONY : memory_buffer_alloc.c.s + +nist_kw.o: nist_kw.c.o + +.PHONY : nist_kw.o + +# target to build an object file +nist_kw.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/nist_kw.c.o +.PHONY : nist_kw.c.o + +nist_kw.i: nist_kw.c.i + +.PHONY : nist_kw.i + +# target to preprocess a source file +nist_kw.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/nist_kw.c.i +.PHONY : nist_kw.c.i + +nist_kw.s: nist_kw.c.s + +.PHONY : nist_kw.s + +# target to generate assembly for a file +nist_kw.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/nist_kw.c.s +.PHONY : nist_kw.c.s + +oid.o: oid.c.o + +.PHONY : oid.o + +# target to build an object file +oid.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/oid.c.o +.PHONY : oid.c.o + +oid.i: oid.c.i + +.PHONY : oid.i + +# target to preprocess a source file +oid.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/oid.c.i +.PHONY : oid.c.i + +oid.s: oid.c.s + +.PHONY : oid.s + +# target to generate assembly for a file +oid.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/oid.c.s +.PHONY : oid.c.s + +padlock.o: padlock.c.o + +.PHONY : padlock.o + +# target to build an object file +padlock.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/padlock.c.o +.PHONY : padlock.c.o + +padlock.i: padlock.c.i + +.PHONY : padlock.i + +# target to preprocess a source file +padlock.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/padlock.c.i +.PHONY : padlock.c.i + +padlock.s: padlock.c.s + +.PHONY : padlock.s + +# target to generate assembly for a file +padlock.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/padlock.c.s +.PHONY : padlock.c.s + +pem.o: pem.c.o + +.PHONY : pem.o + +# target to build an object file +pem.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pem.c.o +.PHONY : pem.c.o + +pem.i: pem.c.i + +.PHONY : pem.i + +# target to preprocess a source file +pem.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pem.c.i +.PHONY : pem.c.i + +pem.s: pem.c.s + +.PHONY : pem.s + +# target to generate assembly for a file +pem.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pem.c.s +.PHONY : pem.c.s + +pk.o: pk.c.o + +.PHONY : pk.o + +# target to build an object file +pk.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pk.c.o +.PHONY : pk.c.o + +pk.i: pk.c.i + +.PHONY : pk.i + +# target to preprocess a source file +pk.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pk.c.i +.PHONY : pk.c.i + +pk.s: pk.c.s + +.PHONY : pk.s + +# target to generate assembly for a file +pk.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pk.c.s +.PHONY : pk.c.s + +pk_wrap.o: pk_wrap.c.o + +.PHONY : pk_wrap.o + +# target to build an object file +pk_wrap.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pk_wrap.c.o +.PHONY : pk_wrap.c.o + +pk_wrap.i: pk_wrap.c.i + +.PHONY : pk_wrap.i + +# target to preprocess a source file +pk_wrap.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pk_wrap.c.i +.PHONY : pk_wrap.c.i + +pk_wrap.s: pk_wrap.c.s + +.PHONY : pk_wrap.s + +# target to generate assembly for a file +pk_wrap.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pk_wrap.c.s +.PHONY : pk_wrap.c.s + +pkcs12.o: pkcs12.c.o + +.PHONY : pkcs12.o + +# target to build an object file +pkcs12.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkcs12.c.o +.PHONY : pkcs12.c.o + +pkcs12.i: pkcs12.c.i + +.PHONY : pkcs12.i + +# target to preprocess a source file +pkcs12.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkcs12.c.i +.PHONY : pkcs12.c.i + +pkcs12.s: pkcs12.c.s + +.PHONY : pkcs12.s + +# target to generate assembly for a file +pkcs12.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkcs12.c.s +.PHONY : pkcs12.c.s + +pkcs5.o: pkcs5.c.o + +.PHONY : pkcs5.o + +# target to build an object file +pkcs5.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkcs5.c.o +.PHONY : pkcs5.c.o + +pkcs5.i: pkcs5.c.i + +.PHONY : pkcs5.i + +# target to preprocess a source file +pkcs5.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkcs5.c.i +.PHONY : pkcs5.c.i + +pkcs5.s: pkcs5.c.s + +.PHONY : pkcs5.s + +# target to generate assembly for a file +pkcs5.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkcs5.c.s +.PHONY : pkcs5.c.s + +pkparse.o: pkparse.c.o + +.PHONY : pkparse.o + +# target to build an object file +pkparse.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkparse.c.o +.PHONY : pkparse.c.o + +pkparse.i: pkparse.c.i + +.PHONY : pkparse.i + +# target to preprocess a source file +pkparse.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkparse.c.i +.PHONY : pkparse.c.i + +pkparse.s: pkparse.c.s + +.PHONY : pkparse.s + +# target to generate assembly for a file +pkparse.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkparse.c.s +.PHONY : pkparse.c.s + +pkwrite.o: pkwrite.c.o + +.PHONY : pkwrite.o + +# target to build an object file +pkwrite.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkwrite.c.o +.PHONY : pkwrite.c.o + +pkwrite.i: pkwrite.c.i + +.PHONY : pkwrite.i + +# target to preprocess a source file +pkwrite.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkwrite.c.i +.PHONY : pkwrite.c.i + +pkwrite.s: pkwrite.c.s + +.PHONY : pkwrite.s + +# target to generate assembly for a file +pkwrite.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/pkwrite.c.s +.PHONY : pkwrite.c.s + +platform.o: platform.c.o + +.PHONY : platform.o + +# target to build an object file +platform.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/platform.c.o +.PHONY : platform.c.o + +platform.i: platform.c.i + +.PHONY : platform.i + +# target to preprocess a source file +platform.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/platform.c.i +.PHONY : platform.c.i + +platform.s: platform.c.s + +.PHONY : platform.s + +# target to generate assembly for a file +platform.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/platform.c.s +.PHONY : platform.c.s + +platform_util.o: platform_util.c.o + +.PHONY : platform_util.o + +# target to build an object file +platform_util.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/platform_util.c.o +.PHONY : platform_util.c.o + +platform_util.i: platform_util.c.i + +.PHONY : platform_util.i + +# target to preprocess a source file +platform_util.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/platform_util.c.i +.PHONY : platform_util.c.i + +platform_util.s: platform_util.c.s + +.PHONY : platform_util.s + +# target to generate assembly for a file +platform_util.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/platform_util.c.s +.PHONY : platform_util.c.s + +poly1305.o: poly1305.c.o + +.PHONY : poly1305.o + +# target to build an object file +poly1305.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/poly1305.c.o +.PHONY : poly1305.c.o + +poly1305.i: poly1305.c.i + +.PHONY : poly1305.i + +# target to preprocess a source file +poly1305.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/poly1305.c.i +.PHONY : poly1305.c.i + +poly1305.s: poly1305.c.s + +.PHONY : poly1305.s + +# target to generate assembly for a file +poly1305.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/poly1305.c.s +.PHONY : poly1305.c.s + +psa_crypto.o: psa_crypto.c.o + +.PHONY : psa_crypto.o + +# target to build an object file +psa_crypto.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto.c.o +.PHONY : psa_crypto.c.o + +psa_crypto.i: psa_crypto.c.i + +.PHONY : psa_crypto.i + +# target to preprocess a source file +psa_crypto.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto.c.i +.PHONY : psa_crypto.c.i + +psa_crypto.s: psa_crypto.c.s + +.PHONY : psa_crypto.s + +# target to generate assembly for a file +psa_crypto.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto.c.s +.PHONY : psa_crypto.c.s + +psa_crypto_slot_management.o: psa_crypto_slot_management.c.o + +.PHONY : psa_crypto_slot_management.o + +# target to build an object file +psa_crypto_slot_management.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto_slot_management.c.o +.PHONY : psa_crypto_slot_management.c.o + +psa_crypto_slot_management.i: psa_crypto_slot_management.c.i + +.PHONY : psa_crypto_slot_management.i + +# target to preprocess a source file +psa_crypto_slot_management.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto_slot_management.c.i +.PHONY : psa_crypto_slot_management.c.i + +psa_crypto_slot_management.s: psa_crypto_slot_management.c.s + +.PHONY : psa_crypto_slot_management.s + +# target to generate assembly for a file +psa_crypto_slot_management.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto_slot_management.c.s +.PHONY : psa_crypto_slot_management.c.s + +psa_crypto_storage.o: psa_crypto_storage.c.o + +.PHONY : psa_crypto_storage.o + +# target to build an object file +psa_crypto_storage.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto_storage.c.o +.PHONY : psa_crypto_storage.c.o + +psa_crypto_storage.i: psa_crypto_storage.c.i + +.PHONY : psa_crypto_storage.i + +# target to preprocess a source file +psa_crypto_storage.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto_storage.c.i +.PHONY : psa_crypto_storage.c.i + +psa_crypto_storage.s: psa_crypto_storage.c.s + +.PHONY : psa_crypto_storage.s + +# target to generate assembly for a file +psa_crypto_storage.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_crypto_storage.c.s +.PHONY : psa_crypto_storage.c.s + +psa_its_file.o: psa_its_file.c.o + +.PHONY : psa_its_file.o + +# target to build an object file +psa_its_file.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_its_file.c.o +.PHONY : psa_its_file.c.o + +psa_its_file.i: psa_its_file.c.i + +.PHONY : psa_its_file.i + +# target to preprocess a source file +psa_its_file.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_its_file.c.i +.PHONY : psa_its_file.c.i + +psa_its_file.s: psa_its_file.c.s + +.PHONY : psa_its_file.s + +# target to generate assembly for a file +psa_its_file.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/psa_its_file.c.s +.PHONY : psa_its_file.c.s + +ripemd160.o: ripemd160.c.o + +.PHONY : ripemd160.o + +# target to build an object file +ripemd160.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ripemd160.c.o +.PHONY : ripemd160.c.o + +ripemd160.i: ripemd160.c.i + +.PHONY : ripemd160.i + +# target to preprocess a source file +ripemd160.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ripemd160.c.i +.PHONY : ripemd160.c.i + +ripemd160.s: ripemd160.c.s + +.PHONY : ripemd160.s + +# target to generate assembly for a file +ripemd160.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/ripemd160.c.s +.PHONY : ripemd160.c.s + +rsa.o: rsa.c.o + +.PHONY : rsa.o + +# target to build an object file +rsa.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rsa.c.o +.PHONY : rsa.c.o + +rsa.i: rsa.c.i + +.PHONY : rsa.i + +# target to preprocess a source file +rsa.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rsa.c.i +.PHONY : rsa.c.i + +rsa.s: rsa.c.s + +.PHONY : rsa.s + +# target to generate assembly for a file +rsa.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rsa.c.s +.PHONY : rsa.c.s + +rsa_internal.o: rsa_internal.c.o + +.PHONY : rsa_internal.o + +# target to build an object file +rsa_internal.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rsa_internal.c.o +.PHONY : rsa_internal.c.o + +rsa_internal.i: rsa_internal.c.i + +.PHONY : rsa_internal.i + +# target to preprocess a source file +rsa_internal.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rsa_internal.c.i +.PHONY : rsa_internal.c.i + +rsa_internal.s: rsa_internal.c.s + +.PHONY : rsa_internal.s + +# target to generate assembly for a file +rsa_internal.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/rsa_internal.c.s +.PHONY : rsa_internal.c.s + +sha1.o: sha1.c.o + +.PHONY : sha1.o + +# target to build an object file +sha1.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha1.c.o +.PHONY : sha1.c.o + +sha1.i: sha1.c.i + +.PHONY : sha1.i + +# target to preprocess a source file +sha1.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha1.c.i +.PHONY : sha1.c.i + +sha1.s: sha1.c.s + +.PHONY : sha1.s + +# target to generate assembly for a file +sha1.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha1.c.s +.PHONY : sha1.c.s + +sha256.o: sha256.c.o + +.PHONY : sha256.o + +# target to build an object file +sha256.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha256.c.o +.PHONY : sha256.c.o + +sha256.i: sha256.c.i + +.PHONY : sha256.i + +# target to preprocess a source file +sha256.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha256.c.i +.PHONY : sha256.c.i + +sha256.s: sha256.c.s + +.PHONY : sha256.s + +# target to generate assembly for a file +sha256.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha256.c.s +.PHONY : sha256.c.s + +sha512.o: sha512.c.o + +.PHONY : sha512.o + +# target to build an object file +sha512.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha512.c.o +.PHONY : sha512.c.o + +sha512.i: sha512.c.i + +.PHONY : sha512.i + +# target to preprocess a source file +sha512.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha512.c.i +.PHONY : sha512.c.i + +sha512.s: sha512.c.s + +.PHONY : sha512.s + +# target to generate assembly for a file +sha512.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/sha512.c.s +.PHONY : sha512.c.s + +threading.o: threading.c.o + +.PHONY : threading.o + +# target to build an object file +threading.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/threading.c.o +.PHONY : threading.c.o + +threading.i: threading.c.i + +.PHONY : threading.i + +# target to preprocess a source file +threading.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/threading.c.i +.PHONY : threading.c.i + +threading.s: threading.c.s + +.PHONY : threading.s + +# target to generate assembly for a file +threading.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/threading.c.s +.PHONY : threading.c.s + +timing.o: timing.c.o + +.PHONY : timing.o + +# target to build an object file +timing.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/timing.c.o +.PHONY : timing.c.o + +timing.i: timing.c.i + +.PHONY : timing.i + +# target to preprocess a source file +timing.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/timing.c.i +.PHONY : timing.c.i + +timing.s: timing.c.s + +.PHONY : timing.s + +# target to generate assembly for a file +timing.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/timing.c.s +.PHONY : timing.c.s + +xtea.o: xtea.c.o + +.PHONY : xtea.o + +# target to build an object file +xtea.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/xtea.c.o +.PHONY : xtea.c.o + +xtea.i: xtea.c.i + +.PHONY : xtea.i + +# target to preprocess a source file +xtea.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/xtea.c.i +.PHONY : xtea.c.i + +xtea.s: xtea.c.s + +.PHONY : xtea.s + +# target to generate assembly for a file +xtea.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/build.make third_party/mbedtls/crypto/library/CMakeFiles/mbedcrypto.dir/xtea.c.s +.PHONY : xtea.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... install/local" + @echo "... install/strip" + @echo "... install" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... crypto_lib" + @echo "... mbedcrypto" + @echo "... __/__/library/error.o" + @echo "... __/__/library/error.i" + @echo "... __/__/library/error.s" + @echo "... __/__/library/version.o" + @echo "... __/__/library/version.i" + @echo "... __/__/library/version.s" + @echo "... __/__/library/version_features.o" + @echo "... __/__/library/version_features.i" + @echo "... __/__/library/version_features.s" + @echo "... aes.o" + @echo "... aes.i" + @echo "... aes.s" + @echo "... aesni.o" + @echo "... aesni.i" + @echo "... aesni.s" + @echo "... arc4.o" + @echo "... arc4.i" + @echo "... arc4.s" + @echo "... aria.o" + @echo "... aria.i" + @echo "... aria.s" + @echo "... asn1parse.o" + @echo "... asn1parse.i" + @echo "... asn1parse.s" + @echo "... asn1write.o" + @echo "... asn1write.i" + @echo "... asn1write.s" + @echo "... base64.o" + @echo "... base64.i" + @echo "... base64.s" + @echo "... bignum.o" + @echo "... bignum.i" + @echo "... bignum.s" + @echo "... blowfish.o" + @echo "... blowfish.i" + @echo "... blowfish.s" + @echo "... camellia.o" + @echo "... camellia.i" + @echo "... camellia.s" + @echo "... ccm.o" + @echo "... ccm.i" + @echo "... ccm.s" + @echo "... chacha20.o" + @echo "... chacha20.i" + @echo "... chacha20.s" + @echo "... chachapoly.o" + @echo "... chachapoly.i" + @echo "... chachapoly.s" + @echo "... cipher.o" + @echo "... cipher.i" + @echo "... cipher.s" + @echo "... cipher_wrap.o" + @echo "... cipher_wrap.i" + @echo "... cipher_wrap.s" + @echo "... cmac.o" + @echo "... cmac.i" + @echo "... cmac.s" + @echo "... ctr_drbg.o" + @echo "... ctr_drbg.i" + @echo "... ctr_drbg.s" + @echo "... des.o" + @echo "... des.i" + @echo "... des.s" + @echo "... dhm.o" + @echo "... dhm.i" + @echo "... dhm.s" + @echo "... ecdh.o" + @echo "... ecdh.i" + @echo "... ecdh.s" + @echo "... ecdsa.o" + @echo "... ecdsa.i" + @echo "... ecdsa.s" + @echo "... ecjpake.o" + @echo "... ecjpake.i" + @echo "... ecjpake.s" + @echo "... ecp.o" + @echo "... ecp.i" + @echo "... ecp.s" + @echo "... ecp_curves.o" + @echo "... ecp_curves.i" + @echo "... ecp_curves.s" + @echo "... entropy.o" + @echo "... entropy.i" + @echo "... entropy.s" + @echo "... entropy_poll.o" + @echo "... entropy_poll.i" + @echo "... entropy_poll.s" + @echo "... gcm.o" + @echo "... gcm.i" + @echo "... gcm.s" + @echo "... havege.o" + @echo "... havege.i" + @echo "... havege.s" + @echo "... hkdf.o" + @echo "... hkdf.i" + @echo "... hkdf.s" + @echo "... hmac_drbg.o" + @echo "... hmac_drbg.i" + @echo "... hmac_drbg.s" + @echo "... md.o" + @echo "... md.i" + @echo "... md.s" + @echo "... md2.o" + @echo "... md2.i" + @echo "... md2.s" + @echo "... md4.o" + @echo "... md4.i" + @echo "... md4.s" + @echo "... md5.o" + @echo "... md5.i" + @echo "... md5.s" + @echo "... md_wrap.o" + @echo "... md_wrap.i" + @echo "... md_wrap.s" + @echo "... memory_buffer_alloc.o" + @echo "... memory_buffer_alloc.i" + @echo "... memory_buffer_alloc.s" + @echo "... nist_kw.o" + @echo "... nist_kw.i" + @echo "... nist_kw.s" + @echo "... oid.o" + @echo "... oid.i" + @echo "... oid.s" + @echo "... padlock.o" + @echo "... padlock.i" + @echo "... padlock.s" + @echo "... pem.o" + @echo "... pem.i" + @echo "... pem.s" + @echo "... pk.o" + @echo "... pk.i" + @echo "... pk.s" + @echo "... pk_wrap.o" + @echo "... pk_wrap.i" + @echo "... pk_wrap.s" + @echo "... pkcs12.o" + @echo "... pkcs12.i" + @echo "... pkcs12.s" + @echo "... pkcs5.o" + @echo "... pkcs5.i" + @echo "... pkcs5.s" + @echo "... pkparse.o" + @echo "... pkparse.i" + @echo "... pkparse.s" + @echo "... pkwrite.o" + @echo "... pkwrite.i" + @echo "... pkwrite.s" + @echo "... platform.o" + @echo "... platform.i" + @echo "... platform.s" + @echo "... platform_util.o" + @echo "... platform_util.i" + @echo "... platform_util.s" + @echo "... poly1305.o" + @echo "... poly1305.i" + @echo "... poly1305.s" + @echo "... psa_crypto.o" + @echo "... psa_crypto.i" + @echo "... psa_crypto.s" + @echo "... psa_crypto_slot_management.o" + @echo "... psa_crypto_slot_management.i" + @echo "... psa_crypto_slot_management.s" + @echo "... psa_crypto_storage.o" + @echo "... psa_crypto_storage.i" + @echo "... psa_crypto_storage.s" + @echo "... psa_its_file.o" + @echo "... psa_its_file.i" + @echo "... psa_its_file.s" + @echo "... ripemd160.o" + @echo "... ripemd160.i" + @echo "... ripemd160.s" + @echo "... rsa.o" + @echo "... rsa.i" + @echo "... rsa.s" + @echo "... rsa_internal.o" + @echo "... rsa_internal.i" + @echo "... rsa_internal.s" + @echo "... sha1.o" + @echo "... sha1.i" + @echo "... sha1.s" + @echo "... sha256.o" + @echo "... sha256.i" + @echo "... sha256.s" + @echo "... sha512.o" + @echo "... sha512.i" + @echo "... sha512.s" + @echo "... threading.o" + @echo "... threading.i" + @echo "... threading.s" + @echo "... timing.o" + @echo "... timing.i" + @echo "... timing.s" + @echo "... xtea.o" + @echo "... xtea.i" + @echo "... xtea.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/third_party/mbedtls/library/Makefile b/third_party/mbedtls/library/Makefile index 60f3ae0d..fba39a59 100644 --- a/third_party/mbedtls/library/Makefile +++ b/third_party/mbedtls/library/Makefile @@ -1,163 +1,772 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.12 -# Also see "include/mbedtls/config.h" +# Default target executed when no arguments are given to make. +default_target: all -CFLAGS ?= -O2 -WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement -LDFLAGS ?= +.PHONY : default_target -LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64 -LOCAL_LDFLAGS = - -ifdef DEBUG -LOCAL_CFLAGS += -g3 -endif - -# MicroBlaze specific options: -# CFLAGS += -mno-xl-soft-mul -mxl-barrel-shift - -# To compile on Plan9: -# CFLAGS += -D_BSD_EXTENSION - -# if were running on Windows build for Windows -ifdef WINDOWS -WINDOWS_BUILD=1 -else ifeq ($(shell uname -s),Darwin) -ifeq ($(AR),ar) -APPLE_BUILD ?= 1 -endif -endif - -# To compile as a shared library: -ifdef SHARED -# all code is position-indep with mingw, avoid warning about useless flag -ifndef WINDOWS_BUILD -LOCAL_CFLAGS += -fPIC -fpic -endif -endif - -SOEXT_TLS=so.12 -SOEXT_X509=so.0 -SOEXT_CRYPTO=so.3 - -# Set AR_DASH= (empty string) to use an ar implementation that does not accept -# the - prefix for command line options (e.g. llvm-ar) -AR_DASH ?= - - -ARFLAGS = $(AR_DASH)src -ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) -ARFLAGS = $(AR_DASH)Src -RLFLAGS = -no_warning_for_no_symbols -c -RL ?= ranlib -endif -endif - -DLEXT ?= so -ifdef WINDOWS_BUILD -# Windows shared library extension: -DLEXT = dll -else ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) -# Mac OS X shared library extension: -DLEXT = dylib -endif -endif +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: +#============================================================================= +# Special targets provided by cmake. -# Look in crypto for libmbedcrypto. -LOCAL_LDFLAGS += -L../crypto/library -LOCAL_CFLAGS += -I../crypto/include -CRYPTO := ../crypto/library/ +# Disable implicit rules so canonical targets will work. +.SUFFIXES: -OBJS_X509= certs.o pkcs11.o x509.o \ - x509_create.o x509_crl.o x509_crt.o \ - x509_csr.o x509write_crt.o x509write_csr.o -OBJS_TLS= debug.o net_sockets.o \ - ssl_cache.o ssl_ciphersuites.o \ - ssl_cli.o ssl_cookie.o \ - ssl_srv.o ssl_ticket.o \ - ssl_tls.o +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = -.SILENT: +.SUFFIXES: .hpux_make_needs_suffix_list -.PHONY: all static shared clean -ifndef SHARED -all: static -else -all: shared static -endif +# Suppress display of executed commands. +$(VERBOSE).SILENT: -static: libmbedcrypto.a libmbedx509.a libmbedtls.a -shared: libmbedcrypto.$(DLEXT) libmbedx509.$(DLEXT) libmbedtls.$(DLEXT) +# A target that is always out of date. +cmake_force: -# tls -libmbedtls.a: $(OBJS_TLS) - echo " AR $@" - $(AR) $(ARFLAGS) $@ $(OBJS_TLS) -ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) - echo " RL $@" - $(RL) $(RLFLAGS) $@ -endif -endif +.PHONY : cmake_force -libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so - echo " LD $@" - $(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS) +#============================================================================= +# Set environment variables for the build. -libmbedtls.so: libmbedtls.$(SOEXT_TLS) - echo " LN $@ -> $<" - ln -sf $< $@ +# The shell in which to execute make rules. +SHELL = /bin/sh -libmbedtls.dylib: $(OBJS_TLS) libmbedx509.dylib - echo " LD $@" - $(CC) -dynamiclib -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS) +# The CMake executable. +CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake -libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll - echo " LD $@" - $(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_TLS) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -lmbedx509 -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS) +# The command to remove a file. +RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f -# x509 -libmbedx509.a: $(OBJS_X509) - echo " AR $@" - $(AR) $(ARFLAGS) $@ $(OBJS_X509) -ifdef APPLE_BUILD -ifneq ($(APPLE_BUILD),0) - echo " RL $@" - $(RL) $(RLFLAGS) $@ -endif -endif +# Escaping for special characters. +EQUALS = = -libmbedx509.$(SOEXT_X509): $(OBJS_X509) $(CRYPTO)libmbedcrypto.so - echo " LD $@" - $(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509) +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /Users/bsergeant/src/foss/ixwebsocket -libmbedx509.so: libmbedx509.$(SOEXT_X509) - echo " LN $@ -> $<" - ln -sf $< $@ +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /Users/bsergeant/src/foss/ixwebsocket -libmbedx509.dylib: $(OBJS_X509) libmbedcrypto.dylib - echo " LD $@" - $(CC) -dynamiclib -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509) +#============================================================================= +# Targets provided globally by CMake. -libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll - echo " LD $@" - $(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_X509) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS) +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local -libmbedcrypto.%: - $(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C ../crypto/library $@ +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast -.c.o: - echo " CC $<" - $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c $< +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components + +.PHONY : list_install_components/fast + +# The main all target +all: cmake_check_build_system + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles /Users/bsergeant/src/foss/ixwebsocket/third_party/mbedtls/library/CMakeFiles/progress.marks + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/all + $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles 0 +.PHONY : all + +# The main clean target clean: -ifndef WINDOWS - rm -f *.o libmbed* -else - del /Q /F *.o libmbed* -endif + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +third_party/mbedtls/library/CMakeFiles/lib.dir/rule: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/CMakeFiles/lib.dir/rule +.PHONY : third_party/mbedtls/library/CMakeFiles/lib.dir/rule + +# Convenience name for target. +lib: third_party/mbedtls/library/CMakeFiles/lib.dir/rule + +.PHONY : lib + +# fast build rule for target. +lib/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/lib.dir/build.make third_party/mbedtls/library/CMakeFiles/lib.dir/build +.PHONY : lib/fast + +# Convenience name for target. +third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule +.PHONY : third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule + +# Convenience name for target. +mbedtls: third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule + +.PHONY : mbedtls + +# fast build rule for target. +mbedtls/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build +.PHONY : mbedtls/fast + +# Convenience name for target. +third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule +.PHONY : third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule + +# Convenience name for target. +mbedx509: third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule + +.PHONY : mbedx509 + +# fast build rule for target. +mbedx509/fast: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build +.PHONY : mbedx509/fast + +certs.o: certs.c.o + +.PHONY : certs.o + +# target to build an object file +certs.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/certs.c.o +.PHONY : certs.c.o + +certs.i: certs.c.i + +.PHONY : certs.i + +# target to preprocess a source file +certs.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/certs.c.i +.PHONY : certs.c.i + +certs.s: certs.c.s + +.PHONY : certs.s + +# target to generate assembly for a file +certs.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/certs.c.s +.PHONY : certs.c.s + +debug.o: debug.c.o + +.PHONY : debug.o + +# target to build an object file +debug.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/debug.c.o +.PHONY : debug.c.o + +debug.i: debug.c.i + +.PHONY : debug.i + +# target to preprocess a source file +debug.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/debug.c.i +.PHONY : debug.c.i + +debug.s: debug.c.s + +.PHONY : debug.s + +# target to generate assembly for a file +debug.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/debug.c.s +.PHONY : debug.c.s + +net_sockets.o: net_sockets.c.o + +.PHONY : net_sockets.o + +# target to build an object file +net_sockets.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/net_sockets.c.o +.PHONY : net_sockets.c.o + +net_sockets.i: net_sockets.c.i + +.PHONY : net_sockets.i + +# target to preprocess a source file +net_sockets.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/net_sockets.c.i +.PHONY : net_sockets.c.i + +net_sockets.s: net_sockets.c.s + +.PHONY : net_sockets.s + +# target to generate assembly for a file +net_sockets.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/net_sockets.c.s +.PHONY : net_sockets.c.s + +pkcs11.o: pkcs11.c.o + +.PHONY : pkcs11.o + +# target to build an object file +pkcs11.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/pkcs11.c.o +.PHONY : pkcs11.c.o + +pkcs11.i: pkcs11.c.i + +.PHONY : pkcs11.i + +# target to preprocess a source file +pkcs11.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/pkcs11.c.i +.PHONY : pkcs11.c.i + +pkcs11.s: pkcs11.c.s + +.PHONY : pkcs11.s + +# target to generate assembly for a file +pkcs11.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/pkcs11.c.s +.PHONY : pkcs11.c.s + +ssl_cache.o: ssl_cache.c.o + +.PHONY : ssl_cache.o + +# target to build an object file +ssl_cache.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cache.c.o +.PHONY : ssl_cache.c.o + +ssl_cache.i: ssl_cache.c.i + +.PHONY : ssl_cache.i + +# target to preprocess a source file +ssl_cache.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cache.c.i +.PHONY : ssl_cache.c.i + +ssl_cache.s: ssl_cache.c.s + +.PHONY : ssl_cache.s + +# target to generate assembly for a file +ssl_cache.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cache.c.s +.PHONY : ssl_cache.c.s + +ssl_ciphersuites.o: ssl_ciphersuites.c.o + +.PHONY : ssl_ciphersuites.o + +# target to build an object file +ssl_ciphersuites.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ciphersuites.c.o +.PHONY : ssl_ciphersuites.c.o + +ssl_ciphersuites.i: ssl_ciphersuites.c.i + +.PHONY : ssl_ciphersuites.i + +# target to preprocess a source file +ssl_ciphersuites.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ciphersuites.c.i +.PHONY : ssl_ciphersuites.c.i + +ssl_ciphersuites.s: ssl_ciphersuites.c.s + +.PHONY : ssl_ciphersuites.s + +# target to generate assembly for a file +ssl_ciphersuites.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ciphersuites.c.s +.PHONY : ssl_ciphersuites.c.s + +ssl_cli.o: ssl_cli.c.o + +.PHONY : ssl_cli.o + +# target to build an object file +ssl_cli.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cli.c.o +.PHONY : ssl_cli.c.o + +ssl_cli.i: ssl_cli.c.i + +.PHONY : ssl_cli.i + +# target to preprocess a source file +ssl_cli.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cli.c.i +.PHONY : ssl_cli.c.i + +ssl_cli.s: ssl_cli.c.s + +.PHONY : ssl_cli.s + +# target to generate assembly for a file +ssl_cli.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cli.c.s +.PHONY : ssl_cli.c.s + +ssl_cookie.o: ssl_cookie.c.o + +.PHONY : ssl_cookie.o + +# target to build an object file +ssl_cookie.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cookie.c.o +.PHONY : ssl_cookie.c.o + +ssl_cookie.i: ssl_cookie.c.i + +.PHONY : ssl_cookie.i + +# target to preprocess a source file +ssl_cookie.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cookie.c.i +.PHONY : ssl_cookie.c.i + +ssl_cookie.s: ssl_cookie.c.s + +.PHONY : ssl_cookie.s + +# target to generate assembly for a file +ssl_cookie.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cookie.c.s +.PHONY : ssl_cookie.c.s + +ssl_srv.o: ssl_srv.c.o + +.PHONY : ssl_srv.o + +# target to build an object file +ssl_srv.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_srv.c.o +.PHONY : ssl_srv.c.o + +ssl_srv.i: ssl_srv.c.i + +.PHONY : ssl_srv.i + +# target to preprocess a source file +ssl_srv.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_srv.c.i +.PHONY : ssl_srv.c.i + +ssl_srv.s: ssl_srv.c.s + +.PHONY : ssl_srv.s + +# target to generate assembly for a file +ssl_srv.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_srv.c.s +.PHONY : ssl_srv.c.s + +ssl_ticket.o: ssl_ticket.c.o + +.PHONY : ssl_ticket.o + +# target to build an object file +ssl_ticket.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ticket.c.o +.PHONY : ssl_ticket.c.o + +ssl_ticket.i: ssl_ticket.c.i + +.PHONY : ssl_ticket.i + +# target to preprocess a source file +ssl_ticket.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ticket.c.i +.PHONY : ssl_ticket.c.i + +ssl_ticket.s: ssl_ticket.c.s + +.PHONY : ssl_ticket.s + +# target to generate assembly for a file +ssl_ticket.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ticket.c.s +.PHONY : ssl_ticket.c.s + +ssl_tls.o: ssl_tls.c.o + +.PHONY : ssl_tls.o + +# target to build an object file +ssl_tls.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_tls.c.o +.PHONY : ssl_tls.c.o + +ssl_tls.i: ssl_tls.c.i + +.PHONY : ssl_tls.i + +# target to preprocess a source file +ssl_tls.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_tls.c.i +.PHONY : ssl_tls.c.i + +ssl_tls.s: ssl_tls.c.s + +.PHONY : ssl_tls.s + +# target to generate assembly for a file +ssl_tls.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_tls.c.s +.PHONY : ssl_tls.c.s + +x509.o: x509.c.o + +.PHONY : x509.o + +# target to build an object file +x509.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509.c.o +.PHONY : x509.c.o + +x509.i: x509.c.i + +.PHONY : x509.i + +# target to preprocess a source file +x509.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509.c.i +.PHONY : x509.c.i + +x509.s: x509.c.s + +.PHONY : x509.s + +# target to generate assembly for a file +x509.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509.c.s +.PHONY : x509.c.s + +x509_create.o: x509_create.c.o + +.PHONY : x509_create.o + +# target to build an object file +x509_create.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_create.c.o +.PHONY : x509_create.c.o + +x509_create.i: x509_create.c.i + +.PHONY : x509_create.i + +# target to preprocess a source file +x509_create.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_create.c.i +.PHONY : x509_create.c.i + +x509_create.s: x509_create.c.s + +.PHONY : x509_create.s + +# target to generate assembly for a file +x509_create.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_create.c.s +.PHONY : x509_create.c.s + +x509_crl.o: x509_crl.c.o + +.PHONY : x509_crl.o + +# target to build an object file +x509_crl.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crl.c.o +.PHONY : x509_crl.c.o + +x509_crl.i: x509_crl.c.i + +.PHONY : x509_crl.i + +# target to preprocess a source file +x509_crl.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crl.c.i +.PHONY : x509_crl.c.i + +x509_crl.s: x509_crl.c.s + +.PHONY : x509_crl.s + +# target to generate assembly for a file +x509_crl.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crl.c.s +.PHONY : x509_crl.c.s + +x509_crt.o: x509_crt.c.o + +.PHONY : x509_crt.o + +# target to build an object file +x509_crt.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crt.c.o +.PHONY : x509_crt.c.o + +x509_crt.i: x509_crt.c.i + +.PHONY : x509_crt.i + +# target to preprocess a source file +x509_crt.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crt.c.i +.PHONY : x509_crt.c.i + +x509_crt.s: x509_crt.c.s + +.PHONY : x509_crt.s + +# target to generate assembly for a file +x509_crt.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crt.c.s +.PHONY : x509_crt.c.s + +x509_csr.o: x509_csr.c.o + +.PHONY : x509_csr.o + +# target to build an object file +x509_csr.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_csr.c.o +.PHONY : x509_csr.c.o + +x509_csr.i: x509_csr.c.i + +.PHONY : x509_csr.i + +# target to preprocess a source file +x509_csr.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_csr.c.i +.PHONY : x509_csr.c.i + +x509_csr.s: x509_csr.c.s + +.PHONY : x509_csr.s + +# target to generate assembly for a file +x509_csr.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_csr.c.s +.PHONY : x509_csr.c.s + +x509write_crt.o: x509write_crt.c.o + +.PHONY : x509write_crt.o + +# target to build an object file +x509write_crt.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_crt.c.o +.PHONY : x509write_crt.c.o + +x509write_crt.i: x509write_crt.c.i + +.PHONY : x509write_crt.i + +# target to preprocess a source file +x509write_crt.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_crt.c.i +.PHONY : x509write_crt.c.i + +x509write_crt.s: x509write_crt.c.s + +.PHONY : x509write_crt.s + +# target to generate assembly for a file +x509write_crt.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_crt.c.s +.PHONY : x509write_crt.c.s + +x509write_csr.o: x509write_csr.c.o + +.PHONY : x509write_csr.o + +# target to build an object file +x509write_csr.c.o: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_csr.c.o +.PHONY : x509write_csr.c.o + +x509write_csr.i: x509write_csr.c.i + +.PHONY : x509write_csr.i + +# target to preprocess a source file +x509write_csr.c.i: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_csr.c.i +.PHONY : x509write_csr.c.i + +x509write_csr.s: x509write_csr.c.s + +.PHONY : x509write_csr.s + +# target to generate assembly for a file +x509write_csr.c.s: + cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_csr.c.s +.PHONY : x509write_csr.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... install/local" + @echo "... install/strip" + @echo "... install" + @echo "... lib" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... list_install_components" + @echo "... mbedtls" + @echo "... mbedx509" + @echo "... certs.o" + @echo "... certs.i" + @echo "... certs.s" + @echo "... debug.o" + @echo "... debug.i" + @echo "... debug.s" + @echo "... net_sockets.o" + @echo "... net_sockets.i" + @echo "... net_sockets.s" + @echo "... pkcs11.o" + @echo "... pkcs11.i" + @echo "... pkcs11.s" + @echo "... ssl_cache.o" + @echo "... ssl_cache.i" + @echo "... ssl_cache.s" + @echo "... ssl_ciphersuites.o" + @echo "... ssl_ciphersuites.i" + @echo "... ssl_ciphersuites.s" + @echo "... ssl_cli.o" + @echo "... ssl_cli.i" + @echo "... ssl_cli.s" + @echo "... ssl_cookie.o" + @echo "... ssl_cookie.i" + @echo "... ssl_cookie.s" + @echo "... ssl_srv.o" + @echo "... ssl_srv.i" + @echo "... ssl_srv.s" + @echo "... ssl_ticket.o" + @echo "... ssl_ticket.i" + @echo "... ssl_ticket.s" + @echo "... ssl_tls.o" + @echo "... ssl_tls.i" + @echo "... ssl_tls.s" + @echo "... x509.o" + @echo "... x509.i" + @echo "... x509.s" + @echo "... x509_create.o" + @echo "... x509_create.i" + @echo "... x509_create.s" + @echo "... x509_crl.o" + @echo "... x509_crl.i" + @echo "... x509_crl.s" + @echo "... x509_crt.o" + @echo "... x509_crt.i" + @echo "... x509_crt.s" + @echo "... x509_csr.o" + @echo "... x509_csr.i" + @echo "... x509_csr.s" + @echo "... x509write_crt.o" + @echo "... x509write_crt.i" + @echo "... x509write_crt.s" + @echo "... x509write_csr.o" + @echo "... x509write_csr.i" + @echo "... x509write_csr.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/ws/CMakeLists.txt b/ws/CMakeLists.txt index 4084debb..cb564c77 100644 --- a/ws/CMakeLists.txt +++ b/ws/CMakeLists.txt @@ -25,10 +25,14 @@ include_directories(ws ../third_party/statsd-client-cpp/src) include_directories(ws ../third_party/spdlog/include) include_directories(ws snake) +if (UNIX) + set( STATSD_CLIENT_SOURCES ../third_party/statsd-client-cpp/src/statsd_client.cpp) +endif() + add_executable(ws ../third_party/msgpack11/msgpack11.cpp ../third_party/jsoncpp/jsoncpp.cpp - ../third_party/statsd-client-cpp/src/statsd_client.cpp + ${STATSD_CLIENT_SOURCES} ixcore/utils/IXCoreLogger.cpp @@ -68,7 +72,7 @@ add_executable(ws target_link_libraries(ws ixwebsocket) -if(NOT APPLE) +if(NOT APPLE AND NOT USE_MBED_TLS) find_package(OpenSSL REQUIRED) add_definitions(${OPENSSL_DEFINITIONS}) message(STATUS "OpenSSL: " ${OPENSSL_VERSION}) diff --git a/ws/IXSentryClient.cpp b/ws/IXSentryClient.cpp index 2d266713..8d452df4 100644 --- a/ws/IXSentryClient.cpp +++ b/ws/IXSentryClient.cpp @@ -22,7 +22,7 @@ namespace ix const std::regex dsnRegex("(http[s]?)://([^:]+):([^@]+)@([^/]+)/([0-9]+)"); std::smatch group; - if (std::regex_match(dsn, group, dsnRegex) and group.size() == 6) + if (std::regex_match(dsn, group, dsnRegex) && group.size() == 6) { _validDsn = true; @@ -47,8 +47,8 @@ namespace ix { std::time_t now; std::time(&now); - char buf[sizeof "2011-10-08T07:07:09Z"]; - std::strftime(buf, sizeof buf, "%Y-%m-%dT%H:%M:%SZ", std::gmtime(&now)); + char buf[sizeof("2011-10-08T07:07:09Z")]; + std::strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", std::gmtime(&now)); return buf; } diff --git a/ws/ixcrypto/IXHMac.cpp b/ws/ixcrypto/IXHMac.cpp index e3fd158e..72acbfc9 100644 --- a/ws/ixcrypto/IXHMac.cpp +++ b/ws/ixcrypto/IXHMac.cpp @@ -3,10 +3,14 @@ * Author: Benjamin Sergeant * Copyright (c) 2018 Machine Zone. All rights reserved. */ + #include "IXHMac.h" #include "IXBase64.h" -#ifdef __APPLE__ +#if defined(IXWEBSOCKET_USE_MBED_TLS) +# include +#elif defined(__APPLE__) +# include # include #else # include @@ -19,7 +23,12 @@ namespace ix constexpr size_t hashSize = 16; unsigned char hash[hashSize]; -#ifdef __APPLE__ +#if defined(IXWEBSOCKET_USE_MBED_TLS) + mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_MD5), + (unsigned char *) key.c_str(), key.size(), + (unsigned char *) data.c_str(), data.size(), + (unsigned char *) &hash); +#elif defined(__APPLE__) CCHmac(kCCHmacAlgMD5, key.c_str(), key.size(), data.c_str(), data.size(), diff --git a/ws/snake/IXSnakeProtocol.h b/ws/snake/IXSnakeProtocol.h index 16d2e7b1..fd541d07 100644 --- a/ws/snake/IXSnakeProtocol.h +++ b/ws/snake/IXSnakeProtocol.h @@ -7,6 +7,7 @@ #pragma once #include +#include namespace ix { diff --git a/ws/ws.cpp b/ws/ws.cpp index f149d711..308652cc 100644 --- a/ws/ws.cpp +++ b/ws/ws.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +// #include #include #include diff --git a/ws/ws_cobra_to_statsd.cpp b/ws/ws_cobra_to_statsd.cpp index cadcfed7..7d16efa7 100644 --- a/ws/ws_cobra_to_statsd.cpp +++ b/ws/ws_cobra_to_statsd.cpp @@ -12,9 +12,12 @@ #include #include -#include #include +#ifndef _WIN32 +#include +#endif + namespace ix { // fields are command line argument that can be specified multiple times @@ -77,7 +80,11 @@ namespace ix // statsd client // test with netcat as a server: `nc -ul 8125` bool statsdBatch = true; +#ifndef _WIN32 statsd::StatsdClient statsdClient(host, port, prefix, statsdBatch); +#else + int statsdClient; +#endif Json::FastWriter jsonWriter; uint64_t msgCount = 0; @@ -124,7 +131,9 @@ namespace ix spdlog::info("{} {}{}", msgCount++, prefix, id); +#ifndef _WIN32 statsdClient.count(id, 1); +#endif }); } else if (eventType == ix::CobraConnection_EventType_Subscribed) diff --git a/ws/ws_send.cpp b/ws/ws_send.cpp index 586472f2..afd0b8b7 100644 --- a/ws/ws_send.cpp +++ b/ws/ws_send.cpp @@ -94,7 +94,7 @@ namespace ix std::streamoff size = file.tellg(); file.seekg(0, file.beg); - memblock.resize(size); + memblock.resize((size_t) size); file.read((char*)&memblock.front(), static_cast(size)); return memblock; diff --git a/ws/ws_snake.cpp b/ws/ws_snake.cpp index 4debc650..557d6e47 100644 --- a/ws/ws_snake.cpp +++ b/ws/ws_snake.cpp @@ -23,7 +23,7 @@ namespace std::streamoff size = file.tellg(); file.seekg(0, file.beg); - memblock.resize(size); + memblock.resize((size_t) size); file.read((char*)&memblock.front(), static_cast(size)); return memblock;