summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-01-06 15:44:52 +0100
committerGitHub <noreply@github.com>2021-01-06 15:44:52 +0100
commitfac269f095391fbbafdebe1047205c55edc32cca (patch)
tree75baeb8acb63cc2e5a5fcf2393032ed33d1433eb
parent64461030796afb9c7ba8faa9a15daa7be72d8487 (diff)
parent717956bf5a253b899a468bd07b5df1f5ad1e6e8c (diff)
downloadATCD-fac269f095391fbbafdebe1047205c55edc32cca.tar.gz
Merge pull request #1396 from jwillemsen/jwi-ACE_NEW_THROWS_EXCEPTIONS
Removed ACE_HAS_EXCEPTIONS checks, that define is always set
-rw-r--r--ACE/ace/CORBA_macros.h1
-rw-r--r--ACE/ace/Log_Msg.cpp9
-rw-r--r--ACE/ace/README2
-rw-r--r--ACE/ace/config-kfreebsd.h3
-rw-r--r--ACE/tests/Network_Adapters_Test.cpp5
-rw-r--r--ACE/tests/New_Fail_Test.cpp27
6 files changed, 0 insertions, 47 deletions
diff --git a/ACE/ace/CORBA_macros.h b/ACE/ace/CORBA_macros.h
index 9cd55e26d17..995aa2e9c80 100644
--- a/ACE/ace/CORBA_macros.h
+++ b/ACE/ace/CORBA_macros.h
@@ -41,7 +41,6 @@
# define ACE_del_bad_alloc
#endif
-// ACE_HAS_EXCEPTIONS is not the same as ACE_NEW_THROWS_EXCEPTIONS.
#if defined(ACE_NEW_THROWS_EXCEPTIONS)
# if defined (ACE_HAS_NEW_NOTHROW)
diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp
index 97b2d34253c..9012294efdd 100644
--- a/ACE/ace/Log_Msg.cpp
+++ b/ACE/ace/Log_Msg.cpp
@@ -217,15 +217,6 @@ ACE_Log_Msg_Manager::get_lock ()
void
ACE_Log_Msg_Manager::close ()
{
-#if defined (ACE_HAS_STHREADS) && ! defined (ACE_HAS_TSS_EMULATION) && ! defined (ACE_HAS_EXCEPTIONS)
- // Delete the (main thread's) Log_Msg instance. I think that this
- // is only "necessary" if exception handling is not enabled.
- // Without exception handling, main thread TSS destructors don't
- // seem to be called. It's not really necessary anyways, because
- // this one leak is harmless on Solaris.
- delete ACE_Log_Msg::instance ();
-#endif /* ACE_HAS_STHREADS && ! TSS_EMULATION && ! ACE_HAS_EXCEPTIONS */
-
// Ugly, ugly, but don't know a better way.
delete ACE_Log_Msg_Manager::lock_;
ACE_Log_Msg_Manager::lock_ = 0;
diff --git a/ACE/ace/README b/ACE/ace/README
index 06c81dc20e7..7830e2d9fe7 100644
--- a/ACE/ace/README
+++ b/ACE/ace/README
@@ -273,8 +273,6 @@ ACE_HAS_DLL Build ACE using the frigging
PC DLL nonsense...
ACE_HAS_EBCDIC Compile in the ACE code set classes
that support EBCDIC.
-ACE_HAS_EXCEPTIONS Compiler supports C++
- exception handling
ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT When a base-class is a
specialization of a class template
then this class template must be
diff --git a/ACE/ace/config-kfreebsd.h b/ACE/ace/config-kfreebsd.h
index 20aea58c9a0..052ab1c3a20 100644
--- a/ACE/ace/config-kfreebsd.h
+++ b/ACE/ace/config-kfreebsd.h
@@ -57,9 +57,6 @@
etc. */
#define ACE_HAS_DIRENT 1
-/* Compiler supports C++ exception handling. */
-#define ACE_HAS_EXCEPTIONS 1
-
/* Define to 1 if platform has getifaddrs(). */
#define ACE_HAS_GETIFADDRS 1
diff --git a/ACE/tests/Network_Adapters_Test.cpp b/ACE/tests/Network_Adapters_Test.cpp
index fd9c253479d..35e417c226e 100644
--- a/ACE/tests/Network_Adapters_Test.cpp
+++ b/ACE/tests/Network_Adapters_Test.cpp
@@ -614,19 +614,15 @@ Stop_Handler::handle_input (ACE_HANDLE handle)
// remove from the reactor's tables all non-null entries
if (this->handlers_to_stop_[i])
{
-#if defined ACE_HAS_EXCEPTIONS
-
// protect from deleted pointer
try
{
-#endif // ACE_HAS_EXCEPTIONS
this->reactor ()->cancel_timer (this->handlers_to_stop_[i]);
this->reactor ()->remove_handler
(this->handlers_to_stop_[i],
ACE_Event_Handler::ALL_EVENTS_MASK
| ACE_Event_Handler::DONT_CALL);
-#if defined ACE_HAS_EXCEPTIONS
}
catch (...)
{
@@ -635,7 +631,6 @@ Stop_Handler::handle_input (ACE_HANDLE handle)
ACE_TEXT ("EXCEPTION CATCHED. Most probably ")
ACE_TEXT ("handler's pointer has been deleted.\n")));
}
-#endif // ACE_HAS_EXCEPTIONS
this->handlers_to_stop_[i] = 0;
}
}
diff --git a/ACE/tests/New_Fail_Test.cpp b/ACE/tests/New_Fail_Test.cpp
index f542fed9f31..5e1a5921802 100644
--- a/ACE/tests/New_Fail_Test.cpp
+++ b/ACE/tests/New_Fail_Test.cpp
@@ -16,17 +16,11 @@
*/
//=============================================================================
-
#include "test_config.h"
#include "ace/Log_Msg.h"
#include "ace/OS_Memory.h"
#include "ace/CORBA_macros.h"
-
-
-#if (!defined (__SUNPRO_CC) && !defined (__GNUG__)) || \
- defined (ACE_HAS_EXCEPTIONS)
-
#include "ace/Numeric_Limits.h"
// This test allocates all of the heap memory, forcing 'new' to fail
@@ -67,7 +61,6 @@ try_ace_new_noreturn ()
ACE_NEW_NORETURN (p, char[BIG_BLOCK]);
return p;
}
-#endif /* (!__SUNPRO_CC && !__GNUG__) || ACE_HAS_EXCEPTIONS */
int
run_main (int, ACE_TCHAR *[])
@@ -75,26 +68,11 @@ run_main (int, ACE_TCHAR *[])
ACE_START_TEST (ACE_TEXT ("New_Fail_Test"));
int status = 0;
- // Some platforms are known to throw an exception on a failed 'new',
- // but are customarily built without exception support to improve
- // performance. These platforms are noted, and the test passes.
- // For new ports, it is wise to let this test run. Depending on
- // intended conditions, exceptions can be disabled when the port is
- // complete.
-#if (defined (__SUNPRO_CC) || defined (__GNUG__)) && \
- !defined (ACE_HAS_EXCEPTIONS)
- ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("Out-of-memory will throw an unhandled exception\n")));
- ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("Rebuild with exceptions=1 to prevent this, but it may impair performance.\n")));
-
-#else
-
char *blocks[MAX_ALLOCS_IN_TEST];
int i;
-# if defined (ACE_HAS_EXCEPTIONS)
try
{
-# endif /* ACE_HAS_EXCEPTIONS */
// First part: test ACE_NEW
for (i = 0; i < MAX_ALLOCS_IN_TEST; i++)
{
@@ -194,10 +172,7 @@ run_main (int, ACE_TCHAR *[])
}
while (i >= 0)
delete [] blocks[i--];
-
-# if defined (ACE_HAS_EXCEPTIONS)
}
-
catch (...)
{
ACE_ERROR ((LM_ERROR,
@@ -209,8 +184,6 @@ run_main (int, ACE_TCHAR *[])
// Mark test failure
status = 1;
}
-# endif /* ACE_HAS_EXCEPTIONS */
-#endif /* __SUNPRO_CC && !ACE_HAS_EXCEPTIONS */
ACE_END_TEST;
return status;