summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-30 04:45:13 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-30 04:45:13 +0000
commit91ddcd2afd0077d5bb48822073e786802a6307b9 (patch)
treea0227f709f781b7dff9d7452478c853d963cc72b
parent6cbef07d6756eb59e5b891d523312be5ab60e985 (diff)
downloadATCD-91ddcd2afd0077d5bb48822073e786802a6307b9.tar.gz
added ACE_Object_Manager_fini to avoid circular include problems
-rw-r--r--ace/OS.i12
-rw-r--r--ace/Object_Manager.cpp6
-rw-r--r--ace/Object_Manager.h3
3 files changed, 15 insertions, 6 deletions
diff --git a/ace/OS.i b/ace/OS.i
index b6e50f3a51d..98ae947192c 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -7305,12 +7305,12 @@ ACE_OS::exit (int status)
{
// ACE_TRACE ("ACE_OS::exit");
-#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
+#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_HAS_WINCE) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
// Shut down the ACE_Object_Manager. With
// ACE_HAS_NONSTATIC_OBJECT_MANAGER, the ACE_Object_Manager is
// instantiated on the main's stack. ::exit () doesn't destroy it.
- ACE_Object_Manager::fini ();
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
+ ACE_Object_Manager_fini ();
+#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
#if !defined (ACE_HAS_WINCE)
# if defined (ACE_WIN32)
@@ -10449,12 +10449,12 @@ fflush (FILE *fp)
ACE_INLINE void
exit (int status)
{
-#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
+#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_HAS_WINCE) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
// Shut down the ACE_Object_Manager. With
// ACE_HAS_NONSTATIC_OBJECT_MANAGER, the ACE_Object_Manager is
// instantiated on the main's stack. ::exit () doesn't destroy it.
- ACE_Object_Manager::fini ();
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
+ ACE_Object_Manager_fini ();
+#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
ACE_OS::exit (status);
}
diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp
index 67dc50b614d..81dc4d5e1cf 100644
--- a/ace/Object_Manager.cpp
+++ b/ace/Object_Manager.cpp
@@ -54,6 +54,12 @@ void *ACE_Object_Manager::preallocated_object[
void *ACE_Object_Manager::preallocated_array[
ACE_Object_Manager::ACE_PREALLOCATED_ARRAYS] = { 0 };
+void
+ACE_Object_Manager_fini (void)
+{
+ ACE_Object_Manager::fini ();
+}
+
// Handy macros for use by ACE_Object_Manager constructor to
// preallocate or delete an object or array, either statically (in
// global data) or dynamically (on the heap).
diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h
index 7c13d6efb34..5f78c61f8be 100644
--- a/ace/Object_Manager.h
+++ b/ace/Object_Manager.h
@@ -17,6 +17,9 @@
#ifndef ACE_OBJECT_MANAGER_H
#define ACE_OBJECT_MANAGER_H
+// Declaration to avoid circular include problems.
+void ACE_Object_Manager_fini (void);
+
#include "ace/OS.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)