diff options
author | Bernard Normier <bernard@zeroc.com> | 2003-06-02 18:03:38 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2003-06-02 18:03:38 +0000 |
commit | e1d353c76161651ffc4db678ff4bbe31f87e967d (patch) | |
tree | bb45cb2977c11a95453ebc66ab26a20e436b0c5b /cpp/src/IceSSL/OpenSSLPluginI.cpp | |
parent | Mapping change for Ice::Byte from char to unsigned char -- Windows-specific (diff) | |
download | ice-e1d353c76161651ffc4db678ff4bbe31f87e967d.tar.bz2 ice-e1d353c76161651ffc4db678ff4bbe31f87e967d.tar.xz ice-e1d353c76161651ffc4db678ff4bbe31f87e967d.zip |
Merged from R1_1_branch
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLPluginI.cpp')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLPluginI.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp index 3fac21cc55d..1abddafe113 100644 --- a/cpp/src/IceSSL/OpenSSLPluginI.cpp +++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp @@ -145,10 +145,20 @@ static void lockingCallback(int mode, int type, const char *file, int line) static unsigned long idFunction() { -#ifdef _WIN32 +#if defined(_WIN32) return static_cast<unsigned long>(GetCurrentThreadId()); -#else +#elif defined(__FreeBSD__) + // + // On FreeBSD, pthread_t is a pointer to a per-thread structure + // + return reinterpret_cast<unsigned long>(pthread_self()); +#elif (defined(__linux) || defined(__sun)) + // + // On Linux and Solaris, pthread_t is an integer + // return static_cast<unsigned long>(pthread_self()); +#else +# error "Unknown platform" #endif } } |