Commit 5870ddf1 authored by unknown's avatar unknown
Browse files

Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/svoj/devel/mysql/yassl-mysql-5.0

parents 4de0989e 0dabdf15
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ namespace yaSSL {


#ifdef MULTI_THREADED
    #ifdef WIN32
    #ifdef _WIN32
        #include <windows.h>

        class Mutex {
@@ -50,7 +50,7 @@ namespace yaSSL {
                ~Lock();
            };
        };
    #else  // WIN32
    #else  // _WIN32
        #include <pthread.h>

        class Mutex {
@@ -71,7 +71,7 @@ namespace yaSSL {
            };
        };

    #endif // WIN32
    #endif // _WIN32
#else  // MULTI_THREADED (WE'RE SINGLE)

    class Mutex {
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@

#include <assert.h>

#ifdef WIN32
#ifdef _WIN32
    #include <winsock2.h>
#else 
    #include <sys/time.h>
@@ -47,7 +47,7 @@ namespace yaSSL {

typedef unsigned int uint;

#ifdef WIN32
#ifdef _WIN32
    typedef SOCKET socket_t;
#else
    typedef int socket_t;
+15 −8
Original line number Diff line number Diff line
@@ -31,32 +31,39 @@
#include <new>        // placement new



#ifdef __IBMCPP__
/*
      Workaround for the lack of operator new(size_t, void*)
      in IBM VA C++ 6.0
*/
    struct Dummy {};
inline void *operator new(size_t size, Dummy *d) { return (void*) d; }

    inline void* operator new(size_t size, Dummy* d) 
    { 
        return static_cast<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 ((yassl_pointer) p) T(value);
    new (reinterpret_cast<yassl_pointer>(p)) T(value);
}


template <typename T>
inline void construct(T* p)
{
    new (static_cast<void*>(p)) T();
    new (reinterpret_cast<yassl_pointer>(p)) T();
}


+3 −3
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ namespace yaSSL {


#ifdef MULTI_THREADED
    #ifdef WIN32
    #ifdef _WIN32
        
        Mutex::Mutex()
        {
@@ -54,7 +54,7 @@ namespace yaSSL {
            LeaveCriticalSection(&mutex_.cs_); 
        }
            
    #else  // WIN32
    #else  // _WIN32
        
        Mutex::Mutex()
        {
@@ -80,7 +80,7 @@ namespace yaSSL {
        }
         

    #endif // WIN32
    #endif // _WIN32
#endif // MULTI_THREADED


+2 −2
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ namespace yaSSL {
    }


    #if defined(WIN32) || defined(__MACH__) || defined(__hpux__)
    #if defined(_WIN32) || defined(__MACH__) || defined(__hpux__)
        typedef int socklen_t;
    #endif

Loading