summaryrefslogtreecommitdiff
path: root/extra/yassl/mySTL/helpers.hpp
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-05-20 18:35:49 +0400
committerunknown <konstantin@mysql.com>2005-05-20 18:35:49 +0400
commit27b7f85a0beafedfe97e8a95b9599ac0c0f53e29 (patch)
tree1d07140c18701ac5e0d4e6098c06d3bbafa37b8f /extra/yassl/mySTL/helpers.hpp
parent78d81529f470f30192ac8b256e9e893062573c99 (diff)
downloadmariadb-git-27b7f85a0beafedfe97e8a95b9599ac0c0f53e29.tar.gz
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.
Diffstat (limited to 'extra/yassl/mySTL/helpers.hpp')
-rw-r--r--extra/yassl/mySTL/helpers.hpp16
1 files changed, 14 insertions, 2 deletions
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 <cstdlib>
+#include <stdlib.h>
+#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 <typename T, typename T2>
inline void construct(T* p, const T2& value)
{
- new (static_cast<void*>(p)) T(value);
+ new ((yassl_pointer) p) T(value);
}