summaryrefslogtreecommitdiff
path: root/ACE/ace/Object_Manager_Base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Object_Manager_Base.cpp')
-rw-r--r--ACE/ace/Object_Manager_Base.cpp46
1 files changed, 4 insertions, 42 deletions
diff --git a/ACE/ace/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp
index 0a1c0767186..3db3504db52 100644
--- a/ACE/ace/Object_Manager_Base.cpp
+++ b/ACE/ace/Object_Manager_Base.cpp
@@ -216,26 +216,20 @@ ACE_OS_Object_Manager::init ()
if (this == instance_)
{
# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
- ACE_CE_Errno::init ();
-# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_OS_MONITOR_LOCK)
if (ACE_OS::thread_mutex_init
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_OS_MONITOR_LOCK"));
ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
ACE_TSS_CLEANUP_LOCK)
if (ACE_OS::recursive_mutex_init
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_TSS_CLEANUP_LOCK"));
ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t,
ACE_LOG_MSG_INSTANCE_LOCK)
if (ACE_OS::thread_mutex_init
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_LOG_MSG_INSTANCE_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK"));
@@ -243,7 +237,6 @@ ACE_OS_Object_Manager::init ()
ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
ACE_TSS_KEY_LOCK)
if (ACE_OS::recursive_mutex_init
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK"));
@@ -251,7 +244,6 @@ ACE_OS_Object_Manager::init ()
ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
ACE_TSS_BASE_LOCK)
if (ACE_OS::recursive_mutex_init
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK"));
@@ -343,7 +335,6 @@ ACE_OS_Object_Manager::fini ()
# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
# if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
if (ACE_OS::thread_mutex_destroy
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0)
# ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY
if (errno != ENOTSUP)
@@ -355,7 +346,6 @@ ACE_OS_Object_Manager::fini ()
ACE_OS_MONITOR_LOCK)
# if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
if (ACE_OS::recursive_mutex_destroy
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0)
# ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY
if (errno != ENOTSUP)
@@ -367,7 +357,6 @@ ACE_OS_Object_Manager::fini ()
ACE_TSS_CLEANUP_LOCK)
# if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
if (ACE_OS::thread_mutex_destroy
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object [ACE_LOG_MSG_INSTANCE_LOCK])) != 0)
# ifdef ACE_LACKS_PTHREAD_MUTEX_DESTROY
if (errno != ENOTSUP)
@@ -380,7 +369,6 @@ ACE_OS_Object_Manager::fini ()
# if defined (ACE_HAS_TSS_EMULATION)
# if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
if (ACE_OS::recursive_mutex_destroy
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK"));
@@ -390,7 +378,6 @@ ACE_OS_Object_Manager::fini ()
# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
# if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
if (ACE_OS::recursive_mutex_destroy
- // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
(reinterpret_cast <ACE_recursive_thread_mutex_t *> (ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0)
ACE_OS_Object_Manager::print_error_message (
__LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK"));
@@ -399,9 +386,6 @@ ACE_OS_Object_Manager::fini ()
ACE_TSS_BASE_LOCK)
# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
# endif /* ACE_HAS_TSS_EMULATION */
-# if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
- ACE_CE_Errno::fini ();
-# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
# endif /* ACE_MT_SAFE */
#endif /* ! ACE_HAS_STATIC_PREALLOCATION */
}
@@ -443,39 +427,17 @@ ACE_OS_Object_Manager::print_error_message (unsigned int line_number,
const ACE_TCHAR *message)
{
// To avoid duplication of these const strings in OS.o.
-#if !defined (ACE_HAS_WINCE)
-# ifndef ACE_LACKS_STDERR
+#ifndef ACE_LACKS_STDERR
fprintf (stderr, "ace/Object_Manager_Base.cpp, line %u: %s ",
line_number,
ACE_TEXT_ALWAYS_CHAR (message));
-# else
- ACE_UNUSED_ARG (line_number);
- ACE_UNUSED_ARG (message);
-# endif
-# if !defined (ACE_LACKS_PERROR)
- perror ("failed");
-# endif /* ACE_LACKS_PERROR */
#else
- // @@ Need to use the following information.
ACE_UNUSED_ARG (line_number);
ACE_UNUSED_ARG (message);
-
- ACE_TCHAR *lpMsgBuf = 0;
- ::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
- 0,
- ::GetLastError (),
- MAKELANGID (LANG_NEUTRAL,
- SUBLANG_DEFAULT),
- // Default language
- (ACE_TCHAR *) &lpMsgBuf,
- 0,
- 0);
- ::MessageBox (0,
- lpMsgBuf,
- ACE_TEXT ("ACE_OS error"),
- MB_OK);
#endif
+#if !defined (ACE_LACKS_PERROR)
+ perror ("failed");
+#endif /* ACE_LACKS_PERROR */
}
int