Correct feature names
[ACE_TAO.git] / ACE / ace / OS_Errno.cpp
blob065eb39e1336976ad9e0f40670b3450b3621db40
1 // -*- C++ -*-
2 #include "ace/OS_Errno.h"
4 // Inlining this class on debug builds with gcc on Solaris can cause
5 // deadlocks during static initialization. On non debug builds it
6 // causes compilation errors.
7 #if !defined (ACE_HAS_INLINED_OSCALLS) || \
8 (defined (__GNUG__) && defined (__sun__))
9 # if defined (ACE_INLINE)
10 # undef ACE_INLINE
11 # endif /* ACE_INLINE */
12 # define ACE_INLINE
13 # include "ace/OS_Errno.inl"
14 #endif /* ACE_HAS_INLINED_OSCALLS */
16 #if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
18 #include "ace/OS_Memory.h"
20 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
22 ACE_CE_Errno *ACE_CE_Errno::instance_ = 0;
23 DWORD ACE_CE_Errno::errno_key_ = 0xffffffff;
25 void
26 ACE_CE_Errno::init ()
28 ACE_NEW (ACE_CE_Errno::instance_,
29 ACE_CE_Errno ());
30 ACE_CE_Errno::errno_key_ = TlsAlloc ();
33 void
34 ACE_CE_Errno::fini ()
36 TlsFree (ACE_CE_Errno::errno_key_);
37 delete ACE_CE_Errno::instance_;
38 ACE_CE_Errno::instance_ = 0;
41 ACE_END_VERSIONED_NAMESPACE_DECL
43 #endif /* ACE_HAS_WINCE_BROKEN_ERRNO */