diff options
Diffstat (limited to 'externals')
95 files changed, 6406 insertions, 587 deletions
diff --git a/externals/ace/ACE.cpp b/externals/ace/ACE.cpp index 24fb3839ca2..3dd5e2e6f9b 100644 --- a/externals/ace/ACE.cpp +++ b/externals/ace/ACE.cpp @@ -1,4 +1,4 @@ -// $Id: ACE.cpp 88193 2009-12-16 09:14:06Z mcorino $ +// $Id: ACE.cpp 91066 2010-07-12 11:05:04Z johnnyw $ #include "ace/ACE.h" @@ -40,7 +40,7 @@ extern "C" int maxFiles; ACE_RCSID (ace, ACE, - "$Id: ACE.cpp 88193 2009-12-16 09:14:06Z mcorino $") + "$Id: ACE.cpp 91066 2010-07-12 11:05:04Z johnnyw $") // Open versioned namespace, if enabled by the user. @@ -658,8 +658,7 @@ ACE::recv_n_i (ACE_HANDLE handle, errno == EWOULDBLOCK) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_read_ready (handle, - timeout); + int const rtn = ACE::handle_read_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -720,8 +719,7 @@ ACE::t_rcv_n_i (ACE_HANDLE handle, if (errno == EWOULDBLOCK) { // Wait for the blocking to subside. - int result = ACE::handle_read_ready (handle, - 0); + int const result = ACE::handle_read_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -778,8 +776,7 @@ ACE::t_rcv_n_i (ACE_HANDLE handle, errno == EWOULDBLOCK) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_read_ready (handle, - timeout); + int const rtn = ACE::handle_read_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -839,8 +836,7 @@ ACE::recv_n_i (ACE_HANDLE handle, if (errno == EWOULDBLOCK) { // Wait for the blocking to subside. - int result = ACE::handle_read_ready (handle, - 0); + int const result = ACE::handle_read_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -895,8 +891,7 @@ ACE::recv_n_i (ACE_HANDLE handle, errno == EWOULDBLOCK) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_read_ready (handle, - timeout); + int const rtn = ACE::handle_read_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -934,8 +929,8 @@ ssize_t ACE::recv (ACE_HANDLE handle, size_t n, ...) { va_list argp; - int total_tuples = static_cast<int> (n / 2); - iovec *iovp; + int const total_tuples = static_cast<int> (n / 2); + iovec *iovp = 0; #if defined (ACE_HAS_ALLOCA) iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); #else @@ -952,7 +947,7 @@ ACE::recv (ACE_HANDLE handle, size_t n, ...) iovp[i].iov_len = va_arg (argp, int); } - ssize_t result = ACE_OS::recvv (handle, iovp, total_tuples); + ssize_t const result = ACE_OS::recvv (handle, iovp, total_tuples); #if !defined (ACE_HAS_ALLOCA) delete [] iovp; #endif /* !defined (ACE_HAS_ALLOCA) */ @@ -992,14 +987,10 @@ ACE::recvv_n_i (ACE_HANDLE handle, size_t &bytes_transferred = bt == 0 ? temp : *bt; bytes_transferred = 0; - for (int s = 0; - s < iovcnt; - ) + for (int s = 0; s < iovcnt; ) { // Try to transfer as much of the remaining data as possible. - ssize_t n = ACE_OS::recvv (handle, - iov + s, - iovcnt - s); + ssize_t n = ACE_OS::recvv (handle, iov + s, iovcnt - s); // Check EOF. if (n == 0) return 0; @@ -1011,8 +1002,7 @@ ACE::recvv_n_i (ACE_HANDLE handle, if (errno == EWOULDBLOCK) { // Wait for the blocking to subside. - int result = ACE::handle_read_ready (handle, - 0); + int const result = ACE::handle_read_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -1060,28 +1050,21 @@ ACE::recvv_n_i (ACE_HANDLE handle, int val = 0; ACE::record_and_set_non_blocking_mode (handle, val); - for (int s = 0; - s < iovcnt; - ) + for (int s = 0; s < iovcnt; ) { // Try to transfer as much of the remaining data as possible. // Since the socket is in non-blocking mode, this call will not // block. - ssize_t n = ACE_OS::recvv (handle, - iov + s, - iovcnt - s); + ssize_t n = ACE_OS::recvv (handle, iov + s, iovcnt - s); // Check for errors. - if (n == 0 || - n == -1) + if (n == 0 || n == -1) { // Check for possible blocking. - if (n == -1 && - errno == EWOULDBLOCK) + if (n == -1 && errno == EWOULDBLOCK) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_read_ready (handle, - timeout); + int const rtn = ACE::handle_read_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -1242,7 +1225,8 @@ ACE::send (ACE_HANDLE handle, return -1; else { - ssize_t bytes_transferred = ACE_OS::send (handle, (const char *) buf, n, flags); + ssize_t const bytes_transferred = + ACE_OS::send (handle, (const char *) buf, n, flags); ACE::restore_non_blocking_mode (handle, val); return bytes_transferred; } @@ -1267,7 +1251,8 @@ ACE::t_snd (ACE_HANDLE handle, return -1; else { - ssize_t bytes_transferred = ACE_OS::t_snd (handle, (const char *) buf, n, flags); + ssize_t const bytes_transferred = + ACE_OS::t_snd (handle, (const char *) buf, n, flags); ACE::restore_non_blocking_mode (handle, val); return bytes_transferred; } @@ -1291,7 +1276,7 @@ ACE::send (ACE_HANDLE handle, return -1; else { - ssize_t bytes_transferred = ACE::send_i (handle, buf, n); + ssize_t const bytes_transferred = ACE::send_i (handle, buf, n); ACE::restore_non_blocking_mode (handle, val); return bytes_transferred; } @@ -1313,7 +1298,8 @@ ACE::sendmsg (ACE_HANDLE handle, return -1; else { - ssize_t bytes_transferred = ACE_OS::sendmsg (handle, msg, flags); + ssize_t const bytes_transferred = + ACE_OS::sendmsg (handle, msg, flags); ACE::restore_non_blocking_mode (handle, val); return bytes_transferred; } @@ -1338,7 +1324,7 @@ ACE::sendto (ACE_HANDLE handle, return -1; else { - ssize_t bytes_transferred = + ssize_t const bytes_transferred = ACE_OS::sendto (handle, buf, len, flags, addr, addrlen); ACE::restore_non_blocking_mode (handle, val); return bytes_transferred; @@ -1381,8 +1367,7 @@ ACE::send_n_i (ACE_HANDLE handle, #endif /* ACE_WIN32 */ { // Wait for the blocking to subside. - int result = ACE::handle_write_ready (handle, - 0); + int const result = ACE::handle_write_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -1435,12 +1420,10 @@ ACE::send_n_i (ACE_HANDLE handle, n == -1) { // Check for possible blocking. - if (n == -1 && - (errno == EWOULDBLOCK || errno == ENOBUFS)) + if (n == -1 && (errno == EWOULDBLOCK || errno == ENOBUFS)) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_write_ready (handle, - timeout); + int const rtn = ACE::handle_write_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -1505,8 +1488,7 @@ ACE::t_snd_n_i (ACE_HANDLE handle, if (errno == EWOULDBLOCK || errno == ENOBUFS) { // Wait for the blocking to subside. - int result = ACE::handle_write_ready (handle, - 0); + int const result = ACE::handle_write_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -1563,8 +1545,7 @@ ACE::t_snd_n_i (ACE_HANDLE handle, errno == EWOULDBLOCK || errno == ENOBUFS) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_write_ready (handle, - timeout); + int const rtn = ACE::handle_write_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -1625,8 +1606,7 @@ ACE::send_n_i (ACE_HANDLE handle, if (errno == EWOULDBLOCK || errno == ENOBUFS) { // Wait for the blocking to subside. - int result = ACE::handle_write_ready (handle, - 0); + int const result = ACE::handle_write_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -1681,8 +1661,7 @@ ACE::send_n_i (ACE_HANDLE handle, (errno == EWOULDBLOCK || errno == ENOBUFS)) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_write_ready (handle, - timeout); + int const rtn = ACE::handle_write_ready (handle, timeout); // Did select() succeed? if (rtn != -1) @@ -1788,9 +1767,8 @@ ACE::sendv_n_i (ACE_HANDLE handle, ) { // Try to transfer as much of the remaining data as possible. - ssize_t n = ACE_OS::sendv (handle, - iov + s, - iovcnt - s); + ssize_t n = ACE_OS::sendv (handle, iov + s, iovcnt - s); + // Check EOF. if (n == 0) return 0; @@ -1802,8 +1780,7 @@ ACE::sendv_n_i (ACE_HANDLE handle, if (errno == EWOULDBLOCK || errno == ENOBUFS) { // Wait for the blocking to subside. - int result = ACE::handle_write_ready (handle, - 0); + int const result = ACE::handle_write_ready (handle, 0); // Did select() succeed? if (result != -1) @@ -1860,9 +1837,7 @@ ACE::sendv_n_i (ACE_HANDLE handle, // Try to transfer as much of the remaining data as possible. // Since the socket is in non-blocking mode, this call will not // block. - ssize_t n = ACE_OS::sendv (handle, - iov + s, - iovcnt - s); + ssize_t n = ACE_OS::sendv (handle, iov + s, iovcnt - s); // Check for errors. if (n == 0 || @@ -1873,8 +1848,7 @@ ACE::sendv_n_i (ACE_HANDLE handle, (errno == EWOULDBLOCK || errno == ENOBUFS)) { // Wait upto <timeout> for the blocking to subside. - int rtn = ACE::handle_write_ready (handle, - timeout); + int const rtn = ACE::handle_write_ready (handle, timeout); // Did select() succeed? if (rtn != -1) diff --git a/externals/ace/Activation_Queue.h b/externals/ace/Activation_Queue.h index 454640474c1..ab58eedb586 100644 --- a/externals/ace/Activation_Queue.h +++ b/externals/ace/Activation_Queue.h @@ -4,7 +4,7 @@ /** * @file Activation_Queue.h * - * $Id: Activation_Queue.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Activation_Queue.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Andres Kruse <Andres.Kruse@cern.ch> * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> @@ -23,6 +23,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Message_Queue.h" +#include "ace/Copy_Disabled.h" #include "ace/Condition_Thread_Mutex.h" /// Define to be compatible with the terminology in the POSA2 book! @@ -35,7 +36,8 @@ class ACE_Method_Request; /** * @class ACE_Activation_Queue * - * @brief Reifies a method into a request. Subclasses typically + * @brief + * Reifies a method into a request. Subclasses typically * represent necessary state and behavior. * * Maintains a priority-ordered queue of ACE_Method_Request objects. @@ -47,10 +49,9 @@ class ACE_Method_Request; * * @sa ACE_Method_Request */ -class ACE_Export ACE_Activation_Queue +class ACE_Export ACE_Activation_Queue : private ACE_Copy_Disabled { public: - // = Initialization and termination methods. /// Constructor. /** * Initializes a new activation queue. @@ -139,12 +140,6 @@ public: /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; -private: - - // = Prevent copying and assignment. - ACE_Activation_Queue (const ACE_Activation_Queue &); - void operator= (const ACE_Activation_Queue &); - protected: /// Stores the Method_Requests. diff --git a/externals/ace/Active_Map_Manager.h b/externals/ace/Active_Map_Manager.h index 744abc0df03..a6c167e5f88 100644 --- a/externals/ace/Active_Map_Manager.h +++ b/externals/ace/Active_Map_Manager.h @@ -4,7 +4,7 @@ /** * @file Active_Map_Manager.h * - * $Id: Active_Map_Manager.h 83956 2008-12-03 07:57:38Z johnnyw $ + * $Id: Active_Map_Manager.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Irfan Pyarali */ @@ -95,7 +95,7 @@ private: /// Slot index in the active map. ACE_UINT32 slot_index_; - /// Slot generation number of <slot_index_> slot in the active map. + /// Slot generation number of @c slot_index_ slot in the active map. ACE_UINT32 slot_generation_; }; diff --git a/externals/ace/Basic_Types.h b/externals/ace/Basic_Types.h index a4f819a1021..bc467fafb5c 100644 --- a/externals/ace/Basic_Types.h +++ b/externals/ace/Basic_Types.h @@ -4,7 +4,7 @@ /** * @file Basic_Types.h * - * $Id: Basic_Types.h 87392 2009-11-07 09:32:06Z johnnyw $ + * $Id: Basic_Types.h 91161 2010-07-21 18:25:12Z schmidt $ * * @author David L. Levine * @@ -712,7 +712,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # if defined (PRId8) # define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId8) # else -# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT (ACE_INT8_FORMAT_SPECIFIER) +# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT (ACE_INT8_FORMAT_SPECIFIER_ASCII) # endif /* defined (PRId8) */ #endif /* ACE_INT8_FORMAT_SPECIFIER */ diff --git a/externals/ace/Cached_Connect_Strategy_T.h b/externals/ace/Cached_Connect_Strategy_T.h index d062e1eaa7a..e95218f60fc 100644 --- a/externals/ace/Cached_Connect_Strategy_T.h +++ b/externals/ace/Cached_Connect_Strategy_T.h @@ -4,7 +4,7 @@ /** * @file Cached_Connect_Strategy_T.h * - * $Id: Cached_Connect_Strategy_T.h 82771 2008-09-17 18:47:48Z johnnyw $ + * $Id: Cached_Connect_Strategy_T.h 91077 2010-07-13 14:33:08Z johnnyw $ * * @author Kirthika Parameswaran <kirthika@cs.wustl.edu> */ @@ -116,12 +116,12 @@ protected: /// Add to cache (non-locking version). virtual int cache_i (const void *recycling_act); - /// Get/Set <recycle_state> (non-locking version). + /// Get/Set recycle_state (non-locking version). virtual int recycle_state_i (const void *recycling_act, ACE_Recyclable_State new_state); virtual ACE_Recyclable_State recycle_state_i (const void *recycling_act) const; - /// Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>. + /// Cleanup hint and reset @c *act_holder to zero if @a act_holder != 0. virtual int cleanup_hint_i (const void *recycling_act, void **act_holder); @@ -184,19 +184,20 @@ protected: /** * @class ACE_Bounded_Cached_Connect_Strategy * - * @brief A connection strategy which caches connections to peers - * (represented by SVC_HANDLER instances), thereby allowing - * subsequent re-use of unused, but available, connections. - * This strategy should be used when the cache is bounded by - * maximum size. + * @brief + * A connection strategy which caches connections to peers + * (represented by SVC_HANDLER instances), thereby allowing + * subsequent re-use of unused, but available, connections. + * This strategy should be used when the cache is bounded by + * maximum size. * - * <Bounded_Cached_Connect_Strategy> is intended to be used as a - * plug-in connection strategy for ACE_Strategy_Connector. - * It's added value is re-use of established connections and - * tweaking the role of the cache as per the caching strategy. - * Thanks to Edan Ayal <edana@bandwiz.com> for contributing this - * class and Susan Liebeskind <shl@janis.gtri.gatech.edu> for - * brainstorming about it. + * Bounded_Cached_Connect_Strategy is intended to be used as a + * plug-in connection strategy for ACE_Strategy_Connector. + * It's added value is re-use of established connections and + * tweaking the role of the cache as per the caching strategy. + * Thanks to Edan Ayal <edana@bandwiz.com> for contributing this + * class and Susan Liebeskind <shl@janis.gtri.gatech.edu> for + * brainstorming about it. */ template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, @@ -244,7 +245,7 @@ protected: protected: - /// max items in the cache, used as a bound for the creation of svc_handlers. + /// Max items in the cache, used as a bound for the creation of svc_handlers. size_t max_size_; }; diff --git a/externals/ace/Capabilities.h b/externals/ace/Capabilities.h index e893d987c08..f4c8b5cc6fb 100644 --- a/externals/ace/Capabilities.h +++ b/externals/ace/Capabilities.h @@ -4,7 +4,7 @@ /** * @file Capabilities.h * - * $Id: Capabilities.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Capabilities.h 91077 2010-07-13 14:33:08Z johnnyw $ * * @author Arturo Montes <mitosys@colomsat.net.co> */ @@ -124,16 +124,17 @@ protected: /** * @class ACE_Capabilities * - * @brief This class implement the ACE Capabilities. + * @brief + * This class implement the ACE Capabilities. * * This is a container class for ACE Capabilities * values. Currently exist three different capability values: - * <ACE_IntCapEntry> (integer), <ACE_BoolCapEntry> (bool) and - * <ACE_StringCapEntry> (String). An ACE_Capabilities is a - * unordered set of pair = (<String>, <ACE_CapEntry> *). Where + * ACE_IntCapEntry (integer), ACE_BoolCapEntry (bool) and + * ACE_StringCapEntry (String). An ACE_Capabilities is a + * unordered set of pair = (String, ACE_CapEntry *). Where * the first component is the name of capability and the second * component is a pointer to the capability value container. A - * <FILE> is a container for ACE_Capabilities, the + * FILE is a container for ACE_Capabilities, the * ACE_Capabilities has a name in the file, as a termcap file. */ class ACE_Export ACE_Capabilities @@ -188,7 +189,6 @@ private: /// This is the set of ACE_CapEntry. CAPABILITIES_MAP caps_; - }; #if defined (ACE_IS_SPLITTING) diff --git a/externals/ace/Connector.h b/externals/ace/Connector.h index 08ef2aa0b8d..d0b98cfa923 100644 --- a/externals/ace/Connector.h +++ b/externals/ace/Connector.h @@ -4,7 +4,7 @@ /** * @file Connector.h * - * $Id: Connector.h 89510 2010-03-17 12:21:14Z vzykov $ + * $Id: Connector.h 91058 2010-07-12 08:20:09Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -424,7 +424,7 @@ public: SUPER; /** - * Initialize a connector. @a flags indicates how <SVC_HANDLER>'s + * Initialize a connector. @a flags indicates how SVC_HANDLER's * should be initialized prior to being activated. Right now, the * only flag that is processed is ACE_NONBLOCK, which enabled * non-blocking I/O on the SVC_HANDLER when it is opened. @@ -535,21 +535,21 @@ protected: /// Creation strategy for an Connector. CREATION_STRATEGY *creation_strategy_; - /// true if Connector created the creation strategy and thus should + /// True if Connector created the creation strategy and thus should /// delete it, else false. bool delete_creation_strategy_; /// Connect strategy for a Connector. CONNECT_STRATEGY *connect_strategy_; - /// true if Connector created the connect strategy and thus should + /// True if Connector created the connect strategy and thus should /// delete it, else false. bool delete_connect_strategy_; - /// Concurrency strategy for an <Connector>. + /// Concurrency strategy for a Connector. CONCURRENCY_STRATEGY *concurrency_strategy_; - /// true if Connector created the concurrency strategy and thus should + /// True if Connector created the concurrency strategy and thus should /// delete it, else false. bool delete_concurrency_strategy_; }; diff --git a/externals/ace/DLL.h b/externals/ace/DLL.h index fa748e8d944..20d333db81a 100644 --- a/externals/ace/DLL.h +++ b/externals/ace/DLL.h @@ -4,7 +4,7 @@ /** * @file DLL.h * - * $Id: DLL.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: DLL.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Kirthika Parameswaran <kirthika@cs.wustl.edu> */ @@ -151,12 +151,12 @@ public: * Return the handle to the caller. If @a become_owner is non-0 then * caller assumes ownership of the handle and the ACE_DLL object * won't call close() when it goes out of scope, even if - * <close_handle_on_destruction> is set. + * @c close_handle_on_destruction is set. */ ACE_SHLIB_HANDLE get_handle (int become_owner = 0) const; /// Set the handle for the DLL object. By default, the close() - //operation on / the object will be invoked before it is destroyed. + /// operation on / the object will be invoked before it is destroyed. int set_handle (ACE_SHLIB_HANDLE handle, bool close_handle_on_destruction = true); diff --git a/externals/ace/DLL_Manager.cpp b/externals/ace/DLL_Manager.cpp index 9f2578e10aa..be73f455800 100644 --- a/externals/ace/DLL_Manager.cpp +++ b/externals/ace/DLL_Manager.cpp @@ -1,4 +1,4 @@ -// $Id: DLL_Manager.cpp 86478 2009-08-13 07:15:05Z johnnyw $ +// $Id: DLL_Manager.cpp 90712 2010-06-18 20:01:29Z shuston $ #include "ace/DLL_Manager.h" @@ -61,7 +61,7 @@ ACE_DLL_Handle::open (const ACE_TCHAR *dll_name, { if (ACE::debug ()) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) DLL_Handle::open: error, ") + ACE_TEXT ("ACE (%P|%t) DLL_Handle::open: error, ") ACE_TEXT ("tried to reopen %s with name %s\n"), this->dll_name_, dll_name)); @@ -370,7 +370,7 @@ ACE_DLL_Handle::get_handle (int become_owner) if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) ACE_DLL_Handle::get_handle: ") + ACE_TEXT ("ACE (%P|%t) DLL_Handle::get_handle: ") ACE_TEXT ("post call: handle %s, refcount %d\n"), this->handle_ == ACE_SHLIB_INVALID_HANDLE ? ACE_TEXT ("invalid") : ACE_TEXT ("valid"), @@ -537,7 +537,7 @@ ACE_DLL_Manager::ACE_DLL_Manager (int size) if (this->open (size) != 0 && ACE::debug ()) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL_Manager ctor failed to allocate ") + ACE_TEXT ("ACE (%P|%t) DLL_Manager ctor failed to allocate ") ACE_TEXT ("handle_vector_.\n"))); } @@ -547,7 +547,7 @@ ACE_DLL_Manager::~ACE_DLL_Manager (void) if (this->close () != 0 && ACE::debug ()) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL_Manager dtor failed to close ") + ACE_TEXT ("ACE (%P|%t) DLL_Manager dtor failed to close ") ACE_TEXT ("properly.\n"))); } @@ -583,7 +583,7 @@ ACE_DLL_Manager::open_dll (const ACE_TCHAR *dll_name, // Error while opening dll. Free temp handle if (ACE::debug ()) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL_Manager::open_dll: Could not ") + ACE_TEXT ("ACE (%P|%t) DLL_Manager::open_dll: Could not ") ACE_TEXT ("open dll %s.\n"), dll_name)); @@ -766,7 +766,7 @@ ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload) { if (ACE::debug ()) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL_Manager::unload error.\n"))); + ACE_TEXT ("ACE (%P|%t) DLL_Manager::unload error.\n"))); return -1; } @@ -775,7 +775,7 @@ ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload) { if (ACE::debug ()) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL_Manager::unload_dll called with ") + ACE_TEXT ("ACE (%P|%t) DLL_Manager::unload_dll called with ") ACE_TEXT ("null pointer.\n"))); return -1; diff --git a/externals/ace/DLL_Manager.h b/externals/ace/DLL_Manager.h index 63b9ee04a84..716e3299557 100644 --- a/externals/ace/DLL_Manager.h +++ b/externals/ace/DLL_Manager.h @@ -4,7 +4,7 @@ /** * @file DLL_Manager.h * - * $Id: DLL_Manager.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: DLL_Manager.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Don Hinton <dhinton@ieee.org> */ @@ -45,7 +45,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * on some platforms. It is refcounted and managed by * ACE_DLL_Manager, so there will only be a single instance of this * class for each dll loaded, no matter how many instances of ACE_DLL - * an application has open. Operations <open>, <close>, and <symbol> + * an application has open. Operations open(), close(), and symbol() * have been implemented to help opening/closing and extracting symbol * information from a DLL, respectively. * @@ -69,11 +69,11 @@ public: /** * This method opens and dynamically links @a dll_name. The default - * mode is <RTLD_LAZY>, which loads identifier symbols but not the + * mode is @c RTLD_LAZY, which loads identifier symbols but not the * symbols for functions, which are loaded dynamically on-demand. - * Other supported modes include: <RTLD_NOW>, which performs all + * Other supported modes include: @c RTLD_NOW, which performs all * necessary relocations when @a dll_name is first loaded and - * <RTLD_GLOBAL>, which makes symbols available for relocation + * @c RTLD_GLOBAL, which makes symbols available for relocation * processing of any other DLLs. Returns -1 on failure and 0 on * success. */ @@ -110,20 +110,20 @@ private: /// to the caller. auto_ptr <ACE_TString> error (void); - // Builds array of DLL names to try to dlopen, based on platform - // and configured DLL prefixes/suffixes. - // Returns the array of names to try in try_names. + /// Builds array of DLL names to try to dlopen, based on platform + /// and configured DLL prefixes/suffixes. + /// Returns the array of names to try in try_names. void get_dll_names (const ACE_TCHAR *dll_name, ACE_Array<ACE_TString> &try_names); - // Disallow copying and assignment since we don't handle them. + /// Disallow copying and assignment since we don't handle them. ACE_DLL_Handle (const ACE_DLL_Handle &); void operator= (const ACE_DLL_Handle &); private: - // Keep track of how many ACE_DLL objects have a reference to this - // dll. + /// Keep track of how many ACE_DLL objects have a reference to this + /// dll. sig_atomic_t refcount_; /// Name of the shared library. @@ -218,16 +218,16 @@ protected: /// Destructor. ~ACE_DLL_Manager (void); - // Allocate handle_vector_. + /// Allocate handle_vector_. int open (int size); - // Close all open dlls and deallocate memory. + /// Close all open dlls and deallocate memory. int close (void); - // Find dll in handle_vector_. + /// Find dll in handle_vector_. ACE_DLL_Handle *find_dll (const ACE_TCHAR *dll_name) const; - // Applies strategy for unloading dll. + /// Applies strategy for unloading dll. int unload_dll (ACE_DLL_Handle *dll_handle, int force_unload = 0); private: @@ -235,7 +235,7 @@ private: /// Close the singleton instance. static void close_singleton (void); - // Disallow copying and assignment since we don't handle these. + /// Disallow copying and assignment since we don't handle these. ACE_DLL_Manager (const ACE_DLL_Manager &); void operator= (const ACE_DLL_Manager &); diff --git a/externals/ace/Dev_Poll_Reactor.h b/externals/ace/Dev_Poll_Reactor.h index 030ad241810..68724bf8f9c 100644 --- a/externals/ace/Dev_Poll_Reactor.h +++ b/externals/ace/Dev_Poll_Reactor.h @@ -4,7 +4,7 @@ /** * @file Dev_Poll_Reactor.h * - * $Id: Dev_Poll_Reactor.h 90177 2010-05-19 11:44:22Z vzykov $ + * $Id: Dev_Poll_Reactor.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @c /dev/poll (or Linux @c sys_epoll) based Reactor implementation. * @@ -56,52 +56,6 @@ class ACE_Dev_Poll_Reactor; // --------------------------------------------------------------------- -#if 0 -/** - * @class ACE_Dev_Poll_Ready_Set - * - * @brief Class that contains the list of "ready" file descriptors. - * - * This class points to an array of pollfd structures corresponding to - * "ready" file descriptors, such as those corresponding to event - * handlers that request an additional callback after being initially - * dispatched (i.e. return a value greater than zero). - * @par - * The idea is to store the "ready" set in an existing area of memory - * that already contains pollfd instances. Doing so is safe since the - * "ready" set is dispatched before polling for additional events, - * thus avoiding being potentially overwritten during the event poll. - * @par - * When the "ready" set is dispatched, all that needs to be done is to - * iterate over the contents of the array. There is no need to "walk" - * the array in search of ready file descriptors since the array by - * design only contains ready file descriptors. As such, this - * implementation of a ready set is much more efficient in the - * presence of a large number of file descriptors in terms of both - * time and space than the one used in the Select_Reactor, for - * example. - */ -class ACE_Dev_Poll_Ready_Set -{ -public: - - /// Constructor. - ACE_Dev_Poll_Ready_Set (void); - -public: - - /// The array containing the pollfd structures corresponding to the - /// "ready" file descriptors. - struct pollfd *pfds; - - /// The number of "ready" file descriptors in the above array. - int nfds; - -}; -#endif /* 0 */ - -// --------------------------------------------------------------------- - /** * @class ACE_Dev_Poll_Reactor_Notify * @@ -1050,10 +1004,6 @@ protected: */ ACE_HANDLE poll_fd_; - /// Track HANDLES we are interested in for various events that must - /// be dispatched *without* polling. - /// ACE_Dev_Poll_Ready_Set ready_set_; - #if defined (ACE_HAS_EVENT_POLL) /// Event structure to be filled by epoll_wait. epoll_wait() only gets /// one event at a time and we rely on it's internals for fairness. diff --git a/externals/ace/Dev_Poll_Reactor.inl b/externals/ace/Dev_Poll_Reactor.inl index 2008107bc2c..0e72b305c62 100644 --- a/externals/ace/Dev_Poll_Reactor.inl +++ b/externals/ace/Dev_Poll_Reactor.inl @@ -1,6 +1,5 @@ // -*- C++ -*- -// -// $Id: Dev_Poll_Reactor.inl 90177 2010-05-19 11:44:22Z vzykov $ +// $Id: Dev_Poll_Reactor.inl 91066 2010-07-12 11:05:04Z johnnyw $ #include "ace/Log_Msg.h" @@ -20,17 +19,6 @@ ACE_Dev_Poll_Reactor::Event_Tuple::Event_Tuple (ACE_Event_Handler *eh, // --------------------------------------------------------------------- -#if 0 -ACE_INLINE -ACE_Dev_Poll_Ready_Set::ACE_Dev_Poll_Ready_Set (void) - : pfds (0), - nfds (0) -{ -} -#endif /* 0 */ - -// --------------------------------------------------------------------- - ACE_INLINE size_t ACE_Dev_Poll_Reactor::Handler_Repository::size (void) const { diff --git a/externals/ace/Dirent.h b/externals/ace/Dirent.h index 8d15e5337da..7735fb1f293 100644 --- a/externals/ace/Dirent.h +++ b/externals/ace/Dirent.h @@ -4,7 +4,7 @@ /** * @file Dirent.h * - * $Id: Dirent.h 84316 2009-02-03 19:46:05Z johnnyw $ + * $Id: Dirent.h 91064 2010-07-12 10:11:24Z johnnyw $ * * Define a portable C++ interface to ACE_OS_Dirent directory-entry * manipulation. @@ -59,21 +59,21 @@ public: * refers, and positions the directory stream at the next entry, * except on read-only filesystems. It returns a NULL pointer upon * reaching the end of the directory stream, or upon detecting an - * invalid location in the directory. <readdir> shall not return + * invalid location in the directory. @c read() shall not return * directory entries containing empty names. It is unspecified * whether entries are returned for dot or dot-dot. The pointer - * returned by <readdir> points to data that may be overwritten by - * another call to <readdir> on the same directory stream. This - * data shall not be overwritten by another call to <readdir> on a - * different directory stream. <readdir> may buffer several - * directory entries per actual read operation; <readdir> marks for + * returned by @c read() points to data that may be overwritten by + * another call to @c read() on the same directory stream. This + * data shall not be overwritten by another call to @c read() on a + * different directory stream. @c read() may buffer several + * directory entries per actual read operation; @c read() marks for * update the st_atime field of the directory each time the * directory is actually read. */ ACE_DIRENT *read (void); /** - * Has the equivalent functionality as <readdir> except that an + * Has the equivalent functionality as @c read() except that an * @a entry and @a result buffer must be supplied by the caller to * store the result. */ @@ -86,15 +86,15 @@ public: long tell (void); /** - * Sets the position of the next <readdir> operation on the + * Sets the position of the next @c read() operation on the * directory stream. The new position reverts to the position - * associated with the directory stream at the time the <telldir> + * associated with the directory stream at the time the @c tell() * operation that provides loc was performed. Values returned by - * <telldir> are good only for the lifetime of the <ACE_DIR> pointer from + * @c tell() are good only for the lifetime of the ACE_DIR pointer from * which they are derived. If the directory is closed and then - * reopened, the <telldir> value may be invalidated due to + * reopened, the @c telldir() value may be invalidated due to * undetected directory compaction. It is safe to use a previous - * <telldir> value immediately after a call to <opendir> and before + * @c telldir() value immediately after a call to @c opendir() and before * any calls to readdir. */ void seek (long loc); @@ -103,7 +103,7 @@ public: * Resets the position of the directory stream to the beginning of * the directory. It also causes the directory stream to refer to * the current state of the corresponding directory, as a call to - * <opendir> would. + * @c opendir() would. */ void rewind (void); diff --git a/externals/ace/Dump_T.h b/externals/ace/Dump_T.h index 92b57addce6..4186cabf937 100644 --- a/externals/ace/Dump_T.h +++ b/externals/ace/Dump_T.h @@ -4,7 +4,7 @@ /** * @file Dump_T.h * - * $Id: Dump_T.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Dump_T.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Doug Schmidt */ @@ -26,7 +26,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Dumpable_Adapter * - * @brief This class inherits the interface of the abstract ACE_Dumpable + * @brief + * This class inherits the interface of the abstract ACE_Dumpable * class and is instantiated with the implementation of the * concrete component class <class Concrete>. * diff --git a/externals/ace/Event_Handler.h b/externals/ace/Event_Handler.h index 2e1414ec336..417f78578e7 100644 --- a/externals/ace/Event_Handler.h +++ b/externals/ace/Event_Handler.h @@ -4,7 +4,7 @@ /** * @file Event_Handler.h * - * $Id: Event_Handler.h 86576 2009-08-29 22:42:51Z shuston $ + * $Id: Event_Handler.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -38,7 +38,8 @@ typedef unsigned long ACE_Reactor_Mask; /** * @class ACE_Event_Handler * - * @brief Provides an abstract interface for handling various types of + * @brief + * Provides an abstract interface for handling various types of * I/O, timer, and signal events. * * Subclasses read/write input/output on an I/O descriptor, @@ -94,9 +95,9 @@ public: // = Get/set priority - // Priorities run from MIN_PRIORITY (which is the "lowest priority") - // to MAX_PRIORITY (which is the "highest priority"). /// Get the priority of the Event_Handler. + /// @note Priorities run from MIN_PRIORITY (which is the "lowest priority") + /// to MAX_PRIORITY (which is the "highest priority"). virtual int priority (void) const; /// Set the priority of the Event_Handler. @@ -177,8 +178,8 @@ public: * non-sockets (such as ACE_STDIN). This is commonly used in * situations where the Reactor is used to demultiplex read events * on ACE_STDIN on UNIX. Note that @a event_handler must be a - * subclass of ACE_Event_Handler. If the <get_handle> method of - * this event handler returns <ACE_INVALID_HANDLE> we default to + * subclass of ACE_Event_Handler. If the get_handle() method of + * this event handler returns ACE_INVALID_HANDLE we default to * reading from ACE_STDIN. */ static ACE_THR_FUNC_RETURN read_adapter (void *event_handler); @@ -193,7 +194,7 @@ public: ACE_Thread_Manager *thr_mgr, int flags = THR_DETACHED); - /// Performs the inverse of the <register_stdin_handler> method. + /// Performs the inverse of the register_stdin_handler() method. static int remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr); @@ -238,7 +239,8 @@ public: /** * @class Reference_Counting_Policy * - * @brief This policy dictates the reference counting requirements + * @brief + * This policy dictates the reference counting requirements * for the handler. * * This policy allows applications to configure whether it wants the diff --git a/externals/ace/File_Lock.h b/externals/ace/File_Lock.h index 2820f71053d..4cd58fcd184 100644 --- a/externals/ace/File_Lock.h +++ b/externals/ace/File_Lock.h @@ -4,7 +4,7 @@ /** * @file File_Lock.h * - * $Id: File_Lock.h 87213 2009-10-23 13:11:34Z johnnyw $ + * $Id: File_Lock.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -69,7 +69,7 @@ public: /** * Note, for interface uniformity with other synchronization - * wrappers we include the <acquire> method. This is implemented as + * wrappers we include the acquire() method. This is implemented as * a write-lock to be on the safe-side... */ int acquire (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); diff --git a/externals/ace/Filecache.h b/externals/ace/Filecache.h index 60b8a90f620..9165a70fcd3 100644 --- a/externals/ace/Filecache.h +++ b/externals/ace/Filecache.h @@ -4,7 +4,7 @@ /** * @file Filecache.h * - * $Id: Filecache.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Filecache.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author James Hu */ @@ -41,7 +41,8 @@ class ACE_Filecache_Object; /** * @class ACE_Filecache_Handle * - * @brief Abstraction over a real file. This is meant to be the entry + * @brief + * Abstraction over a real file. This is meant to be the entry * point into the Cached Virtual Filesystem. * * This is a cached filesystem implementation based loosely on the @@ -143,7 +144,7 @@ private: /// A reference to the low level instance. ACE_Filecache_Object *file_; - /// A <dup>'d version of the one from <file_>. + /// A dup'd version of the one from file_. ACE_HANDLE handle_; int mapit_; @@ -157,7 +158,8 @@ typedef ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *> ACE_Fileca /** * @class ACE_Filecache * - * @brief A hash table holding the information about entry point into + * @brief + * A hash table holding the information about entry point into * the Cached Virtual Filesystem. On insertion, the reference * count is incremented. On destruction, reference count is * decremented. @@ -231,7 +233,8 @@ private: /** * @class ACE_Filecache_Object * - * @brief Abstraction over a real file. This is what the Virtual + * @brief + * Abstraction over a real file. This is what the Virtual * Filesystem contains. This class is not intended for general * consumption. Please consult a physician before attempting to * use this class. diff --git a/externals/ace/Handle_Gobbler.inl b/externals/ace/Handle_Gobbler.inl index cca9e4bd7be..6a053d88be0 100644 --- a/externals/ace/Handle_Gobbler.inl +++ b/externals/ace/Handle_Gobbler.inl @@ -1,11 +1,12 @@ // -*- C++ -*- // -// $Id: Handle_Gobbler.inl 85911 2009-07-07 05:45:14Z olli $ +// $Id: Handle_Gobbler.inl 90388 2010-06-02 15:27:59Z vzykov $ // Since this is only included in Handle_Gobbler.h, these should be // inline, not ACE_INLINE. // FUZZ: disable check_for_inline +#include "ace/ACE.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_fcntl.h" diff --git a/externals/ace/INET_Addr.h b/externals/ace/INET_Addr.h index d68e6409cdb..ba8978c256c 100644 --- a/externals/ace/INET_Addr.h +++ b/externals/ace/INET_Addr.h @@ -4,7 +4,7 @@ /** * @file INET_Addr.h * - * $Id: INET_Addr.h 82789 2008-09-19 14:47:28Z johnnyw $ + * $Id: INET_Addr.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -71,15 +71,15 @@ public: explicit ACE_INET_Addr (u_short port_number, ACE_UINT32 ip_addr = INADDR_ANY); - /// Uses <getservbyname> to create an ACE_INET_Addr from a - /// <port_name>, the remote @a host_name, and the @a protocol. + /// Uses getservbyname() to create an ACE_INET_Addr from a + /// @a port_name, the remote @a host_name, and the @a protocol. ACE_INET_Addr (const char port_name[], const char host_name[], const char protocol[] = "tcp"); /** - * Uses <getservbyname> to create an ACE_INET_Addr from a - * <port_name>, an Internet @a ip_addr, and the @a protocol. This + * Uses getservbyname() to create an ACE_INET_Addr from a + * @a port_name, an Internet @a ip_addr, and the @a protocol. This * method assumes that @a ip_addr is in host byte order. */ ACE_INET_Addr (const char port_name[], diff --git a/externals/ace/Log_Msg_Callback.h b/externals/ace/Log_Msg_Callback.h index f743987b472..a67407459e6 100644 --- a/externals/ace/Log_Msg_Callback.h +++ b/externals/ace/Log_Msg_Callback.h @@ -4,7 +4,7 @@ /** * @file Log_Msg_Callback.h * - * $Id: Log_Msg_Callback.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Log_Msg_Callback.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -35,7 +35,7 @@ class ACE_Log_Record; * Log_Msg class and make sure that they turn on the * ACE_Log_Msg::MSG_CALLBACK flag. * - * Your <log> routine is called with an instance of + * Your log() routine is called with an instance of * ACE_Log_Record. From this class, you can get the log * message, the verbose log message, message type, message * priority, and so on. @@ -43,9 +43,9 @@ class ACE_Log_Record; * Remember that there is one Log_Msg object per thread. * Therefore, you may need to register your callback object with * many ACE_Log_Msg objects (and have the correct - * synchronization in the <log> method) or have a separate + * synchronization in the log() method) or have a separate * callback object per Log_Msg object. Moreover, - * <ACE_Log_Msg_Callbacks> are not inherited when a new thread + * ACE_Log_Msg_Callbacks are not inherited when a new thread * is spawned because it might have been allocated off of the * stack of the original thread, in which case all hell would * break loose... Therefore, you'll need to reset these in each diff --git a/externals/ace/Log_Msg_UNIX_Syslog.h b/externals/ace/Log_Msg_UNIX_Syslog.h index 3c762e8daa9..56d75029e46 100644 --- a/externals/ace/Log_Msg_UNIX_Syslog.h +++ b/externals/ace/Log_Msg_UNIX_Syslog.h @@ -4,7 +4,7 @@ /** * @file Log_Msg_UNIX_Syslog.h * - * $Id: Log_Msg_UNIX_Syslog.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Log_Msg_UNIX_Syslog.h 90388 2010-06-02 15:27:59Z vzykov $ * * @author Jerry D. De Master <jdemaster@rite-solutions.com> */ @@ -23,6 +23,7 @@ #if !defined (ACE_LACKS_UNIX_SYSLOG) #include "ace/Log_Msg_Backend.h" +#include "ace/Basic_Types.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/Log_Record.h b/externals/ace/Log_Record.h index c7161581a7a..aaf2a21ede5 100644 --- a/externals/ace/Log_Record.h +++ b/externals/ace/Log_Record.h @@ -4,7 +4,7 @@ /** * @file Log_Record.h * - * $Id: Log_Record.h 85236 2009-05-01 11:43:56Z johnnyw $ + * $Id: Log_Record.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -56,7 +56,7 @@ public: // = Initialization /** - * Create a <Log_Record> and set its priority, time stamp, and + * Create a Log_Record and set its priority, time stamp, and * process id. */ ACE_Log_Record (void); @@ -72,7 +72,7 @@ public: /// Write the contents of the logging record to the appropriate - /// <FILE> if the corresponding type is enabled. + /// FILE if the corresponding type is enabled. int print (const ACE_TCHAR host_name[], u_long verbose_flag, #if !defined (ACE_HAS_WINCE) @@ -101,62 +101,67 @@ public: static const ACE_TCHAR *priority_name (ACE_Log_Priority p); /// IMPORTANT: @a name must be a statically allocated const ACE_TCHAR* - static void priority_name (ACE_Log_Priority p, - const ACE_TCHAR *name); + static void priority_name (ACE_Log_Priority p, const ACE_TCHAR *name); // = Marshall/demarshall - /// Encode the @c Log_Record for transmission on the network. - /// @deprecated The encode() and decode() metods are deprecated; please use - /// the CDR insertion and extraction operators to properly encode and decode - /// ACE_Log_Record objects. + /** + * Encode the @c Log_Record for transmission on the network. + * @deprecated + * The encode() and decode() metods are deprecated; please use + * the CDR insertion and extraction operators to properly encode and decode + * ACE_Log_Record objects. + */ void encode (void); - /// Decode the @c Log_Record received from the network. - /// @deprecated The encode() and decode() metods are deprecated; please use - /// the CDR insertion and extraction operators to properly encode and decode - /// ACE_Log_Record objects. + /** + * Decode the @c Log_Record received from the network. + * @deprecated + * The encode() and decode() metods are deprecated; please use + * the CDR insertion and extraction operators to properly encode and decode + * ACE_Log_Record objects. + */ void decode (void); // = Set/get methods - /// Get the type of the <Log_Record>. + /// Get the type of the Log_Record. ACE_UINT32 type (void) const; - /// Set the type of the <Log_Record>. + /// Set the type of the Log_Record. void type (ACE_UINT32); /** - * Get the priority of the <Log_Record> <type_>. This is computed + * Get the priority of the Log_Record <type_>. This is computed * as the base 2 logarithm of <type_> (which must be a power of 2, - * as defined by the enums in <ACE_Log_Priority>). + * as defined by the enums in ACE_Log_Priority). */ u_long priority (void) const; - /// Set the priority of the <Log_Record> <type_> (which must be a - /// power of 2, as defined by the enums in <ACE_Log_Priority>). + /// Set the priority of the Log_Record <type_> (which must be a + /// power of 2, as defined by the enums in ACE_Log_Priority). void priority (u_long num); - /// Get the total length of the <Log_Record>, which includes the + /// Get the total length of the Log_Record, which includes the /// size of the various data member fields. long length (void) const; - /// Set the total length of the <Log_Record>, which needs to account for + /// Set the total length of the Log_Record, which needs to account for /// the size of the various data member fields. void length (long); - /// Get the time stamp of the <Log_Record>. + /// Get the time stamp of the Log_Record. ACE_Time_Value time_stamp (void) const; - /// Set the time stamp of the <Log_Record>. + /// Set the time stamp of the Log_Record. void time_stamp (const ACE_Time_Value &ts); - /// Get the process id of the <Log_Record>. + /// Get the process id of the Log_Record. long pid (void) const; - /// Set the process id of the <Log_Record>. + /// Set the process id of the Log_Record. void pid (long); - /// Get the message data of the <Log_Record>. + /// Get the message data of the Log_Record. const ACE_TCHAR *msg_data (void) const; /// Set the message data of the record. If @a data is longer than the @@ -164,7 +169,7 @@ public: /// fit. If such a reallocation faisl, this method returns -1, else 0. int msg_data (const ACE_TCHAR *data); - /// Get the size of the message data of the <Log_Record>, including + /// Get the size of the message data of the Log_Record, including /// a byte for the NUL. size_t msg_data_len (void) const; diff --git a/externals/ace/Logging_Strategy.cpp b/externals/ace/Logging_Strategy.cpp index 1b868d6f696..04899f74dad 100644 --- a/externals/ace/Logging_Strategy.cpp +++ b/externals/ace/Logging_Strategy.cpp @@ -1,8 +1,9 @@ -// $Id: Logging_Strategy.cpp 89512 2010-03-17 14:42:24Z vzykov $ +// $Id: Logging_Strategy.cpp 90712 2010-06-18 20:01:29Z shuston $ #include "ace/Logging_Strategy.h" #include "ace/Service_Config.h" #include "ace/ACE.h" +#include "ace/ACE_export.h" #include "ace/Get_Opt.h" // FUZZ: disable check_for_streams_include @@ -17,7 +18,7 @@ ACE_RCSID (ace, Logging_Strategy, - "$Id: Logging_Strategy.cpp 89512 2010-03-17 14:42:24Z vzykov $") + "$Id: Logging_Strategy.cpp 90712 2010-06-18 20:01:29Z shuston $") ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -603,3 +604,11 @@ ACE_STATIC_SVC_DEFINE (ACE_Logging_Strategy, 0) ACE_FACTORY_DEFINE (ACE, ACE_Logging_Strategy) + +// _get_dll_unload_policy() prevents ACE from being unloaded and having its +// framework components run down if/when the Logging Strategy is unloaded. +extern "C" ACE_Export int +_get_dll_unload_policy() +{ + return ACE_DLL_UNLOAD_POLICY_LAZY; +} diff --git a/externals/ace/Logging_Strategy.h b/externals/ace/Logging_Strategy.h index 00a50eae082..7792c106121 100644 --- a/externals/ace/Logging_Strategy.h +++ b/externals/ace/Logging_Strategy.h @@ -4,7 +4,7 @@ /** * @file Logging_Strategy.h * - * $Id: Logging_Strategy.h 89512 2010-03-17 14:42:24Z vzykov $ + * $Id: Logging_Strategy.h 91064 2010-07-12 10:11:24Z johnnyw $ * * @author Prashant Jain <pjain@cs.wustl.edu> * @author Orlando Ribeiro <oribeiro@inescporto.pt> @@ -30,7 +30,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Logging_Strategy * - * @brief This class provides a way to dynamically configure the ACE logging + * @brief + * This class provides a way to dynamically configure the ACE logging * mechanism at run time as well as enable the mechanisms for limiting * log file size and log file backup/rotation capability. * @@ -170,16 +171,16 @@ protected: /// Program name to be used for %n format specifier. ACE_TCHAR *program_name_; - /// If non-0 then wipeout the logfile, otherwise append to it. - /// Default value is 0. + /// If true then wipeout the logfile, otherwise append to it. + /// Default value is false. bool wipeout_logfile_; - /// If non-0 we have a maximum number of log files we can write. - /// Default value is 0, i.e., no maximum number. + /// If true we have a maximum number of log files we can write. + /// Default value is false, i.e., no maximum number. bool fixed_number_; - /// If non-0 we order the files as we rotate them. Default value - /// is 0, i.e., we do not rotate files by default. + /// If true we order the files as we rotate them. Default value + /// is false, i.e., we do not rotate files by default. bool order_files_; /// This tells us in what file we last wrote. It will be increased diff --git a/externals/ace/Malloc_Base.h b/externals/ace/Malloc_Base.h index 6a13d020ad6..d800c7fe544 100644 --- a/externals/ace/Malloc_Base.h +++ b/externals/ace/Malloc_Base.h @@ -4,7 +4,7 @@ /** * @file Malloc_Base.h * - * $Id: Malloc_Base.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Malloc_Base.h 91058 2010-07-12 08:20:09Z johnnyw $ * * @author Doug Schmidt and Irfan Pyarali */ @@ -73,7 +73,7 @@ public: size_type elem_size, char initial_value = '\0') = 0; - /// Free <ptr> (must have been allocated by <ACE_Allocator::malloc>). + /// Free @a ptr (must have been allocated by ACE_Allocator::malloc()). virtual void free (void *ptr) = 0; /// Remove any resources associated with this memory manager. diff --git a/externals/ace/Manual_Event.h b/externals/ace/Manual_Event.h index 4686e35d39d..5242ef17c96 100644 --- a/externals/ace/Manual_Event.h +++ b/externals/ace/Manual_Event.h @@ -4,7 +4,7 @@ /** * @file Manual_Event.h * - * $Id: Manual_Event.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Manual_Event.h 91066 2010-07-12 11:05:04Z johnnyw $ * * Moved from Synch.h. * @@ -39,14 +39,14 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Export ACE_Manual_Event : public ACE_Event { public: - /// constructor which will create manual event + /// Constructor which will create manual event ACE_Manual_Event (int initial_state = 0, int type = USYNC_THREAD, const char *name = 0, void *arg = 0); #if defined (ACE_HAS_WCHAR) - /// constructor which will create manual event (wchar_t version) + /// Constructor which will create manual event (wchar_t version) ACE_Manual_Event (int initial_state, int type, const wchar_t *name, diff --git a/externals/ace/Map_Manager.h b/externals/ace/Map_Manager.h index 4e361216f29..23fd343c2fd 100644 --- a/externals/ace/Map_Manager.h +++ b/externals/ace/Map_Manager.h @@ -4,7 +4,7 @@ /** * @file Map_Manager.h * - * $Id: Map_Manager.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Map_Manager.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -111,10 +111,11 @@ class ACE_Map_Reverse_Iterator; /** * @class ACE_Map_Manager * - * @brief Define a map abstraction that associates <EXT_ID>s with - * <INT_ID>s. + * @brief + * Define a map abstraction that associates EXT_IDs with + * INT_IDs. * - * The <EXT_ID> must support <operator==>. This constraint can + * The EXT_ID must support @c operator==. This constraint can * be alleviated via template specialization, as shown in the * $ACE_ROOT/tests/Conn_Test.cpp test. * This class uses an ACE_Allocator to allocate memory. The @@ -122,7 +123,7 @@ class ACE_Map_Reverse_Iterator; * ACE_Allocator with a persistable memory pool. * This implementation of a map uses an array, which is searched * linearly. For more efficient searching you should use the - * <ACE_Hash_Map_Manager>. + * ACE_Hash_Map_Manager. */ template <class EXT_ID, class INT_ID, class ACE_LOCK> class ACE_Map_Manager @@ -195,7 +196,7 @@ public: /** * Reassociate @a ext_id with @a int_id. If @a ext_id is not in the - * map then behaves just like <bind>. Otherwise, store the old + * map then behaves just like bind(). Otherwise, store the old * values of @a int_id into the "out" parameter and rebind the new * parameters. * @retval 0 If a new entry is bound successfully. @@ -261,12 +262,12 @@ public: size_t total_size (void) const; /** - * Returns a reference to the underlying <ACE_LOCK>. This makes it + * Returns a reference to the underlying ACE_LOCK. This makes it * possible to acquire the lock explicitly, which can be useful in * some cases if you instantiate the ACE_Atomic_Op with an * ACE_Recursive_Mutex or ACE_Process_Mutex, or if you need to * guard the state of an iterator. - * @note The right name would be <lock>, but HP/C++ will choke on that! + * @note The right name would be lock, but HP/C++ will choke on that! */ ACE_LOCK &mutex (void); diff --git a/externals/ace/Mem_Map.h b/externals/ace/Mem_Map.h index 14410cbf3f0..bda59bd18ed 100644 --- a/externals/ace/Mem_Map.h +++ b/externals/ace/Mem_Map.h @@ -4,7 +4,7 @@ /** * @file Mem_Map.h * - * $Id: Mem_Map.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Mem_Map.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -22,6 +22,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Global_Macros.h" +#include "ace/Copy_Disabled.h" #include "ace/os_include/sys/os_mman.h" #include "ace/os_include/os_limits.h" #include "ace/os_include/os_fcntl.h" @@ -37,7 +38,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * This class works with both the mmap(2) UNIX system and the * Win32 family of memory mapping system calls. */ -class ACE_Export ACE_Mem_Map +class ACE_Export ACE_Mem_Map : private ACE_Copy_Disabled { public: // = Initialization and termination methods. @@ -128,38 +129,38 @@ public: /// file. size_t size (void) const; - /// Unmap the region starting at <base_addr_>. + /// Unmap the region starting at base_addr_. int unmap (ssize_t len = -1); - /// Unmap the region starting at <addr_>. + /// Unmap the region starting at addr_. int unmap (void *addr, ssize_t len); /** * Sync @a len bytes of the memory region to the backing store - * starting at <base_addr_>. If @a len == -1 then sync the whole + * starting at base_addr_. If @a len == -1 then sync the whole * region. */ int sync (size_t len, int flags = MS_SYNC); /** * Sync the whole memory region to the backing store - * starting at <base_addr_>. + * starting at base_addr_. */ int sync (int flags = MS_SYNC); /// Sync @a len bytes of the memory region to the backing store - /// starting at <addr_>. + /// starting at addr_. int sync (void *addr, size_t len, int flags = MS_SYNC); /** * Change the protection of the pages of the mapped region to @a prot - * starting at <base_addr_> up to @a len bytes. + * starting at base_addr_ up to @a len bytes. */ int protect (size_t len, int prot = PROT_RDWR); /** * Change the protection of all the pages of the mapped region to @a prot - * starting at <base_addr_>. + * starting at base_addr_. */ int protect (int prot = PROT_RDWR); @@ -197,10 +198,6 @@ private: ACE_OFF_T offset = 0, LPSECURITY_ATTRIBUTES sa = 0); - // = Disallow copying and assignment. - ACE_Mem_Map (const ACE_Mem_Map &); - void operator = (const ACE_Mem_Map &); - private: /// Base address of the memory-mapped file. diff --git a/externals/ace/Message_Block.h b/externals/ace/Message_Block.h index cd4545a42e6..0e8c4bfd643 100644 --- a/externals/ace/Message_Block.h +++ b/externals/ace/Message_Block.h @@ -4,7 +4,7 @@ /** * @file Message_Block.h * - * $Id: Message_Block.h 86825 2009-09-28 17:45:23Z johnnyw $ + * $Id: Message_Block.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -241,8 +241,8 @@ public: /** * Delete all the resources held in the message. * - * Note that <release()> is designed to release the continuation - * chain; the destructor is not. See <release()> for details. + * @note Note that release() is designed to release the continuation + * chain; the destructor is not. See release() for details. */ virtual ~ACE_Message_Block (void); diff --git a/externals/ace/Message_Queue_T.cpp b/externals/ace/Message_Queue_T.cpp index 6c677c1d555..a33bac23e71 100644 --- a/externals/ace/Message_Queue_T.cpp +++ b/externals/ace/Message_Queue_T.cpp @@ -1,4 +1,4 @@ -// $Id: Message_Queue_T.cpp 88560 2010-01-15 05:02:05Z schmidt $ +// $Id: Message_Queue_T.cpp 91016 2010-07-06 11:29:50Z johnnyw $ #ifndef ACE_MESSAGE_QUEUE_T_CPP #define ACE_MESSAGE_QUEUE_T_CPP @@ -60,13 +60,13 @@ ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::message_length (size_t ne } template <class ACE_MESSAGE_TYPE, ACE_SYNCH_DECL> -ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::ACE_Message_Queue_Ex (size_t hwm, - size_t lwm, +ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::ACE_Message_Queue_Ex (size_t high_water_mark, + size_t low_water_mark, ACE_Notification_Strategy *ns) { ACE_TRACE ("ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE>::ACE_Message_Queue_Ex"); - if (this->queue_.open (hwm, lwm, ns) == -1) + if (this->queue_.open (high_water_mark, low_water_mark, ns) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Message_Queue_Ex"))); } diff --git a/externals/ace/OS_Log_Msg_Attributes.h b/externals/ace/OS_Log_Msg_Attributes.h index 6a1688260ba..65c11ab61bf 100644 --- a/externals/ace/OS_Log_Msg_Attributes.h +++ b/externals/ace/OS_Log_Msg_Attributes.h @@ -4,7 +4,7 @@ /** * @file OS_Log_Msg_Attributes.h * - * $Id: OS_Log_Msg_Attributes.h 83729 2008-11-13 15:32:36Z mitza $ + * $Id: OS_Log_Msg_Attributes.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Carlos O'Ryan */ @@ -23,6 +23,7 @@ #include /**/ "ace/ACE_export.h" #include "ace/os_include/os_stdio.h" #include "ace/iosfwd.h" +#include "ace/Copy_Disabled.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -39,7 +40,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * The contents of the class must be made available to the OS layer, * because they are part of the thread descriptor. */ -class ACE_Export ACE_OS_Log_Msg_Attributes +class ACE_Export ACE_OS_Log_Msg_Attributes : private ACE_Copy_Disabled { public: /// Constructor @@ -65,16 +66,11 @@ protected: /// Depth of the nesting for printing traces. int trace_depth_; -# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) +#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) /// Structured exception handling Callbacks, only used under Win32 ACE_SEH_EXCEPT_HANDLER seh_except_selector_; ACE_SEH_EXCEPT_HANDLER seh_except_handler_; -# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - -private: - // Prevent copying - ACE_OS_Log_Msg_Attributes (const ACE_OS_Log_Msg_Attributes &); - ACE_OS_Log_Msg_Attributes &operator= (const ACE_OS_Log_Msg_Attributes &); +#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ }; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/OS_NS_Thread.h b/externals/ace/OS_NS_Thread.h index 468b4f60b09..d386fa038a0 100644 --- a/externals/ace/OS_NS_Thread.h +++ b/externals/ace/OS_NS_Thread.h @@ -4,7 +4,7 @@ /** * @file OS_NS_Thread.h * - * $Id: OS_NS_Thread.h 85547 2009-06-07 17:57:11Z johnnyw $ + * $Id: OS_NS_Thread.h 91210 2010-07-26 20:31:30Z shuston $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> * @author Jesper S. M|ller<stophph@diku.dk> @@ -1604,7 +1604,7 @@ namespace ACE_OS { * defined, this is the thread-id. For linux-threads, when * ACE_HAS_SCHED_SETAFFINITY defined, it expects a process-id. Since for * linux-threads a thread is seen as a process, it does the job. - * @param cpu_set_size The size of the cpu_mask + * @param cpu_set_size The size of the cpu_mask, in bytes. * @param cpu_mask Is a bitmask of CPUs to bind to, e.g value 1 binds the * thread to the "CPU 0", etc */ @@ -1621,7 +1621,7 @@ namespace ACE_OS { * defined, this is the thread-id. For linux-threads, when * ACE_HAS_SCHED_SETAFFINITY defined, it expects a process-id. Since for * linux-threads a thread is seen as a process, it does the job. - * @param cpu_set_size The size of the cpu_mask + * @param cpu_set_size The size of the cpu_mask, in bytes. * @param cpu_mask Is a bitmask of CPUs to bind to, e.g value 1 binds the * thread to the "CPU 0", etc */ diff --git a/externals/ace/OS_NS_unistd.h b/externals/ace/OS_NS_unistd.h index 2b770e62ef6..489dc8e43e7 100644 --- a/externals/ace/OS_NS_unistd.h +++ b/externals/ace/OS_NS_unistd.h @@ -4,7 +4,7 @@ /** * @file OS_NS_unistd.h * - * $Id: OS_NS_unistd.h 84918 2009-03-20 08:07:01Z johnnyw $ + * $Id: OS_NS_unistd.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> * @author Jesper S. M|ller<stophph@diku.dk> @@ -189,12 +189,12 @@ namespace ACE_OS // should call gethostname() ACE_NAMESPACE_INLINE_FUNCTION - int hostname (char *name, + int hostname (char name[], size_t maxnamelen); #if defined (ACE_HAS_WCHAR) ACE_NAMESPACE_INLINE_FUNCTION - int hostname (wchar_t *name, + int hostname (wchar_t name[], size_t maxnamelen); #endif /* ACE_HAS_WCHAR */ diff --git a/externals/ace/Object_Manager.h b/externals/ace/Object_Manager.h index 94b755e1081..5e177ee6bfe 100644 --- a/externals/ace/Object_Manager.h +++ b/externals/ace/Object_Manager.h @@ -4,7 +4,7 @@ /** * @file Object_Manager.h * - * $Id: Object_Manager.h 84163 2009-01-15 07:57:27Z johnnyw $ + * $Id: Object_Manager.h 91066 2010-07-12 11:05:04Z johnnyw $ * * @author David L. Levine <levine@cs.wustl.edu> * @author Matthias Kerkhoff @@ -272,7 +272,7 @@ public: static int remove_at_exit (void *object); #if 0 /* not implemented yet */ - /// Similar to <at_exit>, except that the cleanup_hook is called + /// Similar to at_exit(), except that the cleanup_hook is called /// when the current thread exits instead of when the program terminates. static int at_thread_exit (void *object, ACE_CLEANUP_FUNC cleanup_hook, @@ -327,7 +327,8 @@ public: }; /** - * @deprecated Accesses a default signal set used, for example, + * @deprecated + * Accesses a default signal set used, for example, * in ACE_Sig_Guard methods. * Deprecated: use ACE_Object_Manager::default_mask () instead. */ @@ -411,10 +412,10 @@ public: static void *preallocated_array[ACE_PREALLOCATED_ARRAYS]; public: - // Application code should not use these explicitly, so they're - // hidden here. They're public so that the ACE_Object_Manager can - // be constructed/destructed in <main> with - // ACE_HAS_NONSTATIC_OBJECT_MANAGER. + /// Application code should not use these explicitly, so they're + /// hidden here. They're public so that the ACE_Object_Manager can + /// be constructed/destructed in <main> with + /// ACE_HAS_NONSTATIC_OBJECT_MANAGER. ACE_Object_Manager (void); ~ACE_Object_Manager (void); @@ -435,7 +436,7 @@ private: #endif /* ACE_MT_SAFE */ #if defined (ACE_HAS_TSS_EMULATION) - // Main thread's thread-specific storage array. + /// Main thread's thread-specific storage array. void *ts_storage_[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX]; bool ts_storage_initialized_; #endif /* ACE_HAS_TSS_EMULATION */ @@ -444,7 +445,7 @@ private: friend class ACE_Object_Manager_Manager; #endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */ - // Disallow copying by not implementing the following . . . + /// Disallow copying by not implementing the following . . . ACE_Object_Manager (const ACE_Object_Manager &); ACE_Object_Manager &operator= (const ACE_Object_Manager &); }; diff --git a/externals/ace/Process.h b/externals/ace/Process.h index 16325b9308e..4a95b53e867 100644 --- a/externals/ace/Process.h +++ b/externals/ace/Process.h @@ -4,7 +4,7 @@ /** * @file Process.h * - * $Id: Process.h 87826 2009-11-30 14:02:40Z johnnyw $ + * $Id: Process.h 91233 2010-07-29 14:47:16Z shuston $ * * @author Tim Harrison <harrison@cs.wustl.edu> */ @@ -94,8 +94,14 @@ public: /** * Set the standard handles of the new process to the respective * handles. If you want to affect a subset of the handles, make - * sure to set the others to ACE_INVALID_HANDLE. Returns 0 on - * success, -1 on failure. + * sure to set the others to ACE_INVALID_HANDLE. + * + * @note Any handle passed as ACE_INVALID_HANDLE will be changed to + * a duplicate of the current associated handle. For example, passing + * ACE_INVALID_HANDLE for @a std_in will cause ACE_STDIN to be + * duplicated and set in this object. + * + * @return 0 on success, -1 on failure. */ int set_handles (ACE_HANDLE std_in, ACE_HANDLE std_out = ACE_INVALID_HANDLE, diff --git a/externals/ace/QoS/ACE_QoS_Export.h b/externals/ace/QoS/ACE_QoS_Export.h new file mode 100644 index 00000000000..501d4be6415 --- /dev/null +++ b/externals/ace/QoS/ACE_QoS_Export.h @@ -0,0 +1,46 @@ +// -*- C++ -*- +// $Id: ACE_QoS_Export.h 80826 2008-03-04 14:51:23Z wotte $ +// Definition for Win32 Export directives. +// This file is generated automatically by +// generate_export_file.pl +// ------------------------------ +#if !defined (ACE_QOS_EXPORT_H) +#define ACE_QOS_EXPORT_H + +#include /**/ "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) +# if !defined (ACE_QoS_HAS_DLL) +# define ACE_QoS_HAS_DLL 0 +# endif /* ! ACE_QoS_HAS_DLL */ +#else +# if !defined (ACE_QoS_HAS_DLL) +# define ACE_QoS_HAS_DLL 1 +# endif /* ! ACE_QoS_HAS_DLL */ +#endif /* ACE_AS_STATIC_LIB */ + +#if defined (ACE_QoS_HAS_DLL) +# if (ACE_QoS_HAS_DLL == 1) +# if defined (ACE_QoS_BUILD_DLL) +# define ACE_QoS_Export ACE_Proper_Export_Flag +# define ACE_QoS_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ACE_QoS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else +# define ACE_QoS_Export ACE_Proper_Import_Flag +# define ACE_QoS_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ACE_QoS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ACE_QoS_BUILD_DLL */ +# else +# define ACE_QoS_Export +# define ACE_QoS_SINGLETON_DECLARATION(T) +# define ACE_QoS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ! ACE_QoS_HAS_DLL == 1 */ +#else +# define ACE_QoS_Export +# define ACE_QoS_SINGLETON_DECLARATION(T) +# define ACE_QoS_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ACE_QoS_HAS_DLL */ + +#endif /* ACE_QOS_EXPORT_H */ + +// End of auto generated file. diff --git a/externals/ace/QoS/QoS_Decorator.cpp b/externals/ace/QoS/QoS_Decorator.cpp new file mode 100644 index 00000000000..2a35b7af80c --- /dev/null +++ b/externals/ace/QoS/QoS_Decorator.cpp @@ -0,0 +1,165 @@ +// QoS_Decorator.cpp +// $Id: QoS_Decorator.cpp 80826 2008-03-04 14:51:23Z wotte $ + +#include "QoS_Decorator.h" + +ACE_RCSID(ace, QoS_Decorator, "$Id: QoS_Decorator.cpp 80826 2008-03-04 14:51:23Z wotte $") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE(ACE_QOS_DECORATOR) + +// Constructor. +ACE_QoS_Decorator_Base::ACE_QoS_Decorator_Base (void) +{} + +// Constructor. +ACE_QoS_Decorator_Base::ACE_QoS_Decorator_Base (ACE_Event_Handler + *event_handler) + : event_handler_ (event_handler) +{ +} + +// Destructor. +ACE_QoS_Decorator_Base::~ACE_QoS_Decorator_Base (void) +{ +} + +// Forward the call to ACE_Event_Handler component. +ACE_HANDLE +ACE_QoS_Decorator_Base::get_handle (void) const +{ + return this->event_handler_->get_handle (); +} + +// Forward the call to ACE_Event_Handler component. +int +ACE_QoS_Decorator_Base::handle_input (ACE_HANDLE fd) +{ + return this->event_handler_->handle_input (fd); +} + +// Forward the call to ACE_Event_Handler component. +int +ACE_QoS_Decorator_Base::handle_qos (ACE_HANDLE fd) +{ + return this->event_handler_->handle_qos (fd); +} + +// Constructor. +ACE_QoS_Decorator::ACE_QoS_Decorator (void) +{} + +// Constructor. +ACE_QoS_Decorator::ACE_QoS_Decorator (ACE_Event_Handler *event_handler, + ACE_QoS_Session *qos_session, + ACE_Reactor *reactor) + : qos_session_ (qos_session), + reactor_ (reactor) +{ + ACE_NEW (this->decorator_base_, + ACE_QoS_Decorator_Base (event_handler)); + + ACE_NEW (this->qos_event_handler_, + ACE_QoS_Event_Handler (this->decorator_base_)); +} + +// Destructor. +ACE_QoS_Decorator::~ACE_QoS_Decorator (void) +{ + delete this->decorator_base_; + delete this->qos_event_handler_; +} + +// Implements the undecorated functionality. This is sufficient for +// GQoS. RAPI needs additional QoS decoration. This is done by the +// ACE_QoS_Event_Handler class. +ACE_HANDLE +ACE_QoS_Decorator::get_handle (void) const +{ + return this->decorator_base_->get_handle (); +} + +// Implements the undecorated functionality. This is sufficient for +// GQoS. RAPI needs additional QoS decoration. This is done by the +// ACE_QoS_Event_Handler class. +int +ACE_QoS_Decorator::handle_input (ACE_HANDLE fd) +{ + return this->decorator_base_->handle_input (fd); +} + +// Implements the undecorated functionality. This is sufficient for +// GQoS. RAPI needs additional QoS decoration. This is done by the +// ACE_QoS_Event_Handler class. +int +ACE_QoS_Decorator::handle_qos (ACE_HANDLE fd) +{ + return this->decorator_base_->handle_qos (fd); +} + +// This method registers the RAPI QoS event handler with the reactor +// if the application is using RAPI. Note that it is a no-op for GQoS +// because an extra socket for handling QoS events is not required. +int +ACE_QoS_Decorator::init (void) +{ +#if defined (ACE_HAS_RAPI) + + // Pass the QoS session to QoS Event Handler. + this->qos_event_handler_->qos_session (this->qos_session_); + + // Register the QoS Event Handler with the Reactor. + return this->reactor_->register_handler (this->qos_event_handler_, + ACE_Event_Handler::READ_MASK); +#endif + return 0; + +} + +// Constructor. +ACE_QoS_Event_Handler::ACE_QoS_Event_Handler (void) +{ +} + +// Constructor. +ACE_QoS_Event_Handler::ACE_QoS_Event_Handler (ACE_QoS_Decorator_Base + *decorator_base) + : decorator_base_ (decorator_base) +{ +} + +// Destructor. +ACE_QoS_Event_Handler::~ACE_QoS_Event_Handler (void) +{ +} + +// Set the QoS session. +void +ACE_QoS_Event_Handler::qos_session (ACE_QoS_Session *qos_session) +{ + this->qos_session_ = qos_session; +} + +// Returns the RAPI file descriptor for listening to RAPI evnets. +ACE_HANDLE +ACE_QoS_Event_Handler::get_handle (void) const +{ + return this->qos_session_->rsvp_events_handle (); +} + +// Note, here the handle_input () calls the handle_qos () of the +// Decorator Base which then calls handle_qos () of the +// ACE_Event_Handler component within it. This helps to translate the +// normal read events into qos events in case of RAPI so the +// application using the API is oblivious to the fact that in RAPI, +// QoS events are received on a different socket. This helps to +// maintain a uniform design for the application irrespective of +// whether it is using RAPI or GQoS. +int +ACE_QoS_Event_Handler::handle_input (ACE_HANDLE fd) +{ + return this->decorator_base_->handle_qos (fd); +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/QoS/QoS_Decorator.h b/externals/ace/QoS/QoS_Decorator.h new file mode 100644 index 00000000000..216f248c902 --- /dev/null +++ b/externals/ace/QoS/QoS_Decorator.h @@ -0,0 +1,179 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file QoS_Decorator.h + * + * $Id: QoS_Decorator.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Vishal Kachroo <vishal@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef QOS_DECORATOR_H +#define QOS_DECORATOR_H +#include /**/ "ace/pre.h" + +#include "ace/Reactor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/INET_Addr.h" +#include "ace/Event_Handler.h" +#include "SOCK_Dgram_Mcast_QoS.h" +#include "ACE_QoS_Export.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_QoS_Decorator_Base + * + * @brief This class is the Decorator Pattern Base class for decorating + * ACE_Event_Handler. + * + * It simply forwards the requests for get_handle (), + * handle_input () and handle_qos () to its event_handler_ + * component. Concrete decorators for ACE_Event_Handler will use + * this class to access the basic event handler functionality and + * decorate that by their own implementation. + */ +class ACE_QoS_Export ACE_QoS_Decorator_Base : public ACE_Event_Handler +{ + +public: + + // Initialization and termination methods. + /// Constructor. + ACE_QoS_Decorator_Base (void); + + /// Constructor. + ACE_QoS_Decorator_Base (ACE_Event_Handler *event_handler); + + /// Destructor. + ~ACE_QoS_Decorator_Base (void); + + /// Forwards the request to its event_handler_ component. + virtual ACE_HANDLE get_handle (void) const; + + /// Forwards the request to its event_handler_ component. + virtual int handle_input (ACE_HANDLE fd); + + /// Forwards the request to its event_handler_ component. + virtual int handle_qos (ACE_HANDLE fd); + +private: + + /// The event handler that is decorated by this class. + ACE_Event_Handler *event_handler_; + +}; + +/** + * @class ACE_QoS_Event_Handler + * + * @brief This Handler is registered with the Reactor for QoS events. + * + * Concrete QoS decorator uses this class to receive QoS events + * for RAPI. It hides the application from knowing that it is + * receiving QoS events on a different socket so the application + * doesnt have to be designed differently for RAPI and GQoS. + */ +class ACE_QoS_Export ACE_QoS_Event_Handler : public ACE_Event_Handler +{ + + /// Destructor. + ~ACE_QoS_Event_Handler (void); + + /// Returns the RAPI file descriptor for receiving QoS events. + virtual ACE_HANDLE get_handle (void) const; + + /// Calls the base class handle_input (). + virtual int handle_input (ACE_HANDLE fd); + + /// Sets the QoS session. + void qos_session (ACE_QoS_Session *qos_session); + + friend class ACE_QoS_Decorator; + +private: + + /// Constructor is private because only ACE_QoS_Decorator should + /// create this object. + ACE_QoS_Event_Handler (void); + + /// The QoS Decorator passes in its base for this handler to use. + ACE_QoS_Event_Handler (ACE_QoS_Decorator_Base *decorator_base); + + /// Used to get to the RAPI file descriptor for QoS Events. + ACE_QoS_Session *qos_session_; + + /// Requests on the class are forwarded to this base class; + ACE_QoS_Decorator_Base *decorator_base_; + +}; + +/** + * @class ACE_QoS_Decorator + * + * @brief Concrete QoS Decorator. + * + * Decorates the ACE_Event_Handler to additionally handle QoS + * events uniformly for different QoS mechanisms like RAPI and + * GQoS. + */ +class ACE_QoS_Export ACE_QoS_Decorator : public ACE_QoS_Decorator_Base +{ + +public: + + // Initialization and termination methods. + /// Constructor. + ACE_QoS_Decorator (void); + + /// Constructor. + ACE_QoS_Decorator (ACE_Event_Handler *event_handler, + ACE_QoS_Session *qos_session, + ACE_Reactor *reactor = ACE_Reactor::instance ()); + + /// Destructor. + ~ACE_QoS_Decorator (void); + + /// Calls the base class get_handle (). + virtual ACE_HANDLE get_handle (void) const; + + /// Calls the base class handle_input (). + virtual int handle_input (ACE_HANDLE fd); + + /// Calls the base class handle_qos (). + virtual int handle_qos (ACE_HANDLE fd); + + /// This method registers the QoS Event Handler with the Reactor + /// to receive RAPI events. + int init (void); + +private: + + /// Requests on the class are forwarded to this base class; + ACE_QoS_Decorator_Base *decorator_base_; + + /// Handles the QoS events and in that sense decorates the usual + /// ACE_Event_Handler. + ACE_QoS_Event_Handler *qos_event_handler_; + + /// Passed to the ACE_QoS_Event_Handler for retrieving the RAPI + /// session specific information like rapi_fd. + ACE_QoS_Session *qos_session_; + + /// If the application wants to use an instance of Reactor other + /// than the Singleton one. + ACE_Reactor *reactor_; + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" +#endif /* QOS_DECORATOR_H */ diff --git a/externals/ace/QoS/QoS_Manager.cpp b/externals/ace/QoS/QoS_Manager.cpp new file mode 100644 index 00000000000..7a38e5dba99 --- /dev/null +++ b/externals/ace/QoS/QoS_Manager.cpp @@ -0,0 +1,41 @@ +// QoS_Manager.cpp +// $Id: QoS_Manager.cpp 80826 2008-03-04 14:51:23Z wotte $ + +#include "QoS_Manager.h" +#include "ace/Log_Msg.h" + +ACE_RCSID(ace, QoS_Manager, "$Id: QoS_Manager.cpp 80826 2008-03-04 14:51:23Z wotte $") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE(ACE_QOS_MANAGER) + +ACE_QoS_Manager::ACE_QoS_Manager (void) +{} + +ACE_QoS_Manager::~ACE_QoS_Manager (void) +{} + +// Adds the given session to the list of session objects joined by +// this socket. + +int +ACE_QoS_Manager::join_qos_session (ACE_QoS_Session *qos_session) +{ + if (this->qos_session_set ().insert (qos_session) != 0) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Error in adding a new session to the ") + ACE_TEXT ("socket session set\n")), + -1); + return 0; +} + +// Returns the QoS session set for this socket. + +ACE_Unbounded_Set <ACE_QoS_Session *> +ACE_QoS_Manager::qos_session_set (void) +{ + return this->qos_session_set_; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/QoS/QoS_Manager.h b/externals/ace/QoS/QoS_Manager.h new file mode 100644 index 00000000000..c9a3654a51e --- /dev/null +++ b/externals/ace/QoS/QoS_Manager.h @@ -0,0 +1,74 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file QoS_Manager.h + * + * $Id: QoS_Manager.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Vishal Kachroo + */ +//============================================================================= + + +#ifndef ACE_QOS_MANAGER_H +#define ACE_QOS_MANAGER_H +#include /**/ "ace/pre.h" + +#include "ace/Addr.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/IPC_SAP.h" +#include "ace/Containers_T.h" +#include "ACE_QoS_Export.h" +#include "QoS_Session.h" + + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_QoS_Manager + * + * @brief This class manages the QoS sessions associated with ACE_SOCK. + * + * This class provides functions to manage the QoS + * associated with a socket. The idea is to keep the management of + * QoS for a socket separate from the socket itself. Currently, the + * manager is used to manage the QoS session set. It will handle more + * responsibilities in the future. + */ +class ACE_QoS_Export ACE_QoS_Manager +{ + +public: + /// Default constructor. + ACE_QoS_Manager (void); + + /// Default destructor. + ~ACE_QoS_Manager (void); + + /** + * Join the given QoS session. A socket can join multiple QoS + * sessions. This call adds the given QoS session to the list of + * QoS sessions that the socket has already joined. + */ + int join_qos_session (ACE_QoS_Session *qos_session); + + typedef ACE_Unbounded_Set <ACE_QoS_Session *> ACE_QOS_SESSION_SET; + + /// Get the QoS session set. + ACE_QOS_SESSION_SET qos_session_set (void); + +private: + + /// Set of QoS sessions that this socket has joined. + ACE_QOS_SESSION_SET qos_session_set_; +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" +#endif /* ACE_QOS_MANAGER_H */ diff --git a/externals/ace/QoS/QoS_Session.h b/externals/ace/QoS/QoS_Session.h new file mode 100644 index 00000000000..6a36fd62cb0 --- /dev/null +++ b/externals/ace/QoS/QoS_Session.h @@ -0,0 +1,183 @@ +/* -*- C++ -*- */ + +//============================================================================= +/** + * @file QoS_Session.h + * + * $Id: QoS_Session.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Vishal Kachroo <vishal@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef ACE_QOS_SESSION_H +#define ACE_QOS_SESSION_H +#include /**/ "ace/pre.h" + +#include "ACE_QoS_Export.h" +#include "ace/INET_Addr.h" +#include "ace/OS_QoS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +class ACE_SOCK; +class ACE_QoS_Manager; + +typedef int ACE_Protocol_ID; +// IPPROTO_UDP or IPPROTO_TCP. + +/** + * @class ACE_QoS_Session + * + * @brief A QoS Session object. + * + * This class defines the interface for a QoS Session. It abstracts the + * notion of QoS on different platforms and presents a simple, easy-to-use + * API. Current [RAPI,GQoS] and future implementations will conform to this + * interface. + */ +class ACE_QoS_Export ACE_QoS_Session +{ + +public: + + enum RSVP_Event_Type + { + RSVP_PATH_EVENT, + RSVP_RESV_EVENT, + RSVP_RESV_CONFIRM, + RSVP_RESV_ERROR, + RSVP_PATH_ERROR + }; + + /// A flag to indicate if this endpoint is a sender or a receiver or + /// both. + enum ACE_End_Point_Type + { + ACE_QOS_SENDER, + ACE_QOS_RECEIVER, + ACE_QOS_BOTH + }; + + + /// to shutup g++. + virtual ~ACE_QoS_Session (void) {}; + + /// Open a QoS session [dest IP, dest port, Protocol ID]. + virtual int open (ACE_INET_Addr dest_addr, + ACE_Protocol_ID protocol_id) = 0; + + /// Close the QoS Session. + virtual int close (void) = 0; + + /// Returns the QoS in the current session. + virtual ACE_QoS qos (void) const = 0; + + /// Set QoS for the current session. The qos manager is used to + /// confirm if this QoS session was subscribed to by the socket. + virtual int qos (ACE_SOCK *socket, + ACE_QoS_Manager *qos_manager, + const ACE_QoS &ace_qos) = 0; + + /** + * Sets the QoS for this session object to ace_qos. Does not + * interfere with the QoS in the underlying socket. This call is + * useful to update the QoS object when the underlying socket QoS is + * being set through a mechanism other than the previous qos () + * method e.g. inside the dgram_mcast.subscribe () where the QoS for + * the socket is set through ACE_OS::join_leaf (). + */ + virtual void qos (const ACE_QoS &ace_qos) = 0; + + /** + * This is called from handle_qos () method of the the QoS Event + * Handler. Invoking this method is an indication of a QoS event + * occurring, that may have resulted in a change of QoS for the + * underlying session. This method updates the QoS object associated + * with this session. + */ + virtual int update_qos (void) = 0; + + /// Get/Set methods for the flags_. + virtual ACE_End_Point_Type flags (void) const = 0; + virtual void flags (const ACE_End_Point_Type flags) = 0; + + /// Get the session id. + virtual int session_id (void) const = 0; + + /// Set the session id. + virtual void session_id (const int session_id) = 0; + + /// Get the file descriptor on which RSVP events will occur. + virtual ACE_HANDLE rsvp_events_handle (void) = 0; + + virtual void rsvp_event_type (RSVP_Event_Type event_type) = 0; + ///Set the RAPI event that last occured + + virtual RSVP_Event_Type rsvp_event_type (void) = 0; + ///Get the RAPI event that last occured + + + /// Get the destination address for this session. + virtual ACE_INET_Addr dest_addr (void) const = 0; + + /// Set the destination address for this session. + virtual void dest_addr (const ACE_INET_Addr &dest_addr) = 0; + + /// Get the source port for this session. + virtual u_short source_port (void) const = 0; + + /// Set the source port for this session. + virtual void source_port (const u_short &source_port) = 0; + + //Set the source host + virtual ACE_INET_Addr* source_addr (void) const = 0; + + /// Set the source port for this session. + virtual void source_addr (ACE_INET_Addr* source_addr) = 0; + + + /** + * Returns the version of the underlying RSVP implementation. Is + * meaningful only when the underlying implementation has + * versioning. + */ + virtual int version (void) = 0; + +protected: + + /// Source port if this is a Sender session. Used for rapi_sender (). + u_short source_port_; + + /// session id for the session. + int session_id_; + + /// Destination address for this session. + ACE_INET_Addr dest_addr_; + + /// Source address for this session. + ACE_INET_Addr* src_addr_; + + /// Is this a TCP or a UDP session. + ACE_Protocol_ID protocol_id_; + + /// QoS for this session. + ACE_QoS qos_; + + /// Specifies if this is a sending/receiving/both session. + ACE_End_Point_Type flags_; + + RSVP_Event_Type rsvp_event_type_; + //Has the last rsvp event that occured + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" +#endif /* ACE_QOS_SESSION_H */ diff --git a/externals/ace/QoS/QoS_Session_Factory.cpp b/externals/ace/QoS/QoS_Session_Factory.cpp new file mode 100644 index 00000000000..f9da19d6aa2 --- /dev/null +++ b/externals/ace/QoS/QoS_Session_Factory.cpp @@ -0,0 +1,105 @@ +// QoS_Session_Factory.cpp +// $Id: QoS_Session_Factory.cpp 80826 2008-03-04 14:51:23Z wotte $ + +#include "QoS_Session_Factory.h" +#include "QoS_Session_Impl.h" +#include "ace/Log_Msg.h" + +ACE_RCSID(ace, QoS_Session_Factory, "$Id: QoS_Session_Factory.cpp 80826 2008-03-04 14:51:23Z wotte $") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE(ACE_QoS_Session_Factory) + +#if defined(ACE_HAS_RAPI) +const enum ACE_QoS_Session_Factory::ACE_QoS_Session_Type + ACE_QoS_Session_Factory::ACE_DEFAULT_QOS_SESSION = ACE_QoS_Session_Factory::ACE_RAPI_SESSION; +#elif defined(ACE_HAS_WINSOCK2_GQOS) + const enum ACE_QoS_Session_Factory::ACE_QoS_Session_Type + ACE_QoS_Session_Factory::ACE_DEFAULT_QOS_SESSION = ACE_QoS_Session_Factory::ACE_GQOS_SESSION; +#else +# error "QoS type not supported. Cannot build." +#endif /* ACE_HAS_RAPI */ + +ACE_QoS_Session_Factory::ACE_QoS_Session_Factory (void) +{ + ACE_TRACE ("ACE_QoS_Session_Factory::ACE_QoS_Session_Factory"); +} + +ACE_QoS_Session_Factory::~ACE_QoS_Session_Factory (void) +{ + ACE_TRACE ("ACE_QoS_Session_Factory::~ACE_QoS_Session_Factory"); +} + +// Create a QoS session of the given type (RAPI or GQoS). +ACE_QoS_Session * +ACE_QoS_Session_Factory::create_session (ACE_QoS_Session_Type qos_session_type) +{ + + ACE_QoS_Session * qos_session = 0; + +#if defined (ACE_HAS_RAPI) + if (qos_session_type == ACE_RAPI_SESSION) + ACE_NEW_RETURN (qos_session, + ACE_RAPI_Session, + 0); +#endif /* ACE_HAS_RAPI */ + + if (qos_session_type == ACE_GQOS_SESSION) + ACE_NEW_RETURN (qos_session, + ACE_GQoS_Session, + 0); + + if (this->add_session (qos_session) == -1) + { + delete qos_session; + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Error in adding session\n")), + 0); + } + + return qos_session; +} + +// Destroy the QoS Session. +int +ACE_QoS_Session_Factory::destroy_session (ACE_QoS_Session *qos_session) +{ + + if ((qos_session != 0) && (this->remove_session (qos_session) == -1)) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Error in destroying session\n")), + -1); + + return 0; +} + +// Add a session to the set of sessions created by this factory. This is a +// private method called by the create_session (). +int +ACE_QoS_Session_Factory::add_session (ACE_QoS_Session *qos_session) +{ + if (this->qos_session_set_.insert (qos_session) != 0) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Error in adding a new session") + ACE_TEXT ("to the session set\n")), + -1); + + return 0; +} + +// Remove a session from the set of sessions created by this factory. This is +// a private method called by the destroy_session (). +int +ACE_QoS_Session_Factory::remove_session (ACE_QoS_Session *qos_session) +{ + if (this->qos_session_set_.remove (qos_session) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Error in removing a session") + ACE_TEXT ("from the session set\n")), + -1); + + return 0; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/QoS/QoS_Session_Factory.h b/externals/ace/QoS/QoS_Session_Factory.h new file mode 100644 index 00000000000..f0840d41824 --- /dev/null +++ b/externals/ace/QoS/QoS_Session_Factory.h @@ -0,0 +1,96 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file QoS_Session_Factory.h + * + * $Id: QoS_Session_Factory.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Vishal Kachroo <vishal@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef ACE_QOS_SESSION_FACTORY_H +#define ACE_QOS_SESSION_FACTORY_H +#include /**/ "ace/pre.h" + +#include "ace/QoS/QoS_Session.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Containers_T.h" +#include "ACE_QoS_Export.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward declare this, so the factory uses only references to this. +class ACE_QoS_Session; + +/** + * @class ACE_QoS_Session_Factory + * + * @brief Concrete factory for the QoS Session objects. + * + * This class manages the life cycle of QoS Session objects. These + * objects are currently either RAPI session objects or GQoS session + * objects. It stores the sessions in an unbounded set. + */ +class ACE_QoS_Export ACE_QoS_Session_Factory +{ + +public : + + // = Initialization and termination methods. + /// Default constructor. + ACE_QoS_Session_Factory (void); + + /// Default destructor. + ~ACE_QoS_Session_Factory (void); + + + /// Types of sessions for this factory to manage. + enum ACE_QoS_Session_Type + { + /// ACE_RAPI_SESSION on Unix platforms with RAPI support + ACE_RAPI_SESSION, + + /// ACE_GQOS_SESSION on Windows platforms with GQOS support + ACE_GQOS_SESSION + }; + + /** The default QoS type supported on this platform. + * + * ACE_DEFAULT_QOS_SESSION = ACE_RAPI_SESSION on Unix platforms with RAPI support + * = ACE_GQOS_SESSION on Windows platforms with GQOS support + */ + static const enum ACE_QoS_Session_Type ACE_DEFAULT_QOS_SESSION; + + /// Create a QoS session of the given type (RAPI or GQoS). + ACE_QoS_Session * create_session (ACE_QoS_Session_Type qos_session_type = ACE_DEFAULT_QOS_SESSION ); + + /// Destroy the QoS Session. + int destroy_session (ACE_QoS_Session *qos_session); + +private: + + /// Used by the create_session () to add new sessions to the + /// set of sessions created by this factory. + int add_session (ACE_QoS_Session *qos_session); + + /// Used by the destroy_session () to remove a session from the set + /// of sessions created by this factory. + int remove_session (ACE_QoS_Session *qos_session); + + /// Unordered set of QoS Sessions. + typedef ACE_Unbounded_Set <ACE_QoS_Session *> QOS_SESSION_SET; + QOS_SESSION_SET qos_session_set_; + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#include /**/ "ace/post.h" +#endif /* ACE_QOS_SESSION_FACTORY_H */ diff --git a/externals/ace/QoS/QoS_Session_Impl.cpp b/externals/ace/QoS/QoS_Session_Impl.cpp new file mode 100644 index 00000000000..453b938b902 --- /dev/null +++ b/externals/ace/QoS/QoS_Session_Impl.cpp @@ -0,0 +1,718 @@ +// QoS_Session_Impl.cpp +// $Id: QoS_Session_Impl.cpp 84565 2009-02-23 08:20:39Z johnnyw $ + +#include "ace/OS_NS_arpa_inet.h" +#include "ace/SOCK.h" +#include "QoS_Manager.h" +#include "QoS_Session_Impl.h" +#include "ace/Log_Msg.h" + +#if !defined (__ACE_INLINE__) +#include "QoS_Session_Impl.inl" +#endif /* __ACE_INLINE__ */ + +ACE_RCSID(ace, QoS_Session_Impl, "$Id: QoS_Session_Impl.cpp 84565 2009-02-23 08:20:39Z johnnyw $") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE(ACE_QoS_Session_Impl) + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (ACE_HAS_RAPI) +#include "rapi_err.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +int ACE_RAPI_Session::rsvp_error = 0; + +// Call back function used by RAPI to report RSVP events. This +// function translates the RAPI QoS parameters into the more generic +// ACE_QoS parameters for the underlying RAPI session. +int +rsvp_callback (rapi_sid_t /* sid */, + rapi_eventinfo_t eventype, + int /* style_id */, + int errcode, + int errvalue, + sockaddr * errnode, + u_char /* errflags */, + int /* filter_spec_no */, + rapi_filter_t * /* filter_spec_list */, + int flow_spec_no, + rapi_flowspec_t *flow_spec_list, + int /* ad_spec_no */, + rapi_adspec_t * /* ad_spec_list */, + void *args + ) +{ + if (args == 0) + ACE_DEBUG ((LM_DEBUG, + "Argument in the call back function is null\n\n")); + + ACE_QoS_Session *qos_session = (ACE_QoS_Session *) args; + + qos_flowspecx_t *csxp = 0; + + if (!flow_spec_list) + { + ACE_DEBUG ((LM_DEBUG, + "(%N|%l) Null flow_spec_list\n")); + } + else + { + // Extended Legacy format. + csxp = &flow_spec_list->specbody_qosx; + if(!csxp) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) Null csxp\n"), + -1); + } + } + + ACE_QoS ace_qos = qos_session->qos (); + + switch(eventype) + { + case RAPI_PATH_EVENT: + { + ACE_DEBUG ((LM_DEBUG, + "RSVP PATH Event received\n" + "No. of TSpecs received : %d %d\n", + flow_spec_no, &flow_spec_list->len)); + + ACE_Flow_Spec *receiving_fs = 0; + + if (flow_spec_no != 0) + { + ACE_NEW_RETURN (receiving_fs, + ACE_Flow_Spec, + -1); + + ACE_NEW_RETURN (receiving_fs, + ACE_Flow_Spec ((u_long)csxp->xspec_r, + (u_long)csxp->xspec_b, + (u_long)csxp->xspec_p, + 0, + csxp->xspec_S, + 1, + csxp->xspec_M, + csxp->xspec_m, + 25, + 0), + -1); + + ACE_DEBUG ((LM_DEBUG, + "\nTSpec :\n" + "\t Spec Type = %d\n" + "\t Rate = %f\n" + "\t Bucket = %f\n" + "\t Peak = %f\n" + "\t MPU = %d\n" + "\t MDU = %d\n" + "\t TTL = %d\n", + csxp->spec_type, + csxp->xspec_r, + csxp->xspec_b, + csxp->xspec_p, + csxp->xspec_m, + csxp->xspec_M, + 25)); + } + + // Set the sending flowspec QoS of the given session. + ace_qos.receiving_flowspec (receiving_fs); + + qos_session->rsvp_event_type (ACE_QoS_Session::RSVP_PATH_EVENT); + } + break; + + case RAPI_RESV_EVENT: + { + ACE_DEBUG ((LM_DEBUG, + "RSVP RESV Event received\n" + "No. of FlowSpecs received : %d\n", + flow_spec_no)); + + ACE_Flow_Spec *sending_flow = 0; + + if (flow_spec_no != 0) + { + ACE_NEW_RETURN (sending_flow, + ACE_Flow_Spec, + -1); + + // Choose based on the service type : [QOS_GUARANTEEDX/QOS_CNTR_LOAD]. + switch (csxp->spec_type) + { + case QOS_GUARANTEEDX: + // Slack term in MICROSECONDS + sending_flow->delay_variation (csxp->xspec_S); + + // @@How does the guaranteed rate parameter map to the ACE_Flow_Spec. + // Note there is no break !! + + case QOS_CNTR_LOAD: + // qos_service_type. + sending_flow->service_type (csxp->spec_type); + // Token Bucket Average Rate (B/s) + sending_flow->token_rate ((u_long)csxp->xspec_r); + // Token Bucket Rate (B) + sending_flow->token_bucket_size ((u_long)csxp->xspec_b); + // Peak Data Rate (B/s) + sending_flow->peak_bandwidth ((u_long)csxp->xspec_p); + // Minimum Policed Unit (B) + sending_flow->minimum_policed_size (csxp->xspec_m); + // Max Packet Size (B) + sending_flow->max_sdu_size (csxp->xspec_M); + break; + + default: + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) Unknown flowspec type: %u.\n", csxp->spec_type), + -1); + } + } + + ace_qos.sending_flowspec (sending_flow); + qos_session->rsvp_event_type (ACE_QoS_Session::RSVP_RESV_EVENT); + } + break; + + case RAPI_PATH_ERROR: + { + ACE_DEBUG ((LM_DEBUG, + "PATH ERROR Event received\n" + "Code=%d Val=%d Node= %s\n", + errcode, + errvalue, + ACE_OS::inet_ntoa(((sockaddr_in *)errnode)->sin_addr))); + qos_session->rsvp_event_type (ACE_QoS_Session::RSVP_PATH_ERROR); + } + break; + + case RAPI_RESV_ERROR: + { + ACE_DEBUG ((LM_DEBUG, + "RESV ERROR Event received\n" + "Code=%d Val=%d Node= %s\n", + errcode, + errvalue, + ACE_OS::inet_ntoa(((sockaddr_in *)errnode)->sin_addr))); + qos_session->rsvp_event_type (ACE_QoS_Session::RSVP_RESV_ERROR); + } + break; + + case RAPI_RESV_CONFIRM: + { + ACE_DEBUG ((LM_DEBUG, + "RESV CONFIRM Event received\n")); + qos_session->rsvp_event_type (ACE_QoS_Session::RSVP_RESV_CONFIRM); + } + break; + + default: + ACE_DEBUG ((LM_DEBUG, + "Unknown RSVP Event Received\n")); + break; + + } + + // Set the updated ACE_QoS for the RSVP callback argument(QoS session). + qos_session->qos (ace_qos); + + // @@ what is the meaning of the return value. RAPI docs don't say anything! + return 0; +} + +// Constructor. +ACE_RAPI_Session::ACE_RAPI_Session (void) +{ + ACE_TRACE ("ACE_RAPI_Session::ACE_RAPI_Session"); + //this->source_port (DEFAULT_SOURCE_SENDER_PORT); + ACE_NEW (this->src_addr_, + ACE_INET_Addr ("0")); +} + +// Open a RAPI QoS session [dest IP, dest port, Protocol ID]. +int +ACE_RAPI_Session::open (ACE_INET_Addr dest_addr, + ACE_Protocol_ID protocol_id) +{ + char buf [BUFSIZ]; + dest_addr.addr_to_string (buf, + BUFSIZ); + ACE_DEBUG ((LM_DEBUG, + "In RAPI SESSION OPEN %s\n", + buf)); + + this->dest_addr_ = dest_addr; + this->protocol_id_ = protocol_id; + + // Open a RAPI session. Note "this" is being passed as an argument to + // the callback function. The callback function uses this argument to + // update the QoS of this session based on the RSVP event it receives. + + if ((this->session_id_ = rapi_session((struct sockaddr *) dest_addr.get_addr (), + protocol_id, + 0, + rsvp_callback, + (void *) this, + &rsvp_error)) == NULL_SID) + ACE_ERROR_RETURN ((LM_ERROR, + "rapi_session () call fails. Error\n"), + -1); + else + ACE_DEBUG ((LM_DEBUG, + "rapi_session () call succeeds. " + "Session ID = %d\n", + this->session_id_)); + + return 0; +} + +// Close the RAPI QoS Session. +int +ACE_RAPI_Session::close (void) +{ + this->rsvp_error = rapi_release(this->session_id_); + + if (rsvp_error == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Can't release RSVP session:\n\t%s\n", + rapi_errlist[rsvp_error]), + -1); + else + ACE_DEBUG ((LM_DEBUG, + "rapi session with id %d released successfully.\n", + this->session_id_)); + return 0; +} + +//Get the most recent RSVP event that occured +ACE_QoS_Session::RSVP_Event_Type +ACE_RAPI_Session::rsvp_event_type (void) +{ + return this->rsvp_event_type_; +} + +//Set the most recent RSVP event that occured +void +ACE_RAPI_Session::rsvp_event_type (ACE_QoS_Session::RSVP_Event_Type event_type) +{ + this->rsvp_event_type_ = event_type; +} + +int +ACE_RAPI_Session::qos (ACE_SOCK * /* socket */, + ACE_QoS_Manager * /* qos_manager */, + const ACE_QoS &ace_qos) +{ + + // If sender : call sending_qos () + // If receiver : call receiving_qos () + // If both : call sending_qos () and receiving_qos () + + if (this->flags_ != ACE_QOS_RECEIVER) + return this->sending_qos (ace_qos); + + if (this->flags_ != ACE_QOS_SENDER) + return this->receiving_qos (ace_qos); + + return 0; +} + +// Set sending QoS for this RAPI session. +int +ACE_RAPI_Session::sending_qos (const ACE_QoS &ace_qos) +{ + ACE_Flow_Spec *sending_flowspec = ace_qos.sending_flowspec (); + + if (sending_flowspec == 0) + { + int result = rapi_sender (this->session_id_, + 0, + 0, + 0, + 0, + 0, + 0, + 25); + if (result != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) rapi_sender error %d:\n\tPATH Generation can't be started\n", + result), + -1); + else + ACE_DEBUG ((LM_DEBUG, + "rapi_sender () call succeeds with PATH Tear!\n")); + + return 0; + } + + rapi_tspec_t *t_spec = this->init_tspec_simplified (*sending_flowspec); + if (t_spec == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) Error in translating from ACE Flow Spec to" + " RAPI TSpec\n"), + -1); + + char buffer[BUFSIZ]; + + // This formats the t_spec in a visually intuitive char * that can + // be printed. + + (void) rapi_fmt_tspec(t_spec, buffer, sizeof(buffer)); + ACE_DEBUG ((LM_DEBUG, + "\nSender TSpec : %s\n", + buffer)); + + // Print out all the fields separately. + ACE_DEBUG ((LM_DEBUG, + "\nTSpec :\n" + "\t Spec Type = %d\n" + "\t Rate = %f\n" + "\t Bucket = %f\n" + "\t Peak = %f\n" + "\t MPU = %d\n" + "\t MDU = %d\n" + "\t TTL = %d\n", + t_spec->tspecbody_qosx.spec_type, + t_spec->tspecbody_qosx.xtspec_r, + t_spec->tspecbody_qosx.xtspec_b, + t_spec->tspecbody_qosx.xtspec_p, + t_spec->tspecbody_qosx.xtspec_m, + t_spec->tspecbody_qosx.xtspec_M, + sending_flowspec->ttl ())); + + // This the source sender port. + // ACE_INET_Addr sender_addr (this->source_port ()); + + ACE_DEBUG ((LM_DEBUG, + "Making the rapi_sender () call\n")); + + // Set the Sender TSpec for this QoS session. + + + int result = rapi_sender(this->session_id_, + 0, + (sockaddr *) this->src_addr_->get_addr (), + 0, + t_spec, + 0, + 0, + sending_flowspec->ttl ()) ; + + /* + int result = rapi_sender(this->session_id_, + 0, + (sockaddr *) sender_addr.get_addr (), + 0, + t_spec, + 0, + 0, + sending_flowspec->ttl ()) ; + */ + if(result!= 0) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) rapi_sender error %d:\n\tPATH Generation can't be started\n", + result), + -1); + else + ACE_DEBUG ((LM_DEBUG, + "rapi_sender () call succeeds !\n")); + return 0; +} + +// Set receiving QoS for this RAPI session. +int +ACE_RAPI_Session::receiving_qos (const ACE_QoS &ace_qos) +{ + + ACE_Flow_Spec *receiving_flowspec = ace_qos.receiving_flowspec (); + if (receiving_flowspec == 0) + { + if (rapi_reserve(this->session_id_, + 0, + // Setting the RAPI_REQ_CONFIRM flag requests confirmation + // of the resevation, by means of a confirmation upcall of + // type RAPI_RESV_CONFIRM. + // (sockaddr *)receiver_addr.get_addr (), + 0, + RAPI_RSTYLE_WILDCARD, + // This applies the flowspec to all the senders. Given this, + // @@I am passing the filter_spec to be null, hoping this will work. + 0, + 0, + 0, + 0, + // The filter spec is NULL. This should work since the RSTYLE is + // WILDCARD. + 0, + 0) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l)rapi_reserve () error:\n\tRESV Generation can't be started\n"), + -1); + else + ACE_DEBUG ((LM_DEBUG, + "rapi_reserve () for RESV Tear call succeeds\n")); + + return 0; + } + + + rapi_flowspec_t *flow_spec = init_flowspec_simplified (*receiving_flowspec); + + if (flow_spec == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) Error in translating from ACE Flow Spec to" + " RAPI FlowSpec\n"), + -1); + + char buffer[BUFSIZ]; + + // This formats the flow_spec in a visually intuitive char * that can + // be printed. + (void)rapi_fmt_flowspec(flow_spec, buffer, sizeof(buffer)); + ACE_DEBUG ((LM_DEBUG, + "\nReceiver FlowSpec : %s\n", + buffer)); + + // Print out all the fields separately. + ACE_DEBUG ((LM_DEBUG, + "\nFlowSpec :\n" + "\t Spec Type = %d\n" + "\t Rate = %f\n" + "\t Bucket = %f\n" + "\t Peak = %f\n" + "\t MPU = %d\n" + "\t MDU = %d\n", + flow_spec->specbody_qosx.spec_type, + flow_spec->specbody_qosx.xspec_r, + flow_spec->specbody_qosx.xspec_b, + flow_spec->specbody_qosx.xspec_p, + flow_spec->specbody_qosx.xspec_m, + flow_spec->specbody_qosx.xspec_M)); + + sockaddr_in Receiver_host; + + Receiver_host.sin_addr.s_addr = INADDR_ANY; + + // Set the Receiver FlowSpec for this QoS session. + // @@The filter style is hardcoded to WildCard. This can be changed later. + if (rapi_reserve(this->session_id_, + RAPI_REQ_CONFIRM, + // Setting the RAPI_REQ_CONFIRM flag requests confirmation + // of the resevation, by means of a confirmation upcall of + // type RAPI_RESV_CONFIRM. + // (sockaddr *)receiver_addr.get_addr (), + (sockaddr *)&Receiver_host, + RAPI_RSTYLE_WILDCARD, + // This applies the flowspec to all the senders. Given this, + // @@I am passing the filter_spec to be null, hoping this will work. + 0, + 0, + 0, + 0, + // The filter spec is NULL. This should work since the RSTYLE is + // WILDCARD. + 1, + flow_spec) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "rapi_reserve () error:\n\tRESV Generation can't be started\n"), + -1); + else + ACE_DEBUG ((LM_DEBUG, + "rapi_reserve () call succeeds\n")); + + return 0; +} + +int +ACE_RAPI_Session::update_qos (void) +{ + // Update the session QoS Parameters based on the RSVP Event Received. + if ((rsvp_error = rapi_dispatch ()) != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Error in rapi_dispatch () : %s\n", + rapi_errlist[rsvp_error]), + -1); + return 0; +} + +// Construct a simplified RAPI Sender TSpec object +// from an ACE_Flow_Spec. Note the form of the TSpec is +// simplified as against the full bodied IntServ version. + +rapi_tspec_t * +ACE_RAPI_Session::init_tspec_simplified (const ACE_Flow_Spec &flow_spec) +{ + rapi_tspec_t *t_spec; + + ACE_NEW_RETURN (t_spec, + rapi_tspec_t, + 0); + + qos_tspecx_t *ctxp = &(t_spec->tspecbody_qosx); + + // There may be some type incompatibility here. + // Note the types of the LHS are float32_t, uint32_t etc. + + ctxp->spec_type = flow_spec.service_type ();//QOS_TSPEC; + ctxp->xtspec_r = flow_spec.token_rate (); // Token Rate (B/s) + ctxp->xtspec_b = flow_spec.token_bucket_size (); // Token Bucket Depth (B) + ctxp->xtspec_p = flow_spec.peak_bandwidth (); // Peak Data Rate (B/s) + ctxp->xtspec_m = flow_spec.minimum_policed_size (); // Minimum policed unit. + ctxp->xtspec_M = flow_spec.max_sdu_size(); // Maximum SDU size. + t_spec->len = sizeof(rapi_hdr_t) + sizeof(qos_tspecx_t); + t_spec->form = RAPI_TSPECTYPE_Simplified; + + return (t_spec); +} + + +// Construct a simplified RAPI flowspec object from ACE_Flow_Spec. +// Note the form of the FlowSpec is simplified as against the +// full bodied IntServ version. + +rapi_flowspec_t * +ACE_RAPI_Session::init_flowspec_simplified(const ACE_Flow_Spec &flow_spec) +{ + rapi_flowspec_t *flowsp; + ACE_NEW_RETURN (flowsp, + rapi_flowspec_t, + 0); + + // Extended Legacy format. + qos_flowspecx_t *csxp = &flowsp->specbody_qosx; + + // Choose based on the service type : [QOS_GUARANTEEDX/QOS_CNTR_LOAD]. + + switch (flow_spec.service_type ()) + { + case QOS_GUARANTEEDX: + csxp->xspec_R = 0 ; // Guaranteed Rate B/s. @@How does this map to the + // ACE Flow Spec Parameters. + + csxp->xspec_S = flow_spec.delay_variation () ; // Slack term in MICROSECONDS + + // Note there is no break !! + + case QOS_CNTR_LOAD: + csxp->spec_type = flow_spec.service_type (); // qos_service_type + csxp->xspec_r = flow_spec.token_rate (); // Token Bucket Average Rate (B/s) + csxp->xspec_b = flow_spec.token_bucket_size (); // Token Bucket Rate (B) + csxp->xspec_p = flow_spec.peak_bandwidth (); // Peak Data Rate (B/s) + csxp->xspec_m = flow_spec.minimum_policed_size (); // Minimum Policed Unit (B) + + csxp->xspec_M = flow_spec.max_sdu_size(); // Max Packet Size (B) + + flowsp->form = RAPI_FLOWSTYPE_Simplified; + break; + + default: + ACE_ERROR_RETURN ((LM_ERROR, + "(%N|%l) Unknown flowspec type: %u\n",flow_spec.service_type () ), + 0); + } + + flowsp->len = sizeof(rapi_flowspec_t); + return flowsp; +} + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_RAPI */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// This is a GQoS session ID generator. +int ACE_GQoS_Session::GQoS_session_id = 0; + +// Constructor. +ACE_GQoS_Session::ACE_GQoS_Session (void) +{ + ACE_TRACE ("ACE_GQoS_Session::ACE_GQoS_Session"); +} + +// Open a GQoS session [dest IP, dest port, Protocol ID]. +int +ACE_GQoS_Session::open (ACE_INET_Addr dest_addr, + ACE_Protocol_ID protocol_id) +{ + this->dest_addr_ = dest_addr; + this->protocol_id_ = protocol_id; + + this->session_id_ = GQoS_session_id++; + + return 0; +} + +// Close the GQoS Session. +int +ACE_GQoS_Session::close (void) +{ + // TBD. + return 0; +} + +// Set the QoS for this GQoS session. +int +ACE_GQoS_Session::qos (ACE_SOCK *socket, + ACE_QoS_Manager *qos_manager, + const ACE_QoS &ace_qos) +{ + + // Confirm if the current session is one of the QoS sessions + // subscribed to by the given socket. + + if (qos_manager->qos_session_set ().find (this) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("This QoS session was not subscribed to") + ACE_TEXT (" by the socket\n")), + -1); + + // Set the QOS according to the supplied ACE_QoS. The I/O control + // code used under the hood is SIO_SET_QOS. + + u_long ret_bytes = 0; + + ACE_QoS qos = ace_qos; + if (ACE_OS::ioctl (socket->get_handle (), + ACE_SIO_SET_QOS, + qos, + &ret_bytes) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Error in Qos set ACE_OS::ioctl() %d\n"), + ret_bytes), + -1); + else + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Setting QoS with ACE_OS::ioctl () succeeds\n"))); + + return 0; +} + +int +ACE_GQoS_Session::update_qos (void) +{ + // WSAIoctl (GET_QOS) call goes here... + return 0; +} + +//Get the most recent RSVP event that occured +ACE_QoS_Session::RSVP_Event_Type +ACE_GQoS_Session::rsvp_event_type (void) +{ + return this->rsvp_event_type_; +} + +//Set the most recent RSVP event that occured +void +ACE_GQoS_Session::rsvp_event_type (ACE_QoS_Session::RSVP_Event_Type event_type) +{ + this->rsvp_event_type_ = event_type; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/QoS/QoS_Session_Impl.h b/externals/ace/QoS/QoS_Session_Impl.h new file mode 100644 index 00000000000..0e987984f48 --- /dev/null +++ b/externals/ace/QoS/QoS_Session_Impl.h @@ -0,0 +1,265 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file QoS_Session_Impl.h + * + * $Id: QoS_Session_Impl.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Vishal Kachroo <vishal@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef ACE_QOS_SESSION_IMPL_H +#define ACE_QOS_SESSION_IMPL_H +#include /**/ "ace/pre.h" + +#include "ace/QoS/QoS_Session.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + + +#if defined (ACE_HAS_RAPI) +#include "rapi_lib.h" + +#define DEFAULT_SOURCE_SENDER_PORT 10001 + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_RAPI_Session + * + * @brief A RAPI QoS session object. + * + * This class is a RAPI (RSVP API, an implementation of RSVP on UNIX) + * implementation of the ACE_QoS_Session interface. + */ +class ACE_QoS_Export ACE_RAPI_Session : public ACE_QoS_Session +{ + +public: + + /// Default destructor. + ~ACE_RAPI_Session (void); + + /// Error handling for RSVP callback + static int rsvp_error; + + /// Open a RAPI QoS session [dest IP, dest port, Protocol ID]. + virtual int open (ACE_INET_Addr dest_addr, + ACE_Protocol_ID protocol_id); + + /// Close the RAPI QoS Session. + virtual int close (void); + + /// Returns the QoS for this RAPI session. + virtual ACE_QoS qos (void) const; + + /// Set QoS for this RAPI session. The socket parameter is used to confirm if + /// this QoS session was subscribed to by the socket. + virtual int qos (ACE_SOCK *socket, + ACE_QoS_Manager *qos_manager, + const ACE_QoS &ace_qos); + + /** + * Sets the QoS for this session object to ace_qos. Does not interfere with the + * QoS in the underlying socket. This call is useful to update the QoS object + * when the underlying socket QoS is being set through a mechanism other than + * the previous qos () method e.g. inside the dgram_mcast.subscribe () where the + * QoS for the socket is set through ACE_OS::join_leaf (). + */ + virtual void qos (const ACE_QoS &ace_qos); + + /** + * Calls rapi_dispatch () that further triggers the call back function. + * It is a mechanism of updating the QoS for this session asynchronously, as + * RSVP events occur. + */ + virtual int update_qos (void); + + /// Get methods for the flags_. + virtual ACE_End_Point_Type flags (void) const; + + /// Set methods for the flags_. + virtual void flags (const ACE_End_Point_Type flags); + + /// Get the RAPI session id. + virtual int session_id (void) const; + + /// Set the RAPI session id. + virtual void session_id (const int session_id); + + /// Get the RAPI file descriptor for RSVP events. + virtual ACE_HANDLE rsvp_events_handle (void); + + ///Set the RAPI event that last occured + virtual void rsvp_event_type (RSVP_Event_Type event_type); + + ///Get the RAPI event that last occured + virtual RSVP_Event_Type rsvp_event_type (void); + + /// Get the destination address for this RAPI session. + virtual ACE_INET_Addr dest_addr (void) const; + + /// Set the destination address for this RAPI session. + virtual void dest_addr (const ACE_INET_Addr &dest_addr); + + /// Get the source port for this session. + virtual u_short source_port (void) const; + + /// Set the source port for this session. + virtual void source_port (const u_short &source_port); + + //Set the source host + virtual ACE_INET_Addr* source_addr (void) const; + + /// Set the source port for this session. + virtual void source_addr (ACE_INET_Addr* source_addr); + + /// RAPI version. Returned value = 100 * major-version + minor-version. + virtual int version (); + + /// The factory is a friend so it can create this object through + /// the only private constructor. + friend class ACE_QoS_Session_Factory; + +private: + + /// Default constuctor. Constructor is defined private so that only + /// the friend factory can instantiate this class. + ACE_RAPI_Session (void); + + /// Construct a simplified RAPI Sender TSpec object + /// from an ACE_Flow_Spec object. Used internally by this class. + rapi_tspec_t *init_tspec_simplified (const ACE_Flow_Spec &flow_spec); + + /// Construct a simplified RAPI Receiver FlowSpec object + /// from an ACE_Flow_Spec object. Used internally by the class. + rapi_flowspec_t *init_flowspec_simplified(const ACE_Flow_Spec &flow_spec); + + /// Set sending QoS for this RAPI session. + int sending_qos (const ACE_QoS &ace_qos); + + /// Set receiving QoS for this RAPI session. + int receiving_qos (const ACE_QoS &ace_qos); + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_RAPI */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_GQoS_Session + * + * @brief A GQoS session object. + * + * This class is a GQoS (Generic QoS, an implementation of RSVP on + * Win2K) implementation of the ACE_QoS_Session interface. + */ +class ACE_QoS_Export ACE_GQoS_Session : public ACE_QoS_Session +{ + +public: + + /// Default destructor. + ~ACE_GQoS_Session (void); + + /// This is a session ID generator. It does a lot more than expected + /// from an int!. + static int GQoS_session_id; + + /// Open a GQoS session [dest IP, dest port, Protocol ID]. + virtual int open (ACE_INET_Addr dest_addr, + ACE_Protocol_ID protocol_id); + + /// Close the GQoS Session. + virtual int close (void); + + /// Returns the QoS for this GQoS session. + virtual ACE_QoS qos (void) const; + + /// Set QoS for this GQoS session. The socket parameter is used to confirm if + /// this QoS session was subscribed to by the socket. + virtual int qos (ACE_SOCK *socket, + ACE_QoS_Manager *qos_manager, + const ACE_QoS &ace_qos); + + /** + * Sets the QoS for this session object to ace_qos. Does not interfere with the + * QoS in the underlying socket. This call is useful to update the QoS object + * when the underlying socket QoS is being set through a mechanism other than + * the previous qos () method e.g. inside the dgram_mcast.subscribe () where the + * QoS for the socket is set through ACE_OS::join_leaf (). + */ + virtual void qos (const ACE_QoS &ace_qos); + + /// Calls the ioctl (ACE_SIO_GET_QOS). It is a mechanism of updating the + /// QoS for this session asynchronously, as RSVP events occur. + virtual int update_qos (void); + + /// Get/Set methods for the flags_. + virtual ACE_End_Point_Type flags (void) const; + virtual void flags (const ACE_End_Point_Type flags); + + /// Get the destination address for this GQoS session. + virtual ACE_INET_Addr dest_addr (void) const; + + /// Set the destination address for this GQoS session. + virtual void dest_addr (const ACE_INET_Addr &dest_addr); + + /// Get the source port for this session. + virtual u_short source_port (void) const; + + /// Set the source port for this session. + virtual void source_port (const u_short &source_port); + + //Set the source host + virtual ACE_INET_Addr* source_addr (void) const; + + /// Set the source port for this session. + virtual void source_addr (ACE_INET_Addr* source_addr); + + /// Get the GQoS session id. + virtual int session_id (void) const; + + /// Set the GQoS session id. + virtual void session_id (const int session_id); + + /// Get the file descriptor of the underlying socket. + virtual ACE_HANDLE rsvp_events_handle (void); + + virtual void rsvp_event_type (RSVP_Event_Type event_type); + ///Set the RAPI event that last occured + + virtual RSVP_Event_Type rsvp_event_type (void); + ///Get the RAPI event that last occured + + /// GQoS version. + virtual int version (); + + /// The factory is a friend so it can create this object through + /// the only private constructor. + friend class ACE_QoS_Session_Factory; + +private: + + /// Default constructor. Constructor is defined private so that only + /// the friend factory can instantiate this class. + ACE_GQoS_Session (void); + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "QoS_Session_Impl.inl" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" +#endif /* ACE_QOS_SESSION_IMPL_H */ diff --git a/externals/ace/QoS/QoS_Session_Impl.inl b/externals/ace/QoS/QoS_Session_Impl.inl new file mode 100644 index 00000000000..7979b5e92ad --- /dev/null +++ b/externals/ace/QoS/QoS_Session_Impl.inl @@ -0,0 +1,229 @@ +// -*- C++ -*- +// +// $Id: QoS_Session_Impl.inl 80826 2008-03-04 14:51:23Z wotte $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +#if defined (ACE_HAS_RAPI) + +ACE_INLINE +ACE_RAPI_Session::~ACE_RAPI_Session (void) +{ + ACE_TRACE ("ACE_RAPI_Session::~ACE_RAPI_Session"); +} + +// Returns the QoS for this RAPI session. +ACE_INLINE ACE_QoS +ACE_RAPI_Session::qos (void) const +{ + return this->qos_; +} + +// Overloaded method to set the QoS for this session object. Does not +// interfere with the underlying socket QoS. +ACE_INLINE void +ACE_RAPI_Session::qos (const ACE_QoS &ace_qos) +{ + this->qos_ = ace_qos; +} + +// Get the RAPI session id. +ACE_INLINE int +ACE_RAPI_Session::session_id (void) const +{ + return this->session_id_; +} + +// Set the RAPI session id. +ACE_INLINE void +ACE_RAPI_Session::session_id (const int session_id) +{ + this->session_id_ = session_id; +} + +// Get the RAPI file desciptor for RSVP events. +ACE_INLINE ACE_HANDLE +ACE_RAPI_Session::rsvp_events_handle (void) +{ + int rapi_fd = rapi_getfd (this->session_id ()); + if (rapi_fd == -1) + { + this->close (); + ACE_ERROR_RETURN ((LM_ERROR, + "Error in rapi_getfd ()\n"), + -1); + } + + return rapi_fd; +} + +// Get the End Point Type (Sender/Receiver/Both). +ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type +ACE_RAPI_Session::flags (void) const +{ + return this->flags_; +} + +// Set the End Point Type (Sender/Receiver/Both). +ACE_INLINE void +ACE_RAPI_Session::flags (const ACE_End_Point_Type flags) +{ + this->flags_ = flags; +} + + +// Get the destination address for this RAPI session. +ACE_INLINE ACE_INET_Addr +ACE_RAPI_Session::dest_addr (void) const +{ + return this->dest_addr_; +} + +// Set the destination address for this RAPI session. +ACE_INLINE void +ACE_RAPI_Session::dest_addr (const ACE_INET_Addr &dest_addr) +{ + this->dest_addr_ = dest_addr; +} + +// Get the source port for this RAPI session. +ACE_INLINE u_short +ACE_RAPI_Session::source_port (void) const +{ + return this->source_port_; +} + +// Set the source port for this RAPI session. +ACE_INLINE void +ACE_RAPI_Session::source_port (const u_short &source_port) +{ + this->source_port_ = source_port; +} + +ACE_INLINE ACE_INET_Addr* +ACE_RAPI_Session::source_addr (void) const +{ + return this->src_addr_; +} + +ACE_INLINE void +ACE_RAPI_Session::source_addr (ACE_INET_Addr* source_addr) +{ + this->src_addr_ = source_addr; +} + +// RAPI version. Returned value = 100 * major-version + minor-version. +ACE_INLINE int +ACE_RAPI_Session::version (void) +{ + return 0; +} + +#endif /* ACE_HAS_RAPI */ + +ACE_INLINE +ACE_GQoS_Session::~ACE_GQoS_Session (void) +{ + ACE_TRACE ("ACE_GQoS_Session::~ACE_GQoS_Session"); +} + +// Returns the QoS for this GQoS session. +ACE_INLINE ACE_QoS +ACE_GQoS_Session::qos (void) const +{ + return this->qos_; +} + +// Overloaded method to set the QoS for this session object. Does not +// interfere with the underlying socket QoS. +ACE_INLINE void +ACE_GQoS_Session::qos (const ACE_QoS &ace_qos) +{ + this->qos_ = ace_qos; +} + +// Get the GQoS session id. +ACE_INLINE int +ACE_GQoS_Session::session_id (void) const +{ + return this->session_id_; +} + +// Set the GQoS session id. +ACE_INLINE void +ACE_GQoS_Session::session_id (const int session_id) +{ + this->session_id_ = session_id; +} + +// Get the underlying file desciptor for RSVP events. +// Currently returns 0 because GQoS does not have a special +// descriptor for QoS events. +ACE_INLINE ACE_HANDLE +ACE_GQoS_Session::rsvp_events_handle (void) +{ + return 0; +} + +// Get the End Point Type (Sender/Receiver/Both). +ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type +ACE_GQoS_Session::flags (void) const +{ + return this->flags_; +} + +// Set the End Point Type (Sender/Receiver/Both). +ACE_INLINE void +ACE_GQoS_Session::flags (const ACE_End_Point_Type flags) +{ + this->flags_ = flags; +} + +// Get the destination address for this GQoS session. +ACE_INLINE ACE_INET_Addr +ACE_GQoS_Session::dest_addr (void) const +{ + return this->dest_addr_; +} + +// Set the destination address for this GQoS session. +ACE_INLINE void +ACE_GQoS_Session::dest_addr (const ACE_INET_Addr &dest_addr) +{ + this->dest_addr_ = dest_addr; +} + +// Get the source port for this RAPI session. +ACE_INLINE u_short +ACE_GQoS_Session::source_port (void) const +{ + return this->source_port_; +} + +// Set the source port for this RAPI session. +ACE_INLINE void +ACE_GQoS_Session::source_port (const u_short &source_port) +{ + this->source_port_ = source_port; +} + +ACE_INLINE ACE_INET_Addr* +ACE_GQoS_Session::source_addr (void) const +{ + return this->src_addr_; +} + +ACE_INLINE void +ACE_GQoS_Session::source_addr (ACE_INET_Addr* source_addr) +{ + this->src_addr_ = source_addr; +} + +// GQoS version. +ACE_INLINE int +ACE_GQoS_Session::version (void) +{ + return 0; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/QoS/README b/externals/ace/QoS/README new file mode 100644 index 00000000000..ce7fac62937 --- /dev/null +++ b/externals/ace/QoS/README @@ -0,0 +1,55 @@ +$Id: README 80826 2008-03-04 14:51:23Z wotte $ + +ACE QoS API (AQoSA) +=================== + +This directory contains the implementation for the ACE QoS API (AQoSA). + +BUILD REQUIREMENTS +================== +WIN2K : + +AQoSA makes use of the GQOS API under Windows 2000. The minimum +requirements are: + +1. June98 Platform SDK or later. +2. Link with ws2_32.lib + +More information about GQOS is available from the MSDN website: +http://msdn.microsoft.com/msdn-files/026/002/258/Search.asp + +------------------------------------------------------------------------------- + +UNIX : + +AQoSA makes use of the RSVP API (RAPI) under UNIX. +RAPI can be obtained from: ftp://ftp.isi.edu/rsvp/release/. +rsvpd.rel4.2a4-1 may require patches in order to compile +under current versions of Linux. Contact Craig Rodrigues <crodrigu@bbn.com> +to obtain these patches. + +The following lines should be added to your platform_macros.GNU file +before building AQoSA: + +PLATFORM_RAPI_CPPFLAGS += -I[path to RAPI header files] +PLATFORM_RAPI_LIBS += -lrsvp +PLATFORM_RAPI_LDFLAGS += -L[path to RAPI library files] + +1. Compile AQoSA with + + make rapi=1 + +More information about RAPI can be found at: + +http://www.opengroup.org/onlinepubs/9619099/toc.htm +http://www.cs.wustl.edu/~vishal/qos.html +http://www.sun.com/software/bandwidth/rsvp/docs/ +http://www.tru64unix.compaq.com/faqs/publications/base_doc/DOCUMENTATION/V51_HTML/ARH9UCTE/TOC.HTM#RSVPCHXX + +------------------------------------------------------------------------------- + +TEST +==== + +The test for AQoSA is located in $ACE_ROOT/examples/QOS + diff --git a/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp b/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp new file mode 100644 index 00000000000..9402d6360bc --- /dev/null +++ b/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp @@ -0,0 +1,258 @@ +// $Id: SOCK_Dgram_Mcast_QoS.cpp 80826 2008-03-04 14:51:23Z wotte $ + +#include "SOCK_Dgram_Mcast_QoS.h" +#include "ace/Log_Msg.h" +#include "ace/OS_NS_sys_socket.h" + +#if defined (ACE_WIN32) +#include "ace/Sock_Connect.h" // needed for subscribe_ifs() +#endif /* ACE_WIN32 */ + +#if !defined (__ACE_INLINE__) +#include "SOCK_Dgram_Mcast_QoS.inl" +#endif /* __ACE_INLINE__ */ + +// This is a workaround for platforms with non-standard +// definitions of the ip_mreq structure +#if ! defined (IMR_MULTIADDR) +#define IMR_MULTIADDR imr_multiaddr +#endif /* ! defined (IMR_MULTIADDR) */ + + +ACE_RCSID (QoS, + SOCK_Dgram_Mcast_QoS, + "$Id: SOCK_Dgram_Mcast_QoS.cpp 80826 2008-03-04 14:51:23Z wotte $") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Dgram_Mcast_QoS) + +// Dummy default constructor... + +ACE_SOCK_Dgram_Mcast_QoS::ACE_SOCK_Dgram_Mcast_QoS (options opts) + : ACE_SOCK_Dgram_Mcast (opts) +{ + ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::ACE_SOCK_Dgram_Mcast_QoS"); +} + +int +ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_INET_Addr &addr, + const ACE_QoS_Params &qos_params, + int protocol_family, + int protocol, + ACE_Protocol_Info *protocolinfo, + ACE_SOCK_GROUP g, + u_long flags, + int reuse_addr) +{ + ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::open"); + + ACE_UNUSED_ARG (qos_params); + + // Only perform the <open> initialization if we haven't been opened + // earlier. + if (this->get_handle () != ACE_INVALID_HANDLE) + return 0; + + ACE_DEBUG ((LM_DEBUG, + "Get Handle Returns Invalid Handle\n")); + + if (ACE_SOCK::open (SOCK_DGRAM, + protocol_family, + protocol, + protocolinfo, + g, + flags, + reuse_addr) == -1) + return -1; + + return this->open_i (addr, 0, reuse_addr); +} + + +int +ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs (const ACE_INET_Addr &mcast_addr, + const ACE_QoS_Params &qos_params, + const ACE_TCHAR *net_if, + int protocol_family, + int protocol, + int reuse_addr, + ACE_Protocol_Info *protocolinfo) +{ + ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs"); +#if defined (ACE_WIN32) + // Windows NT's winsock has trouble with multicast subscribes in the + // presence of multiple network interfaces when the IP address is + // given as INADDR_ANY. It will pick the first interface and only + // accept mcast there. So, to work around this, cycle through all + // of the interfaces known and subscribe to all the non-loopback + // ones. + // + // Note that this only needs to be done on NT, but there's no way to + // tell at this point if the code will be running on NT - only if it + // is compiled for NT-only or for NT/95, and that doesn't really + // help us. It doesn't hurt to do this on Win95, it's just a little + // slower than it normally would be. + // + // NOTE - <ACE_Sock_Connect::get_ip_interfaces> doesn't always get all + // of the interfaces. In particular, it may not get a PPP interface. This + // is a limitation of the way <ACE_Sock_Connect::get_ip_interfaces> works + // with MSVC. The reliable way of getting the interface list is + // available only with MSVC 5. + + if (net_if == 0) + { + ACE_INET_Addr *if_addrs = 0; + size_t if_cnt; + + if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) + return -1; + + size_t nr_subscribed = 0; + + if (if_cnt < 2) + { + if (this->subscribe (mcast_addr, + qos_params, + reuse_addr, + ACE_TEXT ("0.0.0.0"), + protocol_family, + protocol, + protocolinfo) == 0) + ++nr_subscribed; + } + else + // Iterate through all the interfaces, figure out which ones + // offer multicast service, and subscribe to them. + while (if_cnt > 0) + { + --if_cnt; + + // Convert to 0-based for indexing, next loop check. + if (if_addrs[if_cnt].is_loopback()) + continue; + if (this->subscribe (mcast_addr, + qos_params, + reuse_addr, + ACE_TEXT_CHAR_TO_TCHAR + (if_addrs[if_cnt].get_host_addr()), + protocol_family, + protocol, + protocolinfo) == 0) + ++nr_subscribed; + } + + delete [] if_addrs; + + if (nr_subscribed == 0) + { + errno = ENODEV; + return -1; + } + else + // 1 indicates a "short-circuit" return. This handles the + // rather bizarre semantics of checking all the interfaces on + // NT. + return 1; + } +#else + ACE_UNUSED_ARG (mcast_addr); + ACE_UNUSED_ARG (qos_params); + ACE_UNUSED_ARG (protocol_family); + ACE_UNUSED_ARG (protocol); + ACE_UNUSED_ARG (reuse_addr); + ACE_UNUSED_ARG (protocolinfo); +#endif /* ACE_WIN32 */ + // Otherwise, do it like everyone else... + + // Create multicast request. + if (this->make_multicast_ifaddr (0, + mcast_addr, + net_if) == -1) + return -1; + else + return 0; +} + +int +ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr, + const ACE_QoS_Params &qos_params, + int reuse_addr, + const ACE_TCHAR *net_if, + int protocol_family, + int protocol, + ACE_Protocol_Info *protocolinfo, + ACE_SOCK_GROUP g, + u_long flags, + ACE_QoS_Session *qos_session) +{ + ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::subscribe"); + + if (this->open (mcast_addr, + qos_params, + protocol_family, + protocol, + protocolinfo, + g, + flags, + reuse_addr) == -1) + return -1; + + // The following method call only applies to Win32 currently. + int result = this->subscribe_ifs (mcast_addr, + qos_params, + net_if, + protocol_family, + protocol, + reuse_addr, + protocolinfo); + // Check for the "short-circuit" return value of 1 (for NT). + if (result != 0) + return result; + + // Tell network device driver to read datagrams with a + // <mcast_request_if_> IP interface. + else + { + // Check if the mcast_addr passed into this method is the + // same as the QoS session address. + if (qos_session != 0 && mcast_addr == qos_session->dest_addr ()) + { + // Subscribe to the QoS session. + if (this->qos_manager_.join_qos_session (qos_session) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Unable to join QoS Session\n")), + -1); + } + else + { + if (this->close () != 0) + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Unable to close socket\n"))); + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Dest Addr in the QoS Session does") + ACE_TEXT (" not match the address passed into") + ACE_TEXT (" subscribe\n")), + -1); + } + + ip_mreq ret_mreq; + this->make_multicast_ifaddr (&ret_mreq, mcast_addr, net_if); + + // XX This is windows stuff only. fredk + if (ACE_OS::join_leaf (this->get_handle (), + reinterpret_cast<const sockaddr *> (&ret_mreq.IMR_MULTIADDR.s_addr), + sizeof ret_mreq.IMR_MULTIADDR.s_addr, + qos_params) == ACE_INVALID_HANDLE + && errno != ENOTSUP) + return -1; + + else + if (qos_params.socket_qos () != 0 && qos_session != 0) + qos_session->qos (*(qos_params.socket_qos ())); + + return 0; + } +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.h b/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.h new file mode 100644 index 00000000000..c3383a90961 --- /dev/null +++ b/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.h @@ -0,0 +1,142 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file SOCK_Dgram_Mcast_QoS.h + * + * $Id: SOCK_Dgram_Mcast_QoS.h 80826 2008-03-04 14:51:23Z wotte $ + * + * @author Vishal Kachroo <vishal@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef ACE_SOCK_DGRAM_MCAST_QOS_H +#define ACE_SOCK_DGRAM_MCAST_QOS_H +#include /**/ "ace/pre.h" + +#include "ace/SOCK_Dgram_Mcast.h" +#include "QoS_Manager.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +/** + * @class ACE_SOCK_Dgram_Mcast_QoS + * + * @brief Defines the member functions for the ACE QoS enabled socket + * wrapper for UDP/IP multicast. + */ +class ACE_QoS_Export ACE_SOCK_Dgram_Mcast_QoS : public ACE_SOCK_Dgram_Mcast +{ + +public: + // = Initialization routines. + /// Ctor, has same defaults as ACE_SOCK_Dgram_Mcast + ACE_SOCK_Dgram_Mcast_QoS (options opts = DEFOPTS); + + // Note that there is no public <open> method. Therefore, this + // class cannot be used unless you <subscribe> to a multicast group. + // If you just want to send (and not listen) to a multicast group, + // use <ACE_SOCK_Dgram> or <ACE_SOCK_CODgram> instead. + + /// Default dtor. + ~ACE_SOCK_Dgram_Mcast_QoS (void); + + // = Multicast group management routines. + /** + * This is a QoS-enabled method for joining a multicast group, which + * passes <qos_params> via <ACE_OS::join_leaf>. The network + * interface device driver is instructed to accept datagrams with + * <mcast_addr> multicast addresses. If the socket has already been + * opened, <subscribe> closes the socket and opens a new socket + * bound to the <mcast_addr>. The session object specifies the QoS + * session that the socket wants to subscribe to. A socket may + * subscribe to multiple QoS sessions by calling this method multiple + * times with different session objects. + * + * The <net_if> interface is hardware specific, e.g., use "netstat + * -i" to find whether your interface is, such as "le0" or something + * else. If net_if == 0, <subscribe> uses the default mcast + * interface. Returns: -1 if the call fails. + * + * Note that some platforms, such as pSoS, support only number, not + * names, for network interfaces. For these platforms, just give + * these numbers in alphanumeric form and <subscribe> will convert + * them into numbers via <ACE_OS::atoi>. + */ + int subscribe (const ACE_INET_Addr &mcast_addr, + const ACE_QoS_Params &qos_params, + int reuse_addr = 1, + const ACE_TCHAR *net_if = 0, + int protocol_family = PF_INET, + int protocol = 0, + ACE_Protocol_Info *protocolinfo = 0, + ACE_SOCK_GROUP g = 0, + u_long flags = 0, + ACE_QoS_Session *qos_session = 0); + + // = Data transfer routines. + + /// Send <buffer_count> worth of @a buffers to @a addr using overlapped + /// I/O (uses <WSASentTo>). Returns 0 on success. + ssize_t send (const iovec buffers[], + int buffer_count, + size_t &number_of_bytes_sent, + int flags, + const ACE_Addr &addr, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) const; + + /// Send an @a n byte @a buf to the datagram socket (uses <WSASentTo>). + ssize_t send (const void *buf, + size_t n, + const ACE_Addr &addr, + int flags, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) const; + + /// Returns the QoS manager for this socket. + ACE_QoS_Manager qos_manager (void); + + /// Declare the dynamic allocation hooks. + ACE_ALLOC_HOOK_DECLARE; + + int open (const ACE_INET_Addr &addr, + const ACE_QoS_Params &qos_params, + int protocol_family = PF_INET, + int protocol = 0, + ACE_Protocol_Info *protocolinfo = 0, + ACE_SOCK_GROUP g = 0, + u_long flags = 0, + int reuse_addr = 0); + +private: + // = Disable public <open> method to ensure class used properly. + + + /// Subscribe to the multicast interface using QoS-enabled semantics. + int subscribe_ifs (const ACE_INET_Addr &mcast_addr, + const ACE_QoS_Params &qos_params, + const ACE_TCHAR *net_if, + int protocol_family, + int protocol, + int reuse_addr, + ACE_Protocol_Info *protocolinfo); + + /// Manages the QoS sessions that this socket subscribes to. + ACE_QoS_Manager qos_manager_; + +}; + +ACE_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +#include "SOCK_Dgram_Mcast_QoS.inl" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" +#endif /* ACE_SOCK_DGRAM_MCAST_QOS_H */ diff --git a/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.inl b/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.inl new file mode 100644 index 00000000000..1a2eed3b756 --- /dev/null +++ b/externals/ace/QoS/SOCK_Dgram_Mcast_QoS.inl @@ -0,0 +1,57 @@ +// -*- C++ -*- +// +// $Id: SOCK_Dgram_Mcast_QoS.inl 80826 2008-03-04 14:51:23Z wotte $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE +ACE_SOCK_Dgram_Mcast_QoS::~ACE_SOCK_Dgram_Mcast_QoS (void) +{ +} + +ACE_INLINE ssize_t +ACE_SOCK_Dgram_Mcast_QoS::send (const iovec buffers[], + int buffer_count, + size_t &number_of_bytes_sent, + int flags, + const ACE_Addr &addr, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) const +{ + ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::send"); + + return ACE_SOCK_Dgram::send (buffers, + buffer_count, + number_of_bytes_sent, + flags, + addr, + overlapped, + func); + +} + +ACE_INLINE ssize_t +ACE_SOCK_Dgram_Mcast_QoS::send (const void *buf, + size_t n, + const ACE_Addr &addr, + int flags, + ACE_OVERLAPPED *overlapped, + ACE_OVERLAPPED_COMPLETION_FUNC func) const +{ + ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::send"); + + return ACE_SOCK_Dgram::send (buf, + n, + addr, + flags, + overlapped, + func); +} + +ACE_INLINE ACE_QoS_Manager +ACE_SOCK_Dgram_Mcast_QoS::qos_manager (void) +{ + return this->qos_manager_; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/README b/externals/ace/README new file mode 100644 index 00000000000..c1e90bb5c44 --- /dev/null +++ b/externals/ace/README @@ -0,0 +1,1787 @@ +// $Id: README 88535 2010-01-13 21:22:15Z olli $ + +ACE Portability Macros +---------------------- + +The following describes the meaning of the C++ compiler macros that +can be set in the config*.h file. When you port ACE to a new platform +and/or C++ compiler, make sure that you check to see which of these +need to be defined. It's helpful to check the various config*.h files +in this directory to see what's already been defined. If you need to +add new macros, please send them to me and I'll add them to this file. + +Eventually, most of this information should be auto-discovered via GNU +autoconf, which is currently available in the ACE distribution. + +Macro Description +----- ----------- + +ACE_HAS_DUMP Used to enable the dump() + method bodies. If not + defined, the bodies are ifdef + out in order to reduce + footprint. By default, it is + not defined. +ACE_CAST_CONST Used to work around broken + SunCC ANSI casts that require + an extra const. +ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES + Win32 only. Users want to use + a predefined security + attributes defined in + ACE_OS::default_win32_security_attributes + as the default security + object. +ACE_DISABLE_DEBUG_DLL_CHECK Define this if you don't want + debug version ACE search for + debug version DLLs first + before looking for the DLL + names specified. +ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER + Application will allocate its + own object manager. This + implicitly defines + ACE_HAS_NONSTATIC_OBJECT_MANAGER. + Usually used with MFC + applications. +ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO Platform does not initialize + sockaddr_in::sin_zero field in + calls to getpeername() and + getsockname(). As a result, + memcmp()-based equality + comparison can fail despite + the fact two sockaddr_in + instances refer to the same + addr characteristics. +ACE_MAIN Renames "main (int, char *[])", + for platforms such as g++/VxWorks + that don't allow "main". Requires + the use of + ACE_HAS_NONSTATIC_OBJECT_MANAGER. +ACE_MKDIR_LACKS_MODE This platform has a mkdir function with + a mode argument +ACE_MT_SAFE Compile using multi-thread libraries +ACE_NDEBUG Turns off debugging features +ACE_NEW_THROWS_EXCEPTIONS Compiler's 'new' throws exception on + failure (ANSI C++ behavior). +ACE_NLOGGING Turns off the LM_DEBUG and + LM_ERROR logging macros... +ACE_NTRACE Turns off the tracing feature when = 1. +ACE_HAS_TRACE Defined when ACE_NTRACE=0 to + help support tracing. Can + also be defined by users who + implement their own tracing + macros based on + ACE_TRACE_IMPL. Not defining + it helps reduce footprint by + not requiring applications to + link in Trace.o. +ACE_PAGE_SIZE Defines the page size of the + system (not used on Win32 or + with ACE_HAS_GETPAGESIZE). +ACE_REDEFINES_XTI_FUNCTIONS Platform redefines the t_... names (UnixWare) +ACE_TEMPLATES_REQUIRE_PRAGMA Compiler's template mechanism + must use a pragma This is used + for AIX's C++ compiler. +ACE_TEMPLATES_REQUIRE_SOURCE Compiler's template mechanim + must see source code (i.e., + .cpp files). This is used for + GNU G++. +ACE_TIMEPROBE_ASSERTS_FIXED_SIZE If enabled then ACE_Timeprobe_Ex<>::timeprobe() + will assert if the end of the + buffer is reached. If disabled, the + counter wraps around to start + at the beginning of the buffer. +ACE_TIMER_SKEW If a timed ::select () can return + early, then ACE_TIMER_SKEW is the + maximum adjustment, in microseconds, + that ACE_Timer_Queue uses to + compensate for the early return. +ACE_TLI_TCP_DEVICE Device the platform uses for TCP on + TLI. Only needed if not /dev/tcp. +ACE_USE_POLL The OS platform supports the + poll() event demultiplexor +ACE_USES_ASM_SYMBOL_IN_DLSYM Platform uses assembly symbols + instead of C symbols in + dlsym() +ACE_USES_STATIC_MFC When linking MFC as a static library is desired +ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB Platform has its standard c++ + library in the namespace std. +ACE_USES_EXPLICIT_STD_NAMESPACE Set this when ::fclose doesn't + work and you have to + explicitly specify the std + namespace. This is needed + with the Borland 6 and earlier + compilers. +ACE_USES_GPROF ACE calls getitimer before spawning + a new thread and setitimer + after spawning the thread in + order to overcome the problems + of gprof with multithreaded + applications. It uses the idea from + http://sam.zoy.org/writings/programming/gprof.html +ACE_USES_FIFO_SEM Directs ACE to use FIFO based semaphores on + platforms that support this (not having full + POSIX semaphore support, supporting mkfifo, select + and fcntl). +ACE_WSOCK_VERSION A parameter list indicating + the version of WinSock (e.g., + "1, 1" is version 1.1). +ACE_HAS_AIO_CALLS Platform supports POSIX aio* calls. + Corresponds to _POSIX_ASYNCHRONOUS_IO + constant in <unistd.h>. +ACE_HAS_ALT_CUSERID Use ACE's alternate cuserid() + implementation since a system + cuserid() may not exist, or it + is not desirable to use it. + The implementation requires + ACE_LACKS_PWD_FUNCTIONS to be + undefined and that the + geteuid() system call exists. +ACE_HAS_DINKUM_STL Using the Dinkum STL library +ACE_HAS_HEADER_ALLOCATED_CLASS_STATIC_CONST_INT_STOREAGE + Non-C++ Complient compilers that automatically + provide storeage for class static const int + when their declaration is seen. I.e. they object + to explicit definitions being seen in the .cpp + file. +ACE_DEFAULT_THREAD_KEYS Number of TSS keys, with + ACE_HAS_TSS_EMULATION _only_. + Defaults to 64. +ACE_DEFAULT_THREAD_STACKSIZE Default stack size specified for the + ACE thread spawning methods. Defaults + to 0, which defers to OS defaults. +ACE_DEFAULT_LD_SEARCH_PATH Specify the platform default search + paths. This macro should only be + defined on platforms that don't + support environment variables at all + (i.e., Windows CE.) +ACE_THREADS_DONT_INHERIT_LOG_MSG Specify this if you don't want + threads to inherit parent + thread's ACE_Log_Msg + properties. +ACE_THREAD_MANAGER_USES_SAFE_SPAWN Disable the "check before lock" feature + in ACE_Thread_Manager. Defining this + macro avoids a potential race condition + on platforms with aggressive read/write + reordering. +ACE_HAS_CPU_SET_T Platform delivers cpu_set_t. +ACE_HAS_PRIOCNTL OS has priocntl (2). +ACE_HAS_RECURSIVE_MUTEXES Mutexes are inherently recursive + (e.g., Win32) +ACE_HAS_NONRECURSIVE_MUTEXES In addition to recursive mutexes, + platform has non-recursive ones also. +ACE_HAS_RECV_TIMEDWAIT Platform has the MIT pthreads + APIs for +ACE_HAS_RECVFROM_TIMEDWAIT timed send/recv operations +ACE_HAS_RECVMSG_TIMEDWAIT +ACE_HAS_RLIMIT_RESOURCE_ENUM Platform has enum instead of + int for first argument to + ::{get,set}rlimit (). The + value of this macro is the + enum definition, e.g., enum + __rlimit_resource, for Linux + glibc 2.0. +ACE_HAS_RUSAGE_WHO_ENUM Platform has enum instead of + int for first argument to + ::getrusage (). The value of + this macro is the enum + definition, e.g., enum + __rusage_who, for Linux glibc + 2.0. +ACE_HAS_SCANDIR Platform has a native scandir() + function. Without any other scandir- + related settings, it's assumed that + the selector and comparator functions + accept const ACE_DIRENT pointers. +ACE_SCANDIR_CMP_USES_VOIDPTR The OS's scandir() comparator function + is int (*compare)(void*, void*). +ACE_SCANDIR_CMP_USES_CONST_VOIDPTR The OS's scandir() comparator function + is int (*compare)(const void*, + const void*). +ACE_SCANDIR_SEL_LACKS_CONST The OS's scandir() selector function + is int (*selector)(ACE_DIRENT*) +ACE_HAS_SEND_TIMEDWAIT +ACE_HAS_SENDTO_TIMEDWAIT +ACE_HAS_SENDMSG_TIMEDWAIT +ACE_HAS_STDARG_THR_DEST Platform has void (*)(...) + prototype for + pthread_key_create() + destructor (e.g., LynxOS). +ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS Platform/compiler supports + Win32 structural exceptions +ACE_HAS_READ_TIMEDWAIT +ACE_HAS_READV_TIMEDWAIT +ACE_HAS_WRITE_TIMEDWAIT +ACE_HAS_WRITEV_TIMEDWAIT +ACE_HAS_4_4BSD_SENDMSG_RECVMSG Platform has BSD 4.4 + sendmsg()/recvmsg() APIs. +ACE_HAS_P_READ_WRITE Platform has pread() and + pwrite() support +ACE_HAS_AIX_BROKEN_SOCKET_HEADER Platform, such as AIX4, needs + to wrap #include of + sys/socket.h with + #undef/#define of + __cplusplus. +ACE_HAS_AIX_HI_RES_TIMER Platform has AIX4 + ::read_real_time () +ACE_HAS_ALLOCA Compiler/platform supports + alloca() +ACE_HAS_ALLOCA_H Compiler/platform has + <alloca.h> +ACE_HAS_ALPHA_TIMER CPU is an Alpha, with the rpcc + instruction to read the tick timer. + Limited to 32 bits, so not recommended. +ACE_HAS_AUTOMATIC_INIT_FINI Compiler/platform correctly + calls init()/fini() for shared + libraries +ACE_HAS_BIG_FD_SET Compiler/platform has typedef + u_long fdmask (e.g., Linux and + SCO). +ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR + Compiler handles explicit calling of + template destructor correctly. See + "ace/OS.h" for details. +ACE_HAS_BROKEN_ACCEPT_ADDR Platform can't correctly deal + with a NULL addr to accept() + (e.g, VxWorks). +ACE_HAS_BROKEN_DGRAM_SENDV Platform sendv() does not work + properly with datagrams, + i.e. it fails when the iovec + size is IOV_MAX. +ACE_HAS_BROKEN_MAP_FAILED Platform doesn't cast MAP_FAILED + to a void *. +ACE_HAS_BROKEN_MSG_H Platform headers don't support + <msg.h> prototypes +ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the + mmap(2) header files with + extern "C". +ACE_HAS_BROKEN_NESTED_TEMPLATES MSVC has trouble with defining + STL containers for nested + structs and classes +ACE_HAS_BROKEN_POSIX_TIME Platform defines struct + timespec in <sys/timers.h> +ACE_HAS_BROKEN_RANDR OS/compiler's header files are + inconsistent with libC + definition of rand_r(). +ACE_HAS_BROKEN_T_ERROR Compiler/platform has the wrong + prototype for t_error(), i.e., + t_error(char *) rather than + t_error(const char *). +ACE_HAS_BSTRING Platform has <bstring.h> + (which contains bzero() + prototype) +ACE_HAS_BYTESEX_H Platform has <bytesex.h>. +ACE_HAS_CANCEL_IO Platform supports the Win32 + CancelIO() function (WinNT 4.0 + and beyond). +ACE_HAS_CHARPTR_DL OS/platform uses char * for + dlopen/dlsym args, rather than + const char *. +ACE_HAS_CHARPTR_SOCKOPT OS/platform uses char * for + sockopt, rather than const + char * +ACE_HAS_CLOCK_GETTIME Platform supports POSIX.1b + clock_gettime () at least for clock-id CLOCK_REALTIME +ACE_HAS_CLOCK_GETTIME_MONOTONIC Platform supports POSIX.1b + clock_gettime () with the clock-id CLOCK_MONOTONIC +ACE_HAS_CLOCK_SETTIME Platform supports POSIX.1b + clock_settime () +ACE_HAS_CONFLICTING_XTI_MACROS OS's XTI header file defines some + TCP-related macros that netinet/tcp.h + also defines, but they conflict + (only seen on HP-UX 11). +ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES Prototypes for both signal() + and struct sigaction are + consistent. +ACE_HAS_CPLUSPLUS_HEADERS Compiler/platform has + correctly prototyped header + files +ACE_HAS_DIRENT Compiler/platform has Dirent + iterator functions +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 + explicitly exported +ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION For the GCC compiler + on AIX, HPUX and VxWorks we have to + explicitly instantiate static template + members else we get multiple instances + of the same static. +ACE_HAS_GETPAGESIZE Platform supports + getpagesize() call (otherwise, + ACE_PAGE_SIZE must be defined, + except on Win32) +ACE_HAS_GETRUSAGE Platform supports the + getrusage() system call. +ACE_HAS_GETRUSAGE_PROTOTYPE Platform has a getrusage () + prototype in sys/resource.h + that differs from the one in + ace/OS.i. +ACE_HAS_GPERF The GPERF utility is compiled + for this platform +ACE_HAS_GETIFADDRS This platform has ifaddrs.h and + the getifaddrs() function. This + is used in preference to + the SIOCGIFCONF ioctl call, since + it is much simpler and supports + IPv6 and non-IP interfaces better. +ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT Optimize + ACE_Handle_Set::count_bits for + select() operations (common + case) +ACE_HAS_LLSEEK Platform supports llseek. +ACE_HAS_HI_RES_TIMER Compiler/platform supports + SunOS high resolution timers +ACE_HAS_IDTYPE_T Compiler/platform supports + idtype_t. +ACE_HAS_INLINED_OSCALLS Inline all the static class OS + methods to remove call + overhead +ACE_HAS_IP_MULTICAST Platform supports IP multicast +ACE_HAS_IPV6 Platform supports IPv6. +ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED gethostbyaddr does not handle + IPv6-mapped-IPv4 addresses +ACE_USES_IPV4_IPV6_MIGRATION Enable IPv6 support in ACE on + platforms that don't have IPv6 + turned on by default. +ACE_HAS_IPV6_V6ONLY Platform supports the IPPROTO_IPV6 + level IPV6_V6ONLY socket option. +ACE_HAS_IRIX62_THREADS Platform supports the very odd + IRIX 6.2 threads... +ACE_HAS_NONSTATIC_OBJECT_MANAGER Causes the ACE_Object_Manager + instance to be created in main + (int, char *[]), instead of as + a static (global) instance. +ACE_HAS_THR_KEYDELETE Platform supports + thr_keydelete (e.g,. UNIXWARE) +ACE_HAS_THR_MINSTACK Platform calls thr_minstack() + rather than thr_min_stack() + (e.g., Tandem). +ACE_HAS_LIMITED_RUSAGE_T The rusage_t structure has + only two fields. +ACE_HAS_LIMITED_SELECT The select is unable to deal with + large file descriptors. +ACE_HAS_LINUX_NPTL Linux platform (with kernel >= 2.6.x) + with GLibc including new NPTL (Native + POSIX Thread Library). + This triggers extended POSIX checks + since the NPTL library is (almost) fully + POSIX compliant. +ACE_HAS_LOG_MSG_NT_EVENT_LOG Platform supports Windows NT event + log so we can create an + ACE_Log_Msg_Backend to log to it. +ACE_HAS_LONG_MAP_FAILED Platform defines MAP_FAILED as + a long constant. +ACE_HAS_MALLOC_STATS Enabled malloc statistics + collection. +ACE_HAS_MEMCHR Use native implementation of memchr. +ACE_HAS_MINIMAL_ACE_OS Disables some #includes in ace/OS.*. +ACE_HAS_MFC Platform supports Microsoft + Foundation Classes +ACE_HAS_MSG Platform supports recvmsg and + sendmsg +ACE_HAS_MT_SAFE_MKTIME Platform supports MT safe + mktime() call (do any of + them?) +ACE_HAS_MUTEX_TIMEOUTS Compiler supports timed mutex + acquisitions + (e.g. pthread_mutex_timedlock()). +ACE_HAS_NEW_NOTHROW Compiler offers new (nothrow). +ACE_HAS_NONCONST_CHDIR Platform uses non-const char * + in call to chdir +ACE_HAS_NONCONST_CLOCK_SETTIME Platform uses non-const + struct timespec * in call to + clock_settime +ACE_HAS_NONCONST_OPENDIR Platform uses non-const char * + in call to opendir +ACE_HAS_NONCONST_UNLINK Platform uses non-const char * + in call to unlink +ACE_HAS_NONCONST_GETBY Platform uses non-const char * + in calls to gethostbyaddr, + gethostbyname, getservbyname +ACE_HAS_NONCONST_MSGSND Platform has a non-const + parameter to msgsend() (e.g., + SCO). +ACE_HAS_NONCONST_READV Platform omits const qualifier from + iovec parameter in readv() prototype. +ACE_HAS_NONCONST_SELECT_TIMEVAL Platform's select() uses + non-const timeval* (only found + on Linux right now) +ACE_HAS_NONCONST_SENDMSG Platform omits const qualifier + from msghdr parameter in sendmsg() + prototype. +ACE_HAS_NONCONST_SETRLIMIT Platform omits const qualifier + from rlimit parameter in setrlimit() + prototype. +ACE_HAS_NONCONST_STAT Platform's stat function has non const + name argument +ACE_HAS_NONCONST_SWAB Platform's swab function has non + const src argument +ACE_HAS_NONCONST_WRITEV Platform omits const qualifier from + iovec parameter in writev() prototype. +ACE_HAS_OLD_MALLOC Compiler/platform uses old + malloc()/free() prototypes + (ugh) +ACE_HAS_ONLY_SCHED_FIFO Platform, e.g., HP NonStop OSS, + only supports SCHED_FIFO + POSIX scheduling policy. +ACE_HAS_ONLY_SCHED_OTHER Platform, e.g., Solaris 2.5, + only supports SCHED_OTHER + POSIX scheduling policy. +ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R Uses ctime_r & asctime_r with + only two parameters + vs. three. +ACE_HAS_OSF_TIMOD_H Platform supports the OSF TLI + timod STREAMS module +ACE_HAS_3_PARAM_WCSTOK Platform has 3-parameter version + of wcstok(), which was added in + 1994 in the ISO C standard Normative + Addendum 1. Other standards like XPG4 + define a 2 parameter wcstok(). +ACE_HAS_PENTIUM Platform is an Intel Pentium + microprocessor. +ACE_HAS_POLL Platform contains <poll.h> +ACE_HAS_POSITION_INDEPENDENT_POINTERS Platform supports + "position-independent" features + provided by ACE_Based_Pointer<>. +ACE_HAS_POSIX_MESSAGE_PASSING Platform supports POSIX message queues. + Corresponds to _POSIX_MESSAGE_PASSING + constant in <unistd.h>. +ACE_HAS_POSIX_NONBLOCK Platform supports POSIX + O_NONBLOCK semantics +ACE_HAS_POSIX_REALTIME_SIGNALS Platform supports POSIX RT signals. + Corresponds to _POSIX_REALTIME_SIGNALS + constant in <unistd.h>. +ACE_HAS_POSIX_SEM Platform supports POSIX + real-time semaphores (e.g., + VxWorks and Solaris). Corresponds + to _POSIX_SEMAPHORES constant + in <unistd.h> +ACE_HAS_POSIX_SEM_TIMEOUT Platform supports timed wait operation + on POSIX realtime semaphores. +ACE_HAS_POSIX_TIME Platform supports the POSIX + struct timespec type +ACE_HAS_PROC_FS Platform supports the /proc + file system and defines tid_t + in <sys/procfs.h> +ACE_HAS_POWERPC_TIMER Platform supports PowerPC + time-base register. +ACE_HAS_PRUSAGE_T Platform supports the + prusage_t struct +ACE_HAS_PTHREADS Platform supports POSIX + Pthreads, of one form or + another. This macro says the + platform has a pthreads + variety - should also define + one of the below to say which + one. Also may need some + ACE_HAS_... thing for + extensions. +ACE_HAS_PTHREADS_DRAFT4 Platform's 'Pthreads' is .4a draft 4 +ACE_HAS_PTHREADS_DRAFT6 Platform's 'Pthreads' is .4a draft 6 +ACE_HAS_PTHREADS_DRAFT7 Platform's 'Pthreads' is .1c draft 7 +ACE_HAS_PTHREADS_STD Platform supports POSIX.1c-1995 threads + (This is the final standard + Pthreads). +ACE_HAS_PTHREADS_UNIX98_EXT Platform has the UNIX98 extensions to + Pthreads (rwlocks) +ACE_HAS_PTHREAD_ATTR_SETCREATESUSPEND_NP Platform has + pthread_attr_setcreatesuspend_np(). +ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP Platform has pthread_condattr_setkind_np(). +ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP Platform has + pthread_mutexattr_setkind_np(). +ACE_HAS_PTHREAD_GETCONCURRENCY Platform has pthread_getconcurrency(). +ACE_HAS_PTHREAD_SETCONCURRENCY Platform has pthread_setconcurrency(). +ACE_HAS_PTHREAD_PROCESS_ENUM pthread.h declares an enum with + PTHREAD_PROCESS_PRIVATE and + PTHREAD_PROCESS_SHARED values. +ACE_HAS_PTHREAD_SETSTACK Platform has pthread_attr_setstack(). +ACE_HAS_PTHREAD_NP_H Platform has <pthread_np.h> FreeBSD + declares non-portable (*_np) pthread + functions in this header. +ACE_HAS_PURIFY Purify'ing. Set by wrapper_macros.GNU. +ACE_HAS_QUANTIFY Quantify'ing. Set by wrapper_macros.GNU. +ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS Platform will recurse + infinitely on thread exits + from TSS cleanup routines + (e.g., AIX). +ACE_HAS_REENTRANT_FUNCTIONS Platform supports reentrant + functions (i.e., all the POSIX + *_r functions). +ACE_HAS_XPG4_MULTIBYTE_CHAR Platform has support for + multi-byte character support + compliant with the XPG4 + Worldwide Portability + Interface wide-character + classification. +ACE_HAS_REGEX Platform supports the POSIX + regular expression library +ACE_HAS_DLSYM_SEGFAULT_ON_INVALID_HANDLE For OpenBSD: The dlsym call + segfaults when passed an invalid + handle. Other platforms handle + this more gracefully. +ACE_HAS_SELECT_H Platform has special header for select(). +ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL For Win32: Use Select_Reactor + as default implementation of + Reactor instead of + WFMO_Reactor. +ACE_HAS_SEMUN Compiler/platform defines a + union semun for SysV shared + memory +ACE_HAS_SET_T_ERRNO Platform has a function to set + t_errno (e.g., Tandem). +ACE_HAS_SIGACTION_CONSTP2 Platform's sigaction() function takes + const sigaction* as 2nd parameter. +ACE_HAS_SIGINFO_T Platform supports SVR4 + extended signals +ACE_HAS_SIGSUSPEND Platform supports sigsuspend() +ACE_HAS_SIGISMEMBER_BUG Platform has bug with + sigismember() (HP/UX 11). +ACE_HAS_SIGNAL_OBJECT_AND_WAIT Platform supports the Win32 + SignalObjectAndWait() function + (WinNT 4.0 and beyond). +ACE_HAS_SIGWAIT Platform/compiler has the + sigwait(2) prototype +ACE_HAS_SIG_ATOMIC_T Compiler/platform defines the + sig_atomic_t typedef +ACE_HAS_SIG_C_FUNC Compiler requires extern "C" + functions for signals. +ACE_HAS_SIZET_SOCKET_LEN OS/compiler uses size_t * + rather than int * for socket + lengths +ACE_HAS_SOCKADDR_IN_SIN_LEN Platform has sin_len member in struct + sockaddr_in. +ACE_HAS_SOCKADDR_IN6_SIN_LEN Platform has sin6_len member in struct + sockaddr_in6. +ACE_HAS_SOCKADDR_MSG_NAME Platform requires (struct + sockaddr *) for msg_name field + of struct msghdr. +ACE_HAS_SOCKLEN_T Platform provides socklen_t + type, such as Linux with + glibc2. +ACE_HAS_SOCK_BUF_SIZE_MAX Platform limits the maximum socket + message size. +ACE_HAS_SPARCWORKS_401_SIGNALS Compiler has brain-damaged + SPARCwork SunOS 4.x signal + prototype... +ACE_HAS_SSIZE_T Compiler supports the ssize_t + typedef +ACE_HAS_STHREADS Platform supports Solaris + threads +ACE_HAS_STANDARD_CPP_LIBRARY Platform/compiler supports + Standard C++ Library +ACE_HAS_STDCPP_STL_INCLUDES Standard C++ headers can be + included in the standard way. + e.g. #include <vector> +ACE_HAS_STRBUF_T Compiler/platform supports + struct strbuf +ACE_HAS_STRDUP_EMULATION Use ACE's strdup() emulation (even + if platform has a native strdup()). + This is useful if you need control + over what memory allocator is used. +ACE_HAS_WCSDUP_EMULATION Use ACE's wcsdup() emulation (even + if platform has a native wcsdup()). + This is useful if you need control + over what memory allocator is used. +ACE_HAS_STRNLEN Platform supports strnlen(3). +ACE_HAS_STREAMS Platform supports STREAMS +ACE_HAS_STREAM_PIPES Platform supports STREAM pipes +ACE_HAS_STRICT Use the STRICT compilation mode on Win32. +ACE_HAS_STRING_CLASS Platform/Compiler supports a + String class (e.g., GNU or + Win32). +ACE_HAS_STRUCT_NETDB_DATA Compiler/platform has strange + hostent API for socket *_r() + calls +ACE_HAS_SUNOS4_SIGNAL_T Compiler has horrible SunOS + 4.x signal handlers... +ACE_HAS_SVR4_DYNAMIC_LINKING Compiler/platform supports + SVR4 dynamic linking semantics +ACE_HAS_SVR4_GETTIMEOFDAY Compiler/platform supports + SVR4 gettimeofday() prototype +ACE_HAS_SVR4_SIGNAL_T Compiler/platform supports + SVR4 signal typedef +ACE_HAS_SVR4_TLI Compiler/platform supports + SVR4 TLI; that is, TLI with extensions + like t_getname(). This is sometimes + used as a pseudonym for TLI on SunOS4. + This is a modifier to ACE_HAS_TLI and + isn't used if ACE_HAS_XTI is set. +ACE_HAS_SYSCALL_GETRUSAGE HP/UX has an undefined syscall + for GETRUSAGE... +ACE_HAS_SYSENT_H Platform provides <sysent.h> + header +ACE_HAS_SYSV_SYSINFO Platform supports system + configuration information +ACE_HAS_SYSV_IPC Platform supports System V IPC + (most versions of UNIX, but + not Win32) +ACE_HAS_SYS_FILIO_H Platform provides + <sys/filio.h> header +ACE_HAS_SYS_LOADAVG_H Compiler/platform contains the + <sys/loadavg.h> file. +ACE_HAS_SYS_PSTAT_H Compiler/platform contains the + <sys/pstat.h> file. +ACE_HAS_SYS_SOCKIO_H Compiler/platform provides the + sockio.h file +ACE_HAS_SYS_SYSCALL_H Compiler/platform contains the + <sys/syscall.h> file. +ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA Compiler's template + instantiation mechanism + supports the use of "#pragma + instantiate". Edison Design + Group compilers, e.g., SGI C++ + and Green Hills 1.8.8 and + later, support this. +ACE_HAS_TEMPLATE_TYPEDEFS Compiler implements templates + that support typedefs inside + of classes used as formal + arguments to a template + class. +ACE_HAS_TERMIO Platform has terminal ioctl + flags like TCGETS and TCSETS and + termio struct. +ACE_HAS_TERMIOS Platform has POSIX terminal + interface and termios struct. +ACE_HAS_LAZY_MAP_MANAGER ACE supports lazy Map Managers + that allow deletion of entries + during active iteration. +ACE_HAS_THREADS Platform supports threads +ACE_HAS_THREAD_SAFE_ACCEPT Platform allows multiple + threads to call accept() on + the same port (e.g., WinNT). +ACE_HAS_THREAD_SELF Platform has thread_self() + rather than pthread_self() + (e.g., DCETHREADS and AIX) +ACE_HAS_THREAD_SPECIFIC_STORAGE Compiler/platform has + thread-specific storage +ACE_HAS_THR_C_DEST The pthread_keycreate() + routine *must* take extern C + functions. +ACE_HAS_THR_C_FUNC The pthread_create() routine + *must* take extern C + functions. +ACE_HAS_TIMEZONE Platform/compiler supports + global "timezone" variable. +ACE_HAS_TIMEZONE_GETTIMEOFDAY Platform/compiler supports + timezone * as second parameter + to gettimeofday() +ACE_HAS_TIMOD_H Platform supports TLI timod + STREAMS module +ACE_HAS_TIUSER_H Platform provides TLI tiuser.h + header file. +ACE_HAS_TLI Platform supports TLI. Also + see ACE_TLI_TCP_DEVICE. If the + platform supports XTI, set ACE_HAS_XTI + instead of this. +ACE_HAS_TLI_PROTOTYPES Platform provides TLI function + prototypes +ACE_HAS_TR24731_2005_CRT The platform provides an implementation + of C99 draft TR24731 (October 2005), + C run-time with more secure parameters. +ACE_HAS_TSS_EMULATION ACE provides TSS emulation. + See also + ACE_DEFAULT_THREAD_KEYS. +ACE_HAS_UALARM Platform supports ualarm() +ACE_HAS_UCONTEXT_T Platform supports ucontext_t + (which is used in the extended + signal API). +ACE_HAS_UNION_WAIT The wait() system call takes a + (union wait *) rather than int + * +ACE_HAS_UNIXWARE_SVR4_SIGNAL_T Has inconsistent SVR4 signal + stuff, but not the same as the + other platforms +ACE_HAS_VALGRIND Running with valgrind +ACE_HAS_VERBOSE_NOTSUP Prints out console message in + ACE_NOTSUP. Useful for + tracking down origin of + ACE_NOTSUP. +ACE_HAS_VERSIONED_NAMESPACE Wrap all library code within a + "versioned namespace" to + prevent symbol conflicts with + other versions of ACE shared + libraries in third party + libraries. Default namespace + name may be overridden by + defining preprocessor symbol + ACE_VERSIONED_NAMESPACE_NAME + to desired name. +ACE_LACKS_INTMAX_T Platform lacks the intmax_t type +ACE_LACKS_UINTMAX_T Platform lacks the uintmax_t type. +ACE_LACKS_INTPTR_T Platform lacks the intptr_t type +ACE_LACKS_UINTPTR_T Platform lacks the uintptr_t type. + +ACE_HAS_INT8_T Platform provides the int8_t type. +ACE_HAS_INT16_T Platform provides the int16_t type. +ACE_HAS_INT32_T Platform provides the int32_t type. +ACE_HAS_INT64_T Platform provides the int64_t type. +ACE_HAS_UINT8_T Platform provides the uint8_t type. +ACE_HAS_UINT16_T Platform provides the uint16_t type. +ACE_HAS_UINT32_T Platform provides the uint32_t type. +ACE_HAS_UINT64_T Platform provides the uint64_t type. + +ACE_INT8_TYPE Specific type to use for ACE_INT8. + If not defined, ACE will attempt to + determine the correct type. +ACE_INT16_TYPE Specific type to use for ACE_INT16. + If not defined, ACE will attempt to + determine the correct type. +ACE_INT32_TYPE Specific type to use for ACE_INT32. + If not defined, ACE will attempt to + determine the correct type. +ACE_INT64_TYPE Specific type to use for ACE_INT64. + If not defined, ACE will attempt to + determine the correct type. +ACE_UINT8_TYPE Specific type to use for ACE_UINT8. + If not defined, ACE will attempt to + determine the correct type. +ACE_UINT16_TYPE Specific type to use for ACE_UINT16. + If not defined, ACE will attempt to + determine the correct type. +ACE_UINT32_TYPE Specific type to use for ACE_UINT32. + If not defined, ACE will attempt to + determine the correct type. +ACE_UINT64_TYPE Specific type to use for ACE_UINT64. + If not defined, ACE will attempt to + determine the correct type. + +ACE_INT8_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_INT8 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_INT16_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_INT16 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_INT32_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_INT32 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_INT64_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_INT64 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_UINT8_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_UINT8 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_UINT16_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_UINT16 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_UINT32_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_UINT32 values. If + not defined, ACE will attempt to + determine the correct setting. +ACE_UINT64_FORMAT_SPECIFIER String literal containing *printf + format specifier (including the '%') + to be used for ACE_UINT64 values. If + not defined, ACE will attempt to + determine the correct setting. + +ACE_HAS_VOIDPTR_GETTIMEOFDAY Platform/compiler supports + void * as second parameter + to gettimeofday +ACE_HAS_VOIDPTR_MMAP Platform requires void * for + mmap(). +ACE_HAS_VOIDPTR_SOCKOPT OS/compiler uses void * arg 4 + setsockopt() rather than const + char * +ACE_HAS_WCSNLEN Platform supports wcsnlen(3). +ACE_HAS_WIN32_OVERLAPPED_IO Platform has Windows overlapped I/O; + requires I/O completion ports. +ACE_HAS_WIN32_TRYLOCK The Win32 platform support + TryEnterCriticalSection() + (WinNT 4.0 and beyond) +ACE_HAS_WINSOCK2 The Win32 platform supports + WinSock 2.0 +ACE_HAS_XLI Platform has the XLI version + of TLI +ACE_HAS_XTI Platform has XTI + (X/Open-standardized superset + of TLI). Implies ACE_HAS_TLI + but uses a different header + file. +ACE_INITIALIZE_MEMORY_BEFORE_USE Memory is explicitly initialized before + use. Useful when using a profiler like + purify or valgrind +ACE_HRTIME_T_IS_BASIC_TYPE ACE_hrtime_t is a basic type that + doesn't require ACE_U64_TO_U32 + conversion +ACE_LACKS_ACCESS Platform lacks access() (e.g., + VxWorks and Chorus) +ACE_LACKS_ACE_IOSTREAM Platform can not build + ace/IOStream{,_T}.cpp. This + does not necessarily mean that + the platform does not support + iostreams. +ACE_LACKS_AUTO_MMAP_REPLACEMENT No system support for replacing any + previous mappings. +ACE_LACKS_BSEARCH Compiler/platform lacks the + standard C library bsearch() + function +ACE_LACKS_CLEARERR Platform lacks the clearerr system + call. +ACE_LACKS_CLOSEDIR Platform lacks closedir and the closedir + emulation must be used +ACE_LACKS_OPENDIR Platform lacks opendir and the opendir + emulation must be used +ACE_LACKS_READDIR Platform lacks readdir and the readdir + emulation must be used +ACE_LACKS_COND_TIMEDWAIT_RESET pthread_cond_timedwait does + *not* reset the time argument + when the lock is acquired. +ACE_LACKS_CONST_STRBUF_PTR Platform uses struct strbuf * + rather than const struct + strbuf * (e.g., HP/UX 10.x) +ACE_LACKS_CONST_TIMESPEC_PTR Platform forgot const in + cond_timewait (e.g., HP/UX). +ACE_LACKS_COND_T Platform lacks condition + variables (e.g., Win32 and + VxWorks) +ACE_LACKS_CONDATTR_PSHARED Platform has no implementation + of + pthread_condattr_setpshared(), + even though it supports + pthreads! +ACE_LACKS_DIFFTIME Platform lacks difftime() implementation +ACE_LACKS_DUP2 Platform lacks dup2(). +ACE_LACKS_FCNTL Platform lacks POSIX-style fcntl (). +ACE_LACKS_FSYNC Platform lacks fsync(). +ACE_LACKS_INLINE_FUNCTIONS Platform can't handle "inline" + keyword correctly. +ACE_LACKS_EXEC Platform lacks the exec() + family of system calls (e.g., + Win32, VxWorks, Chorus) +ACE_LACKS_FILELOCKS Platform lacks file locking + mechanism +ACE_LACKS_FLOATING_POINT Platform does not support + floating point operations + (e.g., certain Chorus hardware + platforms) +ACE_LACKS_FORK Platform lacks the fork() + system call (e.g., Win32, + VxWorks, Chorus) +ACE_LACKS_GETOPT_PROTOTYPE Platform lacks the getopt() + prototype (e.g., LynxOS) +ACE_LACKS_GETPGID Platform lacks getpgid() call + (e.g., Win32, Chorus, and + FreeBSD). +ACE_LACKS_GETSERVBYNAME Platforms lacks + getservbyname() (e.g., VxWorks + and Chorus). +ACE_LACKS_GETIPNODEBYADDR Platform lacks getipnodebyaddr(). +ACE_LACKS_GETIPNODEBYNAME Platform lacks getipnodebyname(). +ACE_LACKS_INET_ATON Platform lacks the inet_aton() + function. +ACE_LACKS_INET_ATON_PROTOTYPE Platform/compiler lacks the + inet_aton() prototype (e.g., + LynxOS) +ACE_LACKS_IOSTREAMS_TOTALLY Iostreams are not supported + adequately on the given platform. +ACE_LACKS_IOSTREAM_FX iostream header does not + declare ipfx (), opfx (), + etc. +ACE_LACKS_KEY_T Platform lacks key_t (e.g., + Chorus, VxWorks, Win32) +ACE_LACKS_LINEBUFFERED_STREAMBUF Platform lacks streambuf + "linebuffered ()". +ACE_LACKS_LONGLONG_T Compiler/platform does not + support the signed or unsigned long + long datatype. +ACE_LACKS_LSTAT Platform lacks the lstat() function. +ACE_LACKS_MADVISE Platform lacks madvise() + (e.g., Linux) +ACE_LACKS_MALLOC_H Platform lacks malloc.h +ACE_LACKS_MEMORY_H Platform lacks memory.h (e.g., + VxWorks and Chorus) +ACE_LACKS_MKFIFO Platform lacks mkfifo() e.g., + VxWorks, Chorus, pSoS, and WinNT. +ACE_LACKS_MKTEMP Platform lacks the mktemp() function. +ACE_LACKS_MKTEMP_PROTOTYPE Platform/compiler lacks the + mktemp() prototype (e.g., + LynxOS) +ACE_LACKS_MKSTEMP Platform lacks the mkstemp() function. +ACE_LACKS_MKSTEMP_PROTOTYPE Platform/compiler lacks the + mkstemp() prototype (e.g., + LynxOS) +ACE_LACKS_MMAP The platform doesn't have + mmap(2) (e.g., SCO UNIX). +ACE_LACKS_MODE_MASKS Platform/compiler doesn't have + open() mode masks. +ACE_LACKS_MPROTECT The platform doesn't have + mprotect(2) (e.g., EPLX real + time OS from CDC (based on + LYNX)) +ACE_LACKS_MSG_ACCRIGHTS Platform defines ACE_HAS_MSG, + but lacks msg_accrights{,len}. +ACE_LACKS_MSG_WFMO Platform lacks + MsgWaitForMultipleObjects + (only needs to be defined when + ACE_WIN32 is also defined). +ACE_LACKS_MSYNC Platform lacks msync() (e.g., + Linux) +ACE_LACKS_MUTEXATTR_PSHARED Platform lacks + pthread_mutexattr_setpshared(). +ACE_LACKS_NAMED_POSIX_SEM Platform lacks named POSIX + semaphores (e.g., Chorus) +ACE_LACKS_NETDB_REENTRANT_FUNCTIONS Platform does not support + reentrant netdb functions + (getprotobyname_r, + getprotobynumber_r, + gethostbyaddr_r, + gethostbyname_r, + getservbyname_r). +ACE_LACKS_NEW_H OS doesn't have, or we don't want to + use, new.h. +ACE_LACKS_NULL_PTHREAD_STATUS OS requires non-null status pointer + for ::pthread_join (). +ACE_LACKS_NUMERIC_LIMITS Platform lacks std::numeric_limits<>. +ACE_LACKS_PERFECT_MULTICAST_FILTERING Platform lacks IGMPv3 "perfect" filtering + of multicast dgrams at the socket level. + If == 1, ACE_SOCK_Dgram_Mcast will bind + the first joined multicast group to the + socket, and all future joins on that + socket will fail with an error. +ACE_LACKS_PRAGMA_ONCE Compiler complains about #pragma once +ACE_LACKS_PRI_T Platform lacks pri_t (e.g., + Tandem NonStop UNIX). +ACE_LACKS_PTHREAD_CANCEL Platform lacks + pthread_cancel(). +ACE_LACKS_PTHREAD_SIGMASK Platform lacks pthread_sigmask (). +ACE_LACKS_PTHREAD_THR_SIGSETMASK Platform lacks + pthread_thr_sigsetmask (e.g., + MVS, HP/UX, and OSF/1 3.2) +ACE_LACKS_PUTENV_PROTOTYPE Platform/compiler lacks the + putenv() prototype (e.g., + LynxOS) +ACE_LACKS_PWD_REENTRANT_FUNCTIONS Platform lacks getpwnam_r() + methods (e.g., SGI 6.2). +ACE_LACKS_QSORT Compiler/platform lacks the + standard C library qsort() + function +ACE_LACKS_RAND_REENTRANT_FUNCTIONS Platform lacks rand_r() +ACE_LACKS_READLINK Platform lacks the readlink() function. +ACE_LACKS_READV Platform doesn't define readv, + so use our own +ACE_LACKS_RENAME Platform lacks rename(). +ACE_LACKS_RLIMIT Platform/compiler lacks + {get,set}rlimit() function + (e.g., VxWorks, Chorus, and + SCO UNIX) +ACE_LACKS_RLIMIT_PROTOTYPE Platform/compiler lacks + {get,set}rlimit() prototypes + (e.g., Tandem) +ACE_LACKS_READDIR_R Platform uses ACE_HAS_DIRENT + but does not have readdir_r + (). +ACE_LACKS_REALPATH Platform/compiler lacks + realpath () function (e.g., + LynxOS) +ACE_LACKS_RECVMSG Platform lacks recvmsg() + (e.g., Linux) +ACE_LACKS_RWLOCK_T Platform lacks readers/writer + locks. +ACE_LACKS_RWLOCKATTR_PSHARED Platform lacks + pthread_rwlockattr_setpshared(). +ACE_LACKS_SBRK Platform lacks a working + sbrk() (e.g., Win32 and + VxWorks) +ACE_LACKS_SCANDIR_PROTOTYPE Platform/compiler lacks + scandir() prototype + (e.g., LynxOS) +ACE_LACKS_SEEKDIR Platform uses ACE_HAS_DIRENT + but does not have seekdir (). +ACE_LACKS_SEMBUF_T Platform lacks struct sembuf + (e.g., Win32 and VxWorks) +ACE_LACKS_SETDETACH Platform lacks + pthread_attr_setdetachstate() + (e.g., HP/UX 10.x) +ACE_LACKS_SETSCHED Platform lacks + pthread_attr_setsched() + (e.g. MVS) +ACE_LACKS_SIGACTION Platform lacks struct + sigaction (e.g., Win32 and + Chorus) +ACE_LACKS_SIGNED_CHAR Platform lacks "signed char" + type (broken!) +ACE_LACKS_SIGSET Platform lacks signal sets + (e.g., Chorus and Win32) +ACE_LACKS_STRPTIME Platform/compiler lacks the strptime() + function. +ACE_LACKS_WCSCHR Platform/compiler lacks wcschr() +ACE_LACKS_STRDUP Platform/compiler lacks strdup() +ACE_LACKS_WCSDUP Platform/compiler lacks wcsdup() +ACE_LACKS_STRRCHR Platform/compiler lacks strrchr() +ACE_LACKS_WCSRCHR Platform/compiler lacks wcsrchr() +ACE_LACKS_SWAB Platform/compiler lacks + swab () function. +ACE_LACKS_SYS_MSG_H Platform lacks sys/msg.h + (e.g., Chorus and VxWorks) +ACE_LACKS_SYS_PARAM_H Platform lacks <sys/param.h> + (e.g., MVS) +ACE_LACKS_SENDMSG Platform lacks sendmsg() + (e.g., Linux) +ACE_LACKS_SI_ADDR Platform lacks the si_addr + field of siginfo_t (e.g., + VxWorks and HP/UX 10.x) +ACE_LACKS_SYMLINKS Platform lacks symbolic links +ACE_LACKS_SYSV_SHMEM Platform lacks System V shared + memory (e.g., Win32 and + VxWorks) +ACE_LACKS_SIGINFO_H Platform lacks the siginfo.h + include file (e.g., MVS) +ACE_LACKS_SOCKET_BUFSIZ Platform doesn't support + SO_SNDBUF/SO_RCVBUF +ACE_LACKS_SOCKETPAIR Platform lacks the + socketpair() call (e.g., SCO + UNIX) +ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES Compiler doesn't support + static data member templates +ACE_LACKS_STRCASECMP Compiler/platform lacks + strcasecmp() (e.g., DG/UX, + UNIXWARE, VXWORKS) +ACE_LACKS_STRCASECMP_PROTOTYPE Platform/compiler lacks the + strcasecmp() prototype (e.g., + LynxOS) +ACE_LACKS_STRNCASECMP_PROTOTYPE Platform/compiler lacks the + strncasecmp() prototype (e.g., + LynxOS) +ACE_LACKS_STRRECVFD Platform doesn't define struct + strrecvfd. +ACE_LACKS_SYSCALL Platform doesn't have + syscall() prototype +ACE_LACKS_T_ERRNO Header files lack t_errno for + TLI +ACE_LACKS_TCP_NODELAY OS does not support TCP_NODELAY. +ACE_LACKS_TELLDIR Platform uses ACE_HAS_DIRENT + but does not have telldir (). +ACE_LACKS_THREAD_STACK_SIZE Platform lacks + pthread_attr_setstacksize() + (e.g., Linux pthreads) +ACE_LACKS_THR_CONCURRENCY_FUNCS (ONLY APPLIES TO SOLARIS) + Platform does not support + thr_getconcurrency/thr_setconcurrency + functions, or their implementation + is effectively a "no-op". This + notably applies for Solaris >= 5.9. + Note that if you build on Solaris 8 + and run on Solaris 9+, you can + encounter thread creation errors + unless you rebuild on the target + platform. +ACE_LACKS_TIMEDWAIT_PROTOTYPES MIT pthreads platform lacks + the timedwait prototypes +ACE_LACKS_TIMESPEC_T Platform does not define + timepec_t as a typedef for + struct timespec. +ACE_LACKS_TRUNCATE Platform doesn't have truncate() + (e.g., vxworks) +ACE_LACKS_U_LONGLONG_T Platform does not have + u_longlong_t typedef, and + "sun" is defined. +ACE_LACKS_UALARM_PROTOTYPE Platform/compiler lacks the + ualarm() prototype (e.g., + Solaris) +ACE_LACKS_CHAR_RIGHT_SHIFTS Compiler does not have any istream + operator>> for chars, u_chars, or + signed chars. +ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS Compiler does not have + operator>> (istream &, u_char *) or + operator>> (istream &, signed char *) +ACE_LACKS_UCONTEXT_H Platform lacks the ucontext.h + file +ACE_LACKS_UMASK Platform lacks umask function +ACE_LACKS_UNBUFFERED_STREAMBUF Platform lacks streambuf + "unbuffered ()". +ACE_LACKS_UNISTD_H Platform lacks the unistd.h + file (e.g., VxWorks and Win32) +ACE_LACKS_UNIX_DOMAIN_SOCKETS ACE platform has no UNIX + domain sockets +ACE_LACKS_UNIX_SIGNALS Platform lacks full signal + support (e.g., Win32 and + Chorus). +ACE_LACKS_UNSIGNEDLONGLONG_T Compiler/platform does not + support the unsigned long + long datatype. +ACE_LACKS_UTSNAME_T Platform lacks struct utsname + (e.g., Win32 and VxWorks) +ACE_LACKS_UNAME Platform lacks uname calls +ACE_LACKS_WAIT The platform lacks wait +ACE_LACKS_WIN32_GETPROCESSTIMES The Windows platform doesn't have + GetProcessTimes(). +ACE_LACKS_WIN32_MOVEFILEEX The Windows platform doesn't have + MoveFileEx(). +ACE_LACKS_WIN32_SECURITY_DESCRIPTORS The Windows platform doesn't have + security descriptor support. +ACE_LACKS_WRITEV Platform doesn't define + writev, so use our own + +ACE_LEGACY_MODE When defined, it will enable + some code that is used to + provide some support for + backwards compatibility. + +ACE_NEEDS_DEV_IO_CONVERSION Necessary with some compilers + to pass ACE_TTY_IO as + parameter to DEV_Connector. +ACE_NEEDS_FUNC_DEFINITIONS Compiler requires a definition + for a "hidden" function, e.g., + a private, unimplemented copy + constructor or assignment + operator. The SGI C++ + compiler needs this, in + template classes, with + ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA. +ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with + small default stacks. +ACE_NEEDS_LWP_PRIO_SET OS has LWPs, and when the + priority of a bound thread is + set, then the LWP priority + must be set also. +ACE_NEEDS_SCHED_H Platform needs to #include + <sched.h> + to get thread scheduling + defs. + +ACE_NO_WIN32_LEAN_AND_MEAN If this is set, then ACE does not + define WIN32_LEAN_AND_MEAN before + including <windows.h>. Needed for + code that uses non-lean Win32 + facilities such as COM. + +ACE_ONLY_LATEST_AND_GREATEST A macro that indicates that + the "latest and greatest" + features of ACE/TAO should be + turned on. It has been + replaced by ACE_LEGACY_MODE, + which has the opposite meaning + but serves the same purpose. + +ACE_SHM_OPEN_REQUIRES_ONE_SLASH The path specified on shm_open() must + have a leading, single slash and not + have any other slashes. + +ACE_WSTRING_HAS_USHORT_SUPPORT If a platform has wchar_t as a + separate type, then + ACE_WString doesn't have a + constructor that understands + an ACE_USHORT16 string. So + this macro enables + one. (mostly used my ACE Name + Space). + +ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK + Under QNX/RTP the objects preallocated + in ACE_OS_Object_Manager cannot be + destroyed after a fork() call. + Since these objects are only destroyed + at application shutdown we take the + simpler approach of not destroying + them at all. + Both QNX/RTP and LynxOS suffer from + this problem. + +ACE_LACKS_MEMBER_TEMPLATES Compiler does not support + member template feature. + +ACE_LACKS_DEPRECATED_MACROS When this define is set, macros which + are deprecated are not defined. Usefull + to check whether deprecated macros are + not used anymore. + +ACE_DONT_INIT_WINSOCK This definition defines whether or not + to explicitly initialize Winsock during + ACE::init() (i.e., whether WSAStartup() + is called). Some Win32 platforms have + dependent characteristics between + ACE initialization and + network initialization. + +---------------------------------------- + +The following macros determine the svc.conf file format ACE uses. + +Macro Description +----- ----------- +ACE_HAS_CLASSIC_SVC_CONF This macro forces ACE to use + the classic svc.conf format. + +ACE_HAS_XML_SVC_CONF This macro forces ACE to use the XML + svc.conf format. + +ACE_USES_CLASSIC_SVC_CONF This macro should be defined + as 0 or 1, depending on the + preferred svc.conf file + format. Defining this macro + to 0 means ACE will use XML + svc.conf file format. + Defining it to 1 will force + ACE to use the classic + svc.conf format. + ** This macro takes precedence + ** over previous two macros. + +---------------------------------------- +The following is a partial list of where some of these macros are used +in the code. This list was originally compiled by Jam Hamidi +(jh1@core01.osi.com). It is now hopelessly out of date. Hopefully, +someone will come along and update it.... + +ACE_HAS_ALLOCA: +--------------- + + Used in: + libsrc/IPC_SAP/SOCK_SAP/SOCK_Connect.C + for allocation of iovp +A + libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Msg.C + for alocation of iovp + + In solaris: + alloca() allocates size bytes of space in the stack frame of + the caller, and returns a pointer to the allocated block. + This temporary space is automatically freed when the caller + returns. Note: if the allocated block is beyond the current + stack limit, the resulting behavior is undefined. + + In HPUX: + no equivalent. + + Notes: + in HPUX it has to do new and delete. Affects performance. + + +ACE_HAS_AUTOMATIC_INIT_FINI: +---------------------------- + + Used in: + libsrc/Service_Configurator/Service_Repository.i + libsrc/Service_Configurator/Parse_Node.i + include/Parse_Node.i + include/Service_Repository.i + + In solaris: + _init() initializes a loadable module. It is called before + any other routine in a loadable module. + _info() returns information about a loadable module. + _fini() should return the return value from mod_remove(9F). + This flag if set, doesn't do anything. If not set, forces + _init() and _fini() to be executed as is: + dlsym ((char *) handle, "_fini"). + + In HPUX: + don't set. + Maybe have to look into shl_load( ), shl_definesym( ), + shl_findsym( ), shl_gethandle( ), shl_getsymbols( ), + shl_unload( ), shl_get( )(3X) - explicit load of shared libraries + Means Service Configurator won't be available. + TBA. + + +ACE_HAS_CPLUSPLUS_HEADERS: +-------------------------- + + Used In: + ace/OS.h + + HPUX: + set it. + + Notes: + If this is not defined, libc.h and osfcn.h get included. + Only needed for older compiler/OS platforms that don't + provide standard C++ header files in /usr/include. + +ACE_HAS_HI_RES_TIMER: +--------------------- + + Used In: + libsrc/Misc/High_Res_Timer.h + libsrc/Misc/High_Res_Timer.C + include/High_Res_Timer.h + + In Solaris, + C++ wrapper around gethrtime(), which returns a long long. + gethrtime() returns the current high-resolution real time. + Time is expressed as nanoseconds since some arbitrary time + in the past; it is not correlated in any way to the time of + day, and thus is not subject to resetting, drifting, etc. + + In HPUX + look into: getclock(), reltimer(), getitimer() + maybe even vtimes structure vm_utime, vm_stime ? + + Notes: + TBA + + +ACE_LACKS_T_ERRNO: +------------------- + + Used In: + ace/OS.h + + HPUX: + set it. + + Notes: + if set, adds: + extern int t_errno; + + +ACE_HAS_POSIX_NONBLOCK: +----------------------- + + Used in: + ace/OS.h + + HPUX: + set it. + + Notes: + if defined, sets ACE_NONBLOCK and O_NONBLOCK + O_NONBLOCK is used in libsrc/Misc/misc.C to do a + fcntl (fd, F_SETFL, opt) + ACE_NONBLOCK is used in libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv.C in the + disable member function and options passed to the open function + in libsrc/IPC_SAP/FIFO_SAP/FIFO.C + + +ACE_HAS_PROC_FS: +---------------- + + Used in: + ace/OS.h + libsrc/Misc/Profile_Timer.i + + Notes: + if set, includes <sys/procfs.h> + the PIOCUSAGE define is used in Profile_Timer. + + Solaris: + procfs.h defines things for the prpsinfo structure (basically to + do a "ps" from inside a program). + + HPUX: + don't set: obviously a different mechanism. + Look into /usr/include/sys/proc.h. The structure is proc. The + pointer to the kernel's proc table may be obtained by + extern struct proc *proc, *procNPROC; + extern int nproc; + + +ACE_HAS_PRUSAGE_T: +------------------ + + Used in: + libsrc/Misc/Profile_Timer.h + libsrc/Misc/Profile_Timer.C + + Notes: + If defined, declares the Profile_Timer class that does start(), + stop() and basically gets real_time, user_time, system_time for + an interval. + This stuff is highly non-portable. + + HPUX: + don't set + + +ACE_HAS_SEMUN: +-------------- + + Used in: + libsrc/Semaphores/Semaphore_Simple.h + + Notes: + if not defined, defines semun as: + union semun { + int val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + ushort *array; /* array for GETALL & SETALL */ + }; + + HPUX: + don't set. + in /usr/include/sem.h: + /* The fourth argument to semctl() varies depending on the value of + its first argument. If desired, "union semun" can be declared + by the user, but this is not necessary since the individual + member can just be passed as the argument. */ + + +ACE_HAS_SIG_ATOMIC_T: +--------------------- + + Used in: + ace/OS.h + + Notes: + if not defined, does a: + typedef int sig_atomic_t; + This is used in the Reactor and service configurator. + + HPUX: + set it. + in /usr/include/sys/signal.h: + typedef unsigned int sig_atomic_t; + + +ACE_HAS_SSIZE_T: +---------------- + + Used in: + ace/OS.h + + Notes: + if not defined, does a + typedef int ssize_t; + used mostly in IPC_SAP. (don't confuse with size_t). + + HPUX: + set it. + in /usr/include/sys/types.h + + +ACE_HAS_STRBUF_T: +----------------- + + Used in: + include/Str_Buf.h + + Notes: + if not defined, declares the strbuf structure as: + struct strbuf + { + int maxlen; /* no. of bytes in buffer */ + int len; /* no. of bytes returned */ + void *buf; /* pointer to data */ + }; + + Solaris: + defined in /usr/include/sys/stropts.h + Sys V.4 Streams. + uses strbuf as parameter to putmsg, putpmsg: + int putmsg(int fildes, const struct strbuf *ctlptr, + const struct strbuf *dataptr, int flags); + + HPUX: + don't set. + no SYS V.4 streams. + + +ACE_HAS_STREAMS: +---------------- + + Used In: + ace/OS.h + libsrc/IPC_SAP/SOCK_SAP/LSOCK.C + + Notes: + if defined, includes <stropts.h> + + HPUX: + don't set. + no SYS V.4 streams. + + +ACE_HAS_STREAM_PIPES: +--------------------- + + Used in: + libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Msg.h + libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Msg.C + libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Listener.h + libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Listener.C + libsrc/IPC_SAP/SPIPE_SAP/SPIPE.h + libsrc/IPC_SAP/SPIPE_SAP/SPIPE.C + libsrc/IPC_SAP/FIFO_SAP/FIFO_Send_Msg.h + libsrc/IPC_SAP/FIFO_SAP/FIFO_Send_Msg.C + libsrc/IPC_SAP/FIFO_SAP/FIFO_Send_Msg.i + libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv_Msg.h + libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv_Msg.C + libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv_Msg.i + + Notes: + if not set, won't be able to use the SPIPE class (IPC_SAP) with + rendezvous handles. + + HPUX: + don't set. + No sysV.4 streams. + + +ACE_HAS_SVR4_DYNAMIC_LINKING: +----------------------------- + + Used in: + ace/OS.h + tests/Service_Configurator/CCM_App.C + + Notes: + if defined, includes <dlfcn.h> + with dlopen(), dlsym(), etc.. + + HPUX: + don't set. + has its own: + shl_findsym( ), shl_gethandle( ), shl_getsymbols( ), + shl_unload( ), shl_get( )(3X) - explicit load of shared libraries + + +ACE_HAS_SVR4_GETTIMEOFDAY: +-------------------------- + + Used in: + ace/OS.h + libsrc/Reactor/Timer_Queue.i + + Notes: + has to do with gettimeofday (). + + Solaris: + gettimeofday (struct timeval *tp) + + HPUX: + don't set. + it has gettimeofday (struct timeval *tp, struct timezone *tzp); + most calls do a: + #if defined (ACE_HAS_SVR4_GETTIMEOFDAY) + ::gettimeofday (&cur_time); + #else + ::gettimeofday (&cur_time, 0); + #endif /* ACE_HAS_SVR4_GETTIMEOFDAY */ + + +ACE_HAS_POLL: +------------ + Used in: + ace/OS.h + + Notes: + #if defined (ACE_HAS_POLL) + #include /**/ <poll.h> + #endif /* ACE_HAS_POLL */ + +ACE_USE_POLL_IMPLEMENTATION: +------------------ + + Used in: + ace/OS.h + + Notes: + Use the poll() event demultiplexor rather than select(). + + HPUX: + set it. + + +ACE_HAS_SVR4_SIGNAL_T: +---------------------- + + Used in: + ace/OS.h + + Notes: + #if defined (ACE_HAS_SVR4_SIGNAL_T) + typedef void (*SignalHandler)(int); + typedef void (*SignalHandlerV)(void); + #elif defined (ACE_HAS_SIGNALHANDLERV_INT_ARG) + typedef void (*SignalHandler)(int); + typedef void (*SignalHandlerV)(int); + #else + #define SignalHandler SIG_PF + typedef void (*SignalHandlerV)(...); + #endif /* ACE_HAS_SVR4_SIGNAL_T */ + + HPUX: + set it. + + +ACE_HAS_SVR4_TLI: +----------------- + + Used in: + libsrc/IPC_SAP/TLI_SAP/TLI.C + libsrc/IPC_SAP/TLI_SAP/TLI.h + libsrc/IPC_SAP/TLI_SAP/TLI_Stream.C + + Notes: + TLI is the transport layer calls as in: t_bind(), t_open(), t_unbind(), + t_optmgmt(), ... in SunOS and Solaris. + + HPUX: + don't set. + Not supported. + + +ACE_HAS_SYS_FILIO_H: +-------------------- + + Used in: + ace/OS.h + + Notes: + if not defined, includes <sys/filio.h>. + didn't find any reference to anything in this file in the ACE code. + + Solaris: + filio.h defines FIOCLEX, FIOASYNC, ... as _IO('f', 1), .. + for FIOLFS,.. solaris has this to say: + /* + * ioctl's for Online: DiskSuite. + * WARNING - the support for these ioctls may be withdrawn + * in the future OS releases. + */ + + HPUX: + <sys/ioctl.h> defines FIOASYNC and some other ones, + <sgtty.h> defines some like FIOCLEX. + some are never defined. + use #ifdef HP-UX to modify sysincludes.h + + +ACE_HAS_TEMPLATE_TYPEDEFS: +-------------------------- + + Used in: + libsrc/ASX/*.[Chi] + + Notes: + cfront-based C++ compilers don't implement templates that support + classes with typedefs of other types as formal arguments. This + typedef uses the C++ preprocessor to work around this problem. + +ACE_HAS_THREADS: +---------------- + + Used in: + libsrc/Service_Configurator/Svc_Conf.y.C + libsrc/Service_Configurator/Thread_Spawn.i + libsrc/Threads/Synch.C + libsrc/Threads/Synch.i + libsrc/Threads/Thr_Manager.i + libsrc/ASX/STREAM.C + libsrc/ASX/Queue.C + libsrc/ASX/Module.C + libsrc/ASX/Stream_Modules.C + libsrc/ASX/Multiplexor.C + libsrc/ASX/Message_List.C + include/Message_List.h + include/Module.h + include/Multiplexor.h + include/Queue.h + include/STREAM.h + include/Stream_Modules.h + include/Service_Types.h + include/Thread_Spawn.h + include/Synch.h + include/Thr_Manager.h + + Notes: + We use Message_List.h even in a non-threaded environment. + our XOMessageList.h does this by #ifdefs around Threaded things. + + HPUX: + not until 10.0. + + +ACE_HAS_TIMOD_H: +---------------- + + Used in: + ace/OS.h + + Notes: + if defined, include <sys/timod.h> + + Solaris: + timod is a STREAMS module for use with the Transport Inter- + face (TI) functions of the Network Services library. The + timod module converts a set of ioctl(2) calls into STREAMS + messages that may be consumed by a transport protocol pro- + vider that supports the Transport Interface. This allows a + user to initiate certain TI functions as atomic operations. + + HPUX: + don't set. + + +ACE_HAS_TIUSER_H: +----------------- + + Used in: + ace/OS.h + + Notes: + if set, includes <tiuser.h> + + Solaris: + in conjunction with t_bind, t_accept, etc.. transport layer. + + HPUX: + don't set. + + +ACE_USE_POLL_IMPLEMENTATION: +---------------------------- + + Used in: + libsrc/Reactor/Reactor.i + include/Event_Handler.h + ace/OS.h + include/Reactor.h + + Notes: + in the reactor, use poll instead of select. In general, + good thing to have set. + +ACE_USES_GPROF: +---------------------------- + Used in: + ace/Base_Thread_Adapter.h + ace/Base_Thread_Adapter.inl + ace/Base_Thread_Adapter.cpp + + Notes: + When using gprof mainly on Linux, #define ACE_USES_GPROF + will add calls to getitimer/setitimer in order to initialize profile + timer and overcome the problem of gprof with multithreaded applications. + +ACE_QTREACTOR_CLEAR_PENDING_EVENTS: +---------------------------- + Used in: + ace/QtReactor.cpp: + QtReactor by default does not clear qt events pending for + activated socket. Clearing costs much, at least 2 hash accesses + in ACE, and 2 another in Qt. It is also better to not clear + pending events as some side effects are unknown. However, + when events are not clear, then some user applications may be + confused by handle_input/output/exception called without any + data eg. in ACE_Acceptor::make_svc_handler. This swithc is + intended to quickly fix user application which does not + follow some reactor rules. + Linux: + It seems linux::qt does not queue pending events. Do not define + this switch. + Windows: + Windows::qt queues pending events. If user application has handle_* + methods which cannot be called without data, then turn on this switch + to quickly fix the bug. However, one should seriously fix the + application then. diff --git a/externals/ace/Recursive_Thread_Mutex.h b/externals/ace/Recursive_Thread_Mutex.h index 5b7809afe58..93a25a7bd11 100644 --- a/externals/ace/Recursive_Thread_Mutex.h +++ b/externals/ace/Recursive_Thread_Mutex.h @@ -4,7 +4,7 @@ /** * @file Recursive_Thread_Mutex.h * - * $Id: Recursive_Thread_Mutex.h 89121 2010-02-22 14:48:31Z schmidt $ + * $Id: Recursive_Thread_Mutex.h 91066 2010-07-12 11:05:04Z johnnyw $ * * Moved from Synch.h. * @@ -90,14 +90,14 @@ public: /** * Acquire mutex ownership. This calls <acquire> and is only - * here to make the <ACE_Recusive_Thread_Mutex> interface consistent + * here to make the ACE_Recusive_Thread_Mutex interface consistent * with the other synchronization APIs. */ int acquire_read (void); /** * Acquire mutex ownership. This calls <acquire> and is only - * here to make the <ACE_Recusive_Thread_Mutex> interface consistent + * here to make the ACE_Recusive_Thread_Mutex interface consistent * with the other synchronization APIs. */ int acquire_write (void); @@ -105,7 +105,7 @@ public: /** * Conditionally acquire mutex (i.e., won't block). This calls * <tryacquire> and is only here to make the - * <ACE_Recusive_Thread_Mutex> interface consistent with the other + * ACE_Recusive_Thread_Mutex interface consistent with the other * synchronization APIs. Returns -1 on failure. If we "failed" * because someone else already had the lock, @c errno is set to * @c EBUSY. @@ -115,7 +115,7 @@ public: /** * Conditionally acquire mutex (i.e., won't block). This calls * <tryacquire> and is only here to make the - * <ACE_Recusive_Thread_Mutex> interface consistent with the other + * ACE_Recusive_Thread_Mutex interface consistent with the other * synchronization APIs. Returns -1 on failure. If we "failed" * because someone else already had the lock, @c errno is set to * @c EBUSY. diff --git a/externals/ace/SSL/SSL_Asynch_Stream.cpp b/externals/ace/SSL/SSL_Asynch_Stream.cpp index ab8ec7fbbf9..15c648d18fe 100644 --- a/externals/ace/SSL/SSL_Asynch_Stream.cpp +++ b/externals/ace/SSL/SSL_Asynch_Stream.cpp @@ -2,7 +2,7 @@ ACE_RCSID (ACE_SSL, SSL_Asynch_Stream, - "$Id: SSL_Asynch_Stream.cpp 82574 2008-08-08 19:35:06Z parsons $") + "$Id: SSL_Asynch_Stream.cpp 84181 2009-01-16 22:37:49Z shuston $") // This only works on platforms with Asynchronous IO support. #if OPENSSL_VERSION_NUMBER > 0x0090581fL && ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))) @@ -17,6 +17,10 @@ ACE_RCSID (ACE_SSL, #include "ace/Proactor.h" #include "ace/Truncate.h" +#if !defined(__ACE_INLINE__) +#include "SSL_Asynch_Stream.inl" +#endif /* __ACE_INLINE__ */ + #include <openssl/err.h> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -93,13 +97,13 @@ ACE_SSL_Asynch_Stream::ACE_SSL_Asynch_Stream ( ACE_SSL_Asynch_Stream::Stream_Type s_type, ACE_SSL_Context * context) : type_ (s_type), - handle_ (ACE_INVALID_HANDLE), proactor_ (0), ext_handler_ (0), ext_read_result_ (0), ext_write_result_(0), flags_ (0), ssl_ (0), + handshake_complete_(false), bio_ (0), bio_istream_ (), bio_inp_msg_ (), @@ -260,7 +264,7 @@ ACE_SSL_Asynch_Stream::open (ACE_Handler & handler, // Get a proactor for/from the user. this->proactor_ = this->get_proactor (proactor, handler); this->ext_handler_ = & handler; - this->handle_ = handle; + this->handle (handle); // Open internal input stream if (this->bio_istream_.open (*this, // real callbacks to this @@ -342,7 +346,7 @@ ACE_SSL_Asynch_Stream::read (ACE_Message_Block & message_block, ACE_NEW_RETURN (this->ext_read_result_, ACE_SSL_Asynch_Read_Stream_Result ( *this->ext_handler_, - this->handle_, + this->handle (), message_block, bytes_to_read, act, @@ -385,7 +389,7 @@ ACE_SSL_Asynch_Stream::write (ACE_Message_Block & message_block, ACE_NEW_RETURN (this->ext_write_result_, ACE_SSL_Asynch_Write_Stream_Result ( *this->ext_handler_, - this->handle_, + this->handle (), message_block, bytes_to_write, act, @@ -491,7 +495,18 @@ int ACE_SSL_Asynch_Stream::do_SSL_handshake (void) { if (SSL_is_init_finished (this->ssl_)) - return 1; + { + if (!handshake_complete_) + { + handshake_complete_ = true; + + if (!post_handshake_check ()) + { + return -1; + } + } + return 1; + } if (this->flags_ & SF_REQ_SHUTDOWN) return -1; @@ -541,6 +556,13 @@ ACE_SSL_Asynch_Stream::do_SSL_handshake (void) return 1; } + +bool +ACE_SSL_Asynch_Stream::post_handshake_check (void) +{ + return true; +} + // ************************************************************ // Perform SSL_read call if necessary and notify user // ************************************************************ @@ -768,7 +790,7 @@ ACE_SSL_Asynch_Stream::print_error (int err_ssl, const ACE_TCHAR * pText) { ACE_DEBUG ((LM_DEBUG, - "SSL-error:%d %s\n" , + ACE_TEXT("SSL-error:%d %s\n"), err_ssl, pText)); @@ -781,7 +803,7 @@ ACE_SSL_Asynch_Stream::print_error (int err_ssl, { ERR_error_string_n (lerr, buf, sizeof buf); - ACE_DEBUG ((LM_DEBUG, "%s\n", buf)); + ACE_DEBUG ((LM_DEBUG, "%C\n", buf)); } #endif /* OPENSSL_VERSION_NUMBER */ } diff --git a/externals/ace/SSL/SSL_Asynch_Stream.h b/externals/ace/SSL/SSL_Asynch_Stream.h index faae6112cdb..af82300a428 100644 --- a/externals/ace/SSL/SSL_Asynch_Stream.h +++ b/externals/ace/SSL/SSL_Asynch_Stream.h @@ -4,7 +4,7 @@ /** * @file SSL_Asynch_Stream.h * - * $Id: SSL_Asynch_Stream.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: SSL_Asynch_Stream.h 84181 2009-01-16 22:37:49Z shuston $ * * @author Alexander Libman <alibman@baltimore.com> */ @@ -185,6 +185,9 @@ public: int close (void); + /// Return a pointer to the underlying SSL structure. + SSL *ssl (void) const; + /** * Initializes the factory with information which will be used with * each asynchronous call. @@ -295,6 +298,40 @@ protected: virtual void handle_wakeup (void); /** + * This method will be called after a successful SSL handshake indicating + * that the peer's certificate chain (if any) has been verified and the key + * exchange has completed. When a peer certificate is required, this + * method must be used to perform additional checks beyond the verification + * performed by OpenSSL. + * + * Check 1: + * + * SSL clients that require a peer certificate must specify SSL_VERIFY_PEER + * via ACE_SSL_Context::default_verify_mode. If the peer sends an invalid + * certificate, the SSL handshake will fail; however, if the peer does not + * send a certificate, the SSL handshake will complete successfully which + * may not be acceptable. In this case, you must override this method in a + * subclass and return false if the call to SSL_get_peer_certificate returns + * null. + * + * Check 2: + * + * An additional post handshake check that you should perform is to verify + * the certificate's FQDN against the host address you intended to connect + * to. This check will prevent an attacker from using a certificate signed + * by your CA to usurp your session. For further info on this check, see + * the post_connection_check method in Example 5-8 of 'Network Security with + * OpenSSL' by Viega, et. al. + * + * Return: + * + * false - Terminate the connection. Outstanding IO complete with ERR_CANCELED. + * + * true - Proceed with connection. The default implementation returns true. + */ + virtual bool post_handshake_check (void); + + /** * @name SSL State Machine */ //@{ @@ -342,9 +379,6 @@ protected: /// Stream Type ST_CLIENT/ST_SERVER Stream_Type type_; - /// The real file/socket handle - ACE_HANDLE handle_; - /// The proactor ACE_Proactor * proactor_; @@ -377,6 +411,9 @@ protected: /// The SSL session. SSL * ssl_; + /// Flag ensures that post_connection_check() is called at most one time. + bool handshake_complete_; + /// The BIO implementation BIO * bio_; @@ -417,6 +454,10 @@ protected: ACE_END_VERSIONED_NAMESPACE_DECL +#if defined(__ACE_INLINE__) +#include "SSL_Asynch_Stream.inl" +#endif /* __ACE_INLINE__ */ + #endif /* OPENSSL_VERSION_NUMBER > 0x0090581fL && (ACE_WIN32 || ACE_HAS_AIO_CALLS) */ diff --git a/externals/ace/SSL/SSL_Asynch_Stream.inl b/externals/ace/SSL/SSL_Asynch_Stream.inl new file mode 100644 index 00000000000..d9d0db95596 --- /dev/null +++ b/externals/ace/SSL/SSL_Asynch_Stream.inl @@ -0,0 +1,13 @@ +// -*- C++ -*- +// +// $Id: SSL_Asynch_Stream.inl 83916 2008-11-28 16:32:21Z johnnyw $ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE SSL * +ACE_SSL_Asynch_Stream::ssl (void) const +{ + return this->ssl_; +} + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/SSL/SSL_Context.cpp b/externals/ace/SSL/SSL_Context.cpp index 72f02e3dc70..c7915797c37 100644 --- a/externals/ace/SSL/SSL_Context.cpp +++ b/externals/ace/SSL/SSL_Context.cpp @@ -28,7 +28,7 @@ ACE_RCSID (ACE_SSL, SSL_Context, - "$Id: SSL_Context.cpp 82574 2008-08-08 19:35:06Z parsons $") + "$Id: SSL_Context.cpp 85202 2009-04-28 18:52:57Z johnnyw $") namespace @@ -112,6 +112,7 @@ ACE_SSL_Context::ACE_SSL_Context (void) : context_ (0), mode_ (-1), default_verify_mode_ (SSL_VERIFY_NONE), + default_verify_callback_ (0), have_ca_ (0) { ACE_SSL_Context::ssl_library_init (); @@ -131,7 +132,7 @@ ACE_SSL_Context::~ACE_SSL_Context (void) ACE_SSL_Context * ACE_SSL_Context::instance (void) { - return ACE_Singleton<ACE_SSL_Context, ACE_SYNCH_MUTEX>::instance (); + return ACE_Unmanaged_Singleton<ACE_SSL_Context, ACE_SYNCH_MUTEX>::instance (); } void @@ -181,15 +182,15 @@ ACE_SSL_Context::ssl_library_init (void) (void) this->egd_file (egd_socket_file); #endif /* OPENSSL_VERSION_NUMBER */ - const char *rand_file = - ACE_OS::getenv (ACE_SSL_RAND_FILE_ENV); + const char *rand_file = ACE_OS::getenv (ACE_SSL_RAND_FILE_ENV); if (rand_file != 0) - (void) this->seed_file (rand_file); + { + (void) this->seed_file (rand_file); + } // Initialize the mutexes that will be used by the SSL and // crypto library. - } ++ssl_library_init_count; @@ -205,6 +206,9 @@ ACE_SSL_Context::ssl_library_fini (void) --ssl_library_init_count; if (ssl_library_init_count == 0) { + // Explicitly close the singleton + ACE_Unmanaged_Singleton<ACE_SSL_Context, ACE_SYNCH_MUTEX>::close(); + ::ERR_free_strings (); ::EVP_cleanup (); @@ -232,7 +236,11 @@ ACE_SSL_Context::set_mode (int mode) if (this->context_ != 0) return -1; +#if OPENSSL_VERSION_NUMBER >= 0x10000002 + const SSL_METHOD *method = 0; +#else SSL_METHOD *method = 0; +#endif switch (mode) { @@ -305,16 +313,20 @@ ACE_SSL_Context::load_trusted_ca (const char* ca_file, { // Use the default environment settings. ca_file = ACE_OS::getenv (ACE_SSL_CERT_FILE_ENV); +#ifdef ACE_DEFAULT_SSL_CERT_FILE if (ca_file == 0) ca_file = ACE_DEFAULT_SSL_CERT_FILE; +#endif } if (ca_dir == 0 && use_env_defaults) { // Use the default environment settings. ca_dir = ACE_OS::getenv (ACE_SSL_CERT_DIR_ENV); +#ifdef ACE_DEFAULT_SSL_CERT_DIR if (ca_dir == 0) ca_dir = ACE_DEFAULT_SSL_CERT_DIR; +#endif } // NOTE: SSL_CTX_load_verify_locations() returns 0 on error. @@ -566,7 +578,12 @@ ACE_SSL_Context::report_error (unsigned long error_code) char error_string[256]; +// OpenSSL < 0.9.6a doesn't have ERR_error_string_n() function. +#if OPENSSL_VERSION_NUMBER >= 0x0090601fL + (void) ::ERR_error_string_n (error_code, error_string, sizeof error_string); +#else /* OPENSSL_VERSION_NUMBER >= 0x0090601fL */ (void) ::ERR_error_string (error_code, error_string); +#endif /* OPENSSL_VERSION_NUMBER >= 0x0090601fL */ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_SSL (%P|%t) error code: %u - %C\n"), diff --git a/externals/ace/SSL/SSL_Context.h b/externals/ace/SSL/SSL_Context.h index bc3cb329042..003d6042c5b 100644 --- a/externals/ace/SSL/SSL_Context.h +++ b/externals/ace/SSL/SSL_Context.h @@ -4,7 +4,7 @@ /** * @file SSL_Context.h * - * $Id: SSL_Context.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: SSL_Context.h 83916 2008-11-28 16:32:21Z johnnyw $ * * @author Carlos O'Ryan <coryan@ece.uci.edu> * @author Ossama Othman <ossama@dre.vanderbilt.edu> @@ -264,7 +264,6 @@ public: */ void set_verify_peer (int strict = 0, int once = 1, int depth = 0); - /// TODO: a implementation that will lookup the CTX table for the list /// of files and paths etc. /// Query the location of trusted certification authority @@ -281,6 +280,14 @@ public: int default_verify_mode (void) const; /** + * Set and query the default verify callback for this context, it is + * inherited by all the ACE_SSL objects created using the context. + * It can be overriden on a per-ACE_SSL object. + */ + void default_verify_callback (int (*callback) (int, X509_STORE_CTX *)); + int (*default_verify_callback(void) const) (int,X509_STORE_CTX *); + + /** * @name OpenSSL Random Number Generator Seed Related Methods * * These are methods that can be used to seed OpenSSL's @@ -354,7 +361,7 @@ private: /// Cache the mode so we can answer fast int mode_; - /// The private key, certificate, and Diffie-Hellman paramters files + /// The private key, certificate, and Diffie-Hellman parameters files ACE_SSL_Data_File private_key_; ACE_SSL_Data_File certificate_; ACE_SSL_Data_File dh_params_; @@ -362,6 +369,9 @@ private: /// The default verify mode. int default_verify_mode_; + /// The default verify callback. + int (*default_verify_callback_)(int, X509_STORE_CTX *); + /// count of successful CA load attempts int have_ca_; diff --git a/externals/ace/SSL/SSL_Context.inl b/externals/ace/SSL/SSL_Context.inl index 990eab38293..7ecb3e0627e 100644 --- a/externals/ace/SSL/SSL_Context.inl +++ b/externals/ace/SSL/SSL_Context.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SSL_Context.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: SSL_Context.inl 83916 2008-11-28 16:32:21Z johnnyw $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -40,7 +40,8 @@ ACE_SSL_Context::check_context (void) this->set_mode (); } - ::SSL_CTX_set_verify (this->context_, this->default_verify_mode (), 0); + ::SSL_CTX_set_verify (this->context_, this->default_verify_mode (), + this->default_verify_callback ()); } ACE_INLINE SSL_CTX * @@ -98,6 +99,17 @@ ACE_SSL_Context::default_verify_mode (void) const return this->default_verify_mode_; } +ACE_INLINE void +ACE_SSL_Context::default_verify_callback (int (*callback) (int, X509_STORE_CTX*)) +{ + this->default_verify_callback_ = callback; +} + +ACE_INLINE int (*ACE_SSL_Context::default_verify_callback(void) const)(int,X509_STORE_CTX *) +{ + return this->default_verify_callback_; +} + ACE_INLINE int ACE_SSL_Context::get_mode (void) const { diff --git a/externals/ace/SSL/SSL_Export.h b/externals/ace/SSL/SSL_Export.h index 59bd892e7fd..9e0028a9d50 100644 --- a/externals/ace/SSL/SSL_Export.h +++ b/externals/ace/SSL/SSL_Export.h @@ -6,7 +6,6 @@ // ------------------------------ #if !defined (ACE_SSL_EXPORT_H) #define ACE_SSL_EXPORT_H -#define ACE_SSL_BUILD_DLL #include /**/ "ace/config-all.h" diff --git a/externals/ace/SSL/SSL_SOCK_Acceptor.cpp b/externals/ace/SSL/SSL_SOCK_Acceptor.cpp index 2ee8aa419b6..e94c988a392 100644 --- a/externals/ace/SSL/SSL_SOCK_Acceptor.cpp +++ b/externals/ace/SSL/SSL_SOCK_Acceptor.cpp @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SSL_SOCK_Acceptor.cpp 82577 2008-08-09 17:43:11Z mitza $ +// $Id: SSL_SOCK_Acceptor.cpp 82723 2008-09-16 09:35:44Z johnnyw $ #include "SSL_SOCK_Acceptor.h" @@ -19,7 +19,7 @@ ACE_RCSID (ACE_SSL, SSL_SOCK_Acceptor, - "$Id: SSL_SOCK_Acceptor.cpp 82577 2008-08-09 17:43:11Z mitza $") + "$Id: SSL_SOCK_Acceptor.cpp 82723 2008-09-16 09:35:44Z johnnyw $") ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -176,8 +176,8 @@ int ACE_SSL_SOCK_Acceptor::accept (ACE_SSL_SOCK_Stream &new_stream, ACE_Addr *remote_addr, ACE_Time_Value *timeout, - int restart, - int reset_new_handle) const + bool restart, + bool reset_new_handle) const { ACE_TRACE ("ACE_SSL_SOCK_Acceptor::accept"); @@ -214,8 +214,8 @@ ACE_SSL_SOCK_Acceptor::accept (ACE_SSL_SOCK_Stream &new_stream, ACE_Accept_QoS_Params qos_params, ACE_Addr *remote_addr, ACE_Time_Value *timeout, - int restart, - int reset_new_handle) const + bool restart, + bool reset_new_handle) const { ACE_TRACE ("ACE_SSL_SOCK_Acceptor::accept"); diff --git a/externals/ace/SSL/SSL_SOCK_Acceptor.h b/externals/ace/SSL/SSL_SOCK_Acceptor.h index 997378bf329..11f00651a73 100644 --- a/externals/ace/SSL/SSL_SOCK_Acceptor.h +++ b/externals/ace/SSL/SSL_SOCK_Acceptor.h @@ -4,7 +4,7 @@ /** * @file SSL_SOCK_Acceptor.h * - * $Id: SSL_SOCK_Acceptor.h 81826 2008-06-02 15:29:53Z schmidt $ + * $Id: SSL_SOCK_Acceptor.h 82723 2008-09-16 09:35:44Z johnnyw $ * * @author John Heitmann * @author Chris Zimman @@ -138,8 +138,8 @@ public: int accept (ACE_SSL_SOCK_Stream &new_stream, ACE_Addr *remote_addr = 0, ACE_Time_Value *timeout = 0, - int restart = 1, - int reset_new_handle = 0) const; + bool restart = true, + bool reset_new_handle = false) const; /** * Accept a new ACE_SSL_SOCK_Stream connection using the RVSP QoS @@ -160,8 +160,8 @@ public: ACE_Accept_QoS_Params qos_params, ACE_Addr *remote_addr = 0, ACE_Time_Value *timeout = 0, - int restart = 1, - int reset_new_handle = 0) const; + bool restart = true, + bool reset_new_handle = false) const; //@} /// Meta-type info diff --git a/externals/ace/SSL/SSL_SOCK_Acceptor.inl b/externals/ace/SSL/SSL_SOCK_Acceptor.inl index 318d66d5c25..d0833a309fc 100644 --- a/externals/ace/SSL/SSL_SOCK_Acceptor.inl +++ b/externals/ace/SSL/SSL_SOCK_Acceptor.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SSL_SOCK_Acceptor.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: SSL_SOCK_Acceptor.inl 84619 2009-02-26 12:26:16Z johnnyw $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -76,7 +76,7 @@ ACE_SSL_SOCK_Acceptor::close (void) { ACE_TRACE ("ACE_SSL_SOCK_Acceptor::close ()"); - int result = this->acceptor_.close (); + int const result = this->acceptor_.close (); this->set_handle (ACE_INVALID_HANDLE); return result; diff --git a/externals/ace/SSL/SSL_SOCK_Connector.h b/externals/ace/SSL/SSL_SOCK_Connector.h index f1708bf127d..2641bb6f703 100644 --- a/externals/ace/SSL/SSL_SOCK_Connector.h +++ b/externals/ace/SSL/SSL_SOCK_Connector.h @@ -4,7 +4,7 @@ /** * @file SSL_SOCK_Connector.h * - * $Id: SSL_SOCK_Connector.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: SSL_SOCK_Connector.h 84816 2009-03-13 08:16:32Z johnnyw $ * * @author Ossama Othman <ossama@uci.edu> * @author Carlos O'Ryan <coryan@uci.edu> @@ -86,7 +86,7 @@ public: * amount of time passes before the connection is made, * this method returns -1 and errno == ETIME. Note * the difference between this case and when a blocking - * connect is attmpted that TCP times out - in the latter + * connect is attempted that TCP times out - in the latter * case, errno will be ETIMEDOUT. * @param local_sap (optional) The local address to bind to. If it's * the default value of @c ACE_Addr::sap_any then the @@ -137,7 +137,7 @@ public: * amount of time passes before the connection is made, * this method returns -1 and errno == ETIME. Note * the difference between this case and when a blocking - * connect is attmpted that TCP times out - in the latter + * connect is attempted that TCP times out - in the latter * case, errno will be ETIMEDOUT. * @param local_sap (optional) The local address to bind to. If it's * the default value of @c ACE_Addr::sap_any then the @@ -191,7 +191,7 @@ public: * amount of time passes before the connection is made, * this method returns -1 and errno == ETIME. Note * the difference between this case and when a blocking - * connect is attmpted that TCP times out - in the latter + * connect is attempted that TCP times out - in the latter * case, errno will be ETIMEDOUT. * @param local_sap (optional) The local address to bind to. If it's * the default value of @c ACE_Addr::sap_any then the @@ -242,7 +242,7 @@ public: * amount of time passes before the connection is made, * this method returns -1 and errno == ETIME. Note * the difference between this case and when a blocking - * connect is attmpted that TCP times out - in the latter + * connect is attempted that TCP times out - in the latter * case, errno will be ETIMEDOUT. * @param local_sap (optional) The local address to bind to. If it's * the default value of @c ACE_Addr::sap_any then the @@ -279,7 +279,7 @@ public: const ACE_Time_Value *timeout = 0); /// Resets any event associations on this handle - int reset_new_handle (ACE_HANDLE handle); + bool reset_new_handle (ACE_HANDLE handle); /// Meta-type info //@{ diff --git a/externals/ace/SSL/SSL_SOCK_Connector.inl b/externals/ace/SSL/SSL_SOCK_Connector.inl index 58978966dcf..b2be51dd13a 100644 --- a/externals/ace/SSL/SSL_SOCK_Connector.inl +++ b/externals/ace/SSL/SSL_SOCK_Connector.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SSL_SOCK_Connector.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: SSL_SOCK_Connector.inl 82728 2008-09-16 10:22:28Z johnnyw $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -11,7 +11,7 @@ ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector (void) ACE_TRACE ("ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector"); } -ACE_INLINE int +ACE_INLINE bool ACE_SSL_SOCK_Connector::reset_new_handle (ACE_HANDLE handle) { ACE_TRACE ("ACE_SSL_SOCK_Connector::reset_new_handle"); diff --git a/externals/ace/SSL/SSL_SOCK_Stream.h b/externals/ace/SSL/SSL_SOCK_Stream.h index be78b924299..15c5297414b 100644 --- a/externals/ace/SSL/SSL_SOCK_Stream.h +++ b/externals/ace/SSL/SSL_SOCK_Stream.h @@ -4,7 +4,7 @@ /** * @file SSL_SOCK_Stream.h * - * $Id: SSL_SOCK_Stream.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: SSL_SOCK_Stream.h 91103 2010-07-15 12:36:57Z mcorino $ * * @author Ossama Othman <ossama@uci.edu> * @author Carlos O'Ryan <coryan@uci.edu> @@ -207,6 +207,18 @@ public: size_t *bytes_transferred = 0) const; /** + * Try to send exactly len bytes into buf (uses the send() call). + * If send() blocks for longer than timeout the number of bytes + * actually sent is returned with errno == ETIME. If a timeout does + * not occur, send_n() return len (i.e., the number of bytes + * requested to be sent). + */ + ssize_t send_n (const void *buf, + size_t len, + const ACE_Time_Value *timeout, + size_t *bytes_transferred = 0) const; + + /** * Try to receive exactly len bytes into buf (uses the recv() call). * The ACE_Time_Value indicates how long to blocking trying to * receive. If timeout == 0, the caller will block until action is @@ -221,6 +233,21 @@ public: int flags, const ACE_Time_Value *timeout, size_t *bytes_transferred = 0) const; + + /** + * Try to receive exactly len bytes into buf (uses the recv() call). + * The ACE_Time_Value indicates how long to blocking trying to + * receive. If timeout == 0, the caller will block until action is + * possible, else will wait until the relative time specified in + * timeout elapses). If recv() blocks for longer than timeout the + * number of bytes actually read is returned with errno == ETIME. + * If a timeout does not occur, recv_n return len (i.e., the number + * of bytes requested to be read). + */ + ssize_t recv_n (void *buf, + size_t len, + const ACE_Time_Value *timeout, + size_t *bytes_transferred = 0) const; //@} /** diff --git a/externals/ace/SSL/SSL_SOCK_Stream.inl b/externals/ace/SSL/SSL_SOCK_Stream.inl index 71661308f61..9f071cf4102 100644 --- a/externals/ace/SSL/SSL_SOCK_Stream.inl +++ b/externals/ace/SSL/SSL_SOCK_Stream.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: SSL_SOCK_Stream.inl 82579 2008-08-10 23:03:06Z mitza $ +// $Id: SSL_SOCK_Stream.inl 91103 2010-07-15 12:36:57Z mcorino $ #include "ace/OS_NS_errno.h" #include "ace/Truncate.h" @@ -252,12 +252,32 @@ ACE_SSL_SOCK_Stream::recv_n (void *buf, int buf_size) const } ACE_INLINE ssize_t +ACE_SSL_SOCK_Stream::recv_n (void *buf, + size_t len, + const ACE_Time_Value *timeout, + size_t *bytes_transferred) const +{ + ACE_TRACE ("ACE_SSL_SOCK_Stream::recv_n"); + return this->recv_n (buf, len, 0, timeout, bytes_transferred); +} + +ACE_INLINE ssize_t ACE_SSL_SOCK_Stream::send_n (const void *buf, int len) const { ACE_TRACE ("ACE_SSL_SOCK_Stream::send_n"); return this->send_n (buf, len, 0); } +ACE_INLINE ssize_t +ACE_SSL_SOCK_Stream::send_n (const void *buf, + size_t len, + const ACE_Time_Value *timeout, + size_t *bytes_transferred) const +{ + ACE_TRACE ("ACE_SSL_SOCK_Stream::send_n"); + return this->send_n (buf, len, 0, timeout, bytes_transferred); +} + ACE_INLINE int ACE_SSL_SOCK_Stream::close_reader (void) { diff --git a/externals/ace/SSL/sslconf.h b/externals/ace/SSL/sslconf.h index c4ba34797c4..4da812cbc7d 100644 --- a/externals/ace/SSL/sslconf.h +++ b/externals/ace/SSL/sslconf.h @@ -4,7 +4,7 @@ /** * @file sslconf.h * - * $Id: sslconf.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: sslconf.h 83879 2008-11-26 10:46:30Z smcqueen $ * * @author Carlos O'Ryan <coryan@ece.uci.edu> */ @@ -19,19 +19,21 @@ #include /**/ "ace/config-all.h" #if !defined (ACE_DEFAULT_SSL_CERT_FILE) -# ifdef WIN32 -# define ACE_DEFAULT_SSL_CERT_FILE "cert.pem" -# else -# define ACE_DEFAULT_SSL_CERT_FILE "/etc/ssl/cert.pem" -# endif /* WIN32 */ +// Define a default CA certificate filename here if required e.g.: +// # ifdef WIN32 +// # define ACE_DEFAULT_SSL_CERT_FILE "cert.pem" +// # else +// # define ACE_DEFAULT_SSL_CERT_FILE "/etc/ssl/cert.pem" +// # endif /* WIN32 */ #endif /* ACE_DEFAULT_SSL_CERT_FILE */ #if !defined (ACE_DEFAULT_SSL_CERT_DIR) -# ifdef WIN32 -# define ACE_DEFAULT_SSL_CERT_DIR "certs" -# else -# define ACE_DEFAULT_SSL_CERT_DIR "/etc/ssl/certs" -# endif /* WIN32 */ +// Define a default CA certificate files directory here if required. e.g.: +// # ifdef WIN32 +// # define ACE_DEFAULT_SSL_CERT_DIR "certs" +// # else +// # define ACE_DEFAULT_SSL_CERT_DIR "/etc/ssl/certs" +// # endif /* WIN32 */ #endif /* ACE_DEFAULT_SSL_CERT_DIR */ #if !defined (ACE_SSL_CERT_FILE_ENV) diff --git a/externals/ace/SString.h b/externals/ace/SString.h index 3efe80af203..e7ff8ea7872 100644 --- a/externals/ace/SString.h +++ b/externals/ace/SString.h @@ -4,7 +4,7 @@ /** * @file SString.h * - * $Id: SString.h 86289 2009-07-30 03:40:46Z hillj $ + * $Id: SString.h 91058 2010-07-12 08:20:09Z johnnyw $ * * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) */ @@ -145,7 +145,7 @@ public: /// Constructor that copies @a s into dynamically allocated memory. ACE_SString (const char *s, ACE_Allocator *alloc = 0); - /// Constructor that copies @a len chars of @s into dynamically + /// Constructor that copies @a len chars of @a s into dynamically /// allocated memory (will NUL terminate the result). ACE_SString (const char *s, size_type len, ACE_Allocator *alloc = 0); @@ -195,7 +195,7 @@ public: /// Get the underlying pointer. const char *fast_rep (void) const; - /// Same as STL String's <c_str> and <fast_rep>. + /// Same as STL String's c_str() and fast_rep(). const char *c_str (void) const; /// Comparison operator that will match substrings. Returns the @@ -230,7 +230,7 @@ public: /// Inequality comparison operator. bool operator != (const ACE_SString &s) const; - /// Performs a <strcmp>-style comparison. + /// Performs a strcmp()-style comparison. int compare (const ACE_SString &s) const; /// Dump the state of an object. @@ -243,7 +243,7 @@ private: /// Pointer to a memory allocator. ACE_Allocator *allocator_; - /// Length of the ACE_SString (not counting the trailing '\0'). + /// Length of the ACE_SString (not counting the trailing '\\0'). size_type len_; /// Pointer to data. diff --git a/externals/ace/Select_Reactor_Base.cpp b/externals/ace/Select_Reactor_Base.cpp index 225c9f7f9f1..5ffb8a53247 100644 --- a/externals/ace/Select_Reactor_Base.cpp +++ b/externals/ace/Select_Reactor_Base.cpp @@ -1,4 +1,4 @@ -// $Id: Select_Reactor_Base.cpp 88832 2010-02-04 09:57:42Z johnnyw $ +// $Id: Select_Reactor_Base.cpp 90989 2010-07-05 11:22:50Z johnnyw $ #include "ace/Select_Reactor_Base.h" #include "ace/Reactor.h" @@ -20,7 +20,7 @@ ACE_RCSID (ace, Select_Reactor_Base, - "$Id: Select_Reactor_Base.cpp 88832 2010-02-04 09:57:42Z johnnyw $") + "$Id: Select_Reactor_Base.cpp 90989 2010-07-05 11:22:50Z johnnyw $") ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -83,7 +83,7 @@ ACE_Select_Reactor_Handler_Repository::handle_in_range (ACE_HANDLE handle) } int -ACE_Select_Reactor_Handler_Repository::open (size_t size) +ACE_Select_Reactor_Handler_Repository::open (size_type size) { ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::open"); diff --git a/externals/ace/Service_Gestalt.cpp b/externals/ace/Service_Gestalt.cpp index 8b3f8b8ed3c..47ea3d1e81b 100644 --- a/externals/ace/Service_Gestalt.cpp +++ b/externals/ace/Service_Gestalt.cpp @@ -1,4 +1,4 @@ -// $Id: Service_Gestalt.cpp 89501 2010-03-17 08:59:56Z vzykov $ +// $Id: Service_Gestalt.cpp 91158 2010-07-21 15:54:12Z mesnier_p $ #include "ace/Svc_Conf.h" #include "ace/Get_Opt.h" @@ -31,7 +31,7 @@ ACE_RCSID (ace, Service_Gestalt, - "$Id: Service_Gestalt.cpp 89501 2010-03-17 08:59:56Z vzykov $") + "$Id: Service_Gestalt.cpp 91158 2010-07-21 15:54:12Z mesnier_p $") ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -259,32 +259,6 @@ ACE_Service_Gestalt::init_i (void) if (init_svc_conf_file_queue () == -1) return -1; - if ( svc_conf_file_queue_->is_empty ()) - { - // Check if the default file exists before attempting to queue it - // for processing - FILE *fp = ACE_OS::fopen (ACE_DEFAULT_SVC_CONF, - ACE_TEXT ("r")); - bool skip_static_svcs = (fp == 0); - if (fp != 0) - ACE_OS::fclose (fp); - - if (!skip_static_svcs) { - // Load the default "svc.conf" entry here if there weren't - // overriding -f arguments in <parse_args>. - if (svc_conf_file_queue_->enqueue_tail - (ACE_TString (ACE_DEFAULT_SVC_CONF)) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("enqueuing ") - ACE_DEFAULT_SVC_CONF - ACE_TEXT(" file")), - -1); - } - } - } - return 0; } @@ -1086,19 +1060,62 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR program_name[], ACE_Log_Msg::disable_debug_messages (); } + if (!ignore_default_svc_conf_file) + { + bool add_default = true; + bool has_files = this->svc_conf_file_queue_ && + !this->svc_conf_file_queue_->is_empty (); + bool has_cmdline = this->svc_queue_ && !this->svc_queue_->is_empty (); + if (has_files || has_cmdline) + { + // check if default file is already listed + ACE_TString *sptr = 0; + ACE_TString default_svc_conf (ACE_DEFAULT_SVC_CONF); + + for (ACE_SVC_QUEUE_ITERATOR iter (*this->svc_conf_file_queue_); + iter.next (sptr) != 0 && add_default; + iter.advance ()) + { + add_default = (*sptr != default_svc_conf); + } + + if (add_default) + { + FILE *fp = ACE_OS::fopen (ACE_DEFAULT_SVC_CONF, ACE_TEXT ("r")); + if (fp != 0) + ACE_OS::fclose(fp); + else + add_default = false; + + } + } + + // Load the default "svc.conf" entry. here if there weren't + // overriding -f arguments in <parse_args>. + if (add_default && svc_conf_file_queue_->enqueue_head + (ACE_TString (ACE_DEFAULT_SVC_CONF)) == -1) + { + errno = ENOENT; + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("enqueuing ") + ACE_DEFAULT_SVC_CONF + ACE_TEXT(" file")), + -1); + } + } + // See if we need to load the static services. if (this->no_static_svcs_ == 0 && this->load_static_svcs () == -1) result = -1; else { - if (this->process_directives (ignore_default_svc_conf_file) == -1) - result = -1; - else + result = this->process_directives (); + if (result != -1 || errno == ENOENT) result = this->process_commandline_directives (); } - // Reset debugging back to the way it was when we came into // into <open_i>. { @@ -1230,17 +1247,16 @@ ACE_Service_Gestalt::parse_args_i (int argc, // Process service configuration directives from the files queued for // processing int -ACE_Service_Gestalt::process_directives (bool ignore_default_svc_conf_file) +ACE_Service_Gestalt::process_directives (bool ) { ACE_TRACE ("ACE_Service_Gestalt::process_directives"); - if (this->svc_conf_file_queue_ == 0 - || this->svc_conf_file_queue_->is_empty ()) - return 0; + || this->svc_conf_file_queue_->is_empty ()) + { + return 0; + } ACE_TString *sptr = 0; - ACE_TString default_svc_conf (ACE_DEFAULT_SVC_CONF); - int failed = 0; // Iterate through all the svc.conf files. @@ -1248,9 +1264,6 @@ ACE_Service_Gestalt::process_directives (bool ignore_default_svc_conf_file) iter.next (sptr) != 0; iter.advance ()) { - if (*sptr == default_svc_conf && ignore_default_svc_conf_file) - continue; - int result = this->process_file (sptr->fast_rep ()); if (result < 0) return result; diff --git a/externals/ace/Service_Gestalt.h b/externals/ace/Service_Gestalt.h index a4bbbcbcda9..68a2ce7e7cc 100644 --- a/externals/ace/Service_Gestalt.h +++ b/externals/ace/Service_Gestalt.h @@ -4,7 +4,7 @@ /** * @file Service_Gestalt.h * - * $Id: Service_Gestalt.h 89501 2010-03-17 08:59:56Z vzykov $ + * $Id: Service_Gestalt.h 91158 2010-07-21 15:54:12Z mesnier_p $ * * @author Iliyan Jeliazkov <iliyan@ociweb.com> */ @@ -154,11 +154,19 @@ public: * specifies service directives without the need for a configuration * file. Can be specified multiple times. * - * Note: Options '-f' and '-S' complement each other. Directives from files - * and from '-S' option are processed together in the following order. First, - * all files are processed in the order they are specified in @a argv - * parameter. Second, all directive strings are executed in the order the - * directives appear in @a argv parameter. + * Note: Options '-f' and '-S' complement each other. Directives + * from files and from '-S' option are processed together in the + * following order. First, the default file "./svc.conf" is + * evaluated if not ignored, then all files are processed in the + * order they are specified in '-f' @a argv parameter. Finally, all + * '-S' directive strings are executed in the order the directives + * appear in @a argv parameter. + * + * If no files or directives are added via the '-f' and '-S' + * arguments, and the default file is not ignored, it will be + * evaluated whether it exists or not, possibly causing a failure + * return. If any other directives are added then the default file + * will be evaluated only if it exists. * * @param argc The number of commandline arguments. * @param argv The array with commandline arguments @@ -167,16 +175,16 @@ public: * socket address. * @param ignore_static_svcs If true then static services are not loaded, * otherwise, they are loaded. - * @param ignore_default_svc_conf_file If false then the @c svc.conf + * @param ignore_default_svc_conf_file If false then the @c ./svc.conf * configuration file will be ignored. * @param ignore_debug_flag If false then the application is responsible * for setting the @c ACE_Log_Msg::priority_mask * appropriately. * - * @retval -1 The configuration file is not found or cannot + * @retval -1 A configuration file is not found or cannot * be opened (errno is set accordingly). * @retval 0 Success. - * @retval >0 The number of errors encountered while processing + * @retval >0 The number of directive errors encountered while processing * the service configuration file(s). */ int open (int argc, @@ -252,7 +260,7 @@ public: * provided in the svc.conf file(s). Returns the number of errors * that occurred. */ - int process_directives (bool ignore_default_svc_conf_file); + int process_directives (bool defunct_option = false); /// Tidy up and perform last rites when ACE_Service_Config is shut /// down. This method calls @c close_svcs. Returns 0. @@ -335,13 +343,13 @@ protected: bool& ignore_default_svc_conf_file); /** - * Performs an open without parsing command-line arguments. The - * @a logger_key indicates where to write the logging output, which - * is typically either a STREAM pipe or a socket address. If - * @a ignore_default_svc_conf_file is non-0 then the "svc.conf" file - * will be ignored. If @a ignore_debug_flag is non-0 then the - * application is responsible for setting the - * @c ACE_Log_Msg::priority_mask() appropriately. Returns number of + * Performs an open without parsing command-line arguments. The @a + * logger_key indicates where to write the logging output, which is + * typically either a STREAM pipe or a socket address. If @a + * ignore_default_svc_conf_file is non-0 then the "svc.conf" file + * will not be added by default. If @a ignore_debug_flag is non-0 + * then the application is responsible for setting the @c + * ACE_Log_Msg::priority_mask() appropriately. Returns number of * errors that occurred on failure and 0 otherwise. */ int open_i (const ACE_TCHAR program_name[], diff --git a/externals/ace/Service_Gestalt.inl b/externals/ace/Service_Gestalt.inl index 696dbf18d96..436037b71a1 100644 --- a/externals/ace/Service_Gestalt.inl +++ b/externals/ace/Service_Gestalt.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Service_Gestalt.inl 83780 2008-11-17 08:37:37Z johnnyw $ +// $Id: Service_Gestalt.inl 91158 2010-07-21 15:54:12Z mesnier_p $ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -36,6 +36,8 @@ ACE_Service_Gestalt::open (int argc, { ACE_TRACE ("ACE_Service_Gestalt::open"); + // Parsing argv may change no_static_svcs_ so set the default here, then + // parse, then pass the final value to open_i(). this->no_static_svcs_ = ignore_static_svcs; if (this->parse_args_i (argc, @@ -45,7 +47,7 @@ ACE_Service_Gestalt::open (int argc, return this->open_i (argv == 0 ? 0 : argv[0], logger_key, - ignore_static_svcs, + this->no_static_svcs_, ignore_default_svc_conf, ignore_debug_flag); } diff --git a/externals/ace/Service_Repository.h b/externals/ace/Service_Repository.h index efd80bc78dc..9d03b113381 100644 --- a/externals/ace/Service_Repository.h +++ b/externals/ace/Service_Repository.h @@ -4,7 +4,7 @@ /** * @file Service_Repository.h * - * $Id: Service_Repository.h 85007 2009-04-01 14:11:03Z johnnyw $ + * $Id: Service_Repository.h 91016 2010-07-06 11:29:50Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -96,11 +96,11 @@ public: * Locate a named entry in the service table, optionally ignoring * suspended entries. * - * @param service_name The name of the service to search for. - * @param srp Optional; if not 0, it is a pointer to a location - * to receive the ACE_Service_Type pointer for the - * located service. Meaningless if this method - * returns -1. + * @param name The name of the service to search for. + * @param srp Optional; if not 0, it is a pointer to a location + * to receive the ACE_Service_Type pointer for the + * located service. Meaningless if this method + * returns -1. * @param ignore_suspended If true, the search ignores suspended services. * * @retval 0 Named service was located. diff --git a/externals/ace/Sock_Connect.cpp b/externals/ace/Sock_Connect.cpp index 217d83c9381..dc4362e697e 100644 --- a/externals/ace/Sock_Connect.cpp +++ b/externals/ace/Sock_Connect.cpp @@ -1,4 +1,4 @@ -// $Id: Sock_Connect.cpp 87160 2009-10-19 14:01:10Z olli $ +// $Id: Sock_Connect.cpp 90399 2010-06-03 21:35:20Z mesnier_p $ #include "ace/Sock_Connect.h" #include "ace/INET_Addr.h" @@ -60,9 +60,6 @@ const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTER #if defined (ACE_HAS_WINCE) #include /**/ <iphlpapi.h> # if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && (_WIN32_WCE < 0x600) && defined (ACE_HAS_IPV6) -// The following code is suggested by microsoft as a workaround to the fact -// that on Windows CE, these constants are exported as function addresses -// rather than simply values. # include /**/ <ws2tcpip.h> const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; @@ -162,7 +159,7 @@ static ACE_Auto_Array_Ptr<sockaddr> force_compiler_to_include_socket_h; ACE_RCSID (ace, Sock_Connect, - "$Id: Sock_Connect.cpp 87160 2009-10-19 14:01:10Z olli $") + "$Id: Sock_Connect.cpp 90399 2010-06-03 21:35:20Z mesnier_p $") ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/Stream.h b/externals/ace/Stream.h index dbf496a6ee6..9172485c132 100644 --- a/externals/ace/Stream.h +++ b/externals/ace/Stream.h @@ -4,7 +4,7 @@ /** * @file Stream.h * - * $Id: Stream.h 84477 2009-02-16 13:30:38Z johnnyw $ + * $Id: Stream.h 91058 2010-07-12 08:20:09Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@uci.edu> */ @@ -37,8 +37,8 @@ class ACE_Time_Value; * @brief This class is the primary abstraction for the ASX framework. * It is moduled after System V Stream. * - * A Stream consists of a stack of <ACE_Modules>, each of which - * contains two <ACE_Tasks>. Even though the methods in this + * A Stream consists of a stack of @c ACE_Modules, each of which + * contains two @c ACE_Tasks. Even though the methods in this * class are virtual, this class isn't really intended for * subclassing unless you know what you are doing. In * particular, the ACE_Stream destructor calls <close>, which @@ -53,7 +53,7 @@ public: enum { - /// Indicates that <close> deletes the Tasks. Don't change this + /// Indicates that @c close() deletes the Tasks. Don't change this /// value without updating the same enum in class ACE_Module... M_DELETE = 3 }; @@ -88,7 +88,7 @@ public: // = ACE_Stream plumbing operations /// Add a new module @a mod right below the Stream head. The - /// <open()> hook methods of the <ACE_Tasks> in this ACE_Module + /// @c open() hook methods of the @c ACE_Tasks in this ACE_Module /// are invoked to initialize the tasks. virtual int push (ACE_Module<ACE_SYNCH_USE> *mod); @@ -101,7 +101,7 @@ public: /// head). virtual int top (ACE_Module<ACE_SYNCH_USE> *&mod); - /// Insert a new module @a mod below the named module <prev_name>. + /// Insert a new module @a mod below the named module @a prev_name. virtual int insert (const ACE_TCHAR *prev_name, ACE_Module<ACE_SYNCH_USE> *mod); @@ -111,7 +111,7 @@ public: int flags = M_DELETE); /// Remove the named module @a mod from the stream. This bypasses the - /// strict LIFO ordering of <push> and <pop>. + /// strict LIFO ordering of @c push and @c pop. virtual int remove (const ACE_TCHAR *mod, int flags = M_DELETE); @@ -218,7 +218,7 @@ public: int advance (void); private: - /// Next <Module> that we haven't yet seen. + /// Next ACE_Module that we haven't yet seen. ACE_Module<ACE_SYNCH_USE> *next_; }; diff --git a/externals/ace/Svc_Conf.y b/externals/ace/Svc_Conf.y new file mode 100644 index 00000000000..cc46e2d2bb3 --- /dev/null +++ b/externals/ace/Svc_Conf.y @@ -0,0 +1,376 @@ +%{ +// $Id: Svc_Conf.y 82136 2008-06-23 15:28:40Z sma $ + +#include "ace/Svc_Conf.h" + +#if (ACE_USES_CLASSIC_SVC_CONF == 1) + +#include "ace/Module.h" +#include "ace/Stream.h" +#include "ace/Service_Types.h" +#include "ace/ace_wchar.h" + +ACE_RCSID (ace, + Svc_Conf_y, + "$Id: Svc_Conf.y 82136 2008-06-23 15:28:40Z sma $") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Prototypes. + +static ACE_Module_Type * + ace_get_module (ACE_Service_Type const * sr, + ACE_TCHAR const * svc_name, + int & ace_yyerrno); + +#define YYDEBUG_LEXER_TEXT (yytext[yyleng] = '\0', yytext) + +// Force the pretty debugging code to compile. +// #define YYDEBUG 1 + +// Bison 2.3 template contains switch statement with a "default:", but +// without a "case:" label. Suppressing a compiler warning for Visual +// C++. +#if defined (_MSC_VER) +# pragma warning ( disable : 4065 ) +#endif + +// Normalize the message literal's type to match yyerror() prototype +#define YY_ ACE_TEXT + +// Prevent yacc(1) from declaring a trivial YYSTYPE just because +// YYSTYPE is not a macro definition. On the other hand we want +// YYSTYPE_IS_DECLARED to be as localized as possible to avoid +// poluting the global namespace - there may be other yacc(1) parsers +// that want to play nice with ACE +#define YYSTYPE_IS_DECLARED + +ACE_END_VERSIONED_NAMESPACE_DECL + +%} + +%token ACE_DYNAMIC ACE_STATIC ACE_SUSPEND ACE_RESUME ACE_REMOVE ACE_USTREAM +%token ACE_MODULE_T ACE_STREAM_T ACE_SVC_OBJ_T ACE_ACTIVE ACE_INACTIVE +%token ACE_PATHNAME ACE_IDENT ACE_STRING + +%start svc_config_entries + +%type <ident_> ACE_IDENT ACE_STRING ACE_PATHNAME pathname parameters_opt +%type <type_> type status +%type <parse_node_> dynamic static suspend resume remove module_list stream +%type <parse_node_> stream_modules module svc_config_entry +%type <static_node_> stream_ops +%type <svc_record_> svc_location +%type <location_node_> svc_initializer + +// Generate a pure (reentrant) parser -- GNU Bison only +%pure_parser + +%% + +svc_config_entries + : svc_config_entries svc_config_entry + { + if ($2 != 0) + { + $2->apply (ACE_SVC_CONF_PARAM->config, ACE_SVC_CONF_PARAM->yyerrno); + delete $2; + } + ACE_SVC_CONF_PARAM->obstack.release (); + } + | svc_config_entries error + { + ACE_SVC_CONF_PARAM->obstack.release (); + } + | /* EMPTY */ + ; + +svc_config_entry + : dynamic + | static + | suspend + | resume + | remove + | stream + ; + +dynamic + : ACE_DYNAMIC svc_location parameters_opt + { + if ($2 != 0) + $$ = new ACE_Dynamic_Node ($2, $3); + else + $$ = 0; + } + ; + +static + : ACE_STATIC ACE_IDENT parameters_opt + { + $$ = new ACE_Static_Node ($2, $3); + } + ; + +suspend + : ACE_SUSPEND ACE_IDENT + { + $$ = new ACE_Suspend_Node ($2); + } + ; + +resume + : ACE_RESUME ACE_IDENT + { + $$ = new ACE_Resume_Node ($2); + } + ; + +remove + : ACE_REMOVE ACE_IDENT + { + $$ = new ACE_Remove_Node ($2); + } + ; + +stream + : ACE_USTREAM stream_ops stream_modules + { + $$ = new ACE_Stream_Node ($2, $3); + } + | ACE_USTREAM ACE_IDENT { $<static_node_>$ = new ACE_Static_Node ($2); } stream_modules + { + $$ = new ACE_Dummy_Node ($<static_node_>3, $4); + } + ; + +stream_ops + : dynamic + { + } + | static + { + } + ; + +stream_modules + : '{' + { + // Initialize left context... + $<static_node_>$ = $<static_node_>0; + } + module_list '}' + { + ACE_UNUSED_ARG ($2); + $$ = $3; + } + | /* EMPTY */ { $$ = 0; } + ; + +module_list + : module_list module + { + if ($2 != 0) + { + $2->link ($1); + $$ = $2; + } + } + | /* EMPTY */ { $$ = 0; } + ; + +module + : dynamic + { + } + | static + { + ACE_Static_Node *sn = $<static_node_>-1; + ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config), + $<static_node_>1->name (), + ACE_SVC_CONF_PARAM->yyerrno); + + if (((ACE_Stream_Type *) sn->record (ACE_SVC_CONF_PARAM->config)->type ())->push (mt) == -1) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Problem with static\n"))); + ACE_SVC_CONF_PARAM->yyerrno++; + } + } + | suspend + { + ACE_Static_Node *sn = $<static_node_>-1; + ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config), + sn->name (), + ACE_SVC_CONF_PARAM->yyerrno); + if (mt != 0) + mt->suspend (); + } + | resume + { + ACE_Static_Node *sn = $<static_node_>-1; + ACE_Module_Type *mt = ace_get_module (sn->record (ACE_SVC_CONF_PARAM->config), + $<static_node_>1->name (), + ACE_SVC_CONF_PARAM->yyerrno); + if (mt != 0) + mt->resume (); + } + | remove + { + ACE_Static_Node *stream = $<static_node_>-1; + ACE_Static_Node *module = $<static_node_>1; + ACE_Module_Type *mt = ace_get_module (stream->record (ACE_SVC_CONF_PARAM->config), + module->name (), + ACE_SVC_CONF_PARAM->yyerrno); + + ACE_Stream_Type *st = + dynamic_cast<ACE_Stream_Type *> (const_cast<ACE_Service_Type_Impl *> (stream->record (ACE_SVC_CONF_PARAM->config)->type ())); + if (!st || (mt != 0 && st->remove (mt) == -1)) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"), + module->name (), + stream->name ())); + ACE_SVC_CONF_PARAM->yyerrno++; + } + } + ; + +svc_location + : ACE_IDENT type svc_initializer status + { + $$ = new ACE_Service_Type_Factory ($1, $2, $3, $4); + } + ; + +status + : ACE_ACTIVE + { + $$ = 1; + } + | ACE_INACTIVE + { + $$ = 0; + } + | /* EMPTY */ + { + $$ = 1; + } + ; + +svc_initializer + : pathname ':' ACE_IDENT + { + $$ = new ACE_Object_Node ($1, $3); + } + | pathname ':' ACE_IDENT '(' ')' + { + $$ = new ACE_Function_Node ($1, $3); + } + | ':' ACE_IDENT '(' ')' + { + $$ = new ACE_Static_Function_Node ($2); + } + ; + +type + : ACE_MODULE_T '*' + { + $$ = ACE_MODULE_T; + } + | ACE_SVC_OBJ_T '*' + { + $$ = ACE_SVC_OBJ_T; + } + | ACE_STREAM_T '*' + { + $$ = ACE_STREAM_T; + } + ; + +parameters_opt + : ACE_STRING + | /* EMPTY */ { $$ = 0; } + ; + +pathname + : ACE_PATHNAME + | ACE_IDENT + | ACE_STRING + ; + +%% + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Prints the error string to standard output. Cleans up the error +// messages. + +void +yyerror (int yyerrno, int yylineno, ACE_TCHAR const * s) +{ +#if defined (ACE_NLOGGING) + ACE_UNUSED_ARG (yyerrno); + ACE_UNUSED_ARG (yylineno); + ACE_UNUSED_ARG (s); +#endif /* ACE_NLOGGING */ + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("ACE (%P|%t) [error %d] on line %d: %C\n"), + yyerrno, + yylineno, + s)); +} + +void +yyerror (ACE_TCHAR const * s) +{ + yyerror (-1, -1, s); +} + +// Note that SRC_REC represents left context, which is the STREAM * +// record. + +static ACE_Module_Type * +ace_get_module (ACE_Service_Type const * sr, + ACE_TCHAR const * svc_name, + int & yyerrno) +{ + ACE_Service_Type_Impl const * const type = sr->type (); + ACE_Stream_Type const * const st = + (sr == 0 + ? 0 + : dynamic_cast<ACE_Stream_Type const *> (type)); + ACE_Module_Type const * const mt = (st == 0 ? 0 : st->find (svc_name)); + + if (sr == 0 || st == 0 || mt == 0) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("cannot locate Module_Type %s ") + ACE_TEXT ("in STREAM_Type %s\n"), + svc_name, + (sr ? sr->name () : ACE_TEXT ("(nil)")))); + ++yyerrno; + } + + return const_cast<ACE_Module_Type *> (mt); +} + +#if defined (SVC_CONF_Y_DEBUGGING) +// Main driver program. + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_Svc_Conf_Param param (0, stdin); + + // Try to reopen any filename argument to use YYIN. + if (argc > 1 && (yyin = freopen (argv[1], "r", stdin)) == 0) + (void) ACE_OS::fprintf (stderr, ACE_TEXT ("usage: %s [file]\n"), argv[0]), ACE_OS::exit (1); + + return ::yyparse (¶m); +} +#endif /* SVC_CONF_Y_DEBUGGING */ + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/externals/ace/TSS_T.cpp b/externals/ace/TSS_T.cpp index f539de48977..79603f8467c 100644 --- a/externals/ace/TSS_T.cpp +++ b/externals/ace/TSS_T.cpp @@ -1,4 +1,4 @@ -// $Id: TSS_T.cpp 84282 2009-01-30 15:04:29Z msmit $ +// $Id: TSS_T.cpp 91136 2010-07-20 08:56:37Z vzykov $ #ifndef ACE_TSS_T_CPP #define ACE_TSS_T_CPP @@ -26,12 +26,28 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_TSS) +#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) +# if defined (ACE_HAS_THR_C_DEST) +extern "C" void ACE_TSS_C_cleanup (void *); // defined in Synch.cpp +# endif /* ACE_HAS_THR_C_DEST */ +#endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */ + template <class TYPE> ACE_TSS<TYPE>::~ACE_TSS (void) { #if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) if (this->once_) { +# if defined (ACE_HAS_THR_C_DEST) + ACE_TSS_Adapter *tss_adapter = this->ts_value (); + this->ts_value (0); + ACE_TSS_C_cleanup (tss_adapter); +# else + TYPE *ts_obj = this->ts_value (); + this->ts_value (0); + ACE_TSS<TYPE>::cleanup (ts_obj); +# endif /* ACE_HAS_THR_C_DEST */ + ACE_OS::thr_key_detach (this->key_, this); ACE_OS::thr_keyfree (this->key_); } @@ -79,9 +95,6 @@ ACE_TSS<TYPE>::dump (void) const } #if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) -#if defined (ACE_HAS_THR_C_DEST) -extern "C" void ACE_TSS_C_cleanup (void *); // defined in Synch.cpp -#endif /* ACE_HAS_THR_C_DEST */ template <class TYPE> void ACE_TSS<TYPE>::cleanup (void *ptr) @@ -158,20 +171,12 @@ ACE_TSS<TYPE>::ACE_TSS (TYPE *ts_obj) ACE_TSS<TYPE>::cleanup)); // Put the adapter in thread specific storage - if (ACE_Thread::setspecific (this->key_, - (void *) tss_adapter) != 0) + if (this->ts_value (tss_adapter) == -1) { delete tss_adapter; - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Thread::setspecific() failed!"))); } #else - if (ACE_Thread::setspecific (this->key_, - (void *) ts_obj) != 0) - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Thread::setspecific() failed!"))); + this->ts_value (ts_obj); #endif /* ACE_HAS_THR_C_DEST */ } } @@ -190,23 +195,21 @@ ACE_TSS<TYPE>::ts_get (void) const TYPE *ts_obj = 0; #if defined (ACE_HAS_THR_C_DEST) - ACE_TSS_Adapter *tss_adapter = 0; + ACE_TSS_Adapter *tss_adapter = this->ts_value (); + ACE_TSS_Adapter *fake_tss_adapter = 0; - // Get the adapter from thread-specific storage - void *temp = tss_adapter; // Need this temp to keep G++ from complaining. - if (ACE_Thread::getspecific (this->key_, &temp) == -1) - return 0; // This should not happen! - tss_adapter = static_cast <ACE_TSS_Adapter *> (temp); + // If tss_adapter is not 0 but its ts_obj_ is 0 then we still need to create + // a proper ts_obj. That's the intent of this member function. + if (tss_adapter != 0 && tss_adapter->ts_obj_ == 0) + { + fake_tss_adapter = tss_adapter; + tss_adapter = 0; + } // Check to see if this is the first time in for this thread. if (tss_adapter == 0) #else - // Get the ts_obj from thread-specific storage. Note that no locks - // are required here... - void *temp = ts_obj; // Need this temp to keep G++ from complaining. - if (ACE_Thread::getspecific (this->key_, &temp) == -1) - return 0; // This should not happen! - ts_obj = static_cast <TYPE *> (temp); + ts_obj = this->ts_value (); // Check to see if this is the first time in for this thread. if (ts_obj == 0) @@ -228,8 +231,7 @@ ACE_TSS<TYPE>::ts_get (void) const ACE_TSS<TYPE>::cleanup), 0); // Put the adapter in thread specific storage - if (ACE_Thread::setspecific (this->key_, - (void *) tss_adapter) != 0) + if (this->ts_value (tss_adapter) == -1) { delete tss_adapter; delete ts_obj; @@ -238,8 +240,7 @@ ACE_TSS<TYPE>::ts_get (void) const #else // Store the dynamically allocated pointer in thread-specific // storage. - if (ACE_Thread::setspecific (this->key_, - (void *) ts_obj) != 0) + if (this->ts_value (ts_obj) == -1) { delete ts_obj; return 0; // Major problems, this should *never* happen! @@ -248,6 +249,8 @@ ACE_TSS<TYPE>::ts_get (void) const } #if defined (ACE_HAS_THR_C_DEST) + // Delete the adapter that didn't actually have a real ts_obj. + delete fake_tss_adapter; // Return the underlying ts object. return static_cast <TYPE *> (tss_adapter->ts_obj_); #else @@ -268,28 +271,15 @@ ACE_TSS<TYPE>::ts_object (void) const TYPE *ts_obj = 0; #if defined (ACE_HAS_THR_C_DEST) - ACE_TSS_Adapter *tss_adapter = 0; + ACE_TSS_Adapter *tss_adapter = this->ts_value (); - // Get the tss adapter from thread-specific storage - void *temp = tss_adapter; // Need this temp to keep G++ from complaining. - if (ACE_Thread::getspecific (this->key_, &temp) == -1) - { - return 0; // This should not happen! - } - else + if (tss_adapter != 0) { - tss_adapter = static_cast <ACE_TSS_Adapter *> (temp); - { - if (tss_adapter != 0) - // Extract the real TS object. - ts_obj = static_cast <TYPE *> (tss_adapter->ts_obj_); - } + // Extract the real TS object. + ts_obj = static_cast <TYPE *> (tss_adapter->ts_obj_); } #else - void *temp = ts_obj; // Need this temp to keep G++ from complaining. - if (ACE_Thread::getspecific (this->key_, &temp) == -1) - return 0; // This should not happen! - ts_obj = static_cast <TYPE *> (temp); + ts_obj = this->ts_value (); #endif /* ACE_HAS_THR_C_DEST */ return ts_obj; @@ -311,37 +301,33 @@ ACE_TSS<TYPE>::ts_object (TYPE *new_ts_obj) TYPE *ts_obj = 0; #if defined (ACE_HAS_THR_C_DEST) - ACE_TSS_Adapter *tss_adapter = 0; - - void *temp = tss_adapter; // Need this temp to keep G++ from complaining. - if (ACE_Thread::getspecific (this->key_, &temp) == -1) - return 0; // This should not happen! - tss_adapter = static_cast <ACE_TSS_Adapter *> (temp); + ACE_TSS_Adapter *tss_adapter = this->ts_value (); if (tss_adapter != 0) { ts_obj = static_cast <TYPE *> (tss_adapter->ts_obj_); - delete tss_adapter; // don't need this anymore + // Don't delete tss_adapter yet. It can be double-deleted + // in case setspecific below fails. } - ACE_NEW_RETURN (tss_adapter, + ACE_TSS_Adapter *new_tss_adapter = 0; + ACE_NEW_RETURN (new_tss_adapter, ACE_TSS_Adapter ((void *) new_ts_obj, ACE_TSS<TYPE>::cleanup), 0); - if (ACE_Thread::setspecific (this->key_, - (void *) tss_adapter) == -1) + if (this->ts_value (new_tss_adapter) == -1) + { + delete new_tss_adapter; + } + else { + // Now it's fine to delete the old tss_adapter. delete tss_adapter; - return ts_obj; // This should not happen! } #else - void *temp = ts_obj; // Need this temp to keep G++ from complaining. - if (ACE_Thread::getspecific (this->key_, &temp) == -1) - return 0; // This should not happen! - ts_obj = static_cast <TYPE *> (temp); - if (ACE_Thread::setspecific (this->key_, (void *) new_ts_obj) == -1) - return ts_obj; // This should not happen! + ts_obj = this->ts_value (); + this->ts_value (new_ts_obj); #endif /* ACE_HAS_THR_C_DEST */ return ts_obj; diff --git a/externals/ace/TSS_T.h b/externals/ace/TSS_T.h index f9ffaa92f35..d4fa8d52974 100644 --- a/externals/ace/TSS_T.h +++ b/externals/ace/TSS_T.h @@ -4,7 +4,7 @@ /** * @file TSS_T.h * - * $Id: TSS_T.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: TSS_T.h 91124 2010-07-19 11:54:35Z vzykov $ * * Moved from Synch.h. * @@ -39,6 +39,10 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL +#if defined (ACE_HAS_THR_C_DEST) +class ACE_TSS_Adapter; +#endif + /** * @class ACE_TSS * @@ -193,6 +197,20 @@ protected: /// "Destructor" that deletes internal TYPE * when thread exits. static void cleanup (void *ptr); + + /// Obtains a plain value stored in the thread-specific storage. +# if defined (ACE_HAS_THR_C_DEST) + ACE_TSS_Adapter *ts_value (void) const; +# else + TYPE *ts_value (void) const; +# endif /* ACE_HAS_THR_C_DEST */ + + /// Stores a new plain value in the thread-specific storage. +# if defined (ACE_HAS_THR_C_DEST) + int ts_value (ACE_TSS_Adapter *new_tss_adapter) const; +# else + int ts_value (TYPE *new_ts_obj) const; +# endif /* ACE_HAS_THR_C_DEST */ #endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */ // = Disallow copying... ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_TSS<TYPE> &)) diff --git a/externals/ace/TSS_T.inl b/externals/ace/TSS_T.inl index 9959a2edd94..16c7b5de487 100644 --- a/externals/ace/TSS_T.inl +++ b/externals/ace/TSS_T.inl @@ -1,11 +1,14 @@ // -*- C++ -*- // -// $Id: TSS_T.inl 80826 2008-03-04 14:51:23Z wotte $ +// $Id: TSS_T.inl 91124 2010-07-19 11:54:35Z vzykov $ -#if !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) +#include "ace/Thread.h" +#include "ace/Log_Msg.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL +#if !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) + template <class TYPE> ACE_INLINE ACE_TSS<TYPE>::ACE_TSS (TYPE *type) : type_ (type) @@ -13,7 +16,7 @@ ACE_TSS<TYPE>::ACE_TSS (TYPE *type) } template <class TYPE> ACE_INLINE int -ACE_TSS<TYPE>::ts_init (void) +ACE_TSS<TYPE>::ts_init (void) { return 0; } @@ -37,6 +40,64 @@ ACE_TSS<TYPE>::ts_get (void) const return this->type_; } -ACE_END_VERSIONED_NAMESPACE_DECL +#else + +# if defined (ACE_HAS_THR_C_DEST) +template <class TYPE> ACE_INLINE ACE_TSS_Adapter * +ACE_TSS<TYPE>::ts_value (void) const +{ + // Get the tss adapter from thread-specific storage + void *temp = 0; + if (ACE_Thread::getspecific (this->key_, &temp) == -1) + { + return 0; // This should not happen! + } + return static_cast <ACE_TSS_Adapter *> (temp); +} +# else +template <class TYPE> ACE_INLINE TYPE * +ACE_TSS<TYPE>::ts_value (void) const +{ + void *temp = 0; + if (ACE_Thread::getspecific (this->key_, &temp) == -1) + { + return 0; // This should not happen! + } + return static_cast <TYPE *> (temp); +} +# endif /* ACE_HAS_THR_C_DEST */ + +# if defined (ACE_HAS_THR_C_DEST) +template <class TYPE> ACE_INLINE int +ACE_TSS<TYPE>::ts_value (ACE_TSS_Adapter *new_tss_adapter) const +{ + if (ACE_Thread::setspecific (this->key_, + (void *) new_tss_adapter) != 0) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Thread::setspecific() failed!"))); + return -1; + } + + return 0; +} +# else +template <class TYPE> ACE_INLINE int +ACE_TSS<TYPE>::ts_value (TYPE *new_ts_obj) const +{ + if (ACE_Thread::setspecific (this->key_, (void *) new_ts_obj) != 0) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_Thread::setspecific() failed!"))); + return -1; + } + + return 0; +} +# endif /* ACE_HAS_THR_C_DEST */ #endif /* ! (defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/externals/ace/Task.h b/externals/ace/Task.h index f2ac03ca9e9..08147a6459a 100644 --- a/externals/ace/Task.h +++ b/externals/ace/Task.h @@ -4,7 +4,7 @@ /** * @file Task.h * - * $Id: Task.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Task.h 91058 2010-07-12 08:20:09Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -84,21 +84,21 @@ public: /** * Hook called from ACE_Thread_Exit when during thread exit and from - * the default implementation of <module_closed>. In general, this + * the default implementation of @c module_closed(). In general, this * method shouldn't be called directly by an application, - * particularly if the <Task> is running as an Active Object. - * Instead, a special message should be passed into the <Task> via - * the <put> method defined below, and the <svc> method should - * interpret this as a flag to shut down the <Task>. + * particularly if the Task is running as an Active Object. + * Instead, a special message should be passed into the Task via + * the put() method defined below, and the svc() method should + * interpret this as a flag to shut down the Task. */ virtual int close (u_long flags = 0); /** - * Hook called during <ACE_Module::close>. The default + * Hook called during ACE_Module::close(). The default * implementation calls forwards the call to close(1). Please - * notice the changed value of the default argument of <close>. + * notice the changed value of the default argument of close(). * This allows tasks to differ between the call has been originated - * from <ACE_Thread_Exit> or from <module_closed>. Be aware that + * from ACE_Thread_Exit or from module_closed(). Be aware that * close(0) will be also called when a thread associated with the * ACE_Task instance exits. */ @@ -111,7 +111,7 @@ public: /// A hook method that can be used to pass a message to a /// task, where it can be processed immediately or queued for subsequent - /// processing in the <svc> hook method. + /// processing in the svc() hook method. virtual int put (ACE_Message_Block *, ACE_Time_Value * = 0); /// Run by a daemon thread to handle deferred processing. diff --git a/externals/ace/Task_T.h b/externals/ace/Task_T.h index b945bf37551..d79a5fb0e46 100644 --- a/externals/ace/Task_T.h +++ b/externals/ace/Task_T.h @@ -4,7 +4,7 @@ /** * @file Task_T.h * - * $Id: Task_T.h 80826 2008-03-04 14:51:23Z wotte $ + * $Id: Task_T.h 91016 2010-07-06 11:29:50Z johnnyw $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -96,13 +96,13 @@ public: // Should be protected: * the stream. To do this, the message is put onto the task next in * the stream after this task's sibling. * - * @param ACE_Message_Block Pointer to the block that is used in the reply. - * @param timeout The absolute time at which the put operation used to - * send the message block to the next module in the stream - * will time out. If 0, this call blocks until it can be - * completed. + * @param mb Pointer to the block that is used in the reply. + * @param tv The absolute time at which the put operation used to + * send the message block to the next module in the stream + * will time out. If 0, this call blocks until it can be + * completed. */ - int reply (ACE_Message_Block *, ACE_Time_Value *timeout = 0); + int reply (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); /** * Transfer message to the adjacent ACE_Task in a ACE_Stream. Note diff --git a/externals/ace/Time_Value.h b/externals/ace/Time_Value.h index 384ff7d8569..f92c8c7f7f5 100644 --- a/externals/ace/Time_Value.h +++ b/externals/ace/Time_Value.h @@ -4,7 +4,7 @@ /** * @file Time_Value.h * - * $Id: Time_Value.h 89121 2010-02-22 14:48:31Z schmidt $ + * $Id: Time_Value.h 90683 2010-06-17 22:07:42Z shuston $ * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ @@ -129,11 +129,24 @@ public: /// Converts from ACE_Time_Value format into milliseconds format. /** * @return Sum of second field (in milliseconds) and microsecond field + * (in milliseconds). + * + * @note The semantics of this method differs from the sec() and + * usec() methods. There is no analogous "millisecond" + * component in an ACE_Time_Value. + */ + ACE_UINT64 get_msec () const; + + /// Converts from ACE_Time_Value format into milliseconds format. + /** + * @return Sum of second field (in milliseconds) and microsecond field * (in milliseconds) and return them via the @param ms parameter. * * @note The semantics of this method differs from the sec() and * usec() methods. There is no analogous "millisecond" * component in an ACE_Time_Value. + * + * @deprecated Use get_msec() instead. */ void msec (ACE_UINT64 &ms) const; @@ -145,6 +158,8 @@ public: * @note The semantics of this method differs from the sec() and * usec() methods. There is no analogous "millisecond" * component in an ACE_Time_Value. + * + * @deprecated Use get_msec() instead. */ void msec (ACE_UINT64 &ms) /* const */; @@ -154,6 +169,14 @@ public: * usec() methods. There is no analogous "millisecond" * component in an ACE_Time_Value. */ + void set_msec (const ACE_UINT64 &ms); + + /// Converts from milli-seconds format into ACE_Time_Value format. + /** + * @note The semantics of this method differs from the sec() and + * usec() methods. There is no analogous "millisecond" + * component in an ACE_Time_Value. + */ void msec (long); /// Converts from milli-seconds format into ACE_Time_Value format. diff --git a/externals/ace/Time_Value.inl b/externals/ace/Time_Value.inl index 23d6f2dca94..8f7bf23d837 100644 --- a/externals/ace/Time_Value.inl +++ b/externals/ace/Time_Value.inl @@ -1,6 +1,6 @@ // -*- C++ -*- // -// $Id: Time_Value.inl 88502 2010-01-12 19:53:17Z olli $ +// $Id: Time_Value.inl 90689 2010-06-18 11:14:47Z shuston $ #include "ace/Truncate.h" @@ -147,13 +147,21 @@ ACE_Time_Value::msec (void) const return ACE_Utils::truncate_cast<unsigned long> (secs); } +ACE_INLINE ACE_UINT64 +ACE_Time_Value::get_msec () const +{ + // ACE_OS_TRACE ("ACE_Time_Value::get_msec"); + ACE_UINT64 ms = ACE_Utils::truncate_cast<ACE_UINT64> (this->tv_.tv_sec); + ms *= 1000; + ms += (this->tv_.tv_usec / 1000); + return ms; +} + ACE_INLINE void ACE_Time_Value::msec (ACE_UINT64 &ms) const { // ACE_OS_TRACE ("ACE_Time_Value::msec"); - ms = ACE_Utils::truncate_cast<ACE_UINT64> (this->tv_.tv_sec); - ms *= 1000; - ms += (this->tv_.tv_usec / 1000); + ms = this->get_msec (); } ACE_INLINE void @@ -164,6 +172,17 @@ ACE_Time_Value::msec (ACE_UINT64 &ms) /*const*/ tv->msec (ms); } +ACE_INLINE void +ACE_Time_Value::set_msec (const ACE_UINT64 &ms) +{ + // ACE_OS_TRACE ("ACE_Time_Value::set_msec"); + // Convert millisecond units to seconds; + ACE_UINT64 secs = ms / 1000; + this->tv_.tv_sec = static_cast<long> (secs); + // Convert remainder to microseconds; + this->tv_.tv_usec = static_cast<long>((ms - (secs * 1000)) * 1000); +} + /// Converts from milli-seconds format into Time_Value format. ACE_INLINE void ACE_Time_Value::msec (long milliseconds) diff --git a/externals/ace/Version.h b/externals/ace/Version.h index cf8dc897ac6..92d70e802ec 100644 --- a/externals/ace/Version.h +++ b/externals/ace/Version.h @@ -1,9 +1,9 @@ // -*- C++ -*- -// $Id: Version.h 90351 2010-05-31 07:06:15Z johnnyw $ +// $Id: Version.h 91247 2010-08-01 09:46:33Z johnnyw $ // This is file was automatically generated by \$ACE_ROOT/bin/make_release. #define ACE_MAJOR_VERSION 5 -#define ACE_MINOR_VERSION 7 -#define ACE_BETA_VERSION 9 -#define ACE_VERSION "5.7.9" +#define ACE_MINOR_VERSION 8 +#define ACE_BETA_VERSION 1 +#define ACE_VERSION "5.8.1" diff --git a/externals/ace/ace_message_table.bin b/externals/ace/ace_message_table.bin Binary files differindex b46b32a0ba6..6ac08e5dc69 100644 --- a/externals/ace/ace_message_table.bin +++ b/externals/ace/ace_message_table.bin diff --git a/externals/ace/config-doxygen.h b/externals/ace/config-doxygen.h index 830e69a3e55..ddd84e88e7a 100644 --- a/externals/ace/config-doxygen.h +++ b/externals/ace/config-doxygen.h @@ -6,7 +6,7 @@ * * @file config-doxygen.h * - * $Id: config-doxygen.h 84610 2009-02-26 10:26:09Z johnnyw $ + * $Id: config-doxygen.h 91101 2010-07-15 09:49:28Z johnnyw $ * * @author Carlos O'Ryan <coryan@uci.edu> * @author Darrell Brunsch <brunsch@uci.edu> @@ -123,4 +123,6 @@ #define TAO_BEGIN_VERSIONED_NAMESPACE_DECL #define TAO_END_VERSIONED_NAMESPACE_DECL +#define ACE_HAS_POSITION_INDEPENDENT_POINTERS 1 + #endif /* ACE_CONFIG_DOXYGEN_H */ diff --git a/externals/ace/config-irix6.5.x-sgic++.h b/externals/ace/config-irix6.5.x-sgic++.h new file mode 100644 index 00000000000..2d501010b68 --- /dev/null +++ b/externals/ace/config-irix6.5.x-sgic++.h @@ -0,0 +1,18 @@ +// -*- C++ -*- +// $Id: config-irix6.5.x-sgic++.h 80826 2008-03-04 14:51:23Z wotte $ + +// Use this file for IRIX 6.5.x + +#ifndef ACE_CONFIG_IRIX65X_H +#define ACE_CONFIG_IRIX65X_H +#include /**/ "ace/pre.h" + +// Include IRIX 6.[234] configuration +#include "ace/config-irix6.x-sgic++.h" + +// Irix 6.5 man pages show that they exist +#undef ACE_LACKS_CONDATTR_PSHARED +#undef ACE_LACKS_MUTEXATTR_PSHARED + +#include /**/ "ace/post.h" +#endif /* ACE_CONFIG_IRIX65X_H */ diff --git a/externals/ace/config-irix6.x-common.h b/externals/ace/config-irix6.x-common.h new file mode 100644 index 00000000000..1de756d530c --- /dev/null +++ b/externals/ace/config-irix6.x-common.h @@ -0,0 +1,254 @@ +/* -*- C++ -*- */ +// +// $Id: config-irix6.x-common.h 87167 2009-10-19 19:33:53Z olli $ +// +// This file contains the common configuration options for both +// SGI/MIPSPro C++ and g++ under IRIX 6.X +// +// For IRIX 6.2 there are several patches that should be applied to +// get reliable operation with multi-threading and exceptions. +// Specifically you should get a reasonable current IRIX, Compiler +// and POSIX patch-sets. + +// For IRIX 6.[34] it's less critical, but it's still recommended +// that you apply the applicable patch-sets (IRIX and Compiler I believe). + +// These patches are updated frequently, so you should ask your support +// contact or search SGI's web site (http://www.sgi.com) for the latest +// version. + +// Use this file for IRIX 6.[234] if you have the pthreads patches +// installed. + +#ifndef ACE_CONFIG_IRIX6X_COMMON_H + +#ifndef IRIX6 +# define IRIX6 +#endif + +#if ! defined(ACE_CONFIG_H) +#error "This file may only be included by config-irix6.x-sgic++.h, config-irix6.x-kcc.h or config-irix6.x-g++.h" +#endif + +// The Irix 6.x float.h doesn't allow us to distinguish between a +// double and a long double. So, we have to hard-code this. Thanks +// to Bob Laferriere <laferrie@gsao.med.ge.com> for figuring it out. +#if defined (_MIPS_SIM) /* 6.X System */ +# include <sgidefs.h> +# if defined (__GNUC__) +# define ACE_SIZEOF_LONG_DOUBLE 16 +# elif defined (_MIPS_SIM_NABI32) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# define ACE_SIZEOF_LONG_DOUBLE 16 +# elif defined (_MIPS_SIM_ABI32) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# define ACE_SIZEOF_LONG_DOUBLE 8 +# elif defined (_MIPS_SIM_ABI64) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# define ACE_SIZEOF_LONG_DOUBLE 16 +# elif !defined (ACE_SIZEOF_LONG_DOUBLE) +# define ACE_SIZEOF_LONG_DOUBLE 8 +# endif +#else +# define ACE_SIZEOF_LONG_DOUBLE 8 /* 5.3 System */ +#endif + +// petern, Next part of it: + +// Platform supports getpagesize() call. +#define ACE_HAS_GETPAGESIZE + +// Platform has no implementation of pthread_condattr_setpshared(), +// even though it supports pthreads! (like Irix 6.2) +#define ACE_LACKS_CONDATTR_PSHARED +#define ACE_LACKS_MUTEXATTR_PSHARED + +#define ACE_LACKS_SUSECONDS_T + +// Platform/compiler has the sigwait(2) prototype +#define ACE_HAS_SIGWAIT +#define ACE_HAS_SIGTIMEDWAIT +#define ACE_HAS_SIGSUSPEND + +// Platform supports System V IPC (most versions of UNIX, but not Win32) +#define ACE_HAS_SYSV_IPC + +// Platform requires void * for mmap(). +#define ACE_HAS_VOIDPTR_MMAP + +// Platform supports recvmsg and sendmsg. +#define ACE_HAS_MSG + +// Compiler/platform contains the <sys/syscall.h> file. +#define ACE_HAS_SYS_SYSCALL_H + +// Compiler/platform supports alloca() +// Although ACE does have alloca() on this compiler/platform combination, it is +// disabled by default since it can be dangerous. Uncomment the following line +// if you ACE to use it. +//#define ACE_HAS_ALLOCA + +// Compiler/platform has <alloca.h> +#define ACE_HAS_ALLOCA_H + +// Irix needs to define bzero() in this odd file <bstring.h> +#define ACE_HAS_BSTRING + +// Compiler/platform has the getrusage() system call. +#define ACE_HAS_GETRUSAGE + +// Platform supports POSIX O_NONBLOCK semantics. +#define ACE_HAS_POSIX_NONBLOCK + +// Compiler/platform has correctly prototyped header files. +#define ACE_HAS_CPLUSPLUS_HEADERS + +// Platform contains <poll.h>. +#define ACE_HAS_POLL + +// Platform supports the /proc file system. +#define ACE_HAS_PROC_FS + +// Compiler/platform defines the sig_atomic_t typedef. +#define ACE_HAS_SIG_ATOMIC_T + +// Platform supports SVR4 extended signals. +#define ACE_HAS_SIGINFO_T +#define ACE_HAS_UCONTEXT_T + +// Compiler supports the ssize_t typedef. +#define ACE_HAS_SSIZE_T + +// Platform supports STREAMS. +#define ACE_HAS_STREAMS + +// Compiler/platform supports struct strbuf. +#define ACE_HAS_STRBUF_T + +// Compiler/platform supports SVR4 dynamic linking semantics. +#define ACE_HAS_SVR4_DYNAMIC_LINKING + +// Platform provides <sys/filio.h> header. +#define ACE_HAS_SYS_FILIO_H + +// Compiler/platform defines a union semun for SysV shared memory. +#define ACE_HAS_SEMUN + +// Platform supports IP multicast +#define ACE_HAS_IP_MULTICAST +#ifdef ACE_LACKS_PERFECT_MULTICAST_FILTERING + #undef ACE_LACKS_PERFECT_MULTICAST_FILTERING +#endif +#define ACE_LACKS_PERFECT_MULTICAST_FILTERING 1 + +//************************************************************** +// Not so sure how next lines should look like + +// Platform supports POSIX timers via timestruc_t. +#define ACE_HAS_POSIX_TIME + +//************************************************************** + +// IRIX 6.4 and below do not support reentrant netdb functions +// (getprotobyname_r, getprotobynumber_r, gethostbyaddr_r, +// gethostbyname_r, getservbyname_r). +#if (ACE_IRIX_VERS <= 64) && !defined (ACE_HAS_NETDB_REENTRANT_FUNCTIONS) +#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS +#endif /* ACE_HAS_NETDB_REENTRANT_FUNCTIONS */ + +#define ACE_HAS_DIRENT +// Unless the thread enabled version is used the readdir_r interface +// does not get defined in IRIX 6.2 +#define ACE_LACKS_READDIR_R +#define ACE_LACKS_RWLOCK_T + +#define ACE_HAS_GPERF + +#define ACE_HAS_NONCONST_SELECT_TIMEVAL +#define ACE_HAS_BROKEN_DGRAM_SENDV + +#define ACE_LACKS_PLACEMENT_OPERATOR_DELETE +#define ACE_PI_CONTROL_BLOCK_ALIGN_LONGS 2 + +// Platform has POSIX terminal interface. +#define ACE_HAS_TERMIOS + +// IRIX 6.5 supports AIO +#define ACE_HAS_AIO_CALLS +#define ACE_POSIX_AIOCB_PROACTOR +#define ACE_HAS_SGIDLADD +#define ACE_HAS_P_READ_WRITE +#define ACE_LACKS_LINEBUFFERED_STREAMBUF +#define ACE_LACKS_STDINT_H +#define ACE_HAS_SYSENT_H +#define ACE_HAS_SYSV_SYSINFO +#define ACE_HAS_SYS_SYSTEMINFO_H + +// Platform has support for multi-byte character support compliant +// with the XPG4 Worldwide Portability Interface wide-character +// classification. +#define ACE_HAS_XPG4_MULTIBYTE_CHAR + +// We need to setup a very high address or Naming_Test won't run. +#define ACE_DEFAULT_BASE_ADDR ((char *) (1024U * 1024 * 1024)) + +#define ACE_LACKS_SIGNED_CHAR + +// Platform supports reentrant functions (i.e., all the POSIX *_r +// functions). +#define ACE_HAS_REENTRANT_FUNCTIONS + +// Optimize ACE_Handle_Set for select(). +#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT + +// Platform does not support reentrant password file accessor functiions. +#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS + +// uses ctime_r & asctime_r with only two parameters vs. three +#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R + +// Prototypes for both signal() and struct sigaction are consistent. +#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES + +#define ACE_HAS_UALARM + +// Scheduling functions are declared in <sched.h> +#define ACE_NEEDS_SCHED_H + +// Compile using multi-thread libraries by default +#if !defined (ACE_MT_SAFE) + #define ACE_MT_SAFE 1 +#endif /* ACE_MT_SAFE */ + +#if (ACE_MT_SAFE != 0) + +// Add threading support + +#define ACE_HAS_IRIX62_THREADS + +// Needed for the threading stuff? +#include /**/ <task.h> +#define PTHREAD_MIN_PRIORITY PX_PRIO_MIN +#define PTHREAD_MAX_PRIORITY PX_PRIO_MAX + +// ACE supports threads. +#define ACE_HAS_THREADS + +// Platform has no implementation of pthread_condattr_setpshared(), +// even though it supports pthreads! (like Irix 6.2) +#define ACE_LACKS_CONDATTR_PSHARED +#define ACE_LACKS_MUTEXATTR_PSHARED + +// IRIX 6.2 supports a variant of POSIX Pthreads, supposedly POSIX 1c +#define ACE_HAS_PTHREADS + +// Compiler/platform has thread-specific storage +#define ACE_HAS_THREAD_SPECIFIC_STORAGE + +// The pthread_cond_timedwait call does not reset the timer. +#define ACE_LACKS_COND_TIMEDWAIT_RESET 1 + +// When threads are enabled READDIR_R is supported on IRIX. +#undef ACE_LACKS_READDIR_R + +#endif /* (ACE_MT_SAFE == 0) */ + + +#endif /* ACE_CONFIG_IRIX6X_COMMON_H */ diff --git a/externals/ace/config-irix6.x-g++.h b/externals/ace/config-irix6.x-g++.h new file mode 100644 index 00000000000..94c79119a64 --- /dev/null +++ b/externals/ace/config-irix6.x-g++.h @@ -0,0 +1,15 @@ +/* -*- C++ -*- */ +// $Id: config-irix6.x-g++.h 87268 2009-10-29 21:06:06Z olli $ + +// The following configuration file is designed to work for the SGI +// Indigo2EX running Irix 6.2 platform using the GNU C++ Compiler + +#ifndef ACE_CONFIG_H +#define ACE_CONFIG_H +#include /**/ "ace/pre.h" + +#include "ace/config-g++-common.h" +#include "ace/config-irix6.x-common.h" + +#include /**/ "ace/post.h" +#endif /* ACE_CONFIG_H */ diff --git a/externals/ace/config-irix6.x-sgic++.h b/externals/ace/config-irix6.x-sgic++.h new file mode 100644 index 00000000000..8bba07ac671 --- /dev/null +++ b/externals/ace/config-irix6.x-sgic++.h @@ -0,0 +1,36 @@ +/* -*- C++ -*- */ +// $Id: config-irix6.x-sgic++.h 81935 2008-06-12 22:01:53Z jtc $ + +// Use this file for IRIX 6.[234] if you have the pthreads patches +// installed. + +#ifndef ACE_CONFIG_H +#define ACE_CONFIG_H +#include /**/ "ace/pre.h" + +#include "ace/config-irix6.x-common.h" + +// This is the config file for IRIX 6.2, 6.4 and hopefully 6.3, using +// the SGI C++ compiler (7.1 or higher). + +// The following three should be enabled/disabled together. +#if _COMPILER_VERSION < 720 +#define ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA +#endif /* _COMPILER_VERSION < 720 */ +#define ACE_TEMPLATES_REQUIRE_SOURCE +#define ACE_NEEDS_FUNC_DEFINITIONS + +// Platform supports STREAM pipes (note that this is disabled by +// default, see the manual page on pipe(2) to find out how to enable +// it). +// #define ACE_HAS_STREAM_PIPES + +#if defined (_COMPILER_VERSION) +# define ACE_CC_NAME ACE_TEXT ("SGI/MIPSPro") +# define ACE_CC_MAJOR_VERSION (_COMPILER_VERSION / 100) +# define ACE_CC_MINOR_VERSION (_COMPILER_VERSION % 100) +# define ACE_CC_BETA_VERSION (0) +#endif /* _COMPILER_VERSION */ + +#include /**/ "ace/post.h" +#endif /* ACE_CONFIG_H */ diff --git a/externals/ace/config-macosx-snowleopard.h b/externals/ace/config-macosx-snowleopard.h index f9b3522a5aa..09e9458d6b9 100644 --- a/externals/ace/config-macosx-snowleopard.h +++ b/externals/ace/config-macosx-snowleopard.h @@ -1,10 +1,17 @@ -// $Id: config-macosx-snowleopard.h 87236 2009-10-27 08:21:42Z wotte $ +// $Id: config-macosx-snowleopard.h 91093 2010-07-15 09:12:20Z wotte $ #ifndef ACE_CONFIG_MACOSX_SNOWLEOPARD_H #define ACE_CONFIG_MACOSX_SNOWLEOPARD_H + #include "ace/config-macosx-leopard.h" +#ifdef __clang__ +#ifdef ACE_HAS_GCC_ATOMIC_BUILTINS +#undef ACE_HAS_GCC_ATOMIC_BUILTINS +#endif +#endif + // This header has been deprecated in Snow Leopard. #define ACE_LACKS_UCONTEXT_H -#endif ACE_CONFIG_MACOSX_SNOWLEOPARD_H +#endif // ACE_CONFIG_MACOSX_SNOWLEOPARD_H diff --git a/externals/ace/config-sco-5.0.0-nothread.h b/externals/ace/config-sco-5.0.0-nothread.h new file mode 100644 index 00000000000..259bd55c273 --- /dev/null +++ b/externals/ace/config-sco-5.0.0-nothread.h @@ -0,0 +1,12 @@ +/* -*- C++ -*- */ +// $Id: config-sco-5.0.0-nothread.h 87268 2009-10-29 21:06:06Z olli $ + +#ifndef ACE_CONFIG_H +#define ACE_CONFIG_H +#include /**/ "ace/pre.h" + +#include "ace/config-g++-common.h" +#include "ace/config-sco-5.0.0.h" + +#include /**/ "ace/post.h" +#endif /* ACE_CONFIG_H */ diff --git a/externals/ace/config-sunos5.4-g++.h b/externals/ace/config-sunos5.4-g++.h new file mode 100644 index 00000000000..a678389e78d --- /dev/null +++ b/externals/ace/config-sunos5.4-g++.h @@ -0,0 +1,176 @@ +/* -*- C++ -*- */ +// $Id: config-sunos5.4-g++.h 87268 2009-10-29 21:06:06Z olli $ + +// The following configuration file is designed to work for SunOS 5.4 +// platforms using the GNU g++ compiler. + +#ifndef ACE_CONFIG_H +#define ACE_CONFIG_H +#include /**/ "ace/pre.h" + +#if ! defined (__ACE_INLINE__) +# define __ACE_INLINE__ +#endif /* ! __ACE_INLINE__ */ + +// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so +// this must appear before its #include. +#define ACE_HAS_STRING_CLASS + +#include "ace/config-g++-common.h" + +#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT + +// Platform supports pread() and pwrite() +#define ACE_HAS_P_READ_WRITE + +#define ACE_HAS_XPG4_MULTIBYTE_CHAR + +// Platform has POSIX terminal interface. +#define ACE_HAS_TERMIOS + +// Platform supports System V IPC (most versions of UNIX, but not Win32) +#define ACE_HAS_SYSV_IPC + +// Sun has the wrong prototype for sendmsg. +#define ACE_HAS_NONCONST_SENDMSG + +// The SunOS 5.x version of rand_r is inconsistent with the header files... +#define ACE_HAS_BROKEN_RANDR + +// Platform supports system configuration information. +#define ACE_HAS_SYS_SYSTEMINFO_H +#define ACE_HAS_SYSV_SYSINFO + +// Platform supports the POSIX regular expression library +#define ACE_HAS_REGEX + +// Platform supports recvmsg and sendmsg. +#define ACE_HAS_MSG + +// Compiler/platform contains the <sys/syscall.h> file. +#define ACE_HAS_SYS_SYSCALL_H + +// Compiler/platform correctly calls init()/fini() for shared libraries. +#define ACE_HAS_AUTOMATIC_INIT_FINI + +// Platform supports POSIX O_NONBLOCK semantics. +#define ACE_HAS_POSIX_NONBLOCK + +// Compiler/platform has correctly prototyped header files. +#define ACE_HAS_CPLUSPLUS_HEADERS + +// Compiler/platform supports SunOS high resolution timers. +#define ACE_HAS_HI_RES_TIMER + +// Platform supports IP multicast +#define ACE_HAS_IP_MULTICAST + +// Compiler/platform supports alloca() +// Although ACE does have alloca() on this compiler/platform combination, it is +// disabled by default since it can be dangerous. Uncomment the following line +// if you ACE to use it. +//#define ACE_HAS_ALLOCA + +// Compiler/platform has <alloca.h> +#define ACE_HAS_ALLOCA_H + +// Platform contains <poll.h>. +#define ACE_HAS_POLL + +// Platform supports POSIX timers via timestruc_t. +#define ACE_HAS_POSIX_TIME + +// Platform supports the /proc file system. +#define ACE_HAS_PROC_FS + +// Platform supports the prusage_t struct. +#define ACE_HAS_PRUSAGE_T + +// Compiler/platform defines the sig_atomic_t typedef. +#define ACE_HAS_SIG_ATOMIC_T + +// Platform supports SVR4 extended signals. +#define ACE_HAS_SIGINFO_T +#define ACE_HAS_UCONTEXT_T + +// Compiler/platform provides the sockio.h file. +#define ACE_HAS_SYS_SOCKIO_H + +// Compiler supports the ssize_t typedef. +#define ACE_HAS_SSIZE_T + +// Platform supports STREAMS. +#define ACE_HAS_STREAMS + +// Platform supports STREAM pipes. +#define ACE_HAS_STREAM_PIPES + +// Compiler/platform supports struct strbuf. +#define ACE_HAS_STRBUF_T + +// Compiler/platform supports SVR4 dynamic linking semantics. +#define ACE_HAS_SVR4_DYNAMIC_LINKING + +// Compiler/platform supports SVR4 gettimeofday() prototype. +#define ACE_HAS_SVR4_GETTIMEOFDAY + +// Platform lacks pthread_sigaction +#define ACE_LACKS_PTHREAD_THR_SIGSETMASK + +// Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)... +#define ACE_HAS_SVR4_TLI + +// Platform provides <sys/filio.h> header. +#define ACE_HAS_SYS_FILIO_H + +#define ACE_HAS_STRSIGNAL + +/* Turn off the following defines if you want to disable threading. */ +// Compile using multi-thread libraries. +#if !defined (ACE_MT_SAFE) +# define ACE_MT_SAFE 1 +# if !defined (_REENTRANT) +# define _REENTRANT +# endif /* _REENTRANT */ +#endif /* !ACE_MT_SAFE */ + +// Platform supports Solaris threads. +#define ACE_HAS_STHREADS + +// Platform supports threads. +#define ACE_HAS_THREADS + +// Compiler/platform has thread-specific storage +#define ACE_HAS_THREAD_SPECIFIC_STORAGE + +// Platform supports reentrant functions (i.e., all the POSIX *_r functions). +#define ACE_HAS_REENTRANT_FUNCTIONS + +/* end threading defines */ + +#define ACE_HAS_PRIOCNTL +#define ACE_NEEDS_LWP_PRIO_SET + +// Platform supports TLI timod STREAMS module. +#define ACE_HAS_TIMOD_H + +// Platform supports TLI tiuser header. +#define ACE_HAS_TIUSER_H + +// Platform provides TLI function prototypes. +#define ACE_HAS_TLI_PROTOTYPES + +// Platform supports TLI. +#define ACE_HAS_TLI + +// Use the poll() event demultiplexor rather than select(). +//#define ACE_USE_POLL + +// Defines the page size of the system. +#define ACE_PAGE_SIZE 4096 +#define ACE_HAS_IDTYPE_T +#define ACE_HAS_GPERF +#define ACE_HAS_DIRENT + +#include /**/ "ace/post.h" +#endif /* ACE_CONFIG_H */ diff --git a/externals/ace/config-sunos5.4-sunc++-4.x.h b/externals/ace/config-sunos5.4-sunc++-4.x.h new file mode 100644 index 00000000000..d7d0862e328 --- /dev/null +++ b/externals/ace/config-sunos5.4-sunc++-4.x.h @@ -0,0 +1,186 @@ +/* -*- C++ -*- */ +// $Id: config-sunos5.4-sunc++-4.x.h 87250 2009-10-28 11:57:17Z olli $ + +// The following configuration file is designed to work for SunOS 5.4 +// platforms using the SunC++ 4.0.x compiler. + +#ifndef ACE_CONFIG_H +#define ACE_CONFIG_H +#include /**/ "ace/pre.h" + +#if ! defined (__ACE_INLINE__) +# define __ACE_INLINE__ +#endif /* ! __ACE_INLINE__ */ + +// Optimize ACE_Handle_Set for select(). +#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT + +// Platform supports pread() and pwrite() +#define ACE_HAS_P_READ_WRITE + +#define ACE_HAS_XPG4_MULTIBYTE_CHAR + +// Platform supports System V IPC (most versions of UNIX, but not Win32) +#define ACE_HAS_SYSV_IPC + +// Sun has the wrong prototype for sendmsg. +#define ACE_HAS_NONCONST_SENDMSG + +// The SunOS 5.x version of rand_r is inconsistent with the header files... +#define ACE_HAS_BROKEN_RANDR + +// Platform supports system configuration information. +#define ACE_HAS_SYS_SYSTEMINFO_H +#define ACE_HAS_SYSV_SYSINFO + +// Platform supports the POSIX regular expression library. +#define ACE_HAS_REGEX + +// Platform supports recvmsg and sendmsg. +#define ACE_HAS_MSG + +// Compiler/platform contains the <sys/syscall.h> file. +#define ACE_HAS_SYS_SYSCALL_H + +// Platform has POSIX terminal interface. +#define ACE_HAS_TERMIOS + +// Compiler/platform correctly calls init()/fini() for shared libraries. +#define ACE_HAS_AUTOMATIC_INIT_FINI + +// Platform supports POSIX O_NONBLOCK semantics. +#define ACE_HAS_POSIX_NONBLOCK + +// Compiler/platform has correctly prototyped header files. +#define ACE_HAS_CPLUSPLUS_HEADERS + +// Compiler/platform supports SunOS high resolution timers. +#define ACE_HAS_HI_RES_TIMER + +// Platform supports IP multicast +#define ACE_HAS_IP_MULTICAST + +// Compiler/platform supports alloca() +// Although ACE does have alloca() on this compiler/platform combination, it is +// disabled by default since it can be dangerous. Uncomment the following line +// if you ACE to use it. +//#define ACE_HAS_ALLOCA + +// Compiler/platform has <alloca.h> +#define ACE_HAS_ALLOCA_H + +// Platform contains <poll.h>. +#define ACE_HAS_POLL + +// Platform supports POSIX timers via timestruc_t. +#define ACE_HAS_POSIX_TIME + +// Platform supports the /proc file system. +#define ACE_HAS_PROC_FS + +// Platform supports the prusage_t struct. +#define ACE_HAS_PRUSAGE_T + +// Compiler/platform defines the sig_atomic_t typedef. +#define ACE_HAS_SIG_ATOMIC_T + +// Platform supports SVR4 extended signals. +#define ACE_HAS_SIGINFO_T +#define ACE_HAS_UCONTEXT_T + +// Compiler/platform provides the sockio.h file. +#define ACE_HAS_SYS_SOCKIO_H + +// Compiler supports the ssize_t typedef. +#define ACE_HAS_SSIZE_T + +// Platform supports STREAMS. +#define ACE_HAS_STREAMS + +// Platform supports STREAM pipes. +#define ACE_HAS_STREAM_PIPES + +// Compiler/platform supports struct strbuf. +#define ACE_HAS_STRBUF_T + +// Compiler/platform supports SVR4 dynamic linking semantics. +#define ACE_HAS_SVR4_DYNAMIC_LINKING + +// Compiler/platform supports SVR4 gettimeofday() prototype. +#define ACE_HAS_SVR4_GETTIMEOFDAY + +// Compiler/platform supports SVR4 signal typedef. +#define ACE_HAS_SVR4_SIGNAL_T + +// Platform lacks pthread_sigaction +#define ACE_LACKS_PTHREAD_THR_SIGSETMASK + +// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)... +#define ACE_HAS_SVR4_TLI + +// Platform provides <sys/filio.h> header. +#define ACE_HAS_SYS_FILIO_H + +#define ACE_HAS_STRSIGNAL + +/* Turn off the following defines if you want to disable threading. */ +// Compile using multi-thread libraries. +#if !defined (ACE_MT_SAFE) +# define ACE_MT_SAFE 1 +#endif + +// Platform supports Solaris threads. +#define ACE_HAS_STHREADS + +// Platform supports threads. +#define ACE_HAS_THREADS + +// Compiler/platform has thread-specific storage +#define ACE_HAS_THREAD_SPECIFIC_STORAGE + +// Platform supports reentrant functions (i.e., all the POSIX *_r functions). +#define ACE_HAS_REENTRANT_FUNCTIONS + +/* end threading defines */ + +#define ACE_HAS_PRIOCNTL +#define ACE_NEEDS_LWP_PRIO_SET + +// Reactor detects deadlock +// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION + +// Platform supports ACE_TLI timod STREAMS module. +#define ACE_HAS_TIMOD_H + +// Platform supports ACE_TLI tiuser header. +#define ACE_HAS_TIUSER_H + +// Platform provides ACE_TLI function prototypes. +#define ACE_HAS_TLI_PROTOTYPES + +// Platform supports ACE_TLI. +#define ACE_HAS_TLI + +#define ACE_LACKS_LINEBUFFERED_STREAMBUF +#define ACE_LACKS_SIGNED_CHAR + +// Use the poll() event demultiplexor rather than select(). +//#define ACE_USE_POLL + +#define ACE_NEEDS_DEV_IO_CONVERSION + +// Defines the page size of the system. +#define ACE_PAGE_SIZE 4096 +#define ACE_HAS_IDTYPE_T + +#define ACE_HAS_GPERF +#define ACE_HAS_DIRENT + +# if defined (ACE_HAS_EXCEPTIONS) + // If exceptions are enabled and we are using Sun/CC then + // <operator new> throws an exception instead of returning 0. +# define ACE_NEW_THROWS_EXCEPTIONS +# endif /* ACE_HAS_EXCEPTIONS */ + +#include /**/ "ace/post.h" +#endif /* ACE_CONFIG_H */ diff --git a/externals/ace/os_include/os_errno.h b/externals/ace/os_include/os_errno.h index 53c907624bd..4f5cfe6954c 100644 --- a/externals/ace/os_include/os_errno.h +++ b/externals/ace/os_include/os_errno.h @@ -6,7 +6,7 @@ * * system error numbers * - * $Id: os_errno.h 85122 2009-04-20 16:34:19Z johnnyw $ + * $Id: os_errno.h 91076 2010-07-13 14:20:35Z johnnyw $ * * @author Don Hinton <dhinton@dresystems.com> * @author This code was originally in various places including ace/OS.h. @@ -42,6 +42,121 @@ extern "C" #if defined (ACE_WIN32) // error code mapping for windows + // VC++ 10 has these error codes defined in errno.h, + // this will cause different errors in ACE. + // So we undef these error codes if they are wrongly defined +# if defined (EWOULDBLOCK) && (EWOULDBLOCK != WSAEWOULDBLOCK) +# undef EWOULDBLOCK +# endif /* EWOULDBLOCK */ +# if defined (EINPROGRESS) && (EINPROGRESS != WSAEINPROGRESS) +# undef EINPROGRESS +# endif /* EINPROGRESS */ +# if defined (EALREADY) && (EALREADY != WSAEALREADY) +# undef EALREADY +# endif /* EALREADY */ +# if defined (ENOTSOCK) && (ENOTSOCK != WSAENOTSOCK) +# undef ENOTSOCK +# endif /* ENOTSOCK */ +# if defined (EDESTADDRREQ) && (EDESTADDRREQ != WSAEDESTADDRREQ) +# undef EDESTADDRREQ +# endif /* EDESTADDRREQ */ +# if defined (EMSGSIZE) && (EMSGSIZE != WSAEMSGSIZE) +# undef EMSGSIZE +# endif /* EMSGSIZE */ +# if defined (EPROTOTYPE) && (EPROTOTYPE != WSAEPROTOTYPE) +# undef EPROTOTYPE +# endif /* EPROTOTYPE */ +# if defined (ENOPROTOOPT) && (ENOPROTOOPT != WSAENOPROTOOPT) +# undef ENOPROTOOPT +# endif /* ENOPROTOOPT */ +# if defined (EPROTONOSUPPORT) && (EPROTONOSUPPORT != WSAEPROTONOSUPPORT) +# undef EPROTONOSUPPORT +# endif /* EPROTONOSUPPORT */ +# if defined (ESOCKTNOSUPPORT) && (ESOCKTNOSUPPORT != WSAESOCKTNOSUPPORT) +# undef ESOCKTNOSUPPORT +# endif /* ESOCKTNOSUPPORT */ +# if defined (EOPNOTSUPP) && (EOPNOTSUPP != WSAEOPNOTSUPP) +# undef EOPNOTSUPP +# endif /* EOPNOTSUPP */ +# if defined (EPFNOSUPPORT) && (EPFNOSUPPORT != WSAEPFNOSUPPORT) +# undef EPFNOSUPPORT +# endif /* EPFNOSUPPORT */ +# if defined (EAFNOSUPPORT) && (EAFNOSUPPORT != WSAEAFNOSUPPORT) +# undef EAFNOSUPPORT +# endif /* EAFNOSUPPORT */ +# if defined (EADDRINUSE) && (EADDRINUSE != WSAEADDRINUSE) +# undef EADDRINUSE +# endif /* EADDRINUSE */ +# if defined (EADDRNOTAVAIL) && (EADDRNOTAVAIL != WSAEADDRNOTAVAIL) +# undef EADDRNOTAVAIL +# endif /* EADDRNOTAVAIL */ +# if defined (ENETDOWN) && (ENETDOWN != WSAENETDOWN) +# undef ENETDOWN +# endif /* ENETDOWN */ +# if defined (ENETUNREACH) && (ENETUNREACH != WSAENETUNREACH) +# undef ENETUNREACH +# endif /* ENETUNREACH */ +# if defined (ENETRESET) && (ENETRESET != WSAENETRESET) +# undef ENETRESET +# endif /* ENETRESET */ +# if defined (ECONNABORTED) && (ECONNABORTED != WSAECONNABORTED) +# undef ECONNABORTED +# endif /* ECONNABORTED */ +# if defined (ECONNRESET) && (ECONNRESET != WSAECONNRESET) +# undef ECONNRESET +# endif /* ECONNRESET */ +# if defined (ENOBUFS) && (ENOBUFS != WSAENOBUFS) +# undef ENOBUFS +# endif /* ENOBUFS */ +# if defined (EISCONN) && (EISCONN != WSAEISCONN) +# undef EISCONN +# endif /* EISCONN */ +# if defined (ENOTCONN) && (ENOTCONN != WSAENOTCONN) +# undef ENOTCONN +# endif /* ENOTCONN */ +# if defined (ESHUTDOWN) && (ESHUTDOWN != WSAESHUTDOWN) +# undef ESHUTDOWN +# endif /* ESHUTDOWN */ +# if defined (ETOOMANYREFS) && (ETOOMANYREFS != WSAETOOMANYREFS) +# undef ETOOMANYREFS +# endif /* ETOOMANYREFS */ +# if defined (ETIMEDOUT) && (ETIMEDOUT != WSAETIMEDOUT) +# undef ETIMEDOUT +# endif /* ETIMEDOUT */ +# if defined (ECONNREFUSED) && (ECONNREFUSED != WSAECONNREFUSED) +# undef ECONNREFUSED +# endif /* ECONNREFUSED */ +# if defined (ELOOP) && (ELOOP != WSAELOOP) +# undef ELOOP +# endif /* ELOOP */ +//# if defined (ENAMETOOLONG) && (ENAMETOOLONG != WSAENAMETOOLONG) +//# undef ENAMETOOLONG +//# endif /* ENAMETOOLONG */ +# if defined (EHOSTDOWN) && (EHOSTDOWN != WSAEHOSTDOWN) +# undef EHOSTDOWN +# endif /* EHOSTDOWN */ +# if defined (EHOSTUNREACH) && (EHOSTUNREACH != WSAEHOSTUNREACH) +# undef EHOSTUNREACH +# endif /* EHOSTUNREACH */ +//# if defined (ENOTEMPTY) && (ENOTEMPTY != WSAENOTEMPTY) +//# undef ENOTEMPTY +//# endif /* ENOTEMPTY */ +# if defined (EPROCLIM) && (EPROCLIM != WSAEPROCLIM) +# undef EPROCLIM +# endif /* EPROCLIM */ +# if defined (EUSERS) && (EUSERS != WSAEUSERS) +# undef EUSERS +# endif /* EUSERS */ +# if defined (EDQUOT) && (EDQUOT != WSAEDQUOT) +# undef EDQUOT +# endif /* EDQUOT */ +# if defined (ESTALE) && (ESTALE != WSAESTALE) +# undef ESTALE +# endif /* ESTALE */ +# if defined (EREMOTE) && (EREMOTE != WSAEREMOTE) +# undef EREMOTE +# endif /* EREMOTE */ + # if !defined (ETIME) # define ETIME ERROR_SEM_TIMEOUT # endif /* !ETIME */ |