From 959d9452b482cf0f1803eaede692b7fcc8d35c0d Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Fri, 26 Mar 2010 22:30:37 +0000 Subject: [PATCH] - fixes compilation issues on 64bit Darwin. git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1711 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmSession.cpp | 2 +- core/AmThread.cpp | 6 +++--- core/AmThread.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 57339ff4..e25caafe 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -425,7 +425,7 @@ string AmSession::getNewId() id += int2hex(get_random()) + "-"; id += int2hex(t.tv_sec) + int2hex(t.tv_usec) + "-"; - id += int2hex((unsigned int) pthread_self()); + id += int2hex((unsigned int)((unsigned long)pthread_self())); return id; } diff --git a/core/AmThread.cpp b/core/AmThread.cpp index ccb1eb61..98cac9d4 100644 --- a/core/AmThread.cpp +++ b/core/AmThread.cpp @@ -64,12 +64,12 @@ AmThread::AmThread() void * AmThread::_start(void * _t) { AmThread* _this = (AmThread*)_t; - _this->_pid = (pid_t) _this->_td; - DBG("Thread %lu is starting.\n", (unsigned long int) _this->_pid); + _this->_pid = (unsigned long) _this->_td; + DBG("Thread %lu is starting.\n", (unsigned long) _this->_pid); _this->_stopped.set(false); _this->run(); - DBG("Thread %lu is ending.\n", (unsigned long int) _this->_pid); + DBG("Thread %lu is ending.\n", (unsigned long) _this->_pid); _this->_stopped.set(true); //thread_nr_mut.lock(); diff --git a/core/AmThread.h b/core/AmThread.h index 18045334..410ce718 100644 --- a/core/AmThread.h +++ b/core/AmThread.h @@ -170,7 +170,7 @@ protected: virtual void on_stop()=0; public: - pid_t _pid; + unsigned long _pid; AmThread(); virtual ~AmThread() {}