0030569: Foundation Classes - NCollection_Shared lacks inclusion of NCollection_Defin...
[occt.git] / src / Standard / Standard_Mutex.hxx
index 1fe8d80..d5042cd 100644 (file)
@@ -4,8 +4,8 @@
 //
 // This file is part of Open CASCADE Technology software library.
 //
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
 // by the Free Software Foundation, with special exception defined in the file
 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
 // distribution for complete text of the license and disclaimer of any warranty.
 
 #include <Standard_Integer.hxx>
 #include <Standard_Boolean.hxx>
-#include <Standard_ErrorHandlerCallback.hxx>
+#include <Standard_ErrorHandler.hxx>
 
-#if (defined(_WIN32) || defined(__WIN32__))
+#if defined(_WIN32)
   #include <windows.h>
 #else
   #include <pthread.h>
-  #include <sys/errno.h>
+  ///#include <sys/errno.h>
   #include <unistd.h>
   #include <time.h>
 #endif
@@ -62,7 +62,7 @@
   * TryLock(), and UnregisterCallback() before Unlock() (or use Sentry classes). 
   */
 
-class Standard_Mutex : public Standard_ErrorHandlerCallback
+class Standard_Mutex : public Standard_ErrorHandler::Callback
 {
 public:
   /**
@@ -150,12 +150,12 @@ public:
   Standard_EXPORT Standard_Boolean TryLock ();
 
   //! Method to unlock the mutex; releases it to other users
-  Standard_EXPORT void Unlock ();
+  void Unlock ();
 
 private:
 
   //! Callback method to unlock the mutex if OCC exception or signal is raised
-  virtual void DestroyCallback ();
+  Standard_EXPORT virtual void DestroyCallback() Standard_OVERRIDE;
   
   //! This method should not be called (prohibited).
   Standard_Mutex (const Standard_Mutex &);