From 7936630e19d2f008b2e3128a98cacaca2de8d02c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 May 2005 19:32:51 +0500 Subject: [PATCH] WL#2286 - Compile MySQL w/YASSL support Portability fixes extra/yassl/include/buffer.hpp: Use assert.h instead of less portable cassert extra/yassl/include/log.hpp: Use stdio.h instead of less portable cstdio extra/yassl/include/socket_wrapper.hpp: Use assert.h instead of less portable cassert extra/yassl/mySTL/helpers.hpp: Use stdlib.h instead of less portable cstdlib extra/yassl/mySTL/stdexcept.hpp: Use string.h instead of less portable cstring extra/yassl/mySTL/vector.hpp: Use assert.h instead of less portable cassert extra/yassl/src/ssl.cpp: Use stdio.h instead of less portable cstdio extra/yassl/taocrypt/include/block.hpp: Use stddef.h instead of less portable cstddef, always use ptrdiff_t instead of less portable std::ptrdiff_t extra/yassl/taocrypt/include/file.hpp: Use stdio.h instead of less portable cstdio extra/yassl/taocrypt/include/integer.hpp: Use string.h instead of less portable cstring extra/yassl/taocrypt/include/runtime.hpp: Use stdlib.h instead of less portable cstdlib extra/yassl/taocrypt/src/dh.cpp: Use math.h instead of less portable cmatch --- extra/yassl/include/buffer.hpp | 2 +- extra/yassl/include/log.hpp | 2 +- extra/yassl/include/socket_wrapper.hpp | 2 +- extra/yassl/mySTL/helpers.hpp | 2 +- extra/yassl/mySTL/stdexcept.hpp | 2 +- extra/yassl/mySTL/vector.hpp | 2 +- extra/yassl/src/ssl.cpp | 2 +- extra/yassl/taocrypt/include/block.hpp | 6 +----- extra/yassl/taocrypt/include/file.hpp | 2 +- extra/yassl/taocrypt/include/integer.hpp | 2 +- extra/yassl/taocrypt/include/runtime.hpp | 2 +- extra/yassl/taocrypt/src/dh.cpp | 2 +- 12 files changed, 12 insertions(+), 16 deletions(-) diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp index 126bdbc19b7..cdf44ee60a5 100644 --- a/extra/yassl/include/buffer.hpp +++ b/extra/yassl/include/buffer.hpp @@ -27,7 +27,7 @@ #ifndef yaSSL_BUFFER_HPP #define yaSSL_BUFFER_HPP -#include // assert +#include // assert #include "yassl_error.hpp" // Error #include "memory.hpp" // mySTL::auto_ptr #include "algorithm.hpp" // mySTL::swap diff --git a/extra/yassl/include/log.hpp b/extra/yassl/include/log.hpp index 5753bb4502d..c20116901ad 100644 --- a/extra/yassl/include/log.hpp +++ b/extra/yassl/include/log.hpp @@ -30,7 +30,7 @@ #include "socket_wrapper.hpp" #ifdef YASSL_LOG -#include +#include #endif namespace yaSSL { diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index dddbd65e220..2a4ac142ec8 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -29,7 +29,7 @@ #ifndef yaSSL_SOCKET_WRAPPER_HPP #define yaSSL_SOCKET_WRAPPER_HPP -#include +#include #ifdef WIN32 #include diff --git a/extra/yassl/mySTL/helpers.hpp b/extra/yassl/mySTL/helpers.hpp index 1b62d60cd2e..10f120e914b 100644 --- a/extra/yassl/mySTL/helpers.hpp +++ b/extra/yassl/mySTL/helpers.hpp @@ -27,7 +27,7 @@ #ifndef mySTL_HELPERS_HPP #define mySTL_HELPERS_HPP -#include +#include namespace mySTL { diff --git a/extra/yassl/mySTL/stdexcept.hpp b/extra/yassl/mySTL/stdexcept.hpp index 817861438a5..7b797f43c2b 100644 --- a/extra/yassl/mySTL/stdexcept.hpp +++ b/extra/yassl/mySTL/stdexcept.hpp @@ -28,7 +28,7 @@ #define mySTL_STDEXCEPT_HPP -#include // strncpy +#include // strncpy namespace mySTL { diff --git a/extra/yassl/mySTL/vector.hpp b/extra/yassl/mySTL/vector.hpp index 7f1f99295e4..6d5a9b6c057 100644 --- a/extra/yassl/mySTL/vector.hpp +++ b/extra/yassl/mySTL/vector.hpp @@ -31,7 +31,7 @@ #include "helpers.hpp" // construct, destory, fill, etc. #include "algorithm.hpp" // swap #include // ::operator new and delete, placement too -#include // assert +#include // assert namespace mySTL { diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 065b3c260bf..53bd8a75ab6 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -36,7 +36,7 @@ #include "openssl/ssl.h" #include "handshake.hpp" #include "yassl_int.hpp" -#include +#include namespace yaSSL { diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp index 6e96ec9cc35..f490fb0b6e7 100644 --- a/extra/yassl/taocrypt/include/block.hpp +++ b/extra/yassl/taocrypt/include/block.hpp @@ -31,7 +31,7 @@ #include "stdexcept.hpp" // mySTL::runtime_error #include "misc.hpp" #include // memcpy -#include // ptrdiff_t +#include // ptrdiff_t #if defined(_MSC_VER) && defined(_CRTAPI1) @@ -49,11 +49,7 @@ class AllocatorBase public: typedef T value_type; typedef size_t size_type; -#ifdef TAOCRYPT_MSVCRT6 typedef ptrdiff_t difference_type; -#else - typedef std::ptrdiff_t difference_type; -#endif typedef T* pointer; typedef const T* const_pointer; typedef T& reference; diff --git a/extra/yassl/taocrypt/include/file.hpp b/extra/yassl/taocrypt/include/file.hpp index b27ab3aebf3..fe7e1073c99 100644 --- a/extra/yassl/taocrypt/include/file.hpp +++ b/extra/yassl/taocrypt/include/file.hpp @@ -29,7 +29,7 @@ #include "misc.hpp" #include "block.hpp" #include "error.hpp" -#include +#include namespace TaoCrypt { diff --git a/extra/yassl/taocrypt/include/integer.hpp b/extra/yassl/taocrypt/include/integer.hpp index 94383f8061d..3713d09d9f9 100644 --- a/extra/yassl/taocrypt/include/integer.hpp +++ b/extra/yassl/taocrypt/include/integer.hpp @@ -29,7 +29,7 @@ #include "block.hpp" #include "random.hpp" #include "file.hpp" -#include +#include #include "algorithm.hpp" // mySTL::swap diff --git a/extra/yassl/taocrypt/include/runtime.hpp b/extra/yassl/taocrypt/include/runtime.hpp index e2c04af44f4..43f1b72fd51 100644 --- a/extra/yassl/taocrypt/include/runtime.hpp +++ b/extra/yassl/taocrypt/include/runtime.hpp @@ -31,7 +31,7 @@ #if __GNUC__ > 2 -#include +#include static void* operator new (size_t sz) diff --git a/extra/yassl/taocrypt/src/dh.cpp b/extra/yassl/taocrypt/src/dh.cpp index e5a6a562c52..af50d471b52 100644 --- a/extra/yassl/taocrypt/src/dh.cpp +++ b/extra/yassl/taocrypt/src/dh.cpp @@ -26,7 +26,7 @@ #include "runtime.hpp" #include "dh.hpp" #include "asn.hpp" -#include +#include namespace TaoCrypt {