From 27b7f85a0beafedfe97e8a95b9599ac0c0f53e29 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 May 2005 18:35:49 +0400 Subject: Fixes for numerous compatibility problems in yaSSL. extra/yassl/include/openssl/ssl.h: Fix -std=c++98 mode compilation failures. extra/yassl/include/yassl_error.hpp: Fix -std=c++98 mode compilation failures. extra/yassl/include/yassl_types.hpp: Fix -std=c++98 mode compilation failures. extra/yassl/mySTL/helpers.hpp: Fix AIX 5.2 compilation problem. extra/yassl/taocrypt/include/asn.hpp: Fix -std=c++98 mode compilation failures. vio/Makefile.am: Add a dummy C++ file to SSL tests to make libtool use a C++ linker: this lets ssl tests link when using yaSSL and a non-gcc C++ compiler. --- extra/yassl/mySTL/helpers.hpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'extra/yassl/mySTL/helpers.hpp') diff --git a/extra/yassl/mySTL/helpers.hpp b/extra/yassl/mySTL/helpers.hpp index 1b62d60cd2e..fdb856d4db1 100644 --- a/extra/yassl/mySTL/helpers.hpp +++ b/extra/yassl/mySTL/helpers.hpp @@ -27,16 +27,28 @@ #ifndef mySTL_HELPERS_HPP #define mySTL_HELPERS_HPP -#include +#include +#ifdef __IBMCPP__ +/* + Workaround the lack of operator new(size_t, void*) + in IBM VA CPP 6.0 +*/ +struct Dummy {}; +inline void *operator new(size_t size, Dummy *d) { return (void*) d; } +typedef Dummy *yassl_pointer; +#else +typedef void *yassl_pointer; +#endif + namespace mySTL { template inline void construct(T* p, const T2& value) { - new (static_cast(p)) T(value); + new ((yassl_pointer) p) T(value); } -- cgit v1.2.1