summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-13 22:51:30 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-13 22:51:30 +0000
commit9bf4b61b988482458811e387fea0e90a9e922b8d (patch)
tree7eebd8bbc8ad359909765adabc6ed3565be9b5f9
parenta79bc11b8e3985ae520bd33c6d0997cfc33f760e (diff)
downloadATCD-9bf4b61b988482458811e387fea0e90a9e922b8d.tar.gz
Straightened out explicit destructor calling macros
-rw-r--r--ace/OS.h8
-rw-r--r--ace/config-g++-common.h10
-rw-r--r--ace/config-osf1-4.0.h2
-rw-r--r--ace/config-psos-diab.h2
-rw-r--r--ace/config-psos-tm.h2
5 files changed, 14 insertions, 10 deletions
diff --git a/ace/OS.h b/ace/OS.h
index 3e1e154dd4a..2e6194879c5 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -6031,7 +6031,7 @@ private:
# define ACE_DES_FREE(POINTER,DEALLOCATOR,CLASS) \
do { POINTER->~CLASS (); DEALLOCATOR (POINTER); } while (0)
-# if defined (ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR)
+# if !defined (ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR)
# define ACE_DES_NOFREE_TEMPLATE (POINTER,T_CLASS,T_PARAMETER) \
POINTER->~ T_CLASS ()
# define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER) \
@@ -6042,7 +6042,11 @@ private:
do { POINTER->~ T_CLASS (); \
DEALLOCATOR (POINTER); \
} while (0)
-# else /* ! ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR */
+# else /* ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR */
+// @@ Notice that the workaround here only eliminate the compilation errors.
+// It won't fix the "real problem." If the destructor is virtual, it won't
+// work corrrectly.
+//# warning Memory leak possible. The compiler needs to be fixed!!!
# define ACE_DES_NOFREE_TEMPLATE (POINTER,T_CLASS,T_PARAMETER) \
POINTER -> T_CLASS T_PARAMETER ::~ T_CLASS ()
diff --git a/ace/config-g++-common.h b/ace/config-g++-common.h
index 453eda39af5..9347a9e932c 100644
--- a/ace/config-g++-common.h
+++ b/ace/config-g++-common.h
@@ -27,11 +27,11 @@
# define ACE_HAS_TYPENAME_KEYWORD
# endif /* __GNUC__ >= 2.90 */
-# if __GNUC__ == 2 && __GNUC_MINOR__ >= 91
- // This is only needed with egcs 1.1 (egcs-2.91.57). It can't be
- // used with older versions.
-# define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
-# endif /* __GNUC__ >= 2.91 */
+// # if __GNUC__ == 2 && __GNUC_MINOR__ >= 91
+// // This is only needed with egcs 1.1 (egcs-2.91.57). It can't be
+// // used with older versions.
+// # define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
+// # endif /* __GNUC__ >= 2.91 */
# if __GNUC__ == 2 && __GNUC_MINOR__ != 9 && __GNUC_MINOR__ != 91
# // g++ 2.9 and egcs 2.91 apparently have a bug with this . . .
diff --git a/ace/config-osf1-4.0.h b/ace/config-osf1-4.0.h
index d2e1f0fef50..613dc90f7aa 100644
--- a/ace/config-osf1-4.0.h
+++ b/ace/config-osf1-4.0.h
@@ -41,7 +41,7 @@
# define ACE_HAS_GNU_CSTRING_H
# define ACE_HAS_REENTRANT_FUNCTIONS
#elif defined (__DECCXX)
-# define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
+// # define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
# define ACE_LACKS_LINEBUFFERED_STREAMBUF
# define ACE_LACKS_SIGNED_CHAR
# define DEC_CXX
diff --git a/ace/config-psos-diab.h b/ace/config-psos-diab.h
index a1e7a871e54..e526c6c1281 100644
--- a/ace/config-psos-diab.h
+++ b/ace/config-psos-diab.h
@@ -43,7 +43,7 @@
#define ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS
-#define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
+// #define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
# define ACE_HAS_BROKEN_NOOP_DTORS
diff --git a/ace/config-psos-tm.h b/ace/config-psos-tm.h
index b42558f45b3..64837182ddd 100644
--- a/ace/config-psos-tm.h
+++ b/ace/config-psos-tm.h
@@ -24,7 +24,7 @@
#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
+// #define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
// Template instantiation definitions
// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE