]> git.lyx.org Git - lyx.git/blobdiff - sigc++/thread.cc
do not include language.h and gettext.h in lyxfont.h and lyxparagraph.h
[lyx.git] / sigc++ / thread.cc
index bd1e51a9f69112af0e9ff7cfc5c048a9506b80e2..d9b0d4d2009479b645799697243d13f719436f07 100644 (file)
@@ -53,7 +53,7 @@ Condition::~Condition()
 int Condition::signal()       {return pthread_cond_signal(&cond_);}
 int Condition::broadcast()    {return pthread_cond_broadcast(&cond_);}
 int Condition::wait(Mutex &m) {return pthread_cond_wait(&cond_,m);}
-int Condition::wait(Mutex &m,timespec* spec)
+int Condition::wait(Mutex &m, struct timespec* spec)
   {return pthread_cond_timedwait(&cond_,m,spec);}
 int Condition::destroy()      {return pthread_cond_destroy(&cond_);}
 
@@ -135,6 +135,13 @@ void Private_::destroy()
 #endif
   }
 
+Private<int>::operator int&() 
+{
+       int * value = static_cast<int*>(get());
+       if (!value)
+               set(static_cast<void*>(value = new int(0)));
+       return *(value);
+}
 
 #ifdef SIGC_PTHREAD_DCE
 MutexAttr Mutex::Default={pthread_mutexattr_default};