diff options
author | gonzo <gonzo@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-10 07:33:55 +0000 |
---|---|---|
committer | gonzo <gonzo@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-10 07:33:55 +0000 |
commit | b1548a69b2dcd0455b198af029b49883d0937abe (patch) | |
tree | cbd17a5dffadf187dae53b850675c7f0567768a6 /ace | |
parent | 4ea44ac88df971c5a6f2e0ee470ffc618bed9875 (diff) | |
download | ATCD-b1548a69b2dcd0455b198af029b49883d0937abe.tar.gz |
Tests now run OK (most of them) with BCB3
Diffstat (limited to 'ace')
-rw-r--r-- | ace/ACE.cpp | 19 | ||||
-rw-r--r-- | ace/ACED.cpp | 4 | ||||
-rw-r--r-- | ace/Get_Opt.cpp | 2 | ||||
-rw-r--r-- | ace/Malloc.cpp | 8 | ||||
-rw-r--r-- | ace/OS.h | 13 | ||||
-rw-r--r-- | ace/SOCK_Dgram.cpp | 8 | ||||
-rw-r--r-- | ace/WFMO_Reactor.cpp | 10 | ||||
-rw-r--r-- | ace/config-win32-common.h | 7 |
8 files changed, 53 insertions, 18 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 35fbe41d76c..86d83d15f7a 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -565,10 +565,11 @@ ACE::ldfind (const ASYS_TCHAR filename[], // Insert canonical directory separators. ASYS_TCHAR *separator_ptr; - if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') - // Make all the directory separators ``canonical'' to simplify - // subsequent code. - ACE::strrepl (tempcopy, ACE_DIRECTORY_SEPARATOR_CHAR, '/'); +#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') + // Make all the directory separators ``canonical'' to simplify + // subsequent code. + ACE::strrepl (tempcopy, ACE_DIRECTORY_SEPARATOR_CHAR, '/'); +#endif // Separate filename from pathname. separator_ptr = ACE_OS::strrchr (tempcopy, '/'); @@ -635,9 +636,10 @@ ACE::ldfind (const ASYS_TCHAR filename[], } else { - if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') - // Revert to native path name separators - ACE::strrepl (searchpathname, '/', ACE_DIRECTORY_SEPARATOR_CHAR); +#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') + // Revert to native path name separators + ACE::strrepl (searchpathname, '/', ACE_DIRECTORY_SEPARATOR_CHAR); +#endif // First, try matching the filename *without* adding a // prefix. @@ -1623,8 +1625,7 @@ ACE::handle_timed_accept (ACE_HANDLE listener, /* NOTREACHED */ } } - /* NOTREACHED */ - return 0; + ACE_NOTREACHED(return 0); } // Bind socket to an unused port. diff --git a/ace/ACED.cpp b/ace/ACED.cpp index 2af2b7164e0..44c46a46193 100644 --- a/ace/ACED.cpp +++ b/ace/ACED.cpp @@ -98,6 +98,7 @@ USEUNIT("Proactor.cpp"); USEUNIT("Process.cpp"); USEUNIT("Process_Manager.cpp"); USEUNIT("Profile_Timer.cpp"); +USEUNIT("RB_Tree.cpp"); USEUNIT("Reactor.cpp"); USEUNIT("Read_Buffer.cpp"); USEUNIT("Registry.cpp"); @@ -131,6 +132,7 @@ USEUNIT("SPIPE_Acceptor.cpp"); USEUNIT("SPIPE_Addr.cpp"); USEUNIT("SPIPE_Connector.cpp"); USEUNIT("SPIPE_Stream.cpp"); +USEUNIT("Stats.cpp"); USEUNIT("SString.cpp"); USEUNIT("Strategies.cpp"); USEUNIT("Strategies_T.cpp"); @@ -152,6 +154,8 @@ USEUNIT("Task.cpp"); USEUNIT("Task_T.cpp"); USEUNIT("Thread.cpp"); USEUNIT("Thread_Manager.cpp"); +USEUNIT("Timeprobe.cpp"); +USEUNIT("Timeprobe_T.cpp"); USEUNIT("Time_Request_Reply.cpp"); USEUNIT("Timer_Hash.cpp"); USEUNIT("Timer_Hash_T.cpp"); diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp index cf72d8a5bc4..b009bc80bc7 100644 --- a/ace/Get_Opt.cpp +++ b/ace/Get_Opt.cpp @@ -109,7 +109,7 @@ ACE_Get_Opt::operator () (void) opt = (int) *this->nextchar_++; if (opt == (int) ':' - || !(oli = ACE_OS::strchr (this->optstring_, opt))) + || ((oli = ACE_OS::strchr (this->optstring_, opt)) == 0)) { // If the user didn't specify '-' as an option, assume it means // EOF. diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp index 9f630abac94..8cc622a7c00 100644 --- a/ace/Malloc.cpp +++ b/ace/Malloc.cpp @@ -90,8 +90,12 @@ ACE_Allocator::instance (void) // destroy it. static void *allocator_instance = 0; - // Check this critical assumption . . . - ACE_ASSERT (sizeof allocator_instance == sizeof (ACE_New_Allocator)); + // Check this critical assumption. + // We put it in a variable first to avoid stupid compiler + // warnings that the condition may always be true/false. + int assertion = (sizeof allocator_instance == + sizeof (ACE_New_Allocator)); + ACE_ASSERT (assertion); // Initialize the allocator_instance by using a placement // new. The ACE_NEW_RETURN below doesn't actually allocate @@ -494,11 +494,11 @@ private: # define ACE_UNUSED_ARG(a) (a) #endif /* ghs */ -#if defined (__sgi) || defined (ghs) || defined (DEC_CXX) +#if defined (__sgi) || defined (ghs) || defined (DEC_CXX) || defined(__BORLANDC__) # define ACE_NOTREACHED(a) #else # define ACE_NOTREACHED(a) a -#endif /* defined (__sgi) || defined (ghs) || defined (DEC_CXX) */ +#endif /* defined (__sgi) || defined (ghs) || defined (DEC_CXX) || defined(__BORLANDC__) */ #if defined (ACE_REQUIRES_FUNC_DEFINITIONS) // It just evaporated ;-) Not pleasant. @@ -2550,8 +2550,13 @@ typedef void (*ACE_SignalHandlerV)(...); # define ACE_SEH_FINALLY if (1) # else # if defined(__BORLANDC__) -# define ACE_SEH_TRY try -# define ACE_SEH_FINALLY catch(...) +# if (__BORLANDC__ >= 0x0530) /* Borland C++ Builder 3.0 */ +# define ACE_SEH_TRY try +# define ACE_SEH_FINALLY __finally +# else +# define ACE_SEH_TRY try +# define ACE_SEH_FINALLY catch(...) +# endif # else # define ACE_SEH_TRY __try # define ACE_SEH_FINALLY __finally diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp index 546501131b2..11e7dccc477 100644 --- a/ace/SOCK_Dgram.cpp +++ b/ace/SOCK_Dgram.cpp @@ -205,9 +205,13 @@ ACE_SOCK_Dgram::send (const iovec iov[], // Determine the total length of all the buffers in <iov>. for (i = 0; i < n; i++) +#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530)) + // The iov_len is unsigned in Borland. If we go ahead and try the + // if, it will emit a warning. if (iov[i].iov_len < 0) return -1; else +#endif length += iov[i].iov_len; char *buf; @@ -248,9 +252,13 @@ ACE_SOCK_Dgram::recv (iovec iov[], size_t i; for (i = 0; i < n; i++) +#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530)) + // The iov_len is unsigned in Borland. If we go ahead and try the + // if, it will emit a warning. if (iov[i].iov_len < 0) return -1; else +#endif length += iov[i].iov_len; char *buf; diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp index 83ea5080a5b..78bc3813990 100644 --- a/ace/WFMO_Reactor.cpp +++ b/ace/WFMO_Reactor.cpp @@ -1377,8 +1377,14 @@ ACE_WFMO_Reactor::dispatch_handles (size_t wait_status) ; number_of_handlers_dispatched++) { - if (wait_status >= WAIT_OBJECT_0 && - wait_status <= (WAIT_OBJECT_0 + nCount)) + bool ok = ( +#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530)) + // wait_status is unsigned in Borland; + // This >= is always true, with a warning. + wait_status >= WAIT_OBJECT_0 && +#endif + wait_status <= (WAIT_OBJECT_0 + nCount)); + if (ok) dispatch_index += wait_status - WAIT_OBJECT_0; else // Otherwise, a handle was abandoned. diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h index 50de6c8828f..7a357e1e194 100644 --- a/ace/config-win32-common.h +++ b/ace/config-win32-common.h @@ -401,6 +401,13 @@ typedef unsigned __int64 ACE_UINT64; /* Borland C++ Builder definitions. */ #if (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530) +#if 0 +#ifdef ACE_HAS_NONSTATIC_OBJECT_MANAGER +#undef ACE_HAS_NONSTATIC_OBJECT_MANAGER +#endif +#define ACE_HAS_NONSTATIC_OBJECT_MANAGER 1 +#endif + #ifdef ACE_HAS_STANDARD_CPP_LIBRARY #undef ACE_HAS_STANDARD_CPP_LIBRARY #endif |