diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-10-28 16:14:56 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-10-28 16:14:56 +0000 |
commit | 94c5b51fa8ed6e5520da2cf5def58b5c0986f072 (patch) | |
tree | c4fe2b70acf02ce19d199713fff6dec5645d8a93 | |
parent | 3720d45374c2890b3f9e86ff8ae8a3d4a60ecd29 (diff) | |
download | ATCD-94c5b51fa8ed6e5520da2cf5def58b5c0986f072.tar.gz |
ChangeLogTag:Fri Oct 28 00:01:06 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
885 files changed, 5467 insertions, 2142 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index c80ddee69a4..e45b2c37a2d 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -41,6 +41,9 @@ ACE_RCSID (ace, "$Id$") +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE { // private: @@ -3501,3 +3504,6 @@ ACE::wild_match(const char* str, const char* pat, bool case_sensitive) return *p == '\0'; } + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ACE.h b/ace/ACE.h index a16475fd60a..69853fd8841 100644 --- a/ace/ACE.h +++ b/ace/ACE.h @@ -35,11 +35,6 @@ #include "ace/Sock_Connect.h" #include "ace/Default_Constants.h" -// Forward declarations. -class ACE_Time_Value; -class ACE_Message_Block; -class ACE_Handle_Set; - #if defined (CYGWIN32) // Include math.h. math.h defines a macro log2 that conflicts with ACE::log2() // which seems to only cause a problem on cygwin. Insuring that math.h is @@ -59,6 +54,13 @@ class ACE_Handle_Set; #endif #define ACE_EXPORT_MACRO ACE_Export +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward declarations. +class ACE_Time_Value; +class ACE_Message_Block; +class ACE_Handle_Set; /** * @namespace ACE @@ -821,6 +823,9 @@ namespace ACE } +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/ACE.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ACE.inl b/ace/ACE.inl index a58823dbc98..f4e3c2e0cb2 100644 --- a/ace/ACE.inl +++ b/ace/ACE.inl @@ -7,6 +7,10 @@ #include "ace/os_include/os_ctype.h" #include "ace/OS_NS_sys_socket.h" +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + + // Wrappers for methods that have been moved to ACE_OS. ACE_INLINE ssize_t @@ -327,3 +331,6 @@ ACE::hex2byte (ACE_TCHAR c) else return (u_char) (10 + c - ACE_LIB_TEXT ('A')); } + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ACE_crc32.cpp b/ace/ACE_crc32.cpp index 1320ed59085..f9e91c652ce 100644 --- a/ace/ACE_crc32.cpp +++ b/ace/ACE_crc32.cpp @@ -104,6 +104,9 @@ namespace #define COMPUTE(var, ch) (var) = (crc_table[(var ^ ch) & 0xFF] ^ (var >> 8)) +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_UINT32 ACE::crc32 (const char *string) { @@ -143,7 +146,7 @@ ACE::crc32 (const iovec *iov, int len, ACE_UINT32 crc) for (int i = 0; i < len; ++i) { for (const char *p = (const char *) iov[i].iov_base, - *e = (const char *) iov[i].iov_base + iov[i].iov_len; + *e = (const char *) iov[i].iov_base + iov[i].iov_len; p != e; ++p) COMPUTE (crc, *p); @@ -152,4 +155,7 @@ ACE::crc32 (const iovec *iov, int len, ACE_UINT32 crc) return ~crc; } +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + #undef COMPUTE diff --git a/ace/ACE_crc_ccitt.cpp b/ace/ACE_crc_ccitt.cpp index e81f3419831..f591b53aa10 100644 --- a/ace/ACE_crc_ccitt.cpp +++ b/ace/ACE_crc_ccitt.cpp @@ -71,6 +71,9 @@ namespace #define COMPUTE(var, ch) (var) = (crc_table[(var ^ ch) & 0xFF] ^ (var >> 8)) +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_UINT16 ACE::crc_ccitt (const char *string) { @@ -110,7 +113,7 @@ ACE::crc_ccitt (const iovec *iov, int len, ACE_UINT16 crc) for (int i = 0; i < len; ++i) { for (const char *p = (const char *) iov[i].iov_base, - *e = (const char *) iov[i].iov_base + iov[i].iov_len; + *e = (const char *) iov[i].iov_base + iov[i].iov_len; p != e; ++p) COMPUTE (crc, *p); @@ -119,4 +122,7 @@ ACE::crc_ccitt (const iovec *iov, int len, ACE_UINT16 crc) return ~crc; } +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + #undef COMPUTE diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp index 8109c3c215c..ff9ad0c6758 100644 --- a/ace/ARGV.cpp +++ b/ace/ARGV.cpp @@ -1,4 +1,3 @@ -// ARGV.cpp // $Id$ // Transforms a string BUF into an ARGV-style vector of strings. @@ -16,6 +15,9 @@ ACE_RCSID(ace, ARGV, "$Id$") +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_ARGV) void @@ -64,7 +66,7 @@ ACE_ARGV::argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf) } ACE_ARGV::ACE_ARGV (const ACE_TCHAR buf[], - int substitute_env_args) + int substitute_env_args) : substitute_env_args_ (substitute_env_args), state_ (TO_PTR_ARRAY), argc_ (0), @@ -91,7 +93,7 @@ ACE_ARGV::ACE_ARGV (const ACE_TCHAR buf[], } ACE_ARGV::ACE_ARGV (ACE_TCHAR *argv[], - int substitute_env_args) + int substitute_env_args) : substitute_env_args_ (substitute_env_args), state_ (TO_STRING), argc_ (0), @@ -197,7 +199,7 @@ ACE_ARGV::add (const ACE_TCHAR *next_arg) if (this->argv_ != 0) { for (int i = 0; this->argv_[i] != 0; i++) - ACE_OS::free ((void *) this->argv_[i]); + ACE_OS::free ((void *) this->argv_[i]); delete [] this->argv_; this->argv_ = 0; @@ -277,7 +279,7 @@ ACE_ARGV::create_buf_from_queue (void) // Put in an argument separating space. if (more != 0) - *ptr++ = ' '; + *ptr++ = ' '; } // Put in the NUL terminator @@ -295,3 +297,6 @@ template class ACE_Node<ACE_TCHAR *>; #pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_TCHAR *> #pragma instantiate ACE_Node<ACE_TCHAR *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ARGV.h b/ace/ARGV.h index feba0fe6b1d..f7c0468b151 100644 --- a/ace/ARGV.h +++ b/ace/ARGV.h @@ -23,6 +23,9 @@ #include "ace/Unbounded_Queue.h" +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_ARGV * @@ -175,6 +178,9 @@ private: ACE_Unbounded_Queue<ACE_TCHAR *> queue_; }; +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/ARGV.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ARGV.inl b/ace/ARGV.inl index 00c465f6250..47711a486ee 100644 --- a/ace/ARGV.inl +++ b/ace/ARGV.inl @@ -3,6 +3,9 @@ #include "ace/Global_Macros.h" +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Return the number of args ACE_INLINE int ACE_ARGV::argc (void) const @@ -65,3 +68,6 @@ ACE_ARGV::operator[] (size_t i) return (const ACE_TCHAR *) this->argv ()[i]; } + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ATM_Acceptor.cpp b/ace/ATM_Acceptor.cpp index 41273857113..1210917a0c5 100644 --- a/ace/ATM_Acceptor.cpp +++ b/ace/ATM_Acceptor.cpp @@ -14,6 +14,10 @@ ACE_RCSID(ace, ATM_Acceptor, "$Id$") #include "ace/ATM_Acceptor.inl" #endif /* __ACE_INLINE__ */ + +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Put the actual definitions of the ACE_ATM_Request and // ACE_ATM_Request_Queue classes here to hide them from clients... @@ -298,4 +302,8 @@ ACE_ATM_Acceptor::accept (ACE_ATM_Stream &new_sap, #endif /* ACE_HAS_FORE_ATM_XTI */ } +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + + #endif /* ACE_HAS_ATM */ diff --git a/ace/ATM_Acceptor.h b/ace/ATM_Acceptor.h index 6305013601f..6e2f8572633 100644 --- a/ace/ATM_Acceptor.h +++ b/ace/ATM_Acceptor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -33,12 +33,19 @@ #if defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) #include "ace/SOCK_Acceptor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_SOCK_Acceptor ATM_Acceptor; +ACE_END_VERSIONED_NAMESPACE_DECL #elif defined (ACE_HAS_FORE_ATM_XTI) #include "ace/TLI_Acceptor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_TLI_Acceptor ATM_Acceptor; +ACE_END_VERSIONED_NAMESPACE_DECL #endif // ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations. class ACE_Time_Value @@ -103,6 +110,10 @@ private: ATM_Acceptor acceptor_; }; +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + + #if defined (__ACE_INLINE__) #include "ace/ATM_Acceptor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ATM_Acceptor.inl b/ace/ATM_Acceptor.inl index ba0630dd6d6..b63b68a9621 100644 --- a/ace/ATM_Acceptor.inl +++ b/ace/ATM_Acceptor.inl @@ -1,7 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// ATM_Acceptor.i +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_ATM_Acceptor::dump (void) const @@ -35,3 +37,6 @@ ACE_ATM_Acceptor::close (void) return 0; #endif // ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM } + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ATM_Addr.cpp b/ace/ATM_Addr.cpp index 17cb7ef87c6..1c30b7f7a9a 100644 --- a/ace/ATM_Addr.cpp +++ b/ace/ATM_Addr.cpp @@ -17,6 +17,8 @@ ACE_RCSID(ace, ATM_Addr, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Addr) #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) @@ -321,7 +323,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[]) == SOCKET_ERROR) { ACE_OS::printf ("Error: WSALookupServiceBeginW failed! %d\n", ::WSAGetLastError ()); - return -1; + return -1; } dwValue = sizeof (WSAQUERYSETW); @@ -331,7 +333,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[]) if (WSAGetLastError () != WSA_E_NO_MORE) { ACE_OS::printf ("Error: WSALookupServiceNextW failed! %d\n", ::WSAGetLastError ()); - return -1; + return -1; } } @@ -398,11 +400,11 @@ ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[], int i; if (addrlen < ATM_ADDR_SIZE + 1) - return -1; + return -1; for (i = 0; i < ATM_ADDR_SIZE; i++) { buffer[ i * 3 ] = '\0'; - ACE_OS::sprintf (buffer, ACE_LIB_TEXT ("%s%02x."), + ACE_OS::sprintf (buffer, ACE_LIB_TEXT ("%s%02x."), buffer, atm_addr_.satm_number.Addr[ i ]); } @@ -515,4 +517,6 @@ ACE_ATM_Addr::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ATM */ diff --git a/ace/ATM_Addr.h b/ace/ATM_Addr.h index f498d12baf4..c3f112e8c1c 100644 --- a/ace/ATM_Addr.h +++ b/ace/ATM_Addr.h @@ -26,14 +26,21 @@ #include "ace/Addr.h" #if defined (ACE_HAS_FORE_ATM_XTI) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ATMSAPAddress ATM_Addr; +ACE_END_VERSIONED_NAMESPACE_DECL #elif defined (ACE_HAS_FORE_ATM_WS2) #define FORE_NAME_SPACE NS_ALL +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef struct sockaddr_atm ATM_Addr; +ACE_END_VERSIONED_NAMESPACE_DECL #elif defined (ACE_HAS_LINUX_ATM) #include /**/ "atm.h" +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + //pbrandao:as Linux has this 2 structs separeted we "link it" here typedef struct _linux_atm_addr { @@ -177,6 +184,10 @@ private: ATM_Addr atm_addr_; }; +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + + #if defined (__ACE_INLINE__) #include "ace/ATM_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ATM_Addr.inl b/ace/ATM_Addr.inl index e2cf062a706..8120c6d11d5 100644 --- a/ace/ATM_Addr.inl +++ b/ace/ATM_Addr.inl @@ -2,6 +2,7 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE u_char ACE_ATM_Addr::get_selector (void) const @@ -32,3 +33,5 @@ ACE_ATM_Addr::set_selector (u_char selector) ACE_UNUSED_ARG (selector); #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ATM_Connector.cpp b/ace/ATM_Connector.cpp index 07811ffc264..bff8ddad5bd 100644 --- a/ace/ATM_Connector.cpp +++ b/ace/ATM_Connector.cpp @@ -12,6 +12,9 @@ ACE_RCSID(ace, ATM_Connector, "$Id$") #include "ace/ATM_Connector.inl" #endif /* __ACE_INLINE__ */ +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Connector) ACE_ATM_Connector::ACE_ATM_Connector (void) @@ -129,4 +132,7 @@ ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream, #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ } +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ATM */ diff --git a/ace/ATM_Connector.h b/ace/ATM_Connector.h index 151f3e9978b..8ac6b970439 100644 --- a/ace/ATM_Connector.h +++ b/ace/ATM_Connector.h @@ -28,12 +28,20 @@ #if defined (ACE_WIN32) || defined (ACE_HAS_LINUX_ATM) #include "ace/SOCK_Connector.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_SOCK_Connector ATM_Connector; +ACE_END_VERSIONED_NAMESPACE_DECL #else #include "ace/XTI_ATM_Mcast.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_XTI_ATM_Mcast ATM_Connector; +// Open versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL #endif +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_ATM_Connector * @@ -149,6 +157,9 @@ private: ATM_Connector connector_; }; +// Open versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/ATM_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ATM_Connector.inl b/ace/ATM_Connector.inl index 50bde9ce55f..f301aa781f5 100644 --- a/ace/ATM_Connector.inl +++ b/ace/ATM_Connector.inl @@ -1,7 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// ATM_Connector.i +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_ATM_Connector::dump (void) const @@ -12,13 +14,13 @@ ACE_ATM_Connector::dump (void) const } ACE_INLINE -ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream, - const ACE_ATM_Addr &remote_sap, +ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream, + const ACE_ATM_Addr &remote_sap, ACE_ATM_Params params, ACE_ATM_QoS options, ACE_Time_Value *timeout, - const ACE_ATM_Addr &local_sap, - int reuse_addr, + const ACE_ATM_Addr &local_sap, + int reuse_addr, int flags, int perms) { @@ -29,11 +31,11 @@ ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream, options, timeout, local_sap, - reuse_addr, + reuse_addr, flags, perms) == ACE_INVALID_HANDLE && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME)) - ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), + ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream"))); } @@ -41,9 +43,9 @@ ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream, ACE_INLINE int -ACE_ATM_Connector::complete (ACE_ATM_Stream &new_stream, - ACE_ATM_Addr *remote_sap, - ACE_Time_Value *tv) +ACE_ATM_Connector::complete (ACE_ATM_Stream &new_stream, + ACE_ATM_Addr *remote_sap, + ACE_Time_Value *tv) { ACE_TRACE ("ACE_ATM_Connector::complete"); #if defined (ACE_HAS_ATM) @@ -80,18 +82,18 @@ ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream, &cqos, 0, (JL_SENDER_ONLY)); - + ACE_OS::printf( "ATM_Connector::add_leaf: connecting...\n" ); ACE_HANDLE result = ACE_OS::join_leaf(current_stream.get_handle(), - (struct sockaddr *)saddr, + (struct sockaddr *)saddr, addr_len, qos_params); - - if ( result == ACE_INVALID_HANDLE ) - ACE_OS::printf( "ATM_Connector(add_leaf): connection failed, %d\n", + + if ( result == ACE_INVALID_HANDLE ) + ACE_OS::printf( "ATM_Connector(add_leaf): connection failed, %d\n", ::WSAGetLastError()); - + return (result != ACE_INVALID_HANDLE); #elif defined (ACE_HAS_LINUX_ATM) ACE_OS::printf("ATM_Connector(add_leaf): not yet implemented in Linux \n"); @@ -116,13 +118,15 @@ int ACE_ATM_Connector::reset_new_handle (ACE_HANDLE handle) { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) - // Reset the event association + // Reset the event association return ::WSAEventSelect ((SOCKET) handle, 0, - 0); + 0); #else /* !defined ACE_HAS_WINSOCK2 */ ACE_UNUSED_ARG (handle); return 0; #endif /* ACE_WIN32 */ } +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ATM_Params.cpp b/ace/ATM_Params.cpp index 1777616858d..cc6ec674ece 100644 --- a/ace/ATM_Params.cpp +++ b/ace/ATM_Params.cpp @@ -2,15 +2,19 @@ #include "ace/ATM_Params.h" -ACE_RCSID(ace, ATM_Params, "$Id$") - #if defined (ACE_HAS_ATM) +ACE_RCSID(ace, ATM_Params, "$Id$") + #if !defined (__ACE_INLINE__) #include "ace/ATM_Params.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Params) +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ATM */ diff --git a/ace/ATM_Params.h b/ace/ATM_Params.h index 1056c1bb728..2ae36a6a4a4 100644 --- a/ace/ATM_Params.h +++ b/ace/ATM_Params.h @@ -49,6 +49,8 @@ typedef int Param_Info; typedef int Param_Udata; #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_ATM_Params * @@ -201,6 +203,8 @@ private: int oflag_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/ATM_Params.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ATM_Params.inl b/ace/ATM_Params.inl index 4006d4d00b5..5d60f6ba920 100644 --- a/ace/ATM_Params.inl +++ b/ace/ATM_Params.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// ATM_Params.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_ATM_Params::dump (void) const @@ -96,7 +97,7 @@ ACE_ATM_Params::set_type (int type) } ACE_INLINE -ACE_Protocol_Info* +ACE_Protocol_Info* ACE_ATM_Params::get_protocol_info( void ) { ACE_TRACE ("ACE_ATM_Params::get_protocol_info"); @@ -104,7 +105,7 @@ ACE_ATM_Params::get_protocol_info( void ) } ACE_INLINE -void +void ACE_ATM_Params::set_protocol_info( ACE_Protocol_Info *protocol_info ) { ACE_TRACE ("ACE_ATM_Params::set_protocol_info"); @@ -112,7 +113,7 @@ ACE_ATM_Params::set_protocol_info( ACE_Protocol_Info *protocol_info ) } ACE_INLINE -ACE_SOCK_GROUP +ACE_SOCK_GROUP ACE_ATM_Params::get_sock_group( void ) { ACE_TRACE ("ACE_ATM_Params::get_sock_group"); @@ -120,7 +121,7 @@ ACE_ATM_Params::get_sock_group( void ) } ACE_INLINE -void +void ACE_ATM_Params::set_sock_group( ACE_SOCK_GROUP g ) { ACE_TRACE ("ACE_ATM_Params::set_sock_group"); @@ -128,7 +129,7 @@ ACE_ATM_Params::set_sock_group( ACE_SOCK_GROUP g ) } ACE_INLINE -u_long +u_long ACE_ATM_Params::get_flags( void ) { ACE_TRACE ("ACE_ATM_Params::get_flags"); @@ -136,7 +137,7 @@ ACE_ATM_Params::get_flags( void ) } ACE_INLINE -void +void ACE_ATM_Params::set_flags( u_long flags) { ACE_TRACE ("ACE_ATM_Params::set_flags"); @@ -231,3 +232,4 @@ ACE_ATM_Params::set_oflag (int oflag) oflag_ = oflag; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ATM_QoS.cpp b/ace/ATM_QoS.cpp index 6d713cf8579..814834571cf 100644 --- a/ace/ATM_QoS.cpp +++ b/ace/ATM_QoS.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, ATM_QoS, "$Id$") #include "ace/ATM_QoS.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) #define BHLI_MAGIC "FORE_ATM" // This is line rate in cells/s for an OC-3 MM interface. @@ -153,25 +155,25 @@ ACE_ATM_QoS::ACE_ATM_QoS(int rate, + sizeof( ATM_QOS_CLASS_IE ); ACE_OS::memcpy(ie_ptr->IE, &ie_qos, sizeof(ATM_QOS_CLASS_IE)); - // qos_.SendingFlowspec.TokenRate = 0xffffffff; - // qos_.SendingFlowspec.TokenBucketSize = 0xffffffff; - // qos_.SendingFlowspec.PeakBandwidth = 0xffffffff; - // qos_.SendingFlowspec.Latency = 0xffffffff; - // qos_.SendingFlowspec.DelayVariation = 0xffffffff; - // qos_.SendingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; + // qos_.SendingFlowspec.TokenRate = 0xffffffff; + // qos_.SendingFlowspec.TokenBucketSize = 0xffffffff; + // qos_.SendingFlowspec.PeakBandwidth = 0xffffffff; + // qos_.SendingFlowspec.Latency = 0xffffffff; + // qos_.SendingFlowspec.DelayVariation = 0xffffffff; + // qos_.SendingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; // This will most probably be ignored by the service provider. - // qos_.SendingFlowspec.MaxSduSize = 0xffffffff; - // qos_.SendingFlowspec.MinimumPolicedSize = 0xffffffff; - - // qos_.ReceivingFlowspec.TokenRate = 0xffffffff; - // qos_.ReceivingFlowspec.TokenBucketSize = 0xffffffff; - // qos_.ReceivingFlowspec.PeakBandwidth = 0xffffffff; - // qos_.ReceivingFlowspec.Latency = 0xffffffff; - // qos_.ReceivingFlowspec.DelayVariation = 0xffffffff; - // qos_.ReceivingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; + // qos_.SendingFlowspec.MaxSduSize = 0xffffffff; + // qos_.SendingFlowspec.MinimumPolicedSize = 0xffffffff; + + // qos_.ReceivingFlowspec.TokenRate = 0xffffffff; + // qos_.ReceivingFlowspec.TokenBucketSize = 0xffffffff; + // qos_.ReceivingFlowspec.PeakBandwidth = 0xffffffff; + // qos_.ReceivingFlowspec.Latency = 0xffffffff; + // qos_.ReceivingFlowspec.DelayVariation = 0xffffffff; + // qos_.ReceivingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; // This will most probably be ignored by the service provider. - // qos_.ReceivingFlowspec.MaxSduSize = 0xffffffff; - // qos_.ReceivingFlowspec.MinimumPolicedSize = 0; + // qos_.ReceivingFlowspec.MaxSduSize = 0xffffffff; + // qos_.ReceivingFlowspec.MinimumPolicedSize = 0; ACE_Flow_Spec send_fspec( 0xffffffff, 0xffffffff, @@ -346,7 +348,7 @@ ACE_ATM_QoS::set_cbr_rate (int rate, // Peak bandwidth is in bytes/sec. The rate is specified in cells/sec so // we need to convert from cells/sec to bytes/sec (i.e., multiply by 53). qos_.SendingFlowspec.PeakBandwidth = rate * BYTES_PER_ATM_CELL; - qos_.SendingFlowspec.Latency = -1; // we don't care too much + qos_.SendingFlowspec.Latency = -1; // we don't care too much qos_.SendingFlowspec.DelayVariation = -1; // we don't care too much // no provider-specific data allowed on ATM qos_.ProviderSpecific.buf=0; @@ -478,7 +480,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, // signal the UNI 3.1 Calling Party ID Information Element. t_atm_addr *source_addr; - popt->len = sizeof (struct t_opthdr) + sizeof (t_atm_addr); + popt->len = sizeof (struct t_opthdr) + sizeof (t_atm_addr); popt->level = T_ATM_SIGNALING; popt->name = T_ATM_ORIG_ADDR; popt->status = 0; @@ -530,7 +532,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, struct t_atm_traffic *traffic; // T_ATM_BEARER_CAP: Broadband bearer capability - popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_bearer); + popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_bearer); popt->level = T_ATM_SIGNALING; popt->name = T_ATM_BEARER_CAP; popt->status = 0; @@ -546,7 +548,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, } else { - bearer->traffic_type = 0; // UBR + bearer->traffic_type = 0; // UBR bearer->timing_requirements = 0; } bearer->clipping_susceptibility = T_ATM_NULL; @@ -559,7 +561,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, popt = T_OPT_NEXTHDR (buf, info.options, popt); // T_ATM_TRAFFIC: traffic descriptor - popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_traffic); + popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_traffic); popt->level = T_ATM_SIGNALING; popt->name = T_ATM_TRAFFIC; popt->status = 0; @@ -576,13 +578,13 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, traffic->forward.tagging = T_NO; traffic->backward.PCR_high_priority = T_ATM_ABSENT; - traffic->backward.PCR_all_traffic = + traffic->backward.PCR_all_traffic = (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP)) ? 0 : qos_cells ? qos_cells : LINE_RATE; traffic->backward.SCR_high_priority = T_ATM_ABSENT; - traffic->backward.SCR_all_traffic = T_ATM_ABSENT; + traffic->backward.SCR_all_traffic = T_ATM_ABSENT; traffic->backward.MBS_high_priority = T_ATM_ABSENT; - traffic->backward.MBS_all_traffic = T_ATM_ABSENT; + traffic->backward.MBS_all_traffic = T_ATM_ABSENT; traffic->backward.tagging = T_NO; traffic->best_effort = qos_cells ? T_NO : T_YES; @@ -597,7 +599,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, struct t_atm_qos *qos; // T_ATM_QOS: Quality of Service - popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_qos); + popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_qos); popt->level = T_ATM_SIGNALING; popt->name = T_ATM_QOS; popt->status = 0; @@ -623,5 +625,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd, #endif /* ACE_HAS_FORE_ATM_WS2 */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ATM */ diff --git a/ace/ATM_QoS.h b/ace/ATM_QoS.h index c29962d80fc..41a4dafab6e 100644 --- a/ace/ATM_QoS.h +++ b/ace/ATM_QoS.h @@ -24,18 +24,28 @@ #if defined (ACE_HAS_ATM) #if defined (ACE_HAS_FORE_ATM_WS2) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // just map to WS2 GQOS struct typedef ACE_QoS ATM_QoS; +ACE_END_VERSIONED_NAMESPACE_DECL #elif defined (ACE_HAS_FORE_ATM_XTI) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef struct netbuf ATM_QoS; +ACE_END_VERSIONED_NAMESPACE_DECL #elif defined (ACE_HAS_LINUX_ATM) #include /**/ "atm.h" #include "ace/ATM_Params.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef struct atm_qos ATM_QoS; +ACE_END_VERSIONED_NAMESPACE_DECL #else +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef int ATM_QoS; +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_ATM_QoS * @@ -94,6 +104,8 @@ private: ATM_QoS qos_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/ATM_QoS.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ATM_QoS.inl b/ace/ATM_QoS.inl index ac5b7de890f..283baa3f560 100644 --- a/ace/ATM_QoS.inl +++ b/ace/ATM_QoS.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// ATM_QoS.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_ATM_QoS::dump (void) const @@ -24,3 +25,5 @@ ACE_ATM_QoS::get_qos (void) ACE_TRACE ("ACE_ATM_QoS::get_qos"); return qos_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ATM_Stream.cpp b/ace/ATM_Stream.cpp index 898a627c694..c6de5d4b533 100644 --- a/ace/ATM_Stream.cpp +++ b/ace/ATM_Stream.cpp @@ -10,6 +10,8 @@ ACE_RCSID (ace, ATM_Stream, "$Id$") #include "ace/ATM_Stream.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_ATM_Stream) char* @@ -283,4 +285,6 @@ ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi, #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ATM */ diff --git a/ace/ATM_Stream.h b/ace/ATM_Stream.h index 7741eeab366..e1bb9257c9e 100644 --- a/ace/ATM_Stream.h +++ b/ace/ATM_Stream.h @@ -28,12 +28,18 @@ #if defined (ACE_WIN32) #include "ace/SOCK_Stream.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_SOCK_Stream ATM_Stream; +ACE_END_VERSIONED_NAMESPACE_DECL #else #include "ace/TLI_Stream.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_TLI_Stream ATM_Stream; +ACE_END_VERSIONED_NAMESPACE_DECL #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_ATM_Stream * @@ -90,6 +96,8 @@ private: ATM_Stream stream_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/ATM_Stream.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/ATM_Stream.inl b/ace/ATM_Stream.inl index 9c11fd93b7c..b796af474e7 100644 --- a/ace/ATM_Stream.inl +++ b/ace/ATM_Stream.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// ATM_Stream.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_ATM_Stream::dump (void) const @@ -129,3 +130,4 @@ ACE_ATM_Stream::send_n (const void *buf, #endif /* ACE_HAS_FORE_ATM_XTI */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp index bd6435f1a77..8dfb0662c49 100644 --- a/ace/Acceptor.cpp +++ b/ace/Acceptor.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Acceptor) template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void @@ -1221,4 +1223,6 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPT return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_ACCEPTOR_CPP */ diff --git a/ace/Acceptor.h b/ace/Acceptor.h index 138c6766de3..4fb2de02ce7 100644 --- a/ace/Acceptor.h +++ b/ace/Acceptor.h @@ -24,6 +24,7 @@ #include "ace/Strategies_T.h" #include "ace/Synch_Options.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Acceptor @@ -644,6 +645,8 @@ private: int delete_concurrency_strategy_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Acceptor.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Activation_Queue.cpp b/ace/Activation_Queue.cpp index 74aba6c7734..20a1c48df47 100644 --- a/ace/Activation_Queue.cpp +++ b/ace/Activation_Queue.cpp @@ -13,6 +13,8 @@ ACE_RCSID (ace, Activation_Queue, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Activation_Queue::dump (void) const { @@ -108,3 +110,5 @@ ACE_Activation_Queue::enqueue (ACE_Method_Request *mr, return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Activation_Queue.h b/ace/Activation_Queue.h index 9a370d2cdf6..7ded53ca766 100644 --- a/ace/Activation_Queue.h +++ b/ace/Activation_Queue.h @@ -34,8 +34,9 @@ /// Define to be compatible with the terminology in the POSA2 book! #define ACE_Activation_List ACE_Activation_Queue -class ACE_Method_Request; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +class ACE_Method_Request; /** * @class ACE_Activation_Queue @@ -163,10 +164,11 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Activation_Queue (const ACE_Activation_Queue &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Activation_Queue.inl" #endif /* __ACE_INLINE__ */ #include /**/ "ace/post.h" #endif /* ACE_ACTIVATION_QUEUE_H */ - diff --git a/ace/Activation_Queue.inl b/ace/Activation_Queue.inl index b4b9283bced..466635d859c 100644 --- a/ace/Activation_Queue.inl +++ b/ace/Activation_Queue.inl @@ -1,22 +1,23 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Activation_Queue.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE size_t -ACE_Activation_Queue::method_count (void) const +ACE_Activation_Queue::method_count (void) const { return queue_->message_count (); } -ACE_INLINE int -ACE_Activation_Queue::is_full (void) const +ACE_INLINE int +ACE_Activation_Queue::is_full (void) const { return queue_->is_full (); -} +} -ACE_INLINE int -ACE_Activation_Queue::is_empty (void) const +ACE_INLINE int +ACE_Activation_Queue::is_empty (void) const { return queue_->is_empty (); } @@ -27,8 +28,10 @@ ACE_Activation_Queue::queue (void) const return queue_; } -ACE_INLINE void +ACE_INLINE void ACE_Activation_Queue::queue (ACE_Message_Queue<ACE_SYNCH> *q) { queue_ = q; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Active_Map_Manager.cpp b/ace/Active_Map_Manager.cpp index 47e734d044d..6f4b66191c7 100644 --- a/ace/Active_Map_Manager.cpp +++ b/ace/Active_Map_Manager.cpp @@ -7,4 +7,3 @@ ACE_RCSID(ace, Active_Map_Manager, "$Id$") #if !defined (__ACE_INLINE__) #include "ace/Active_Map_Manager.inl" #endif /* __ACE_INLINE__ */ - diff --git a/ace/Active_Map_Manager.h b/ace/Active_Map_Manager.h index 7764ba11aa1..7e3bb348058 100644 --- a/ace/Active_Map_Manager.h +++ b/ace/Active_Map_Manager.h @@ -23,6 +23,8 @@ #include "ace/Basic_Types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Active_Map_Manager_Key * @@ -101,6 +103,8 @@ private: key_data key_data_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Active_Map_Manager.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Active_Map_Manager.inl b/ace/Active_Map_Manager.inl index 491b25430b7..652cf7c1f71 100644 --- a/ace/Active_Map_Manager.inl +++ b/ace/Active_Map_Manager.inl @@ -4,6 +4,8 @@ #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (void) { @@ -89,3 +91,5 @@ ACE_Active_Map_Manager_Key::encode (void *data) const &this->key_data_, sizeof this->key_data_); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Active_Map_Manager_T.cpp b/ace/Active_Map_Manager_T.cpp index b4fbf30cfa5..b8cd14446ac 100644 --- a/ace/Active_Map_Manager_T.cpp +++ b/ace/Active_Map_Manager_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_ACTIVE_MAP_MANAGER_T_C -#define ACE_ACTIVE_MAP_MANAGER_T_C +#ifndef ACE_ACTIVE_MAP_MANAGER_T_CPP +#define ACE_ACTIVE_MAP_MANAGER_T_CPP #include "ace/Active_Map_Manager_T.h" @@ -13,8 +13,10 @@ #include "ace/Active_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Active_Map_Manager_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Active_Map_Manager) -#endif /* ACE_ACTIVE_MAP_MANAGER_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_ACTIVE_MAP_MANAGER_T_CPP */ diff --git a/ace/Active_Map_Manager_T.h b/ace/Active_Map_Manager_T.h index f3e90b3f744..2194f8194de 100644 --- a/ace/Active_Map_Manager_T.h +++ b/ace/Active_Map_Manager_T.h @@ -24,6 +24,8 @@ #include "ace/Null_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Active_Map_Manager * @@ -191,6 +193,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Active_Map_Manager (const ACE_Active_Map_Manager<T> &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Active_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Active_Map_Manager_T.inl b/ace/Active_Map_Manager_T.inl index fd9ff0df6c6..124f76c48c4 100644 --- a/ace/Active_Map_Manager_T.inl +++ b/ace/Active_Map_Manager_T.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_INLINE int ACE_Active_Map_Manager<T>::bind (ACE_Active_Map_Manager_Key &key, T *&internal_value) @@ -304,3 +307,5 @@ ACE_Active_Map_Manager<T>::rend (void) { return ACE_AMM_BASE::rend (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Addr.cpp b/ace/Addr.cpp index a627d8262c0..6b4e3770f33 100644 --- a/ace/Addr.cpp +++ b/ace/Addr.cpp @@ -15,6 +15,8 @@ ACE_RCSID (ace, #include "ace/Log_Msg.h" #include "ace/os_include/sys/os_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Note: this object requires static construction and destruction. /* static */ const ACE_Addr ACE_Addr::sap_any (AF_ANY, -1); @@ -66,3 +68,5 @@ ACE_Addr::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Addr.h b/ace/Addr.h index 654b1fc4355..53fba544456 100644 --- a/ace/Addr.h +++ b/ace/Addr.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Addr * @@ -91,6 +93,8 @@ protected: int addr_size_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Addr.inl b/ace/Addr.inl index 34457d86612..3780e04b6aa 100644 --- a/ace/Addr.inl +++ b/ace/Addr.inl @@ -4,19 +4,20 @@ // Return the address of the address. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE bool ACE_Addr::operator == (const ACE_Addr &sap) const { return (sap.addr_type_ == this->addr_type_ && - sap.addr_size_ == this->addr_size_ ); + sap.addr_size_ == this->addr_size_ ); } ACE_INLINE bool ACE_Addr::operator != (const ACE_Addr &sap) const { return (sap.addr_type_ != this->addr_type_ || - sap.addr_size_ != this->addr_size_ ); + sap.addr_size_ != this->addr_size_ ); } // Return the size of the address. @@ -56,3 +57,5 @@ ACE_Addr::hash (void) const { return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Arg_Shifter.cpp b/ace/Arg_Shifter.cpp index 9217adffe0c..3c2ebd9fe08 100644 --- a/ace/Arg_Shifter.cpp +++ b/ace/Arg_Shifter.cpp @@ -9,6 +9,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Arg_Shifter::ACE_Arg_Shifter (int& argc, const ACE_TCHAR** argv, const ACE_TCHAR** temp) @@ -50,10 +52,10 @@ ACE_Arg_Shifter::init (void) // Fill the temporary array. this->argc_ = 0; for (int i = 0; i < this->total_size_; i++) - { - this->temp_[i] = this->argv_[i]; - this->argv_[i] = 0; - } + { + this->temp_[i] = this->argv_[i]; + this->argv_[i] = 0; + } } else { @@ -100,9 +102,9 @@ ACE_Arg_Shifter::get_the_parameter (const ACE_TCHAR *flag) this->consume_arg (); if (!this->is_parameter_next()) - { - return 0; - } + { + return 0; + } } // the paramter is in the middle somewhere... return this->temp_[current_index_] + offset; @@ -120,22 +122,22 @@ ACE_Arg_Shifter::cur_arg_strncasecmp (const ACE_TCHAR *flag) if (ACE_OS::strncasecmp(this->temp_[current_index_], flag, flag_length) == 0) - { - if (ACE_OS::strlen(temp_[current_index_]) == - flag_length) - { - // match and lengths are equal - return 0; - } - else - { - // matches, with more info to boot! + { + if (ACE_OS::strlen(temp_[current_index_]) == + flag_length) + { + // match and lengths are equal + return 0; + } + else + { + // matches, with more info to boot! size_t remaining = ACE_OS::strspn (this->temp_[current_index_] + flag_length, ACE_LIB_TEXT (" ")) + flag_length; return static_cast<int> (remaining); - } - } + } + } } // failure return -1; @@ -150,9 +152,9 @@ ACE_Arg_Shifter::consume_arg (int number) if (this->is_anything_left() >= number) { for (int i = 0, j = this->back_ - (number - 1); - i < number; - ++i, ++j, ++this->current_index_) - this->argv_[j] = this->temp_[this->current_index_]; + i < number; + ++i, ++j, ++this->current_index_) + this->argv_[j] = this->temp_[this->current_index_]; this->back_ -= number; retval = 1; @@ -170,9 +172,9 @@ ACE_Arg_Shifter::ignore_arg (int number) if (this->is_anything_left () >= number) { for (int i = 0; - i < number; - i++, this->current_index_++, this->front_++) - this->argv_[this->front_] = this->temp_[this->current_index_]; + i < number; + i++, this->current_index_++, this->front_++) + this->argv_[this->front_] = this->temp_[this->current_index_]; retval = 1; this->argc_ += number; @@ -206,3 +208,5 @@ ACE_Arg_Shifter::num_ignored_args (void) const { return this->front_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Arg_Shifter.h b/ace/Arg_Shifter.h index 66901baf659..b75537a1338 100644 --- a/ace/Arg_Shifter.h +++ b/ace/Arg_Shifter.h @@ -1,4 +1,4 @@ -// This may look like C, but it's really -*- C++ -*- +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Arg_Shifter * @@ -199,6 +201,8 @@ private: int front_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_ARG_SHIFTER_H */ diff --git a/ace/Argv_Type_Converter.cpp b/ace/Argv_Type_Converter.cpp index c6dead61178..2fca97a0671 100644 --- a/ace/Argv_Type_Converter.cpp +++ b/ace/Argv_Type_Converter.cpp @@ -13,6 +13,8 @@ ACE_RCSID (ace, #include "ace/OS_NS_string.h" #include "ace/OS_Errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_USES_WCHAR) ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, wchar_t** argv) : saved_argc_ (argc) @@ -204,3 +206,5 @@ ACE_Argv_Type_Converter::cleanup (void) this->char_passed_ = 0; } #endif // ACE_USES_WCHAR + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Argv_Type_Converter.h b/ace/Argv_Type_Converter.h index 276ca6c2845..89ba35c6220 100644 --- a/ace/Argv_Type_Converter.h +++ b/ace/Argv_Type_Converter.h @@ -22,6 +22,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Argv_Type_Converter @@ -107,6 +108,8 @@ private: #endif /* ACE_USES_WCHAR */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Argv_Type_Converter.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Argv_Type_Converter.inl b/ace/Argv_Type_Converter.inl index 16c657ce864..f56c83146b3 100644 --- a/ace/Argv_Type_Converter.inl +++ b/ace/Argv_Type_Converter.inl @@ -2,6 +2,7 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_TCHAR** ACE_Argv_Type_Converter::get_TCHAR_argv (void) @@ -39,3 +40,5 @@ ACE_Argv_Type_Converter::get_argc (void) { return this->saved_argc_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Array_Base.cpp b/ace/Array_Base.cpp index a054d900045..66f3ae7ec59 100644 --- a/ace/Array_Base.cpp +++ b/ace/Array_Base.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_ARRAY_BASE_C -#define ACE_ARRAY_BASE_C +#ifndef ACE_ARRAY_BASE_CPP +#define ACE_ARRAY_BASE_CPP #include "ace/Array_Base.h" @@ -21,13 +21,9 @@ #include "ace/os_include/os_errno.h" -ACE_RCSID (ace, - Array_Base, - "$Id$") - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Dynamically initialize an array. - template <class T> ACE_Array_Base<T>::ACE_Array_Base (size_t size, ACE_Allocator *alloc) @@ -210,4 +206,6 @@ ACE_Array_Iterator<T>::next (T *&item) } } -#endif /* ACE_ARRAY_BASE_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_ARRAY_BASE_CPP */ diff --git a/ace/Array_Base.h b/ace/Array_Base.h index 7b785e404b7..3511b998e98 100644 --- a/ace/Array_Base.h +++ b/ace/Array_Base.h @@ -22,6 +22,8 @@ #include "ace/Global_Macros.h" #include "ace/Malloc_Base.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration. template <class T> class ACE_Array_Iterator; @@ -190,6 +192,8 @@ private: ACE_Array_Base<T> &array_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Array_Base.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Array_Base.inl b/ace/Array_Base.inl index f5698deb9eb..3afc27e69b8 100644 --- a/ace/Array_Base.inl +++ b/ace/Array_Base.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ // Clean up the array (e.g., delete dynamically allocated memory). +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_INLINE ACE_Array_Base<T>::~ACE_Array_Base (void) { @@ -84,3 +87,5 @@ ACE_Array_Iterator<T>::done (void) const return this->current_ >= array_.size (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Array_Map.cpp b/ace/Array_Map.cpp index 01fbf4cdcae..e525890d8d4 100644 --- a/ace/Array_Map.cpp +++ b/ace/Array_Map.cpp @@ -11,6 +11,7 @@ #include <algorithm> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL #ifndef ACE_LACKS_MEMBER_TEMPLATES template<typename Key, typename Value, class EqualTo> @@ -281,4 +282,6 @@ operator< (ACE_Array_Map<Key, Value, EqualTo> const & lhs, rhs.begin (), rhs.end ()); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_ARRAY_MAP_CPP */ diff --git a/ace/Array_Map.h b/ace/Array_Map.h index 5952397aa2e..a5ee252012e 100644 --- a/ace/Array_Map.h +++ b/ace/Array_Map.h @@ -32,6 +32,7 @@ #include <iterator> #include <functional> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Array_Map @@ -300,6 +301,8 @@ bool operator< (ACE_Array_Map<Key, Value, EqualTo> const & lhs, // -------------------------------------------------------------- +ACE_END_VERSIONED_NAMESPACE_DECL + #ifdef __ACE_INLINE__ # include "ace/Array_Map.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Array_Map.inl b/ace/Array_Map.inl index 3c423390241..85cb1554c2f 100644 --- a/ace/Array_Map.inl +++ b/ace/Array_Map.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<typename Key, typename Value, class EqualTo> ACE_INLINE ACE_Array_Map<Key, Value, EqualTo>::ACE_Array_Map ( @@ -118,3 +120,5 @@ ACE_Array_Map<Key, Value, EqualTo>::operator[] ( iterator i = (this->insert (value_type (k, data_type ()))).first; return (*i).second; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp index 6bf4ab5c313..53d2b78fd59 100644 --- a/ace/Asynch_Acceptor.cpp +++ b/ace/Asynch_Acceptor.cpp @@ -24,6 +24,8 @@ ACE_RCSID(ace, Asynch_Acceptor, "$Id$") #include "ace/SOCK_Stream.h" #include "ace/Sock_Connect.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class HANDLER> ACE_Asynch_Acceptor<HANDLER>::ACE_Asynch_Acceptor (void) : listen_handle_ (ACE_INVALID_HANDLE), @@ -518,5 +520,7 @@ ACE_Asynch_Acceptor<HANDLER>::should_reissue_accept (void) return this->reissue_accept_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */ #endif /* ACE_ASYNCH_ACCEPTOR_C */ diff --git a/ace/Asynch_Acceptor.h b/ace/Asynch_Acceptor.h index 27efe871c0f..f5f236a09b2 100644 --- a/ace/Asynch_Acceptor.h +++ b/ace/Asynch_Acceptor.h @@ -26,6 +26,8 @@ #include "ace/Default_Constants.h" #include "ace/Asynch_IO.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations class ACE_Message_Block; class ACE_INET_Addr; @@ -279,6 +281,8 @@ private: int addr_family_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Asynch_Acceptor.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Asynch_Connector.cpp b/ace/Asynch_Connector.cpp index 1fbbcc512e7..65b23f9a60c 100644 --- a/ace/Asynch_Connector.cpp +++ b/ace/Asynch_Connector.cpp @@ -1,8 +1,7 @@ -/* -*- C++ -*- */ // $Id$ -#ifndef ACE_ASYNCH_CONNECTOR_C -#define ACE_ASYNCH_CONNECTOR_C +#ifndef ACE_ASYNCH_CONNECTOR_CPP +#define ACE_ASYNCH_CONNECTOR_CPP #include "ace/Asynch_Connector.h" @@ -10,8 +9,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Asynch_Connector, "$Id$") - #if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE) // This only works on platforms that support async I/O. @@ -22,6 +19,8 @@ ACE_RCSID(ace, Asynch_Connector, "$Id$") #include "ace/Message_Block.h" #include "ace/INET_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class HANDLER> ACE_Asynch_Connector<HANDLER>::ACE_Asynch_Connector (void) : pass_addresses_ (0), @@ -291,5 +290,7 @@ ACE_Asynch_Connector<HANDLER>::validate_new_connection (int new_value) this->validate_new_connection_ = new_value; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */ -#endif /* ACE_ASYNCH_CONNECTOR_C */ +#endif /* ACE_ASYNCH_CONNECTOR_CPP */ diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp index 58ddd94bd54..00c5f482a76 100644 --- a/ace/Asynch_IO.cpp +++ b/ace/Asynch_IO.cpp @@ -12,6 +12,8 @@ ACE_RCSID(ace, Asynch_IO, "$Id$") #include "ace/INET_Addr.h" #include "ace/Asynch_IO_Impl.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + size_t ACE_Asynch_Result::bytes_transferred (void) const { @@ -1335,3 +1337,5 @@ template class ACE_Refcounted_Auto_Ptr<ACE_Handler::Proxy, ACE_SYNCH_MUTEX>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Refcounted_Auto_Ptr<ACE_Handler::Proxy, ACE_SYNCH_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h index b1822e82c3c..82f5c85c3d9 100644 --- a/ace/Asynch_IO.h +++ b/ace/Asynch_IO.h @@ -47,6 +47,8 @@ #include "ace/os_include/sys/os_socket.h" #include "ace/os_include/sys/os_types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_WIN32) && ! defined (ACE_HAS_WINCE) \ && ! defined (ACE_HAS_PHARLAP) typedef TRANSMIT_FILE_BUFFERS ACE_TRANSMIT_FILE_BUFFERS; @@ -1661,6 +1663,8 @@ public: virtual void act (const void *); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/ #include /**/ "ace/post.h" #endif /* ACE_ASYNCH_IO_H */ diff --git a/ace/Asynch_IO_Impl.cpp b/ace/Asynch_IO_Impl.cpp index 8b52d7eab9a..8dba289d6ec 100644 --- a/ace/Asynch_IO_Impl.cpp +++ b/ace/Asynch_IO_Impl.cpp @@ -10,6 +10,8 @@ #include "ace/Asynch_IO_Impl.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Asynch_Result_Impl::~ACE_Asynch_Result_Impl (void) { } @@ -110,7 +112,6 @@ ACE_Asynch_Write_Dgram_Result_Impl::ACE_Asynch_Write_Dgram_Result_Impl (void) { } - - +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_WIN32 || ACE_HAS_WINCE */ diff --git a/ace/Asynch_IO_Impl.h b/ace/Asynch_IO_Impl.h index a6feb00fbf7..09173b3ce93 100644 --- a/ace/Asynch_IO_Impl.h +++ b/ace/Asynch_IO_Impl.h @@ -36,6 +36,8 @@ #include "ace/Asynch_IO.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration. class ACE_Proactor_Impl; @@ -812,6 +814,8 @@ protected: ACE_Asynch_Write_Dgram_Result_Impl (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Asynch_IO_Impl.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Asynch_IO_Impl.inl b/ace/Asynch_IO_Impl.inl index 3d61fae7942..495a768a972 100644 --- a/ace/Asynch_IO_Impl.inl +++ b/ace/Asynch_IO_Impl.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Asynch_Result_Impl::ACE_Asynch_Result_Impl (void) { @@ -98,3 +102,5 @@ ACE_Asynch_Transmit_File_Result_Impl::ACE_Asynch_Transmit_File_Result_Impl (void : ACE_Asynch_Result_Impl () { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Asynch_Pseudo_Task.cpp b/ace/Asynch_Pseudo_Task.cpp index ce936471e52..b3e25ef0298 100644 --- a/ace/Asynch_Pseudo_Task.cpp +++ b/ace/Asynch_Pseudo_Task.cpp @@ -7,6 +7,8 @@ ACE_RCSID(ace, Asynch_Pseudo_Task, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Asynch_Pseudo_Task::ACE_Asynch_Pseudo_Task() : select_reactor_ (), // should be initialized before reactor_ reactor_ (&select_reactor_, 0) // don't delete implementation @@ -18,7 +20,7 @@ ACE_Asynch_Pseudo_Task::~ACE_Asynch_Pseudo_Task() this->stop(); } -int +int ACE_Asynch_Pseudo_Task::start (void) { if (this->reactor_.initialized () == 0) @@ -30,10 +32,10 @@ ACE_Asynch_Pseudo_Task::start (void) return this->activate () == -1 ? -1 : 0; // If started, return 0 } -int +int ACE_Asynch_Pseudo_Task::stop (void) { - if (this->thr_count () == 0) // already stopped + if (this->thr_count () == 0) // already stopped return 0; if (this->reactor_.end_reactor_event_loop () == -1) @@ -47,7 +49,7 @@ ACE_Asynch_Pseudo_Task::stop (void) int ACE_Asynch_Pseudo_Task::svc (void) { -#if !defined (ACE_WIN32) +#if !defined (ACE_WIN32) sigset_t RT_signals; @@ -92,7 +94,7 @@ ACE_Asynch_Pseudo_Task::register_io_handler (ACE_HANDLE handle, ACE_LIB_TEXT ("register_io_handler (suspended)"))); this->reactor_.remove_handler (handle, ACE_Event_Handler::ALL_EVENTS_MASK - | ACE_Event_Handler::DONT_CALL); + | ACE_Event_Handler::DONT_CALL); return -1; } @@ -126,3 +128,5 @@ ACE_Asynch_Pseudo_Task::resume_io_handler (ACE_HANDLE handle) { return this->reactor_.resume_handler (handle); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Asynch_Pseudo_Task.h b/ace/Asynch_Pseudo_Task.h index a20570737b5..7fc68e16b70 100644 --- a/ace/Asynch_Pseudo_Task.h +++ b/ace/Asynch_Pseudo_Task.h @@ -25,6 +25,8 @@ #include "ace/Select_Reactor.h" #include "ace/Task.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /* * Specialization hook to replace the Reactor with the * concrete Reactor implementation, e.g., select_st, @@ -63,6 +65,8 @@ protected: ACE_Reactor reactor_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_ASYNCH_PSEUDO_TASK_H */ diff --git a/ace/Atomic_Op.cpp b/ace/Atomic_Op.cpp index eee9f742d2c..8737981a794 100644 --- a/ace/Atomic_Op.cpp +++ b/ace/Atomic_Op.cpp @@ -179,7 +179,8 @@ multi_cpu_exchange_add (volatile long *value, long rhs) } // end namespace - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + long (*ACE_Atomic_Op<ACE_Thread_Mutex, long>::increment_fn_) (volatile long *) = 0; long (*ACE_Atomic_Op<ACE_Thread_Mutex, long>::decrement_fn_) (volatile long *) = 0; long (*ACE_Atomic_Op<ACE_Thread_Mutex, long>::exchange_fn_) (volatile long *, long) = 0; @@ -246,4 +247,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_BUILTIN_ATOMIC_OP */ diff --git a/ace/Atomic_Op.h b/ace/Atomic_Op.h index 968ed3d49b5..c66664acaca 100644 --- a/ace/Atomic_Op.h +++ b/ace/Atomic_Op.h @@ -44,6 +44,9 @@ #endif /* ACE_HAS_THREADS */ #if defined (ACE_HAS_BUILTIN_ATOMIC_OP) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Atomic_Op<ACE_Thread_Mutex, long> * @@ -236,6 +239,8 @@ private: static long (*exchange_add_fn_) (volatile long *, long); }; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_BUILTIN_ATOMIC_OP */ #if defined (__ACE_INLINE__) diff --git a/ace/Atomic_Op.inl b/ace/Atomic_Op.inl index 7c481b206ad..81bf9d8a9f3 100644 --- a/ace/Atomic_Op.inl +++ b/ace/Atomic_Op.inl @@ -5,6 +5,8 @@ #if defined (ACE_HAS_BUILTIN_ATOMIC_OP) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (void) : value_ (0) @@ -294,4 +296,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::value_i (void) return this->value_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_BUILTIN_ATOMIC_OP */ diff --git a/ace/Atomic_Op_T.cpp b/ace/Atomic_Op_T.cpp index cfa7b1b316e..d31e49e081a 100644 --- a/ace/Atomic_Op_T.cpp +++ b/ace/Atomic_Op_T.cpp @@ -1,5 +1,5 @@ -#ifndef ACE_ATOMIC_OP_T_C -#define ACE_ATOMIC_OP_T_C +#ifndef ACE_ATOMIC_OP_T_CPP +#define ACE_ATOMIC_OP_T_CPP #include "ace/Atomic_Op_T.h" #include "ace/Log_Msg.h" @@ -12,6 +12,7 @@ #include "ace/Atomic_Op_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op_Ex) ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op) @@ -71,4 +72,6 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (const TYPE &c) // ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op"); } -#endif /* ACE_ATOMIC_OP_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_ATOMIC_OP_T_CPP */ diff --git a/ace/Atomic_Op_T.h b/ace/Atomic_Op_T.h index b87c1db1d4c..d9ce5a5ec29 100644 --- a/ace/Atomic_Op_T.h +++ b/ace/Atomic_Op_T.h @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Atomic_Op_Ex * @@ -234,6 +236,7 @@ private: ACE_Atomic_Op_Ex <ACE_LOCK, TYPE> impl_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Atomic_Op_T.inl" diff --git a/ace/Atomic_Op_T.inl b/ace/Atomic_Op_T.inl index 4a236220741..41b7ccd2af0 100644 --- a/ace/Atomic_Op_T.inl +++ b/ace/Atomic_Op_T.inl @@ -4,6 +4,8 @@ #include "ace/Guard_T.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // // ACE_Atomic_Op_Ex inline functions // @@ -277,3 +279,5 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::value_i (void) { return this->impl_.value_i (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Auto_Event.cpp b/ace/Auto_Event.cpp index 2c29a7dd24e..9e106ac8119 100644 --- a/ace/Auto_Event.cpp +++ b/ace/Auto_Event.cpp @@ -6,8 +6,11 @@ #include "ace/Auto_Event.inl" #endif /* __ACE_INLINE__ */ +ACE_RCSID (ace, + Auto_Event, + "$Id$") -ACE_RCSID(ace, Auto_Event, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Auto_Event::ACE_Auto_Event (int initial_state, int type, @@ -42,3 +45,5 @@ ACE_Auto_Event::dump (void) const ACE_Event::dump (); #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Auto_Event.h b/ace/Auto_Event.h index e722ee89500..762089e827f 100644 --- a/ace/Auto_Event.h +++ b/ace/Auto_Event.h @@ -24,6 +24,8 @@ #include "ace/Event.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Auto_Event * @@ -61,6 +63,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Auto_Event.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Auto_Event.inl b/ace/Auto_Event.inl index e8858bfa4a6..80048c29b99 100644 --- a/ace/Auto_Event.inl +++ b/ace/Auto_Event.inl @@ -1,7 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Auto_Event::~ACE_Auto_Event (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Auto_Functor.cpp b/ace/Auto_Functor.cpp index af1ff0142ce..91dbad1952b 100644 --- a/ace/Auto_Functor.cpp +++ b/ace/Auto_Functor.cpp @@ -1,3 +1,5 @@ +// $Id$ + #ifndef ACE_AUTO_FUNCTOR_CPP #define ACE_AUTO_FUNCTOR_CPP @@ -7,7 +9,7 @@ # include "ace/Auto_Functor.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Auto_Functor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template<typename X, typename Functor> ACE_Utils::Auto_Functor<X,Functor>::~Auto_Functor() @@ -35,4 +37,6 @@ ACE_Utils::Auto_Functor<X,Functor>::reset(X * p, Functor f) f_ = f; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /*ACE_AUTO_FUNCTOR_CPP*/ diff --git a/ace/Auto_Functor.h b/ace/Auto_Functor.h index 8a5f9f2ed71..b9bcf8342b1 100644 --- a/ace/Auto_Functor.h +++ b/ace/Auto_Functor.h @@ -20,6 +20,8 @@ #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_Utils { /** @@ -127,7 +129,9 @@ private: Functor f_; }; -} // namespace TAO +} // namespace ACE_Utils + +ACE_END_VERSIONED_NAMESPACE_DECL #if defined(__ACE_INLINE__) # include "ace/Auto_Functor.inl" diff --git a/ace/Auto_Functor.inl b/ace/Auto_Functor.inl index 6364894bc86..31c2dc25f97 100644 --- a/ace/Auto_Functor.inl +++ b/ace/Auto_Functor.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<typename X, typename Functor> ACE_INLINE ACE_Utils::Auto_Functor_Ref<X,Functor>:: Auto_Functor_Ref(X * p, Functor f) @@ -141,3 +145,5 @@ ACE_Utils::Auto_Functor<X,Functor>::operator ACE_Utils::Auto_Functor_Ref<X,Funct } #endif /* ACE_LACKS_MEMBER_TEMPLATES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Auto_IncDec_T.cpp b/ace/Auto_IncDec_T.cpp index c4e689e3ab2..cf33efd7d6e 100644 --- a/ace/Auto_IncDec_T.cpp +++ b/ace/Auto_IncDec_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_AUTO_INCDEC_T_C -#define ACE_AUTO_INCDEC_T_C +#ifndef ACE_AUTO_INCDEC_T_CPP +#define ACE_AUTO_INCDEC_T_CPP #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -10,12 +10,12 @@ #include "ace/Auto_IncDec_T.h" #include "ace/Log_Msg.h" -ACE_RCSID(ace, Auto_IncDec_T, "Auto_IncDec_T.cpp, by Edan Ayal") - #if !defined (__ACE_INLINE__) #include "ace/Auto_IncDec_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Auto_IncDec) template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> void @@ -29,4 +29,6 @@ ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::dump (void) const #endif /* ACE_HAS_DUMP */ } -#endif /* ACE_AUTO_INCDEC_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_AUTO_INCDEC_T_CPP */ diff --git a/ace/Auto_IncDec_T.h b/ace/Auto_IncDec_T.h index a9092c7c122..466463d196d 100644 --- a/ace/Auto_IncDec_T.h +++ b/ace/Auto_IncDec_T.h @@ -24,6 +24,8 @@ #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Auto_IncDec * @@ -62,6 +64,8 @@ private: ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Auto_IncDec_T.inl" // On non-Win32 platforms, this code will be inlined diff --git a/ace/Auto_IncDec_T.inl b/ace/Auto_IncDec_T.inl index 96658ed76c5..51daac0e84d 100644 --- a/ace/Auto_IncDec_T.inl +++ b/ace/Auto_IncDec_T.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Implicitly and automatically increment the counter. template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> ACE_INLINE @@ -19,3 +22,4 @@ ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::~ACE_Auto_IncDec (void) --this->counter_; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Auto_Ptr.cpp b/ace/Auto_Ptr.cpp index 9c2827504c9..3ac8e73cb86 100644 --- a/ace/Auto_Ptr.cpp +++ b/ace/Auto_Ptr.cpp @@ -1,8 +1,7 @@ -// Auto_Ptr.cpp // $Id$ -#if !defined (ACE_AUTO_PTR_C) -#define ACE_AUTO_PTR_C +#ifndef ACE_AUTO_PTR_CPP +#define ACE_AUTO_PTR_CPP #include "ace/Auto_Ptr.h" @@ -12,10 +11,13 @@ ACE_RCSID(ace, Auto_Ptr, "$Id$") -ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Ptr) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Ptr) ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Array_Ptr) +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__MINGW32__) # if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \ (ACE_HAS_STANDARD_CPP_LIBRARY != 0) @@ -27,4 +29,4 @@ template alloc; # endif /* ACE_HAS_STANDARD_CPP_LIBRARY != 0 */ #endif /* __MINGW32__ */ -#endif /* ACE_AUTO_PTR_C */ +#endif /* ACE_AUTO_PTR_CPP */ diff --git a/ace/Auto_Ptr.h b/ace/Auto_Ptr.h index 1f0d93062dc..eca987863a2 100644 --- a/ace/Auto_Ptr.h +++ b/ace/Auto_Ptr.h @@ -32,6 +32,9 @@ # pragma warning(disable: 4284) #endif /* _MSC_VER */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Auto_Basic_Ptr * @@ -163,6 +166,8 @@ public: X *operator-> () const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + // Some platforms have an older version of auto_ptr // support, which lacks reset, and cannot be disabled // easily. Portability to these platforms requires diff --git a/ace/Auto_Ptr.inl b/ace/Auto_Ptr.inl index ce4d53a490c..57adb236261 100644 --- a/ace/Auto_Ptr.inl +++ b/ace/Auto_Ptr.inl @@ -1,10 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Auto_Ptr.i - #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class X> ACE_INLINE void ACE_Auto_Basic_Ptr<X>::dump (void) const { @@ -167,3 +168,4 @@ ACE_Auto_Array_Ptr<X>::operator->() const return this->get (); } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Barrier.cpp b/ace/Barrier.cpp index 6637f1ec638..0f8ffeb61eb 100644 --- a/ace/Barrier.cpp +++ b/ace/Barrier.cpp @@ -14,7 +14,11 @@ # include "ace/Log_Msg.h" #endif /* ACE_HAS_DUMP */ -ACE_RCSID(ace, Barrier, "$Id$") +ACE_RCSID (ace, + Barrier, + "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Sub_Barrier) @@ -148,4 +152,6 @@ ACE_Process_Barrier::dump (void) const } #endif /* 0 */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ diff --git a/ace/Barrier.h b/ace/Barrier.h index 1bc2514c1de..f90fa7bb163 100644 --- a/ace/Barrier.h +++ b/ace/Barrier.h @@ -27,13 +27,14 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/OS_NS_errno.h" +#include "ace/config-all.h" // ACE platform supports some form of threading. #if !defined (ACE_HAS_THREADS) -#include "ace/config-all.h" +#include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Barrier @@ -190,6 +191,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Barrier.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Barrier.inl b/ace/Barrier.inl index bb7a483b3e3..9ab5c9fb111 100644 --- a/ace/Barrier.inl +++ b/ace/Barrier.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Sub_Barrier::~ACE_Sub_Barrier (void) { @@ -15,3 +18,5 @@ ACE_INLINE ACE_Thread_Barrier::~ACE_Thread_Barrier (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Base_Thread_Adapter.cpp b/ace/Base_Thread_Adapter.cpp index 5aa59b6a113..25fb2ba81c4 100644 --- a/ace/Base_Thread_Adapter.cpp +++ b/ace/Base_Thread_Adapter.cpp @@ -2,7 +2,9 @@ #include "ace/Base_Thread_Adapter.h" -ACE_RCSID(ace, Base_Thread_Adapter, "$Id$") +ACE_RCSID (ace, + Base_Thread_Adapter, + "$Id$") #if !defined (ACE_HAS_INLINED_OSCALLS) # include "ace/Base_Thread_Adapter.inl" @@ -12,6 +14,8 @@ ACE_RCSID(ace, Base_Thread_Adapter, "$Id$") # include "ace/OS_NS_Thread.h" #endif /* ACE_HAS_TSS_EMULATION */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::init_log_msg_hook_ = 0; ACE_INHERIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::inherit_log_msg_hook_ = 0; ACE_CLOSE_LOG_MSG_HOOK ACE_Base_Thread_Adapter::close_log_msg_hook_ = 0; @@ -83,12 +87,14 @@ ACE_Base_Thread_Adapter::thr_desc_log_msg (void) return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + // Run the thread entry point for the <ACE_Thread_Adapter>. This must // be an extern "C" to make certain compilers happy... #if defined (ACE_PSOS) extern "C" void -ace_thread_adapter (unsigned long args) +ACE_THREAD_ADAPTER_NAME (unsigned long args) { ACE_OS_TRACE ("ace_thread_adapter"); @@ -100,7 +106,7 @@ ace_thread_adapter (unsigned long args) ACE_TSS_Emulation::tss_open (ts_storage); #endif /* ACE_HAS_TSS_EMULATION */ - ACE_Base_Thread_Adapter *thread_args = + ACE_Base_Thread_Adapter * const thread_args = static_cast<ACE_Base_Thread_Adapter *> (args); // Invoke the user-supplied function with the args. @@ -108,7 +114,7 @@ ace_thread_adapter (unsigned long args) } #else /* ! defined (ACE_PSOS) */ extern "C" ACE_THR_FUNC_RETURN -ace_thread_adapter (void *args) +ACE_THREAD_ADAPTER_NAME (void *args) { ACE_OS_TRACE ("ace_thread_adapter"); @@ -120,7 +126,7 @@ ace_thread_adapter (void *args) ACE_TSS_Emulation::tss_open (ts_storage); #endif /* ACE_HAS_TSS_EMULATION */ - ACE_Base_Thread_Adapter *thread_args = + ACE_Base_Thread_Adapter * const thread_args = static_cast<ACE_Base_Thread_Adapter *> (args); #ifdef ACE_USES_GPROF diff --git a/ace/Base_Thread_Adapter.h b/ace/Base_Thread_Adapter.h index cd82e2b45ac..66848a365e3 100644 --- a/ace/Base_Thread_Adapter.h +++ b/ace/Base_Thread_Adapter.h @@ -1,3 +1,5 @@ +// -*- C++ -*- + //============================================================================= /** * @file Base_Thread_Adapter.h @@ -25,14 +27,31 @@ #include "os_include/sys/os_time.h" #endif // ACE_USES_GPROF +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + && !(defined (_MSC_VER) && _MSC_VER <= 1200) +// MSVC++ 6's preprocessor can't handle macro expansions required by +// the versioned namespace support. *sigh* + +# define ACE_THREAD_ADAPTER_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ace_thread_adapter) + +#else + +# define ACE_THREAD_ADAPTER_NAME ace_thread_adapter + +#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ + // Run the thread entry point for the ACE_Thread_Adapter. This must // be an extern "C" to make certain compilers happy... + #if defined (ACE_PSOS) -extern "C" void ace_thread_adapter (unsigned long args); +extern "C" void ACE_THREAD_ADAPTER_NAME (unsigned long args); #else /* ! defined (ACE_PSOS) */ -extern "C" ACE_Export ACE_THR_FUNC_RETURN ace_thread_adapter (void *args); +extern "C" ACE_Export ACE_THR_FUNC_RETURN ACE_THREAD_ADAPTER_NAME (void *args); #endif /* ACE_PSOS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_OS_Thread_Descriptor * @@ -108,7 +127,7 @@ protected: /// Constructor. ACE_Base_Thread_Adapter (ACE_THR_FUNC user_func, void *arg, - ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ace_thread_adapter, + ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME, ACE_OS_Thread_Descriptor *td = 0 # if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) , ACE_SEH_EXCEPT_HANDLER selector = 0 @@ -163,11 +182,10 @@ protected: struct itimerval itimer_; #endif // ACE_USES_GPROF - /// Friend declaration to avoid compiler warning: only defines a private - /// destructor and has no friends. - friend class ACE_Thread_Adapter_Has_Private_Destructor; }; +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/Base_Thread_Adapter.inl b/ace/Base_Thread_Adapter.inl index 814c50e610d..7fa3959034b 100644 --- a/ace/Base_Thread_Adapter.inl +++ b/ace/Base_Thread_Adapter.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE long ACE_OS_Thread_Descriptor::flags (void) const { @@ -32,6 +36,7 @@ ACE_Base_Thread_Adapter::entry_point (void) { return this->entry_point_; } + #ifdef ACE_USES_GPROF ACE_INLINE itimerval* ACE_Base_Thread_Adapter::timerval (void) @@ -39,3 +44,5 @@ ACE_Base_Thread_Adapter::timerval (void) return &(this->itimer_); } #endif // ACE_USES_GPROF + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Based_Pointer_Repository.cpp b/ace/Based_Pointer_Repository.cpp index 2973da69ee8..73d3db464b3 100644 --- a/ace/Based_Pointer_Repository.cpp +++ b/ace/Based_Pointer_Repository.cpp @@ -7,6 +7,8 @@ #include "ace/Synch_Traits.h" #include "ace/RW_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Based_Pointer_Repository_Rep * @@ -129,3 +131,5 @@ template class ACE_Map_Iterator_Base<void *, size_t, ACE_Null_Mutex>; template ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX> * ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX>::singleton_; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Based_Pointer_Repository.h b/ace/Based_Pointer_Repository.h index 586bfcf79be..f55a0963088 100644 --- a/ace/Based_Pointer_Repository.h +++ b/ace/Based_Pointer_Repository.h @@ -28,9 +28,13 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "ace/Singleton.h" #include "ace/Synch_Traits.h" #include "ace/os_include/os_stddef.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl., using the "Cheshire Cat" technique. class ACE_Based_Pointer_Repository_Rep; @@ -77,8 +81,6 @@ private: // ---------------------------------- -#include "ace/Singleton.h" - /// Declare a process wide singleton ACE_MEMORY_SINGLETON_DECLARE (ACE_Singleton, ACE_Based_Pointer_Repository, @@ -88,6 +90,7 @@ ACE_MEMORY_SINGLETON_DECLARE (ACE_Singleton, typedef ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX> ACE_BASED_POINTER_REPOSITORY; +ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" diff --git a/ace/Based_Pointer_T.cpp b/ace/Based_Pointer_T.cpp index c648d28834f..2155bc3a734 100644 --- a/ace/Based_Pointer_T.cpp +++ b/ace/Based_Pointer_T.cpp @@ -13,6 +13,8 @@ #include "ace/Based_Pointer_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class CONCRETE> ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (void) { @@ -114,4 +116,6 @@ ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const ACE_Based_Pointer<CONCRETE ACE_ASSERT (0); // not implemented. } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_BASED_POINTER_T_CPP */ diff --git a/ace/Based_Pointer_T.h b/ace/Based_Pointer_T.h index 91ebfc778cd..70bf617ad02 100644 --- a/ace/Based_Pointer_T.h +++ b/ace/Based_Pointer_T.h @@ -27,6 +27,8 @@ #pragma warning(disable: 4284) #endif /* _MSC_VER */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Based_Pointer_Basic * @@ -184,6 +186,8 @@ public: CONCRETE *operator-> (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Based_Pointer_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Based_Pointer_T.inl b/ace/Based_Pointer_T.inl index b45e14073e3..4d6b86e0c41 100644 --- a/ace/Based_Pointer_T.inl +++ b/ace/Based_Pointer_T.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #define ACE_COMPUTE_BASED_POINTER(P) (((char *) (P) - (P)->base_offset_) + (P)->target_) #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class CONCRETE> ACE_INLINE CONCRETE * ACE_Based_Pointer<CONCRETE>::operator->(void) { @@ -132,3 +135,5 @@ ACE_Based_Pointer<CONCRETE>::operator= (const ACE_Based_Pointer<CONCRETE> &rhs) ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator="); *this = rhs.addr (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Basic_Stats.cpp b/ace/Basic_Stats.cpp index eaf51d04a17..f81b29bfcaa 100644 --- a/ace/Basic_Stats.cpp +++ b/ace/Basic_Stats.cpp @@ -7,7 +7,11 @@ #include "ace/Basic_Stats.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Basic_Stats, "$Id$") +ACE_RCSID(ace, + Basic_Stats, + "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL void ACE_Basic_Stats::accumulate (const ACE_Basic_Stats &rhs) @@ -28,7 +32,7 @@ ACE_Basic_Stats::accumulate (const ACE_Basic_Stats &rhs) if (this->min_ > rhs.min_) { this->min_ = rhs.min_; - this->min_at_ = rhs.min_at_; + this->min_at_ = rhs.min_at_; } if (this->max_ < rhs.max_) { @@ -68,3 +72,5 @@ ACE_Basic_Stats::dump_results (const ACE_TCHAR *msg, #endif /* ACE_NLOGGING */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Basic_Stats.h b/ace/Basic_Stats.h index 7a6c7fd8ab6..2dc50694e63 100644 --- a/ace/Basic_Stats.h +++ b/ace/Basic_Stats.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /// Collect basic stats about a series of samples /** * Compute the average and standard deviation (aka jitter) for an @@ -75,6 +77,8 @@ public: ACE_UINT64 sum_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Basic_Stats.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Basic_Stats.inl b/ace/Basic_Stats.inl index b2fd80d121a..bbdce099907 100644 --- a/ace/Basic_Stats.inl +++ b/ace/Basic_Stats.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Basic_Stats::ACE_Basic_Stats (void) : samples_count_ (0) @@ -45,3 +49,5 @@ ACE_Basic_Stats::sample (ACE_UINT64 value) this->sum_ += value; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Basic_Types.cpp b/ace/Basic_Types.cpp index b31658212a0..6300cf7bb5d 100644 --- a/ace/Basic_Types.cpp +++ b/ace/Basic_Types.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, # include "ace/streams.h" # endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_U_LongLong::output (FILE *file) const { @@ -131,6 +133,7 @@ operator<< (ostream& os, const ACE_U_LongLong& ll) } # endif +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_LACKS_LONGLONG_T */ diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h index 4e93efd5847..a0825e8a1a2 100644 --- a/ace/Basic_Types.h +++ b/ace/Basic_Types.h @@ -169,97 +169,99 @@ # endif /* !defined (ACE_SIZEOF_LONG_LONG) */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // The sizes of the commonly implemented types are now known. Set up // typedefs for whatever we can. Some of these are needed for certain // cases of ACE_UINT64, so do them before the 64-bit stuff. #if defined (ACE_INT8_TYPE) - typedef ACE_INT8_TYPE ACE_INT8; + typedef ACE_INT8_TYPE ACE_INT8; #elif defined (ACE_HAS_INT8_T) - typedef int8_t ACE_INT8; + typedef int8_t ACE_INT8; #elif !defined (ACE_LACKS_SIGNED_CHAR) - typedef signed char ACE_INT8; + typedef signed char ACE_INT8; #else - typedef char ACE_INT8; + typedef char ACE_INT8; #endif /* defined (ACE_INT8_TYPE) */ #if defined (ACE_UINT8_TYPE) - typedef ACE_UINT8_TYPE ACE_UINT8; + typedef ACE_UINT8_TYPE ACE_UINT8; #elif defined (ACE_HAS_UINT8_T) - typedef uint8_t ACE_UINT8; + typedef uint8_t ACE_UINT8; #else - typedef unsigned char ACE_UINT8; + typedef unsigned char ACE_UINT8; #endif /* defined (ACE_UINT8_TYPE) */ #if defined (ACE_INT16_TYPE) - typedef ACE_INT16_TYPE ACE_INT16; + typedef ACE_INT16_TYPE ACE_INT16; #elif defined (ACE_HAS_INT16_T) - typedef int16_t ACE_INT16; + typedef int16_t ACE_INT16; #elif ACE_SIZEOF_SHORT == 2 - typedef short ACE_INT16; + typedef short ACE_INT16; #elif ACE_SIZEOF_INT == 2 - typedef int ACE_INT16; + typedef int ACE_INT16; #else # error Have to add to the ACE_INT16 type setting #endif /* defined (ACE_INT16_TYPE) */ #if defined (ACE_UINT16_TYPE) - typedef ACE_UINT16_TYPE ACE_UINT16; + typedef ACE_UINT16_TYPE ACE_UINT16; #elif defined (ACE_HAS_UINT16_T) - typedef uint16_t ACE_UINT16; + typedef uint16_t ACE_UINT16; #elif ACE_SIZEOF_SHORT == 2 - typedef unsigned short ACE_UINT16; + typedef unsigned short ACE_UINT16; #elif ACE_SIZEOF_INT == 2 - typedef unsigned int ACE_UINT16; + typedef unsigned int ACE_UINT16; #else # error Have to add to the ACE_UINT16 type setting #endif /* defined (ACE_UINT16_TYPE) */ #if defined (ACE_INT32_TYPE) - typedef ACE_INT32_TYPE ACE_INT32; + typedef ACE_INT32_TYPE ACE_INT32; #elif defined (ACE_HAS_INT32_T) - typedef int32_t ACE_INT32; + typedef int32_t ACE_INT32; #elif ACE_SIZEOF_INT == 4 - typedef int ACE_INT32; + typedef int ACE_INT32; #elif ACE_SIZEOF_LONG == 4 - typedef long ACE_INT32; + typedef long ACE_INT32; #else # error Have to add to the ACE_INT32 type setting #endif /* defined (ACE_INT32_TYPE) */ #if defined (ACE_UINT32_TYPE) - typedef ACE_UINT32_TYPE ACE_UINT32; + typedef ACE_UINT32_TYPE ACE_UINT32; #elif defined (ACE_HAS_UINT32_T) - typedef uint32_t ACE_UINT32; + typedef uint32_t ACE_UINT32; #elif ACE_SIZEOF_INT == 4 - typedef unsigned int ACE_UINT32; + typedef unsigned int ACE_UINT32; #elif ACE_SIZEOF_LONG == 4 - typedef unsigned long ACE_UINT32; + typedef unsigned long ACE_UINT32; #else # error Have to add to the ACE_UINT32 type setting #endif /* defined (ACE_UINT32_TYPE) */ #if defined (ACE_INT64_TYPE) - typedef ACE_INT64_TYPE ACE_INT64; + typedef ACE_INT64_TYPE ACE_INT64; #elif defined (ACE_HAS_INT64_T) - typedef int64_t ACE_INT64; + typedef int64_t ACE_INT64; #elif ACE_SIZEOF_LONG == 8 - typedef long ACE_INT64; + typedef long ACE_INT64; #elif !defined (ACE_LACKS_LONGLONG_T) && ACE_SIZEOF_LONG_LONG == 8 - typedef long long ACE_INT64; + typedef long long ACE_INT64; #endif /* defined (ACE_INT64_TYPE) */ #if !(defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)) /* See matching #if around ACE_U_LongLong class declaration below */ # if defined (ACE_UINT64_TYPE) - typedef ACE_UINT64_TYPE ACE_UINT64; + typedef ACE_UINT64_TYPE ACE_UINT64; # elif defined (ACE_HAS_UINT64_T) - typedef uint64_t ACE_UINT64; + typedef uint64_t ACE_UINT64; # elif ACE_SIZEOF_LONG == 8 - typedef unsigned long ACE_UINT64; + typedef unsigned long ACE_UINT64; # elif ACE_SIZEOF_LONG_LONG == 8 - typedef unsigned long long ACE_UINT64; + typedef unsigned long long ACE_UINT64; # endif /* defined (ACE_UINT64_TYPE) */ #endif /* !(ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T) */ @@ -297,6 +299,8 @@ typedef unsigned long ptrdiff_t; // evc3, PocketPC don't defined ptrdiff_t # endif typedef ptrdiff_t ptr_arith_t; +ACE_END_VERSIONED_NAMESPACE_DECL + // Byte-order (endian-ness) determination. # if defined (BYTE_ORDER) # if (BYTE_ORDER == LITTLE_ENDIAN) @@ -387,6 +391,8 @@ typedef ptrdiff_t ptr_arith_t; // Forward declaration for streams # include "ace/iosfwd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_U_LongLong * @@ -578,6 +584,8 @@ typedef ptrdiff_t ptr_arith_t; ostream &operator<< (ostream &, const ACE_U_LongLong &); #endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ +ACE_END_VERSIONED_NAMESPACE_DECL + # endif /* ACE_LACKS_LONGLONG_T */ // Conversions from ACE_UINT64 to ACE_UINT32. ACE_CU64_TO_CU32 should diff --git a/ace/Basic_Types.inl b/ace/Basic_Types.inl index 20d01562575..20ed2567eef 100644 --- a/ace/Basic_Types.inl +++ b/ace/Basic_Types.inl @@ -4,6 +4,8 @@ # if !defined (ACE_LACKS_LONGLONG_T) && defined (ACE_LACKS_UNSIGNEDLONGLONG_T) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Implementation for ACE_U_LongLong when we have signed long long // but no unsigned long long. @@ -134,7 +136,7 @@ ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const { if (data_ == n.data_) return true; - return data_ > n.data_; + return data_ > n.data_; } ACE_INLINE bool @@ -943,4 +945,6 @@ ACE_U_LongLong::operator/ (const int n) const } #endif /* ACE_SIZEOF_INT != 4 */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ diff --git a/ace/Bound_Ptr.h b/ace/Bound_Ptr.h index 833ab3fe84e..c80fe91dc65 100644 --- a/ace/Bound_Ptr.h +++ b/ace/Bound_Ptr.h @@ -23,6 +23,8 @@ #include "ace/Auto_Ptr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Bound_Ptr_Counter * @@ -333,6 +335,8 @@ private: X *ptr_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include "ace/Bound_Ptr.inl" #include /**/ "ace/post.h" diff --git a/ace/Bound_Ptr.inl b/ace/Bound_Ptr.inl index f95b7c94f59..7f6797156f9 100644 --- a/ace/Bound_Ptr.inl +++ b/ace/Bound_Ptr.inl @@ -8,6 +8,8 @@ # include "ace/Log_Msg.h" #endif /* ACE_NEW_THROWS_EXCEPTIONS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class ACE_LOCK> inline ACE_Bound_Ptr_Counter<ACE_LOCK> * ACE_Bound_Ptr_Counter<ACE_LOCK>::internal_create (int init_obj_ref_count) { @@ -482,3 +484,5 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::remove_ref () } return new_obj_ref_count; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/CDR_Base.cpp b/ace/CDR_Base.cpp index 156ae7984a4..bd90ffbaefd 100644 --- a/ace/CDR_Base.cpp +++ b/ace/CDR_Base.cpp @@ -12,6 +12,8 @@ ACE_RCSID (ace, CDR_Base, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // // See comments in CDR_Base.inl about optimization cases for swap_XX_array. // @@ -620,3 +622,5 @@ ACE_CDR::Float::operator!= (const ACE_CDR::Float & /* rhs */) const return false; } #endif /* _UNICOS */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/CDR_Base.h b/ace/CDR_Base.h index 7f19e1aaad9..04468fa07b1 100644 --- a/ace/CDR_Base.h +++ b/ace/CDR_Base.h @@ -45,6 +45,7 @@ # include "ace/If_Then_Else.h" #endif /* !_MSC_VER || _MSC_VER >= 1310 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Message_Block; @@ -303,6 +304,8 @@ public: #endif /* ACE_CDR_GIOP_MINOR_VERSION */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) # include "ace/CDR_Base.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/CDR_Base.inl b/ace/CDR_Base.inl index 6d6222ff40d..84e14344cc5 100644 --- a/ace/CDR_Base.inl +++ b/ace/CDR_Base.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // // The ACE_CDR::swap_X and ACE_CDR::swap_X_array routines are broken // in 4 cases for optimization: @@ -97,7 +99,7 @@ ACE_CDR::swap_4 (const char* orig, char* target) ACE_INLINE void ACE_CDR::swap_8 (const char* orig, char* target) { -#if defined(__amd64__) && defined(__GNUG__) +#if defined(__amd64__) && defined(__GNUG__) register unsigned long x = * reinterpret_cast<const unsigned long*> (orig); asm ("bswapq %1" : "=r" (x) : "0" (x)); @@ -196,4 +198,6 @@ ACE_CDR::next_size (size_t minsize) return newsize; } +ACE_END_VERSIONED_NAMESPACE_DECL + // **************************************************************** diff --git a/ace/CDR_Size.cpp b/ace/CDR_Size.cpp index e63d22c53be..3f2829cc909 100644 --- a/ace/CDR_Size.cpp +++ b/ace/CDR_Size.cpp @@ -9,6 +9,8 @@ ACE_RCSID (ace, CDR_Size, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_CDR::Boolean ACE_SizeCDR::write_wchar (ACE_CDR::WChar x) { @@ -241,3 +243,5 @@ operator<< (ACE_SizeCDR &ss, const ACE_CString &x) ss.write_string (x); return ss.good_bit (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/CDR_Size.h b/ace/CDR_Size.h index b52b04486c7..9ad1ec4fabc 100644 --- a/ace/CDR_Size.h +++ b/ace/CDR_Size.h @@ -36,6 +36,8 @@ #include "ace/SStringfwd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SizeCDR * @@ -172,16 +174,19 @@ protected: ACE_CDR::Octet minor_version_; }; - // @@ This operator should not be inlined since they force SString.h // to be included in this header. extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const ACE_CString &x); +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) # include "ace/CDR_Size.inl" #else /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Not used by CORBA or TAO extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, ACE_CDR::Char x); @@ -226,8 +231,11 @@ extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, const ACE_CDR::WChar* x); +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* __ACE_INLINE__ */ + #include /**/ "ace/post.h" #endif /* ACE_CDR_SIZE_H */ diff --git a/ace/CDR_Size.inl b/ace/CDR_Size.inl index 7697b9abdf7..4c835067ce8 100644 --- a/ace/CDR_Size.inl +++ b/ace/CDR_Size.inl @@ -4,6 +4,7 @@ #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_SizeCDR::ACE_SizeCDR (ACE_CDR::Octet major_version, @@ -415,3 +416,5 @@ operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wstring x) (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_)); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp index bc567468953..9a091f4f3fb 100644 --- a/ace/CDR_Stream.cpp +++ b/ace/CDR_Stream.cpp @@ -12,6 +12,8 @@ ACE_RCSID (ace, // **************************************************************** +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_OutputCDR::wchar_maxbytes_ = sizeof (ACE_CDR::WChar); ACE_OutputCDR::ACE_OutputCDR (size_t size, @@ -1667,3 +1669,5 @@ operator>> (ACE_InputCDR &is, ACE_CString &x) is.read_string (x); return is.good_bit (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/CE_Screen_Output.cpp b/ace/CE_Screen_Output.cpp index dd36a8385bb..3afc5325d9a 100644 --- a/ace/CE_Screen_Output.cpp +++ b/ace/CE_Screen_Output.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/CE_Screen_Output.h" @@ -6,6 +5,8 @@ #include "ace/Log_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_CE_Screen_Output::ACE_CE_Screen_Output(HWND hEdit) : handler_(hEdit) , pFile_(0) @@ -152,4 +153,6 @@ ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (FILE* pFile) return *this; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif // ACE_HAS_WINCE diff --git a/ace/CE_Screen_Output.h b/ace/CE_Screen_Output.h index 5252b810fb1..48e9d54cb13 100644 --- a/ace/CE_Screen_Output.h +++ b/ace/CE_Screen_Output.h @@ -24,8 +24,13 @@ #include "ace/Log_Msg_Callback.h" #include "ace/Log_Record.h" -const ACE_TCHAR endl[] = ACE_LIB_TEXT("\r\n"); -const ACE_TCHAR tab[] = ACE_LIB_TEXT("\t"); +namespace +{ + const ACE_TCHAR endl[] = ACE_LIB_TEXT("\r\n"); + const ACE_TCHAR tab[] = ACE_LIB_TEXT("\t"); +} + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_CE_Screen_Output @@ -87,7 +92,7 @@ public: private: - ACE_CE_Screen_Output(ACE_CE_Screen_Output&); + ACE_CE_Screen_Output (ACE_CE_Screen_Output&); private: @@ -98,5 +103,7 @@ private: FILE* pFile_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif // ACE_HAS_WINCE #endif // ACE_CE_SCREEN_OUTPUT_H diff --git a/ace/Cache_Map_Manager_T.cpp b/ace/Cache_Map_Manager_T.cpp index f2e6c88a273..f1d31f34f5c 100644 --- a/ace/Cache_Map_Manager_T.cpp +++ b/ace/Cache_Map_Manager_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_CACHE_MAP_MANAGER_T_C -#define ACE_CACHE_MAP_MANAGER_T_C +#ifndef ACE_CACHE_MAP_MANAGER_T_CPP +#define ACE_CACHE_MAP_MANAGER_T_CPP #include "ace/Cache_Map_Manager_T.h" @@ -16,7 +16,7 @@ #include "ace/Cache_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Cache_Map_Manager_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Manager) @@ -415,4 +415,6 @@ ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> { } -#endif /* ACE_CACHE_MAP_MANAGER_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_CACHE_MAP_MANAGER_T_CPP */ diff --git a/ace/Cache_Map_Manager_T.h b/ace/Cache_Map_Manager_T.h index cd981a8d702..d35e5a81739 100644 --- a/ace/Cache_Map_Manager_T.h +++ b/ace/Cache_Map_Manager_T.h @@ -25,6 +25,8 @@ #include "ace/Global_Macros.h" #include "ace/Pair_T.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration. class ACE_Allocator; @@ -384,6 +386,8 @@ protected: REVERSE_IMPLEMENTATION reverse_iterator_implementation_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Cache_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Cache_Map_Manager_T.inl b/ace/Cache_Map_Manager_T.inl index ca559696665..5b7cb29f499 100644 --- a/ace/Cache_Map_Manager_T.inl +++ b/ace/Cache_Map_Manager_T.inl @@ -2,6 +2,8 @@ // //$Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class KEY, class VALUE, class MAP, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> ACE_INLINE int ACE_Cache_Map_Manager<KEY, VALUE, MAP, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>::purge (void) { @@ -240,3 +242,4 @@ ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRAT return this->reverse_iterator_implementation_; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Cached_Connect_Strategy_T.cpp b/ace/Cached_Connect_Strategy_T.cpp index f44f3209987..78093665f99 100644 --- a/ace/Cached_Connect_Strategy_T.cpp +++ b/ace/Cached_Connect_Strategy_T.cpp @@ -1,7 +1,7 @@ //$Id$ -#ifndef CACHED_CONNECT_STRATEGY_T_C -#define CACHED_CONNECT_STRATEGY_T_C +#ifndef ACE_CACHED_CONNECT_STRATEGY_T_CPP +#define ACE_CACHED_CONNECT_STRATEGY_T_CPP #include "ace/Cached_Connect_Strategy_T.h" @@ -16,11 +16,11 @@ #include "ace/WFMO_Reactor.h" #include "ace/Pair_T.h" -ACE_RCSID(ace, Cached_Connect_Strategy_T, "$Id$") - #define ACE_T1 class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX #define ACE_T2 SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <ACE_T1> ACE_Cached_Connect_Strategy_Ex<ACE_T2>::ACE_Cached_Connect_Strategy_Ex (CACHING_STRATEGY &caching_s, @@ -726,7 +726,9 @@ ACE_Bounded_Cached_Connect_Strategy<ACE_T2>::find_or_create_svc_handler_i ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Cached_Connect_Strategy) +ACE_END_VERSIONED_NAMESPACE_DECL + #undef ACE_T1 #undef ACE_T2 -#endif /* CACHED_CONNECT_STRATEGY_T_C */ +#endif /* ACE_CACHED_CONNECT_STRATEGY_T_CPP */ diff --git a/ace/Cached_Connect_Strategy_T.h b/ace/Cached_Connect_Strategy_T.h index 8c051a240d2..f04392846cb 100644 --- a/ace/Cached_Connect_Strategy_T.h +++ b/ace/Cached_Connect_Strategy_T.h @@ -30,6 +30,8 @@ // For linkers which cant grok long names... #define ACE_Cached_Connect_Strategy_Ex ACCSE +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Cached_Connect_Strategy_Ex * @@ -246,6 +248,7 @@ protected: size_t max_size_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Cached_Connect_Strategy_T.cpp" diff --git a/ace/Caching_Strategies_T.cpp b/ace/Caching_Strategies_T.cpp index 7adf976162f..db2f9067ec9 100644 --- a/ace/Caching_Strategies_T.cpp +++ b/ace/Caching_Strategies_T.cpp @@ -1,7 +1,7 @@ //$Id$ -#ifndef CACHING_STRATEGIES_T_C -#define CACHING_STRATEGIES_T_C +#ifndef ACE_CACHING_STRATEGIES_T_CPP +#define ACECACHING_STRATEGIES_T_CPP #include "ace/Caching_Strategies_T.h" #include "ace/Log_Msg.h" @@ -14,7 +14,7 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Caching_Strategies_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template<class ATTRIBUTES, class CACHING_UTILITY> ACE_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::~ACE_Caching_Strategy (void) @@ -54,4 +54,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_LFU_Caching_Strategy) ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Caching_Strategy) ACE_ALLOC_HOOK_DEFINE(ACE_Null_Caching_Strategy) -#endif /* CACHING_STRATEGIES_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_CACHING_STRATEGIES_T_CPP */ diff --git a/ace/Caching_Strategies_T.h b/ace/Caching_Strategies_T.h index cbf1157a96e..74f7ff2b1fe 100644 --- a/ace/Caching_Strategies_T.h +++ b/ace/Caching_Strategies_T.h @@ -29,6 +29,8 @@ // For linkers that cant grok long names. #define ACE_Caching_Strategy ACS +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Caching_Strategy * @@ -531,6 +533,8 @@ private: CACHING_UTILITY caching_utility_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Caching_Strategies_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Caching_Strategies_T.inl b/ace/Caching_Strategies_T.inl index 12e82be947b..cbe5f9c35ff 100644 --- a/ace/Caching_Strategies_T.inl +++ b/ace/Caching_Strategies_T.inl @@ -1,10 +1,13 @@ -/* -*-C++-*- */ +// -*-C++-*- +// //$Id$ ////////////////////////////////////////////////////////////////////////////////// #include "ace/OS_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation, int delete_implementation) @@ -457,4 +460,6 @@ ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL + ////////////////////////////////////////////////////////////////////////////////// diff --git a/ace/Caching_Utility_T.cpp b/ace/Caching_Utility_T.cpp index 767adb3c07d..c1b5e52993a 100644 --- a/ace/Caching_Utility_T.cpp +++ b/ace/Caching_Utility_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef CACHING_UTILITY_T_C -#define CACHING_UTILITY_T_C +#ifndef ACE_CACHING_UTILITY_T_CPP +#define ACE_CACHING_UTILITY_T_CPP #include "ace/Caching_Utility_T.h" @@ -11,13 +11,12 @@ #include "ace/Min_Max.h" #include "ace/OS_Memory.h" -// #include "ace/Strategies.h" #include "ace/Recyclable.h" -ACE_RCSID(ace, Caching_Utility_T, "$Id$") - ////////////////////////////////////////////////////////////////////////////// +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Pair_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy, int delete_cleanup_strategy) @@ -495,4 +494,6 @@ ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum ( ACE_UNUSED_ARG (value_to_remove); } -#endif /* CACHING_UTILITY_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_CACHING_UTILITY_T_CPP */ diff --git a/ace/Caching_Utility_T.h b/ace/Caching_Utility_T.h index 03b95ce3cd1..c5238dd2a0a 100644 --- a/ace/Caching_Utility_T.h +++ b/ace/Caching_Utility_T.h @@ -27,6 +27,8 @@ // For linkers that cant grok long names. #define ACE_Pair_Caching_Utility APUTIL +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Pair_Caching_Utility * @@ -330,6 +332,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Null_Caching_Utility (const ACE_Null_Caching_Utility<KEY,VALUE,CONTAINER,ITERATOR,ATTRIBUTES> &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Caching_Utility_T.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Capabilities.cpp b/ace/Capabilities.cpp index 2af1ef65954..a748901e8f2 100644 --- a/ace/Capabilities.cpp +++ b/ace/Capabilities.cpp @@ -16,6 +16,7 @@ ACE_RCSID (ace, #define ACE_ESC ((ACE_TCHAR)0x1b) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_CapEntry::~ACE_CapEntry (void) { @@ -364,3 +365,5 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Ha #pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex> #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Capabilities.h b/ace/Capabilities.h index 902dc31a540..356e0e2975e 100644 --- a/ace/Capabilities.h +++ b/ace/Capabilities.h @@ -27,6 +27,8 @@ #include "ace/SString.h" #include "ace/Functor_String.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_CapEntry * @@ -204,6 +206,8 @@ is_line (const ACE_TCHAR *line) } #endif /* ACE_IS_SPLITTING */ +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Capabilities.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Capabilities.inl b/ace/Capabilities.inl index ca168c0491a..053e0ecf7b6 100644 --- a/ace/Capabilities.inl +++ b/ace/Capabilities.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_CapEntry::ACE_CapEntry (int captype) : captype_ (captype) @@ -46,3 +48,5 @@ ACE_BoolCapEntry::getval (void) const { return val_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Cleanup.cpp b/ace/Cleanup.cpp index 9e51dd6cf70..71b5ebf0d74 100644 --- a/ace/Cleanup.cpp +++ b/ace/Cleanup.cpp @@ -1,9 +1,10 @@ -// -*- C++ -*- // $Id$ #include "ace/Cleanup.h" -ACE_RCSID(ace, Cleanup, "$Id$") +ACE_RCSID (ace, + Cleanup, + "$Id$") #if !defined (ACE_HAS_INLINED_OSCALLS) # include "ace/Cleanup.inl" @@ -11,6 +12,8 @@ ACE_RCSID(ace, Cleanup, "$Id$") #include "ace/OS_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Cleanup::cleanup (void *) { @@ -163,7 +166,7 @@ ACE_OS_Exit_Info::find (void *object) } void -ACE_OS_Exit_Info::call_hooks () +ACE_OS_Exit_Info::call_hooks (void) { // Call all registered cleanup hooks, in reverse order of // registration. @@ -183,3 +186,5 @@ ACE_OS_Exit_Info::call_hooks () (*info.cleanup_hook_) (info.object_, info.param_); } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Cleanup.h b/ace/Cleanup.h index 4cf7629ac4a..35442a26d86 100644 --- a/ace/Cleanup.h +++ b/ace/Cleanup.h @@ -26,6 +26,9 @@ # endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/ACE_export.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Cleanup * @@ -113,6 +116,8 @@ private: ACE_Cleanup_Info_Node *registered_objects_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/Cleanup.inl b/ace/Cleanup.inl index 841c715bf1a..02d3c223f8d 100644 --- a/ace/Cleanup.inl +++ b/ace/Cleanup.inl @@ -1,7 +1,12 @@ // -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Cleanup::ACE_Cleanup (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Cleanup_Strategies_T.cpp b/ace/Cleanup_Strategies_T.cpp index 5b9425ee5da..f17f181f121 100644 --- a/ace/Cleanup_Strategies_T.cpp +++ b/ace/Cleanup_Strategies_T.cpp @@ -1,7 +1,7 @@ //$Id$ -#ifndef CLEANUP_STRATEGIES_T_C -#define CLEANUP_STRATEGIES_T_C +#ifndef ACE_CLEANUP_STRATEGIES_T_CPP +#define ACE_CLEANUP_STRATEGIES_T_CPP #include "ace/Cleanup_Strategies_T.h" @@ -9,6 +9,8 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + //////////////////////////////////////////////////////////////////////////// template <class KEY, class VALUE, class CONTAINER> @@ -19,19 +21,18 @@ ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>::~ACE_Cleanup_Strategy (void) template <class KEY, class VALUE, class CONTAINER> int ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container, KEY *key, - VALUE *value) + VALUE *) { - ACE_UNUSED_ARG (value); - return container.unbind (*key); } //////////////////////////////////////////////////////////////////////////// template <class KEY, class VALUE, class CONTAINER> int -ACE_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container, - KEY *key, - VALUE *) +ACE_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup ( + CONTAINER &container, + KEY *key, + VALUE *) { VALUE value; @@ -48,9 +49,12 @@ ACE_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAIN ///////////////////////////////////////////////////////////////////////////// template <class KEY, class VALUE, class CONTAINER> int -ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &, - KEY *, - VALUE *value) +ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<KEY, + VALUE, + CONTAINER>::cleanup ( + CONTAINER &, + KEY *, + VALUE *value) { return value->first ()->handle_close_i (); } @@ -58,9 +62,10 @@ ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::clean //////////////////////////////////////////////////////////////////////////// template <class KEY, class VALUE, class CONTAINER> int -ACE_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container, - KEY *key, - VALUE *value) +ACE_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup ( + CONTAINER &container, + KEY *key, + VALUE *value) { // Remove the item from cache only if the handler isnt in use. if ((*value)->active () == 0) @@ -78,15 +83,11 @@ ACE_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &contain //////////////////////////////////////////////////////////////////////////// template <class KEY, class VALUE, class CONTAINER> int -ACE_Null_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container, - KEY *key, - VALUE *value) +ACE_Null_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &, + KEY *, + VALUE *) { - ACE_UNUSED_ARG (container); - ACE_UNUSED_ARG (key); - ACE_UNUSED_ARG (value); - return 0; } -#endif /* CLEANUP_STRATEGIES_T_C */ +#endif /* ACE_CLEANUP_STRATEGIES_T_CPP */ diff --git a/ace/Codecs.cpp b/ace/Codecs.cpp index 8e717cb4533..027231d322b 100644 --- a/ace/Codecs.cpp +++ b/ace/Codecs.cpp @@ -7,14 +7,28 @@ ACE_RCSID (ace, Codecs, "$Id$") -const ACE_Byte ACE_Base64::alphabet_[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +namespace +{ + // Just in case ... +#undef alphabet +#undef pad +#undef max_columns + + // Symbols which form the Base64 alphabet (Defined as per RFC 2045) + ACE_Byte const alphabet[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -const ACE_Byte ACE_Base64::pad_ = '='; + // The padding character used in the encoding + ACE_Byte const pad = '='; -int ACE_Base64::init_ = 0; + // Number of columns per line of encoded output (Can have a maximum + // value of 76). + int const max_columns = 72; +} -int ACE_Base64::max_columns_ = 72; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +bool ACE_Base64::init_ = false; ACE_Byte ACE_Base64::decoder_[256]; @@ -34,7 +48,7 @@ ACE_Base64::encode (const ACE_Byte* input, ACE_Byte* result = 0; size_t length = ((input_len + 2) / 3) * 4; - size_t num_lines = length / ACE_Base64::max_columns_ + 1; + size_t num_lines = length / max_columns + 1; length += num_lines + 1; ACE_NEW_RETURN (result, ACE_Byte[length], 0); @@ -50,12 +64,12 @@ ACE_Base64::encode (const ACE_Byte* input, if (char_count == 3) { - result[pos++] = ACE_Base64::alphabet_[bits >> 18]; - result[pos++] = ACE_Base64::alphabet_[(bits >> 12) & 0x3f]; - result[pos++] = ACE_Base64::alphabet_[(bits >> 6) & 0x3f]; - result[pos++] = ACE_Base64::alphabet_[bits & 0x3f]; + result[pos++] = alphabet[bits >> 18]; + result[pos++] = alphabet[(bits >> 12) & 0x3f]; + result[pos++] = alphabet[(bits >> 6) & 0x3f]; + result[pos++] = alphabet[bits & 0x3f]; cols += 4; - if (cols == ACE_Base64::max_columns_) { + if (cols == max_columns) { result[pos++] = '\n'; cols = 0; } @@ -71,17 +85,17 @@ ACE_Base64::encode (const ACE_Byte* input, if (char_count != 0) { bits <<= (16 - (8 * char_count)); - result[pos++] = ACE_Base64::alphabet_[bits >> 18]; - result[pos++] = ACE_Base64::alphabet_[(bits >> 12) & 0x3f]; + result[pos++] = alphabet[bits >> 18]; + result[pos++] = alphabet[(bits >> 12) & 0x3f]; if (char_count == 1) { - result[pos++] = pad_; - result[pos++] = pad_; + result[pos++] = pad; + result[pos++] = pad; } else { - result[pos++] = ACE_Base64::alphabet_[(bits >> 6) & 0x3f]; - result[pos++] = pad_; + result[pos++] = alphabet[(bits >> 6) & 0x3f]; + result[pos++] = pad; } if (cols > 0) result[pos++] = '\n'; @@ -99,7 +113,7 @@ ACE_Base64::length (const ACE_Byte* input) ACE_Byte* ptr = const_cast<ACE_Byte*> (input); while (*ptr != 0 && - (member_[*(ptr)] == 1 || *ptr == pad_ + (member_[*(ptr)] == 1 || *ptr == pad || ACE_OS::ace_isspace (*ptr))) ptr++; size_t len = ptr - input; @@ -122,7 +136,7 @@ ACE_Base64::decode (const ACE_Byte* input, size_t* output_len) ACE_Byte* ptr = const_cast<ACE_Byte*> (input); while (*ptr != 0 && - (member_[*(ptr)] == 1 || *ptr == pad_ + (member_[*(ptr)] == 1 || *ptr == pad || ACE_OS::ace_isspace (*ptr))) ptr++; size_t input_len = ptr - input; @@ -134,7 +148,7 @@ ACE_Base64::decode (const ACE_Byte* input, size_t* output_len) size_t i = 0; for (; i < input_len; ++i) { - if (input[i] == pad_) + if (input[i] == pad) break; if (!ACE_Base64::member_[input[i]]) continue; @@ -200,12 +214,14 @@ ACE_Base64::init () { if (!ACE_Base64::init_) { - for (ACE_Byte i = 0; i < sizeof (ACE_Base64::alphabet_); ++i) + for (ACE_Byte i = 0; i < sizeof (alphabet); ++i) { - ACE_Base64::decoder_[ACE_Base64::alphabet_[i]] = i; - ACE_Base64::member_[ACE_Base64::alphabet_[i]] = 1; + ACE_Base64::decoder_[alphabet[i]] = i; + ACE_Base64::member_ [alphabet[i]] = 1; } - ACE_Base64::init_ = 1; + ACE_Base64::init_ = true; } return; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Codecs.h b/ace/Codecs.h index 899092b29aa..9c2152a4fa6 100644 --- a/ace/Codecs.h +++ b/ace/Codecs.h @@ -1,5 +1,6 @@ // -*- C++ -*- +//============================================================================= /** * @file Codecs.h * @@ -13,9 +14,11 @@ * One: Format of Internet Message Bodies. * */ +//============================================================================= #ifndef ACE_CODECS_H #define ACE_CODECS_H + #include /**/ "ace/pre.h" #include "ace/Basic_Types.h" @@ -25,6 +28,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Base64 * @@ -37,7 +42,6 @@ */ class ACE_Export ACE_Base64 { - friend class ace_dewarn_gplusplus; public: //@{ @@ -77,17 +81,21 @@ public: //@} +protected: + + // Prevent default construction. + ACE_Base64 (void) {} + private: - /// Initialize the tables for encoding/decoding. - static void init(); + // Preventing copying and assignment. + ACE_Base64 (ACE_Base64 const &); + ACE_Base64 & operator= (ACE_Base64 const &); - // Prevent construction in any form - ACE_UNIMPLEMENTED_FUNC (ACE_Base64 ()) - ACE_UNIMPLEMENTED_FUNC (ACE_Base64 (const ACE_Base64&)) + /// Initialize the tables for encoding/decoding. + static void init (void); - /// Symbols which form the Base64 alphabet (Defined as per RFC 2045) - static const ACE_Byte alphabet_[]; +private: /// Alphabet used for decoding i.e decoder_[alphabet_[i = 0..63]] = i static ACE_Byte decoder_[]; @@ -96,16 +104,13 @@ private: /// member_[alphabet_[0..63]] = 1 static ACE_Byte member_[]; - /// The padding character used in the encoding - static const ACE_Byte pad_; - /// Boolean to denote whether initialization is complete - static int init_; - - /// Number of columns per line of encoded output (Can have a max value of 76) - static int max_columns_; + static bool init_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" + #endif /* ACE_CODECS_H */ diff --git a/ace/Codeset_IBM1047.cpp b/ace/Codeset_IBM1047.cpp index aeda9a3c43e..469c15089c4 100644 --- a/ace/Codeset_IBM1047.cpp +++ b/ace/Codeset_IBM1047.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ // ============================================================================ @@ -22,10 +21,57 @@ #if defined(ACE_MVS) -ACE_RCSID(ace, Codeset_IBM1047, "$Id$") +ACE_RCSID (ace, + Codeset_IBM1047, + "$Id$") // **************************************************************** +namespace +{ + char const to_IBM1047[] = + { + "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" // 00-0F + "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x35\x1F" // 10-1F + "\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61" // 20-2F + "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F" // 30-3F + "\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6" // 40-4F + "\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xAD\xE0\xBD\x5F\x6D" // 50-5F + "\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96" // 60-6F + "\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x4F\xD0\xA1\x07" // 70-7F + "\x43\x20\x21\x1C\x23\xEB\x24\x9B\x71\x28\x38\x49\x90\xBA\xEC\xDF" // 80-8F + "\x45\x29\x2A\x9D\x72\x2B\x8A\x9A\x67\x56\x64\x4A\x53\x68\x59\x46" // 90-9F + "\xEA\xDA\x2C\xDE\x8B\x55\x41\xFE\x58\x51\x52\x48\x69\xDB\x8E\x8D" // A0-AF + "\x73\x74\x75\xFA\x15\xB0\xB1\xB3\xB4\xB5\x6A\xB7\xB8\xB9\xCC\xBC" // B0-BF + "\xAB\x3E\x3B\x0A\xBF\x8F\x3A\x14\xA0\x17\xCB\xCA\x1A\x1B\x9C\x04" // C0-CF + "\x34\xEF\x1E\x06\x08\x09\x77\x70\xBE\xBB\xAC\x54\x63\x65\x66\x62" // D0-DF + "\x30\x42\x47\x57\xEE\x33\xB6\xE1\xCD\xED\x36\x44\xCE\xCF\x31\xAA" // E0-EF + "\xFC\x9E\xAE\x8C\xDD\xDC\x39\xFB\x80\xAF\xFD\x78\x76\xB2\x9F\xFF" // F0-FF +}; + + char const from_IBM1047[] = + { + "\x00\x01\x02\x03\xCF\x09\xD3\x7F\xD4\xD5\xC3\x0B\x0C\x0D\x0E\x0F" // 00-0F + "\x10\x11\x12\x13\xC7\xB4\x08\xC9\x18\x19\xCC\xCD\x83\x1D\xD2\x1F" // 10-1F + "\x81\x82\x1C\x84\x86\x0A\x17\x1B\x89\x91\x92\x95\xA2\x05\x06\x07" // 20-2F + "\x20\xEE\x16\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\xC1\x1A" // 30-3F + "\x20\xA6\xE1\x80\xEB\x90\x9F\xE2\xAB\x8B\x9B\x2E\x3C\x28\x2B\x7C" // 40-4F + "\x26\xA9\xAA\x9C\xDB\xA5\x99\xE3\xA8\x9E\x21\x24\x2A\x29\x3B\x5E" // 50-5F + "\x2D\x2F\xDF\xDC\x9A\xDD\xDE\x98\x9D\xAC\xBA\x2C\x25\x5F\x3E\x3F" // 60-6F + "\xD7\x88\x94\xB0\xB1\xB2\xFC\xD6\xFB\x60\x3A\x23\x40\x27\x3D\x22" // 70-7F + "\xF8\x61\x62\x63\x64\x65\x66\x67\x68\x69\x96\xA4\xF3\xAF\xAE\xC5" // 80-8F + "\x8C\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x97\x87\xCE\x93\xF1\xFE" // 90-9F + "\xC8\x7E\x73\x74\x75\x76\x77\x78\x79\x7A\xEF\xC0\xDA\x5B\xF2\xF9" // A0-AF + "\xB5\xB6\xFD\xB7\xB8\xB9\xE6\xBB\xBC\xBD\x8D\xD9\xBF\x5D\xD8\xC4" // B0-BF + "\x7B\x41\x42\x43\x44\x45\x46\x47\x48\x49\xCB\xCA\xBE\xE8\xEC\xED" // C0-CF + "\x7D\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\xA1\xAD\xF5\xF4\xA3\x8F" // D0-DF + "\x5C\xE7\x53\x54\x55\x56\x57\x58\x59\x5A\xA0\x85\x8E\xE9\xE4\xD1" // E0-EF + "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xB3\xF7\xF0\xFA\xA7\xFF" // F0-FF + }; +} + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_IBM1047_ISO8859::ACE_IBM1047_ISO8859 (void) { } @@ -52,7 +98,7 @@ ACE_IBM1047_ISO8859::read_char (ACE_InputCDR &in, { if (this->read_1 (in, reinterpret_cast<ACE_CDR::Octet*> (&x))) { - x = ACE_to_IBM1047[x]; + x = to_IBM1047[x]; return 1; } return 0; @@ -94,7 +140,7 @@ ACE_IBM1047_ISO8859::read_char_array (ACE_InputCDR& in, len)) { for (ACE_CDR::ULong i = 0; i != len; ++i) - x[i] = ACE_to_IBM1047[x[i]]; + x[i] = to_IBM1047[x[i]]; return 1; } @@ -108,7 +154,7 @@ ACE_IBM1047_ISO8859::write_char (ACE_OutputCDR& out, { return this->write_1 (out, - reinterpret_cast<const ACE_CDR::Octet*> (&ACE_from_IBM1047[x])); + reinterpret_cast<const ACE_CDR::Octet*> (&from_IBM1047[x])); } ACE_CDR::Boolean @@ -132,7 +178,7 @@ ACE_IBM1047_ISO8859::write_char_array (ACE_OutputCDR& out, ACE_OS::memcpy (buf, x, len); for (ACE_CDR::ULong i = 0; i != len; ++i) - buf[i] = ACE_from_IBM1047[buf[i]]; + buf[i] = from_IBM1047[buf[i]]; return 1; } @@ -170,7 +216,7 @@ ACE_ISO8859_IBM1047::read_char (ACE_InputCDR& in, { if (this->read_1 (in, reinterpret_cast<ACE_CDR::Octet*> (&x))) { - x = ACE_from_IBM1047[x]; + x = from_IBM1047[x]; return 1; } return 0; @@ -212,7 +258,7 @@ ACE_ISO8859_IBM1047::read_char_array (ACE_InputCDR &in, len)) { for (ACE_CDR::ULong i = 0; i != len; ++i) - x[i] = ACE_from_IBM1047[x[i]]; + x[i] = from_IBM1047[x[i]]; return 1; } @@ -226,7 +272,7 @@ ACE_ISO8859_IBM1047::write_char (ACE_OutputCDR &out, { return this->write_1 (out, - reinterpret_cast<const ACE_CDR::Octet *> (&ACE_to_IBM1047[x])); + reinterpret_cast<const ACE_CDR::Octet *> (&to_IBM1047[x])); } ACE_CDR::Boolean @@ -252,7 +298,7 @@ ACE_ISO8859_IBM1047::write_char_array (ACE_OutputCDR &out, ACE_OS::memcpy (buf, x, len); for (ACE_CDR::ULong i = 0; i != len; ++i) - buf[i] = ACE_to_IBM1047[buf[i]]; + buf[i] = to_IBM1047[buf[i]]; return 1; } @@ -261,49 +307,11 @@ ACE_ISO8859_IBM1047::write_char_array (ACE_OutputCDR &out, return 0; } -// **************************************************************** - -char ACE_to_IBM1047[257] = -{ - "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" // 00-0F - "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x35\x1F" // 10-1F - "\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61" // 20-2F - "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F" // 30-3F - "\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6" // 40-4F - "\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xAD\xE0\xBD\x5F\x6D" // 50-5F - "\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96" // 60-6F - "\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x4F\xD0\xA1\x07" // 70-7F - "\x43\x20\x21\x1C\x23\xEB\x24\x9B\x71\x28\x38\x49\x90\xBA\xEC\xDF" // 80-8F - "\x45\x29\x2A\x9D\x72\x2B\x8A\x9A\x67\x56\x64\x4A\x53\x68\x59\x46" // 90-9F - "\xEA\xDA\x2C\xDE\x8B\x55\x41\xFE\x58\x51\x52\x48\x69\xDB\x8E\x8D" // A0-AF - "\x73\x74\x75\xFA\x15\xB0\xB1\xB3\xB4\xB5\x6A\xB7\xB8\xB9\xCC\xBC" // B0-BF - "\xAB\x3E\x3B\x0A\xBF\x8F\x3A\x14\xA0\x17\xCB\xCA\x1A\x1B\x9C\x04" // C0-CF - "\x34\xEF\x1E\x06\x08\x09\x77\x70\xBE\xBB\xAC\x54\x63\x65\x66\x62" // D0-DF - "\x30\x42\x47\x57\xEE\x33\xB6\xE1\xCD\xED\x36\x44\xCE\xCF\x31\xAA" // E0-EF - "\xFC\x9E\xAE\x8C\xDD\xDC\x39\xFB\x80\xAF\xFD\x78\x76\xB2\x9F\xFF" // F0-FF -}; +ACE_END_VERSIONED_NAMESPACE_DECL -char ACE_from_IBM1047[257] = -{ - "\x00\x01\x02\x03\xCF\x09\xD3\x7F\xD4\xD5\xC3\x0B\x0C\x0D\x0E\x0F" // 00-0F - "\x10\x11\x12\x13\xC7\xB4\x08\xC9\x18\x19\xCC\xCD\x83\x1D\xD2\x1F" // 10-1F - "\x81\x82\x1C\x84\x86\x0A\x17\x1B\x89\x91\x92\x95\xA2\x05\x06\x07" // 20-2F - "\x20\xEE\x16\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\xC1\x1A" // 30-3F - "\x20\xA6\xE1\x80\xEB\x90\x9F\xE2\xAB\x8B\x9B\x2E\x3C\x28\x2B\x7C" // 40-4F - "\x26\xA9\xAA\x9C\xDB\xA5\x99\xE3\xA8\x9E\x21\x24\x2A\x29\x3B\x5E" // 50-5F - "\x2D\x2F\xDF\xDC\x9A\xDD\xDE\x98\x9D\xAC\xBA\x2C\x25\x5F\x3E\x3F" // 60-6F - "\xD7\x88\x94\xB0\xB1\xB2\xFC\xD6\xFB\x60\x3A\x23\x40\x27\x3D\x22" // 70-7F - "\xF8\x61\x62\x63\x64\x65\x66\x67\x68\x69\x96\xA4\xF3\xAF\xAE\xC5" // 80-8F - "\x8C\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x97\x87\xCE\x93\xF1\xFE" // 90-9F - "\xC8\x7E\x73\x74\x75\x76\x77\x78\x79\x7A\xEF\xC0\xDA\x5B\xF2\xF9" // A0-AF - "\xB5\xB6\xFD\xB7\xB8\xB9\xE6\xBB\xBC\xBD\x8D\xD9\xBF\x5D\xD8\xC4" // B0-BF - "\x7B\x41\x42\x43\x44\x45\x46\x47\x48\x49\xCB\xCA\xBE\xE8\xEC\xED" // C0-CF - "\x7D\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\xA1\xAD\xF5\xF4\xA3\x8F" // D0-DF - "\x5C\xE7\x53\x54\x55\x56\x57\x58\x59\x5A\xA0\x85\x8E\xE9\xE4\xD1" // E0-EF - "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xB3\xF7\xF0\xFA\xA7\xFF" // F0-FF -}; +// **************************************************************** #elif defined (__HP_aCC) // Make aC++ stop complaining about an empty translation unit -static int shut_up_aCC = 0; +static int const shut_up_aCC = 0; #endif /* ACE_MVS */ diff --git a/ace/Codeset_IBM1047.h b/ace/Codeset_IBM1047.h index ca788435be6..9f9231a41a9 100644 --- a/ace/Codeset_IBM1047.h +++ b/ace/Codeset_IBM1047.h @@ -29,8 +29,7 @@ #include "ace/CDR_Stream.h" -extern ACE_Export char ACE_to_IBM1047[257]; -extern ACE_Export char ACE_from_IBM1047[257]; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // **************************************************************** @@ -120,7 +119,10 @@ public: virtual ACE_CDR::ULong tcs (); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_MVS */ #include /**/ "ace/post.h" + #endif /* ACE_CODESET_IMB1047_H */ diff --git a/ace/Codeset_Registry.inl b/ace/Codeset_Registry.inl index 01fbe51fe13..d24e07cc83b 100644 --- a/ace/Codeset_Registry.inl +++ b/ace/Codeset_Registry.inl @@ -14,6 +14,8 @@ */ //============================================================================= +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Codeset_Registry::locale_to_registry(const ACE_CString &locale, @@ -96,3 +98,5 @@ ACE_Codeset_Registry::get_max_bytes (ACE_CDR::ULong codeset_id) return ACE_Codeset_Registry::get_max_bytes_i (codeset_id); #endif /* ACE_HAS_DCE_CODESET_REGISTRY */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Condition_Recursive_Thread_Mutex.cpp b/ace/Condition_Recursive_Thread_Mutex.cpp index fa364a6a03e..06301818247 100644 --- a/ace/Condition_Recursive_Thread_Mutex.cpp +++ b/ace/Condition_Recursive_Thread_Mutex.cpp @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- + /** * @file Condition_Recursive_Thread_Mutex.cpp * @@ -17,6 +18,8 @@ # include "ace/Log_Msg.h" #endif /* ACE_HAS_DUMP */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_Condition<ACE_Recursive_Thread_Mutex>::remove (void) { @@ -121,4 +124,6 @@ ACE_Condition_Recursive_Thread_Mutex::ACE_Condition_Recursive_Thread_Mutex ( { } -#endif /* ACD_HAS_THREADS */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_HAS_THREADS */ diff --git a/ace/Condition_Recursive_Thread_Mutex.h b/ace/Condition_Recursive_Thread_Mutex.h index 21a24557fc5..6c3d648db10 100644 --- a/ace/Condition_Recursive_Thread_Mutex.h +++ b/ace/Condition_Recursive_Thread_Mutex.h @@ -27,8 +27,9 @@ #else /* ACE_HAS_THREADS */ #include "ace/Recursive_Thread_Mutex.h" -template <class ACE_LOCK> -class ACE_Condition; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +template <class ACE_LOCK> class ACE_Condition; /** * @class ACE_Condition<ACE_Recursive_Thread_Mutex> @@ -105,6 +106,8 @@ public: ACE_Condition_Recursive_Thread_Mutex (ACE_Recursive_Thread_Mutex &m); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_HAS_THREADS */ #include /**/ "ace/post.h" diff --git a/ace/Condition_T.cpp b/ace/Condition_T.cpp index 456482d91ef..c2d4375486e 100644 --- a/ace/Condition_T.cpp +++ b/ace/Condition_T.cpp @@ -1,23 +1,24 @@ // $Id$ -#ifndef ACE_CONDITION_T_C -#define ACE_CONDITION_T_C +#ifndef ACE_CONDITION_T_CPP +#define ACE_CONDITION_T_CPP #include "ace/Condition_T.h" -#include "ace/Log_Msg.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Condition_T, "$Id$") - #if defined (ACE_HAS_THREADS) +#include "ace/Log_Msg.h" + #if !defined (__ACE_INLINE__) #include "ace/Condition_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Condition) template <class MUTEX> void @@ -190,6 +191,9 @@ ACE_Condition<MUTEX>::wait (const ACE_Time_Value *abstime) // ACE_TRACE ("ACE_Condition<MUTEX>::wait"); return this->wait (this->mutex_, abstime); } + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ -#endif /* ACE_CONDITION_T_C */ +#endif /* ACE_CONDITION_T_CPP */ diff --git a/ace/Condition_T.h b/ace/Condition_T.h index 6d85c4b3519..e5ec5fcaab7 100644 --- a/ace/Condition_T.h +++ b/ace/Condition_T.h @@ -14,6 +14,7 @@ #ifndef ACE_CONDITION_T_H #define ACE_CONDITION_T_H + #include /**/ "ace/pre.h" #include "ace/OS_NS_Thread.h" @@ -25,6 +26,8 @@ #if defined (ACE_HAS_THREADS) /* ACE platform supports some form of threading. */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -156,6 +159,8 @@ public: // Declare the dynamic allocation hooks. }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Condition_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Condition_T.inl b/ace/Condition_T.inl index cb927320208..b787569a764 100644 --- a/ace/Condition_T.inl +++ b/ace/Condition_T.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class MUTEX> ACE_INLINE int ACE_Condition<MUTEX>::remove (void) { @@ -79,3 +82,5 @@ ACE_Condition<MUTEX>::broadcast (void) #endif /* CHORUS */ return ACE_OS::cond_broadcast (&this->cond_); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Condition_Thread_Mutex.cpp b/ace/Condition_Thread_Mutex.cpp index a04e2b30847..7907b717f73 100644 --- a/ace/Condition_Thread_Mutex.cpp +++ b/ace/Condition_Thread_Mutex.cpp @@ -21,6 +21,8 @@ ACE_RCSID(ace, Condition_Thread_Mutex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Condition_Thread_Mutex) void @@ -133,4 +135,6 @@ ACE_Condition_Thread_Mutex::broadcast (void) return ACE_OS::cond_broadcast (&this->cond_); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ diff --git a/ace/Condition_Thread_Mutex.h b/ace/Condition_Thread_Mutex.h index 7b30fba8079..01a465e8f33 100644 --- a/ace/Condition_Thread_Mutex.h +++ b/ace/Condition_Thread_Mutex.h @@ -29,6 +29,8 @@ #include "ace/Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; class ACE_Export ACE_Condition_Attributes @@ -176,6 +178,8 @@ public: }; #endif /* 0 */ +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Condition_Thread_Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Condition_Thread_Mutex.inl b/ace/Condition_Thread_Mutex.inl index ff15f94ad04..3e12c9c911a 100644 --- a/ace/Condition_Thread_Mutex.inl +++ b/ace/Condition_Thread_Mutex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Condition_Attributes::ACE_Condition_Attributes (int type) { @@ -67,3 +70,5 @@ ACE_Process_Condition<MUTEX>::ACE_Process_Condition (MUTEX &m, // ACE_TRACE ("ACE_Process_Condition<MUTEX>::ACE_Process_Condition"); } #endif /* 0 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp index 468f1b9e9dc..13f66db7b8f 100644 --- a/ace/Configuration.cpp +++ b/ace/Configuration.cpp @@ -12,16 +12,18 @@ # include "ace/OS_NS_unistd.h" #endif /* ACE_LACKS_ACCESS */ -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if defined (ACE_HAS_THREADS) +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +# if defined (ACE_HAS_THREADS) // ACE_SYNCH_MUTEX should not be used in the template instantiations // because the resulting template instantiation for the // single-threaded case already exists in ACE. template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> >; template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex>; template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex, ACE_Control_Block>; -#endif /* ACE_HAS_THREADS */ +# endif /* ACE_HAS_THREADS */ + template class ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId>; template class ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId>; template class ACE_Hash_Map_Entry<ACE_Configuration_ExtId, int>; @@ -50,14 +52,15 @@ template class ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, int>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#if defined (ACE_HAS_THREADS) +# if defined (ACE_HAS_THREADS) // ACE_SYNCH_MUTEX should not be used in the template instantiations // because the resulting template instantiation for the // single-threaded case already exists in ACE. #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> > #pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> #pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex, ACE_Control_Block> -#endif /* ACE_HAS_THREADS */ +# endif /* ACE_HAS_THREADS */ + #pragma instantiate ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId> #pragma instantiate ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId> #pragma instantiate ACE_Hash_Map_Entry<ACE_Configuration_ExtId, int> @@ -2257,3 +2260,5 @@ ACE_Configuration_Heap::remove_value (const ACE_Configuration_Section_Key& key, return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Configuration.h b/ace/Configuration.h index 96ba0153409..dd5ca17a5c8 100644 --- a/ace/Configuration.h +++ b/ace/Configuration.h @@ -53,6 +53,8 @@ #define ACE_DEFAULT_CONFIG_SECTION_SIZE 16 #endif /* ACE_DEFAULT_CONFIG_SECTION_SIZE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Section_Key_Internal * @@ -884,5 +886,7 @@ private: size_t default_map_size_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_CONFIGURATION_H */ diff --git a/ace/Configuration_Import_Export.cpp b/ace/Configuration_Import_Export.cpp index da1ea7d660e..aab75bf5654 100644 --- a/ace/Configuration_Import_Export.cpp +++ b/ace/Configuration_Import_Export.cpp @@ -5,6 +5,8 @@ #include "ace/OS_NS_ctype.h" #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Config_ImpExp_Base::ACE_Config_ImpExp_Base (ACE_Configuration& config) : config_ (config) { @@ -644,3 +646,5 @@ ACE_Ini_ImpExp::squish (ACE_TCHAR *src) return cp; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Configuration_Import_Export.h b/ace/Configuration_Import_Export.h index d2ac9eeb566..41dc401e0c7 100644 --- a/ace/Configuration_Import_Export.h +++ b/ace/Configuration_Import_Export.h @@ -32,6 +32,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Config_ImpExp_Base * @@ -207,5 +209,7 @@ private: ACE_Ini_ImpExp& operator= (const ACE_Ini_ImpExp&); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_CONFIGURATION_IMPORT_EXPORT_H */ diff --git a/ace/Connection_Recycling_Strategy.cpp b/ace/Connection_Recycling_Strategy.cpp index 351dde2ea52..c5bc6910d21 100644 --- a/ace/Connection_Recycling_Strategy.cpp +++ b/ace/Connection_Recycling_Strategy.cpp @@ -4,10 +4,10 @@ ACE_RCSID(ace, Connection_Recycling_Strategy, "$Id$") -ACE_Connection_Recycling_Strategy::ACE_Connection_Recycling_Strategy (void) -{ -} +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Connection_Recycling_Strategy::~ACE_Connection_Recycling_Strategy (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Connection_Recycling_Strategy.h b/ace/Connection_Recycling_Strategy.h index bbe4f7b48ce..786835ef6b7 100644 --- a/ace/Connection_Recycling_Strategy.h +++ b/ace/Connection_Recycling_Strategy.h @@ -19,15 +19,13 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Connection_Recycling_Strategy * * @brief Defines the interface for a connection recycler. */ - class ACE_Export ACE_Connection_Recycling_Strategy { public: @@ -56,12 +54,10 @@ public: virtual int cleanup_hint (const void *recycling_act, void **act_holder = 0) = 0; -protected: - /// Default ctor. - ACE_Connection_Recycling_Strategy (void); }; - +ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" + #endif /*ACE_CONNECTION_RECYCLING_STRATEGY*/ diff --git a/ace/Connector.cpp b/ace/Connector.cpp index c4a40988e59..6bcfb1f861a 100644 --- a/ace/Connector.cpp +++ b/ace/Connector.cpp @@ -1,8 +1,7 @@ -// Connector.cpp // $Id$ -#ifndef ACE_CONNECTOR_C -#define ACE_CONNECTOR_C +#ifndef ACE_CONNECTOR_CPP +#define ACE_CONNECTOR_CPP #include "ace/Connector.h" #include "ace/OS_NS_stdio.h" @@ -13,7 +12,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Connector, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Connector) @@ -994,4 +993,6 @@ ACE_Strategy_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::concurrency_strategy return this->concurrency_strategy_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_CONNECTOR_C */ diff --git a/ace/Connector.h b/ace/Connector.h index c82593dcb69..34ffaba2d4f 100644 --- a/ace/Connector.h +++ b/ace/Connector.h @@ -25,6 +25,8 @@ #include "ace/Synch_Options.h" #include "ace/Handle_Set.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Connector_Base * @@ -560,6 +562,8 @@ protected: int delete_concurrency_strategy_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Connector.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Container_Instantiations.cpp b/ace/Container_Instantiations.cpp index 9b45dacf6e4..7615c7a7cfc 100644 --- a/ace/Container_Instantiations.cpp +++ b/ace/Container_Instantiations.cpp @@ -2,6 +2,8 @@ #include "ace/CDR_Base.h" #include "ace/Unbounded_Queue.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Instantiations of templates with basic data types that can be used // across ACE+TAO. #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) @@ -17,3 +19,5 @@ template class ACE_Unbounded_Queue_Iterator<ACE_INT32>; #pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_INT32>; #endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION*/ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Containers.cpp b/ace/Containers.cpp index 63faaef39bd..e9c497f92ff 100644 --- a/ace/Containers.cpp +++ b/ace/Containers.cpp @@ -10,6 +10,8 @@ ACE_RCSID (ace, #include "ace/Containers.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Double_Linked_List<ACE_DLList_Node>; template class ACE_Double_Linked_List_Iterator_Base<ACE_DLList_Node>; @@ -22,3 +24,4 @@ template class ACE_Double_Linked_List_Reverse_Iterator<ACE_DLList_Node>; #pragma instantiate ACE_Double_Linked_List_Reverse_Iterator<ACE_DLList_Node> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Containers.h b/ace/Containers.h index b5356ecdf3e..f8e4cda2d02 100644 --- a/ace/Containers.h +++ b/ace/Containers.h @@ -21,15 +21,12 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -template <class T> -class ACE_Double_Linked_List; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template <class T> -class ACE_Double_Linked_List_Iterator_Base; -template <class T> -class ACE_Double_Linked_List_Iterator; -template <class T> -class ACE_Double_Linked_List_Reverse_Iterator; +template <class T> class ACE_Double_Linked_List; +template <class T> class ACE_Double_Linked_List_Iterator_Base; +template <class T> class ACE_Double_Linked_List_Iterator; +template <class T> class ACE_Double_Linked_List_Reverse_Iterator; /** * @class ACE_DLList_Node @@ -48,7 +45,6 @@ public: ACE_DLList_Node (void *&i, ACE_DLList_Node *n = 0, ACE_DLList_Node *p = 0); - ~ACE_DLList_Node (void); /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; @@ -62,6 +58,8 @@ protected: ACE_DLList_Node (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Containers.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Containers.inl b/ace/Containers.inl index 1312f2a47a6..ebc0b96bf7e 100644 --- a/ace/Containers.inl +++ b/ace/Containers.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_DLList_Node::ACE_DLList_Node (void) : item_ (0), @@ -19,7 +22,4 @@ ACE_DLList_Node::ACE_DLList_Node (void *&i, { } -ACE_INLINE -ACE_DLList_Node::~ACE_DLList_Node (void) -{ -} +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp index 1b7ecfca264..80d9ca7f206 100644 --- a/ace/Containers_T.cpp +++ b/ace/Containers_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_CONTAINERS_T_C -#define ACE_CONTAINERS_T_C +#ifndef ACE_CONTAINERS_T_CPP +#define ACE_CONTAINERS_T_CPP #include "ace/Log_Msg.h" #include "ace/Malloc_Base.h" @@ -17,9 +17,7 @@ #include "ace/Containers_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID (ace, - Containers_T, - "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Stack) @@ -1934,5 +1932,6 @@ ACE_Array<T>::operator== (const ACE_Array<T> &s) const // **************************************************************** +ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_CONTAINERS_T_C */ +#endif /* ACE_CONTAINERS_T_CPP */ diff --git a/ace/Containers_T.h b/ace/Containers_T.h index fdbf7d6bec1..e2fc0e6ed06 100644 --- a/ace/Containers_T.h +++ b/ace/Containers_T.h @@ -36,6 +36,8 @@ // Backwards compatibility, please include "ace/Unbounded_Queue.h" directly. #include "ace/Unbounded_Queue.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Allocator; @@ -1230,23 +1232,23 @@ public: protected: // = Initialization method. ACE_Fixed_Set_Iterator_Base (ACE_Fixed_Set<T, ACE_SIZE> &s); - + /// Set we are iterating over. ACE_Fixed_Set<T, ACE_SIZE> &s_; /// How far we've advanced over the set. ssize_t next_; - + /// The number of non free items that the iterator had pointed at. size_t iterated_items_; - + /// Dump the state of an object. void dump_i (void) const; - + /// Pass back the {next_item} that hasn't been seen in the Set. /// Returns 0 when all items have been seen, else 1. int next_i (T *&next_item); -}; +}; /** * @class ACE_Fixed_Set_Iterator @@ -1271,12 +1273,12 @@ public: /// Dump the state of an object. void dump (void) const; - + /// Remove the item where the itearetor is located at. /// Returns 1 if it removes a item, else 0. /// Pass back the removed {item}. int remove (T *&item); - + /// STL-like iterator dereference operator: returns a reference /// to the node underneath the iterator. T & operator* (void); @@ -1307,7 +1309,7 @@ public: /// Dump the state of an object. void dump (void) const; - + /// STL-like iterator dereference operator: returns a reference /// to the node underneath the iterator. const T & operator* (void) const ; @@ -2005,6 +2007,8 @@ public: bool operator!= (const ACE_Array<T> &s) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Containers_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Containers_T.inl b/ace/Containers_T.inl index 885345ba9a8..df0b81e2aeb 100644 --- a/ace/Containers_T.inl +++ b/ace/Containers_T.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_INLINE int ACE_Bounded_Stack<T>::is_empty (void) const { @@ -472,3 +475,5 @@ ACE_DLList_Reverse_Iterator<T>::dump (void) const ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::dump (); #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Copy_Disabled.h b/ace/Copy_Disabled.h index 583bc683062..62e5c79b3b6 100644 --- a/ace/Copy_Disabled.h +++ b/ace/Copy_Disabled.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Copy_Disabled * @@ -46,15 +48,17 @@ */ class ACE_Export ACE_Copy_Disabled { -public: - /// Default constructor - ACE_Copy_Disabled (void); +protected: + + ACE_Copy_Disabled (void) {} private: ACE_Copy_Disabled (const ACE_Copy_Disabled &); ACE_Copy_Disabled &operator= (const ACE_Copy_Disabled &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_COPY_DISABLED_H */ diff --git a/ace/Countdown_Time.cpp b/ace/Countdown_Time.cpp index b8556633cb1..fb03f0465e0 100644 --- a/ace/Countdown_Time.cpp +++ b/ace/Countdown_Time.cpp @@ -5,6 +5,8 @@ ACE_RCSID (ace, Countdown_Time, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Countdown_Time::ACE_Countdown_Time (ACE_Time_Value *max_wait_time) : max_wait_time_ (max_wait_time), stopped_ (0) @@ -60,3 +62,5 @@ ACE_Countdown_Time::update (void) { return this->stop () == 0 && this->start (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Countdown_Time.h b/ace/Countdown_Time.h index 374f8d00140..248e2d19951 100644 --- a/ace/Countdown_Time.h +++ b/ace/Countdown_Time.h @@ -23,6 +23,8 @@ #include "ace/Time_Value.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Countdown_Time * @@ -71,6 +73,8 @@ private: ACE_Countdown_Time &operator= (const ACE_Countdown_Time &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_COUNTDOWN_TIME_H */ diff --git a/ace/DEV.cpp b/ace/DEV.cpp index 932d7644ad5..1ae27fc558e 100644 --- a/ace/DEV.cpp +++ b/ace/DEV.cpp @@ -1,7 +1,5 @@ -// DEV.cpp // $Id$ - #include "ace/DEV.h" #include "ace/OS_NS_unistd.h" @@ -12,6 +10,8 @@ ACE_RCSID(ace, DEV, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_DEV) void @@ -39,3 +39,5 @@ ACE_DEV::close (void) this->set_handle (ACE_INVALID_HANDLE); return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV.h b/ace/DEV.h index 69a92aaad1b..8b0c585ddf7 100644 --- a/ace/DEV.h +++ b/ace/DEV.h @@ -36,6 +36,8 @@ #define ACE_DEV_STREAM ACE_DEV_IO, ACE_DEV_Addr #endif /* ACE_TEMPLATE_TYPEDEFS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_DEV * @@ -66,6 +68,8 @@ protected: ACE_DEV (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/DEV.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/DEV.inl b/ace/DEV.inl index 91246710423..e00f4fc705e 100644 --- a/ace/DEV.inl +++ b/ace/DEV.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_DEV::disable (int signum) const { @@ -11,3 +14,5 @@ ACE_DEV::disable (int signum) const return ACE_IO_SAP::disable (signum) ; #endif /* ACE_WIN32 */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV_Addr.cpp b/ace/DEV_Addr.cpp index 16b7536e0b0..f7e5503b1eb 100644 --- a/ace/DEV_Addr.cpp +++ b/ace/DEV_Addr.cpp @@ -1,4 +1,3 @@ -// DEV_Addr.cpp // $Id$ #include "ace/DEV_Addr.h" @@ -13,6 +12,8 @@ ACE_RCSID (ace, DEV_Addr, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Addr) // Transform the current address into string format. @@ -56,7 +57,7 @@ ACE_DEV_Addr::ACE_DEV_Addr (void) ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr"); (void) ACE_OS::memset ((void *) &this->devname_, - 0, sizeof this->devname_); + 0, sizeof this->devname_); } int @@ -104,3 +105,4 @@ ACE_DEV_Addr::operator= (const ACE_DEV_Addr &sa) return *this; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV_Addr.h b/ace/DEV_Addr.h index eba31734c2b..0646260c8f9 100644 --- a/ace/DEV_Addr.h +++ b/ace/DEV_Addr.h @@ -23,6 +23,8 @@ #include "ace/os_include/os_dirent.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_DEV_Addr * @@ -77,6 +79,8 @@ private: ACE_TCHAR devname_[DEVNAME_LENGTH]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/DEV_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/DEV_Addr.inl b/ace/DEV_Addr.inl index 059c81111a8..820b961d1d0 100644 --- a/ace/DEV_Addr.inl +++ b/ace/DEV_Addr.inl @@ -6,6 +6,8 @@ #include "ace/Global_Macros.h" #include "ace/os_include/sys/os_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void ACE_DEV_Addr::set (const ACE_TCHAR *devname) { @@ -33,7 +35,7 @@ ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const { ACE_TRACE ("ACE_DEV_Addr::operator !="); - return !((*this) == sap); // This is lazy, of course... ;-). + return !((*this) == sap); // This is lazy, of course... ;-). } // Return the path name used for the rendezvous point. @@ -45,3 +47,5 @@ ACE_DEV_Addr::get_path_name (void) const return this->devname_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV_Connector.cpp b/ace/DEV_Connector.cpp index 5c577754481..a1fef807057 100644 --- a/ace/DEV_Connector.cpp +++ b/ace/DEV_Connector.cpp @@ -1,4 +1,3 @@ -// DEV_Connector.cpp // $Id$ #include "ace/DEV_Connector.h" @@ -15,6 +14,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector) void @@ -48,3 +49,5 @@ ACE_DEV_Connector::connect (ACE_DEV_IO &new_io, new_io.addr_ = remote_sap; // class copy. return handle == ACE_INVALID_HANDLE ? -1 : 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV_Connector.h b/ace/DEV_Connector.h index 858cd5d0369..2d57f836b24 100644 --- a/ace/DEV_Connector.h +++ b/ace/DEV_Connector.h @@ -22,6 +22,9 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_DEV_Connector * @@ -97,6 +100,8 @@ public: typedef ACE_DEV_IO PEER_STREAM; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/DEV_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/DEV_Connector.inl b/ace/DEV_Connector.inl index 798639197b4..13ceeba1d75 100644 --- a/ace/DEV_Connector.inl +++ b/ace/DEV_Connector.inl @@ -1,23 +1,26 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Creates a Local ACE_DEV. ACE_INLINE ACE_DEV_Connector::ACE_DEV_Connector (ACE_DEV_IO &new_io, - const ACE_DEV_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) + const ACE_DEV_Addr &remote_sap, + ACE_Time_Value *timeout, + const ACE_Addr &local_sap, + int reuse_addr, + int flags, + int perms) { ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector"); if (this->connect (new_io, remote_sap, timeout, local_sap, - reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE + reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME)) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("address %s, %p\n"), - remote_sap.get_path_name (), ACE_LIB_TEXT ("ACE_DEV_IO"))); + remote_sap.get_path_name (), ACE_LIB_TEXT ("ACE_DEV_IO"))); } ACE_INLINE int @@ -28,3 +31,4 @@ ACE_DEV_Connector::reset_new_handle (ACE_HANDLE handle) return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV_IO.cpp b/ace/DEV_IO.cpp index fb025287df0..f5367d1d5cd 100644 --- a/ace/DEV_IO.cpp +++ b/ace/DEV_IO.cpp @@ -1,4 +1,3 @@ -// DEV_IO.cpp // $Id$ #include "ace/DEV_IO.h" @@ -10,6 +9,9 @@ ACE_RCSID(ace, DEV_IO, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_DEV_IO) // Return the local endpoint address. @@ -125,3 +127,5 @@ ACE_DEV_IO::recv (size_t n, ...) const va_end (argp); return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DEV_IO.h b/ace/DEV_IO.h index 69e584a401b..fd2a0e2c5b8 100644 --- a/ace/DEV_IO.h +++ b/ace/DEV_IO.h @@ -28,6 +28,8 @@ #include "ace/os_include/os_stdio.h" #include "ace/os_include/sys/os_uio.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -173,6 +175,8 @@ private: ACE_DEV_Addr addr_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/DEV_IO.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/DEV_IO.inl b/ace/DEV_IO.inl index 3724c7cc492..cb9392e2bf3 100644 --- a/ace/DEV_IO.inl +++ b/ace/DEV_IO.inl @@ -1,8 +1,7 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// DEV_IO.i - #include "ace/OS_NS_sys_uio.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_Memory.h" @@ -12,6 +11,8 @@ // Send exactly N bytes from BUF to this device. Keeping trying until // this many bytes are sent. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_DEV_IO::send_n (const void *buf, size_t n) const { @@ -23,7 +24,7 @@ ACE_DEV_IO::send_n (const void *buf, size_t n) const // this many bytes are received. ACE_INLINE ssize_t -ACE_DEV_IO::recv_n (void *buf, +ACE_DEV_IO::recv_n (void *buf, size_t n, const ACE_Time_Value *timeout, size_t *bytes_transferred) const @@ -121,3 +122,5 @@ ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) c return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags); } #endif /* ACE_HAS_STREAM_PIPES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DLL.cpp b/ace/DLL.cpp index 7a8df6573a7..00363d51bbf 100644 --- a/ace/DLL.cpp +++ b/ace/DLL.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, DLL, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Default constructor. Also, by default, the object will be closed // before it is destroyed. @@ -134,7 +136,7 @@ ACE_DLL::open_i (const ACE_TCHAR *dll_filename, if (!this->dll_name_) this->dll_name_ = ACE::strnew (dll_filename); - + this->open_mode_ = open_mode; this->close_handle_on_destruction_ = close_handle_on_destruction; @@ -238,3 +240,5 @@ ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle, return this->open_i (temp, 1, close_handle_on_destruction, handle); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DLL.h b/ace/DLL.h index 3554b558542..330da0f27c1 100644 --- a/ace/DLL.h +++ b/ace/DLL.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #include "ace/Global_Macros.h" #include "ace/os_include/os_dlfcn.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_DLL_Handle; /** @@ -113,7 +115,7 @@ public: /// Set the handle for the DLL object. By default, the close() //operation on / the object will be invoked before it is destroyed. - int set_handle (ACE_SHLIB_HANDLE handle, + int set_handle (ACE_SHLIB_HANDLE handle, int close_handle_on_destruction = 1); private: @@ -145,5 +147,7 @@ private: ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_DLL &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_DLL_H */ diff --git a/ace/DLL_Manager.cpp b/ace/DLL_Manager.cpp index cbbb10545fe..b30e30d46d5 100644 --- a/ace/DLL_Manager.cpp +++ b/ace/DLL_Manager.cpp @@ -14,11 +14,14 @@ #include "ace/OS_NS_dlfcn.h" #include "ace/OS_NS_string.h" -ACE_RCSID (ace, DLL_Manager, - "DLL_Manager.cpp,v 4.23 2003/11/05 23:30:46 shuston Exp") +ACE_RCSID (ace, + DLL_Manager, + "DLL_Manager.cpp,v 4.23 2003/11/05 23:30:46 shuston Exp") /******************************************************************/ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + sig_atomic_t ACE_DLL_Handle::open_called_ = 0; ACE_DLL_Handle::ACE_DLL_Handle (void) @@ -703,3 +706,5 @@ template class ACE_Auto_Basic_Ptr<ACE_TString>; # pragma instantiate ACE_Auto_Basic_Ptr<ACE_TString> # endif /* ACE_LACKS_AUTO_PTR */ #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/DLL_Manager.h b/ace/DLL_Manager.h index 856fbe4e861..142cce6c525 100644 --- a/ace/DLL_Manager.h +++ b/ace/DLL_Manager.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -32,6 +32,9 @@ #define ACE_DEFAULT_DLL_MANAGER_SIZE 1024 + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_DLL_Handle * @@ -48,9 +51,9 @@ * extracting symbol information from a DLL, respectively. * * Most of this class came from the original ACE_DLL class. - * ACE_DLL is now just an interface that passed all it's calls - * either directly or via ACE_DLL_Manager to this class for - * execution. + * ACE_DLL is now just an interface that passed all it's calls + * either directly or via ACE_DLL_Manager to this class for + * execution. * */ class ACE_Export ACE_DLL_Handle @@ -76,12 +79,12 @@ public: * processing of any other DLLs. Returns -1 on failure and 0 on * success. */ - int open (const ACE_TCHAR *dll_name, + int open (const ACE_TCHAR *dll_name, int open_mode, ACE_SHLIB_HANDLE handle); /// Call to close the DLL object. If unload = 0, it only decrements - /// the refcount, but if unload = 1, then it will actually unload + /// the refcount, but if unload = 1, then it will actually unload /// the library when the refcount == 0; int close (int unload = 0); @@ -100,7 +103,7 @@ public: * caller assumes ownership of the handle so we decrement the retcount. */ ACE_SHLIB_HANDLE get_handle (int become_owner = 0); - + private: /// Returns a pointer to a string explaining why <symbol> or <open> /// failed. This is used internal to print out the error to the log, @@ -146,10 +149,10 @@ class ACE_Framework_Repository; /** * @class ACE_DLL_Manager * - * @brief This class is a singleton and serves as a factory and - * repository for instances of ACE_DLL_Handle. + * @brief This class is a singleton and serves as a factory and + * repository for instances of ACE_DLL_Handle. * - * This class is a singleton whose lifetime is managed by the + * This class is a singleton whose lifetime is managed by the * ACE_Framework_Repository. Although it is normally meant to be * used directly only by ACE_DLL, applications can call the unload_policy() * methods in order get/set the the dll unload policy. Unload policies include @@ -157,29 +160,29 @@ class ACE_Framework_Repository; * by using the ACE_DLL_UNLOAD_POLICY macro found in config-all.h. If a dll * choses to set an unload policy, it will be used when the per-dll policy * (the default) is in effect. If the per-dll policy is in effect and a dll - * has not chosen to set a policy, the current per-process policy will be - * used. + * has not chosen to set a policy, the current per-process policy will be + * used. * * The following policy macros are provided in config-all.h: * - * ACE_DLL_UNLOAD_POLICY_PER_PROCESS - Per-process policy that unloads dlls + * ACE_DLL_UNLOAD_POLICY_PER_PROCESS - Per-process policy that unloads dlls * eagerly. - * - * ACE_DLL_UNLOAD_POLICY_PER_DLL - Apply policy on a per-dll basis. If the - * dll doesn't use one of the macros below, the current per-process policy + * + * ACE_DLL_UNLOAD_POLICY_PER_DLL - Apply policy on a per-dll basis. If the + * dll doesn't use one of the macros below, the current per-process policy * will be used. * - * ACE_DLL_UNLOAD_POLICY_LAZY - Don't unload dll when refcount reaches + * ACE_DLL_UNLOAD_POLICY_LAZY - Don't unload dll when refcount reaches * zero, i.e., wait for either an explicit unload request or program exit. * - * ACE_DLL_UNLOAD_POLICY_DEFAULT - Default policy allows dlls to control + * ACE_DLL_UNLOAD_POLICY_DEFAULT - Default policy allows dlls to control * their own destinies, but will unload those that don't make a choice eagerly. * */ class ACE_Export ACE_DLL_Manager { public: - // This if to silence the compiler warnings, even though ACE_Framework_Repository + // This if to silence the compiler warnings, even though ACE_Framework_Repository // always uses the instance method. friend class ACE_Framework_Repository; @@ -191,10 +194,10 @@ public: /// Return a unique instance static ACE_DLL_Manager *instance (int size = ACE_DLL_Manager::DEFAULT_SIZE); - /// Factory for ACE_DLL_Handle objects. If one already exits, + /// Factory for ACE_DLL_Handle objects. If one already exits, /// its refcount is incremented. - ACE_DLL_Handle *open_dll (const ACE_TCHAR *dll_name, - int openmode, + ACE_DLL_Handle *open_dll (const ACE_TCHAR *dll_name, + int openmode, ACE_SHLIB_HANDLE handle); /// Close the underlying dll. Decrements the refcount. @@ -203,7 +206,7 @@ public: /// Returns the current per-process UNLOAD_POLICY. u_long unload_policy (void) const; - /// Set the per-process UNLOAD_POLICY. If the policy is changed from + /// Set the per-process UNLOAD_POLICY. If the policy is changed from /// LAZY to EAGER, then it will also unload any dlls with zero /// refcounts. void unload_policy (u_long unload_policy); @@ -256,5 +259,7 @@ private: ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_DLL_Manager &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_DLL_MANAGER_H */ diff --git a/ace/Date_Time.h b/ace/Date_Time.h index d11af119f9d..7efd047cafd 100644 --- a/ace/Date_Time.h +++ b/ace/Date_Time.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -113,6 +115,8 @@ private: long wday_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Date_Time.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Date_Time.inl b/ace/Date_Time.inl index 4dbc8ecc657..dfb0d239bc3 100644 --- a/ace/Date_Time.inl +++ b/ace/Date_Time.inl @@ -1,13 +1,14 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Date_Time.i - #include "ace/Global_Macros.h" #include "ace/Time_Value.h" #include "ace/OS_NS_sys_time.h" #include "ace/OS_NS_time.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void ACE_Date_Time::update (const ACE_Time_Value& timevalue) { @@ -214,3 +215,5 @@ ACE_Date_Time::weekday (long wday) ACE_TRACE ("ACE_Date_Time::weekday"); wday_ = wday; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp index f88c8ad8487..20d57ea0d62 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -40,6 +40,8 @@ ACE_RCSID (ace, #include "ace/os_include/os_poll.h" #include "ace/OS_NS_sys_mman.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Dev_Poll_Reactor_Notify::ACE_Dev_Poll_Reactor_Notify (void) : dp_reactor_ (0) , notification_pipe_ () @@ -912,7 +914,7 @@ ACE_Dev_Poll_Reactor::open (size_t size, else if (this->notify_handler_->open (this, 0, disable_notify_pipe) == -1 - || (disable_notify_pipe == 0 + || (disable_notify_pipe == 0 && this->register_handler_i ( this->notify_handler_->notify_handle (), this->notify_handler_, @@ -2663,4 +2665,6 @@ template class ACE_Reverse_Lock<ACE_Dev_Poll_Reactor_Token>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_EVENT_POLL || ACE_HAS_DEV_POLL */ diff --git a/ace/Dev_Poll_Reactor.h b/ace/Dev_Poll_Reactor.h index 38ca44218f3..b34fc2c8e13 100644 --- a/ace/Dev_Poll_Reactor.h +++ b/ace/Dev_Poll_Reactor.h @@ -62,14 +62,15 @@ # include "ace/Unbounded_Queue.h" #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -// Forward declarations -class ACE_Sig_Handler; -class ACE_Dev_Poll_Reactor; - #if defined (ACE_HAS_DEV_POLL) struct pollfd; #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward declarations +class ACE_Sig_Handler; +class ACE_Dev_Poll_Reactor; /** * @class ACE_Dev_Poll_Event_Tuple @@ -1267,6 +1268,7 @@ private: }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) # include "ace/Dev_Poll_Reactor.inl" diff --git a/ace/Dev_Poll_Reactor.inl b/ace/Dev_Poll_Reactor.inl index 0d99c764c01..b7034e07333 100644 --- a/ace/Dev_Poll_Reactor.inl +++ b/ace/Dev_Poll_Reactor.inl @@ -4,6 +4,8 @@ #include "ace/Log_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Dev_Poll_Event_Tuple::ACE_Dev_Poll_Event_Tuple (void) : event_handler (0), @@ -222,3 +224,5 @@ ACE_Dev_Poll_Reactor::Token_Guard::is_owner (void) { return this->owner_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dirent.h b/ace/Dirent.h index 5cda1c442fb..d5f8d7e3bf6 100644 --- a/ace/Dirent.h +++ b/ace/Dirent.h @@ -25,6 +25,8 @@ #include "ace/OS_NS_dirent.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Dirent * @@ -110,6 +112,8 @@ private: ACE_DIR *dirp_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Dirent.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Dirent.inl b/ace/Dirent.inl index c75c79fd320..1c120dad225 100644 --- a/ace/Dirent.inl +++ b/ace/Dirent.inl @@ -1,15 +1,18 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Log_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int -ACE_Dirent::open (const ACE_TCHAR *dirname) +ACE_Dirent::open (const ACE_TCHAR *dirname) { // If the directory stream is already open, close it to prevent // possible resource leaks. - if (this->dirp_ != 0) + if (this->dirp_ != 0) { ACE_OS::closedir (this->dirp_); this->dirp_ = 0; @@ -23,23 +26,23 @@ ACE_Dirent::open (const ACE_TCHAR *dirname) return 0; } -ACE_INLINE +ACE_INLINE ACE_Dirent::ACE_Dirent (void) : dirp_ (0) { } -ACE_INLINE -ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname) +ACE_INLINE +ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname) : dirp_ (0) { if (this->open (dirname) == -1) ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_Dirent::ACE_Dirent"))); } -ACE_INLINE +ACE_INLINE ACE_Dirent::~ACE_Dirent (void) { if (this->dirp_ != 0) @@ -64,7 +67,7 @@ ACE_Dirent::read (struct dirent *entry, ACE_INLINE void ACE_Dirent::close (void) { - if (this->dirp_ != 0) + if (this->dirp_ != 0) { ACE_OS::closedir (this->dirp_); @@ -93,3 +96,4 @@ ACE_Dirent::tell (void) return this->dirp_ ? ACE_OS::telldir (this->dirp_) : 0; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dirent_Selector.cpp b/ace/Dirent_Selector.cpp index c4690ee88e4..9a141ee9b58 100644 --- a/ace/Dirent_Selector.cpp +++ b/ace/Dirent_Selector.cpp @@ -13,6 +13,8 @@ ACE_RCSID (ace, Dirent_Selector, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Construction/Destruction ACE_Dirent_Selector::ACE_Dirent_Selector (void) @@ -54,3 +56,5 @@ ACE_Dirent_Selector::close (void) this->namelist_ = 0; return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dirent_Selector.h b/ace/Dirent_Selector.h index 8985e4a930a..8ffa8d71dca 100644 --- a/ace/Dirent_Selector.h +++ b/ace/Dirent_Selector.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #include "ace/os_include/os_dirent.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Dirent_Selector * @@ -62,6 +64,8 @@ protected: int n_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Dirent_Selector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Dirent_Selector.inl b/ace/Dirent_Selector.inl index 894971076ed..d48f2a04d2c 100644 --- a/ace/Dirent_Selector.inl +++ b/ace/Dirent_Selector.inl @@ -1,6 +1,9 @@ // -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Dirent_Selector::length (void) const { @@ -12,3 +15,5 @@ ACE_Dirent_Selector::operator[] (const int n) const { return this->namelist_[n]; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dump.cpp b/ace/Dump.cpp index 380be07f857..b601496f3b6 100644 --- a/ace/Dump.cpp +++ b/ace/Dump.cpp @@ -8,6 +8,8 @@ ACE_RCSID(ace, Dump, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Implementations (very simple for now...) ACE_Dumpable::~ACE_Dumpable (void) @@ -135,3 +137,5 @@ ACE_ODB::remove_object (const void *this_ptr) } ACE_ODB *ACE_ODB::instance_ = 0; + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dump.h b/ace/Dump.h index aff3faab9a9..7c792f0db66 100644 --- a/ace/Dump.h +++ b/ace/Dump.h @@ -58,6 +58,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Dumpable * @@ -161,6 +163,8 @@ private: int current_size_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + // Include the templates classes at this point. #include "ace/Dump_T.h" diff --git a/ace/Dump_T.cpp b/ace/Dump_T.cpp index fe83085ee1a..3c789497eee 100644 --- a/ace/Dump_T.cpp +++ b/ace/Dump_T.cpp @@ -1,8 +1,9 @@ // Dump_T.cpp +// // $Id$ -#ifndef ACE_DUMP_T_C -#define ACE_DUMP_T_C +#ifndef ACE_DUMP_T_CPP +#define ACE_DUMP_T_CPP #include "ace/Dump_T.h" #include "ace/Global_Macros.h" @@ -12,7 +13,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Dump_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class Concrete> ACE_Dumpable_Adapter<Concrete>::~ACE_Dumpable_Adapter (void) @@ -42,4 +43,6 @@ ACE_Dumpable_Adapter<Concrete>::dump (void) const #endif /* ACE_HAS_DUMP */ } -#endif /* ACE_DUMP_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_DUMP_T_CPP */ diff --git a/ace/Dump_T.h b/ace/Dump_T.h index 7595526a562..561569765a4 100644 --- a/ace/Dump_T.h +++ b/ace/Dump_T.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Dumpable_Adapter * @@ -53,6 +55,8 @@ private: const Concrete *this_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + // Some useful macros for conditionally compiling this feature... #if defined (ACE_NDEBUG) #define ACE_REGISTER_OBJECT(CLASS) diff --git a/ace/Dynamic.cpp b/ace/Dynamic.cpp index fbab1172542..4e9f3fb26c5 100644 --- a/ace/Dynamic.cpp +++ b/ace/Dynamic.cpp @@ -1,4 +1,3 @@ -// Dynamic.cpp // $Id$ #include "ace/Dynamic.h" @@ -13,8 +12,10 @@ ACE_RCSID(ace, Dynamic, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Dynamic::ACE_Dynamic (void) - : is_dynamic_ (0) + : is_dynamic_ (false) { ACE_TRACE ("ACE_Dynamic::ACE_Dynamic"); } @@ -43,3 +44,5 @@ template ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex> * ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex>::singleton_; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dynamic.h b/ace/Dynamic.h index d6c3ab9466b..7a7de9e3c70 100644 --- a/ace/Dynamic.h +++ b/ace/Dynamic.h @@ -46,8 +46,8 @@ public: */ void set (void); - /// 1 if we were allocated dynamically, else 0. - int is_dynamic (void); + /// @c true if we were allocated dynamically, else @c false. + bool is_dynamic (void); /// Resets state flag. void reset (void); @@ -60,7 +60,7 @@ private: * method is usually called in operator new and then checked and * reset in the constructor. */ - int is_dynamic_; + bool is_dynamic_; }; #if defined (__ACE_INLINE__) diff --git a/ace/Dynamic.inl b/ace/Dynamic.inl index 9d1595441d6..3f506bc51f4 100644 --- a/ace/Dynamic.inl +++ b/ace/Dynamic.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Dynamic.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Dynamic::~ACE_Dynamic (void) @@ -13,11 +14,11 @@ ACE_INLINE void ACE_Dynamic::set (void) { // ACE_TRACE ("ACE_Dynamic::set"); - this->is_dynamic_ = 1; + this->is_dynamic_ = true; } -ACE_INLINE int -ACE_Dynamic::is_dynamic () +ACE_INLINE bool +ACE_Dynamic::is_dynamic (void) { // ACE_TRACE ("ACE_Dynamic::is_dynamic"); return this->is_dynamic_; @@ -27,5 +28,7 @@ ACE_INLINE void ACE_Dynamic::reset (void) { // ACE_TRACE ("ACE_Dynamic::reset"); - this->is_dynamic_ = 0; + this->is_dynamic_ = false; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dynamic_Service.cpp b/ace/Dynamic_Service.cpp index 9178889675c..dd0d8d0c679 100644 --- a/ace/Dynamic_Service.cpp +++ b/ace/Dynamic_Service.cpp @@ -1,8 +1,7 @@ -// Dynamic_Service.cpp // $Id$ -#ifndef ACE_DYNAMIC_SERVICE_C -#define ACE_DYNAMIC_SERVICE_C +#ifndef ACE_DYNAMIC_SERVICE_CPP +#define ACE_DYNAMIC_SERVICE_CPP #include "ace/Dynamic_Service.h" @@ -16,14 +15,16 @@ #include "ace/Dynamic_Service.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class TYPE> TYPE * ACE_Dynamic_Service<TYPE>::instance (const ACE_TCHAR *name) { - ACE_Service_Object *svc_obj = + ACE_Service_Object * svc_obj = static_cast<ACE_Service_Object *> (ACE_Dynamic_Service_Base::instance (name)); return dynamic_cast<TYPE *> (svc_obj); } -ACE_RCSID(ace, Dynamic_Service, "$Id$") +ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_DYNAMIC_SERVICE_C */ +#endif /* ACE_DYNAMIC_SERVICE_CPP */ diff --git a/ace/Dynamic_Service.h b/ace/Dynamic_Service.h index e7cddce6ad8..d913f1a750d 100644 --- a/ace/Dynamic_Service.h +++ b/ace/Dynamic_Service.h @@ -24,6 +24,8 @@ #include "ace/Dynamic_Service_Base.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Service_Object; /** @@ -48,6 +50,8 @@ public: #endif // ACE_USES_WCHAR }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Dynamic_Service.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Dynamic_Service.inl b/ace/Dynamic_Service.inl index f2ebfc81e1b..50bce680a39 100644 --- a/ace/Dynamic_Service.inl +++ b/ace/Dynamic_Service.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_USES_WCHAR) template <class TYPE> ACE_INLINE TYPE * ACE_Dynamic_Service<TYPE>::instance (const ACE_ANTI_TCHAR *name) @@ -8,3 +11,5 @@ ACE_Dynamic_Service<TYPE>::instance (const ACE_ANTI_TCHAR *name) return instance (ACE_TEXT_CHAR_TO_TCHAR (name)); } #endif // ACE_USES_WCHAR + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dynamic_Service_Base.cpp b/ace/Dynamic_Service_Base.cpp index 4f62b6de092..bec17fb079f 100644 --- a/ace/Dynamic_Service_Base.cpp +++ b/ace/Dynamic_Service_Base.cpp @@ -9,6 +9,7 @@ ACE_RCSID (ace, Dynamic_Service_Base, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL void ACE_Dynamic_Service_Base::dump (void) const @@ -39,6 +40,8 @@ ACE_Dynamic_Service_Base::instance (const ACE_TCHAR *name) if (type == 0) return 0; - void *obj = type->object (); + void * const obj = type->object (); return obj; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Dynamic_Service_Base.h b/ace/Dynamic_Service_Base.h index 2b80085f0e7..17b7c5dda2f 100644 --- a/ace/Dynamic_Service_Base.h +++ b/ace/Dynamic_Service_Base.h @@ -22,6 +22,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Dynamic_Service_Base @@ -42,5 +43,7 @@ protected: static void* instance (const ACE_TCHAR *name); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_DYNAMIC_SERVICE_BASE_H */ diff --git a/ace/Env_Value_T.cpp b/ace/Env_Value_T.cpp index dcab4e0522c..788bf125fc5 100644 --- a/ace/Env_Value_T.cpp +++ b/ace/Env_Value_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#if !defined (ACE_ENV_VALUE_T_C) -#define ACE_ENV_VALUE_T_C +#ifndef ACE_ENV_VALUE_T_CPP +#define ACE_ENV_VALUE_T_CPP #include "ace/Env_Value_T.h" @@ -9,6 +9,4 @@ #include "ace/Env_Value_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Env_Value_T, "$Id$") - -#endif /* ACE_ENV_VALUE_T_C */ +#endif /* ACE_ENV_VALUE_T_CPP */ diff --git a/ace/Env_Value_T.h b/ace/Env_Value_T.h index a88cca9d7e6..42735b42ef7 100644 --- a/ace/Env_Value_T.h +++ b/ace/Env_Value_T.h @@ -27,6 +27,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Env_Value * @@ -77,6 +79,8 @@ private: /// Function to convert a string @a s into type @c T. template <class T> void ACE_Convert (const ACE_TCHAR *s, T &t); +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Env_Value_T.inl" #endif /* __ACE_INLINE__ */ @@ -85,6 +89,7 @@ template <class T> void ACE_Convert (const ACE_TCHAR *s, T &t); #include "ace/Env_Value_T.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Default calls a CTOR on type T of the form 'T::T(const char*)', but // users can feel free to create their own specialized conversion @@ -152,6 +157,8 @@ ACE_Convert (const ACE_TCHAR *s, double &d) d = ACE_OS::strtod (s, 0); } +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #pragma implementation ("Env_Value_T.cpp") #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ diff --git a/ace/Env_Value_T.inl b/ace/Env_Value_T.inl index 2a58036c2f3..63fe8df1f29 100644 --- a/ace/Env_Value_T.inl +++ b/ace/Env_Value_T.inl @@ -1,5 +1,7 @@ // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_INLINE ACE_Env_Value<T>::operator T (void) { @@ -25,8 +27,8 @@ template <class T> ACE_INLINE void ACE_Env_Value<T>::open (const ACE_TCHAR *varname, const T &defval) { - varname_ = varname; - value_ = defval; + this->varname_ = varname; + this->value_ = defval; this->fetch_value (); } @@ -40,17 +42,19 @@ ACE_Env_Value<T>::fetch_value (void) #else char *nenv = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (this->varname_)); if (nenv != 0) - ACE_Convert (ACE_TEXT_CHAR_TO_TCHAR (nenv), value_); + ACE_Convert (ACE_TEXT_CHAR_TO_TCHAR (nenv), this->value_); #endif } template <class T> ACE_INLINE const ACE_TCHAR* ACE_Env_Value<T>::varname (void) const { - return varname_; + return this->varname_; } template <class T> ACE_INLINE ACE_Env_Value<T>::~ACE_Env_Value (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Event.cpp b/ace/Event.cpp index fde6f78840c..bc21465d27a 100644 --- a/ace/Event.cpp +++ b/ace/Event.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, Event, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Event::ACE_Event (int manual_reset, int initial_state, int type, @@ -85,3 +87,5 @@ ACE_Event::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Event.h b/ace/Event.h index 1a0070c2970..c4457a7dd9c 100644 --- a/ace/Event.h +++ b/ace/Event.h @@ -24,6 +24,8 @@ #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Event * @@ -130,6 +132,8 @@ private: const ACE_Event &operator= (const ACE_Event &rhs); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Event.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Event.inl b/ace/Event.inl index fdb9b491650..188d7c202cf 100644 --- a/ace/Event.inl +++ b/ace/Event.inl @@ -1,6 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_event_t ACE_Event::handle (void) const { @@ -13,3 +15,4 @@ ACE_Event::handle (ACE_event_t new_handle) this->handle_ = new_handle; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Event_Handler.cpp b/ace/Event_Handler.cpp index 5ea84a6c9a3..10a2a472ed7 100644 --- a/ace/Event_Handler.cpp +++ b/ace/Event_Handler.cpp @@ -13,6 +13,8 @@ ACE_RCSID(ace, Event_Handler, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Implement conceptually abstract virtual functions in the base class // so derived classes don't have to implement unused ones. @@ -404,3 +406,5 @@ ACE_Notification_Buffer::ACE_Notification_Buffer (ACE_Event_Handler *eh, { ACE_TRACE ("ACE_Notification_Buffer::ACE_Notification_Buffer"); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h index c0aea234a72..7379276e9ca 100644 --- a/ace/Event_Handler.h +++ b/ace/Event_Handler.h @@ -24,6 +24,8 @@ #include "ace/Atomic_Op.h" #include "ace/Synch_Traits.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration. class ACE_Message_Block; class ACE_Reactor; @@ -376,6 +378,8 @@ public: ACE_Reactor_Mask mask_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Event_Handler.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Event_Handler.inl b/ace/Event_Handler.inl index d07de45a072..75f2cd12aa5 100644 --- a/ace/Event_Handler.inl +++ b/ace/Event_Handler.inl @@ -1,8 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Notification_Buffer::~ACE_Notification_Buffer (void) { } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Event_Handler_T.cpp b/ace/Event_Handler_T.cpp index cbe9676a58e..51a03f62310 100644 --- a/ace/Event_Handler_T.cpp +++ b/ace/Event_Handler_T.cpp @@ -17,6 +17,7 @@ #include "ace/Event_Handler_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Event_Handler_T) @@ -117,6 +118,8 @@ ACE_Event_Handler_T<T>::handle_signal (int signum, siginfo_t *s, ucontext_t *u) return this->sig_handler_ == 0 ? 0 : (this->op_handler_->*sig_handler_) (signum, s, u); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TEMPLATE_TYPEDEFS */ #endif /* ACE_EVENT_HANDLER_T_CPP */ diff --git a/ace/Event_Handler_T.h b/ace/Event_Handler_T.h index 1352a65d486..71c97bcf4a8 100644 --- a/ace/Event_Handler_T.h +++ b/ace/Event_Handler_T.h @@ -22,6 +22,8 @@ #if defined (ACE_HAS_TEMPLATE_TYPEDEFS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Event_Handler_T * @@ -170,6 +172,8 @@ protected: GET_HANDLE get_handle_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Event_Handler_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Event_Handler_T.inl b/ace/Event_Handler_T.inl index f5d85f862b5..5d2e31ab81e 100644 --- a/ace/Event_Handler_T.inl +++ b/ace/Event_Handler_T.inl @@ -2,9 +2,9 @@ // // $Id$ - #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template<class T> ACE_INLINE void ACE_Event_Handler_T<T>::op_handler (T *op) @@ -131,3 +131,5 @@ ACE_Event_Handler_T<T>::sig_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::SIG_HA ACE_TRACE ("ACE_Event_Handler_T<T>::sig_handler"); this->sig_handler_ = h; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO.cpp b/ace/FIFO.cpp index 89c6019e449..89624fc4231 100644 --- a/ace/FIFO.cpp +++ b/ace/FIFO.cpp @@ -1,4 +1,3 @@ -// FIFO.cpp // $Id$ #include "ace/FIFO.h" @@ -15,6 +14,8 @@ ACE_RCSID(ace, FIFO, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FIFO) void @@ -52,8 +53,8 @@ ACE_FIFO::open (const ACE_TCHAR *r, int flags, int perms, } ACE_FIFO::ACE_FIFO (const ACE_TCHAR *fifo_name, - int flags, - int perms, + int flags, + int perms, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO::ACE_FIFO"); @@ -79,3 +80,5 @@ ACE_FIFO::close (void) } return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO.h b/ace/FIFO.h index 1b88db74a1d..f710dabcc2b 100644 --- a/ace/FIFO.h +++ b/ace/FIFO.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //========================================================================== /** @@ -24,6 +24,8 @@ #include "ace/IPC_SAP.h" #include "ace/os_include/os_limits.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FIFO * @@ -73,6 +75,8 @@ private: ACE_TCHAR rendezvous_[MAXPATHLEN + 1]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FIFO.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FIFO.inl b/ace/FIFO.inl index 0c91ceaca3f..149ed11318b 100644 --- a/ace/FIFO.inl +++ b/ace/FIFO.inl @@ -1,10 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// FIFO.i - #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_FIFO::get_local_addr (const ACE_TCHAR *&r) const { @@ -17,6 +18,8 @@ ACE_INLINE int ACE_FIFO::remove (void) { ACE_TRACE ("ACE_FIFO::remove"); - int result = this->close (); + int const result = this->close (); return ACE_OS::unlink (this->rendezvous_) == -1 || result == -1 ? -1 : 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Recv.cpp b/ace/FIFO_Recv.cpp index 4aa92e29acd..5e6ac9055b5 100644 --- a/ace/FIFO_Recv.cpp +++ b/ace/FIFO_Recv.cpp @@ -1,4 +1,3 @@ -// FIFO_Recv.cpp // $Id$ #include "ace/FIFO_Recv.h" @@ -11,6 +10,8 @@ ACE_RCSID(ace, FIFO_Recv, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv) void @@ -43,9 +44,9 @@ ACE_FIFO_Recv::close (void) int ACE_FIFO_Recv::open (const ACE_TCHAR *fifo_name, - int flags, - int perms, - int persistent, + int flags, + int perms, + int persistent, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO_Recv::open"); @@ -55,7 +56,7 @@ ACE_FIFO_Recv::open (const ACE_TCHAR *fifo_name, else if (this->disable (ACE_NONBLOCK) == -1) return -1; else if (persistent - && (this->aux_handle_ = ACE_OS::open (fifo_name, O_WRONLY, 0, sa)) == ACE_INVALID_HANDLE) + && (this->aux_handle_ = ACE_OS::open (fifo_name, O_WRONLY, 0, sa)) == ACE_INVALID_HANDLE) return -1; else return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0; @@ -68,18 +69,20 @@ ACE_FIFO_Recv::ACE_FIFO_Recv (void) } ACE_FIFO_Recv::ACE_FIFO_Recv (const ACE_TCHAR *fifo_name, - int flags, - int perms, - int persistent, + int flags, + int perms, + int persistent, LPSECURITY_ATTRIBUTES sa) : aux_handle_ (ACE_INVALID_HANDLE) { ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv"); if (this->ACE_FIFO_Recv::open (fifo_name, - flags, - perms, - persistent, + flags, + perms, + persistent, sa) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_FIFO_Recv"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Recv.h b/ace/FIFO_Recv.h index ea1b391edb9..979b43891a0 100644 --- a/ace/FIFO_Recv.h +++ b/ace/FIFO_Recv.h @@ -25,6 +25,8 @@ #include "ace/os_include/os_fcntl.h" #include "ace/Default_Constants.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FIFO_Recv * @@ -72,6 +74,8 @@ private: ACE_HANDLE aux_handle_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FIFO_Recv.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FIFO_Recv.inl b/ace/FIFO_Recv.inl index 5817a486624..b5cf96cb56d 100644 --- a/ace/FIFO_Recv.inl +++ b/ace/FIFO_Recv.inl @@ -1,11 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// FIFO_Recv.i - #include "ace/ACE.h" #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_FIFO_Recv::recv (void *buf, size_t len) { @@ -19,3 +20,5 @@ ACE_FIFO_Recv::recv_n (void *buf, size_t n) ACE_TRACE ("ACE_FIFO_Recv::recv_n"); return ACE::recv_n (this->get_handle (), buf, n); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Recv_Msg.cpp b/ace/FIFO_Recv_Msg.cpp index de6055f5707..ad45d3c705f 100644 --- a/ace/FIFO_Recv_Msg.cpp +++ b/ace/FIFO_Recv_Msg.cpp @@ -1,4 +1,3 @@ -// FIFO_Recv_Msg.cpp // $Id$ #include "ace/FIFO_Recv_Msg.h" @@ -11,6 +10,8 @@ ACE_RCSID(ace, FIFO_Recv_Msg, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv_Msg) void @@ -28,17 +29,17 @@ ACE_FIFO_Recv_Msg::dump (void) const int ACE_FIFO_Recv_Msg::open (const ACE_TCHAR *fifo_name, - int flags, - int perms, - int persistent, + int flags, + int perms, + int persistent, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO_Recv_Msg::open"); return ACE_FIFO_Recv::open (fifo_name, - flags, - perms, - persistent, + flags, + perms, + persistent, sa); } @@ -48,17 +49,19 @@ ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (void) } ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ACE_TCHAR *fifo_name, - int flags, - int perms, - int persistent, + int flags, + int perms, + int persistent, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg"); if (this->ACE_FIFO_Recv_Msg::open (fifo_name, - flags, - perms, - persistent, + flags, + perms, + persistent, sa) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_FIFO_Recv_Msg"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Recv_Msg.h b/ace/FIFO_Recv_Msg.h index cc35bc22423..600a06a03ac 100644 --- a/ace/FIFO_Recv_Msg.h +++ b/ace/FIFO_Recv_Msg.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decls class ACE_Str_Buf; @@ -126,6 +128,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FIFO_Recv_Msg.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FIFO_Recv_Msg.inl b/ace/FIFO_Recv_Msg.inl index c5a81e02a62..bab21a7e20e 100644 --- a/ace/FIFO_Recv_Msg.inl +++ b/ace/FIFO_Recv_Msg.inl @@ -2,8 +2,6 @@ // // $Id$ -// FIFO_Recv_Msg.i - #include "ace/Min_Max.h" #include "ace/OS_NS_stropts.h" @@ -11,6 +9,8 @@ #include "ace/OS_NS_unistd.h" #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg) { @@ -26,8 +26,8 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg) return recv_msg.len; #else /* Do the ol' 2-read trick... */ if (ACE_OS::read (this->get_handle (), - (char *) &recv_msg.len, - sizeof recv_msg.len) != sizeof recv_msg.len) + (char *) &recv_msg.len, + sizeof recv_msg.len) != sizeof recv_msg.len) return -1; else { @@ -77,8 +77,8 @@ ACE_FIFO_Recv_Msg::recv (void *buf, size_t max_len) #if defined (ACE_HAS_STREAM_PIPES) ACE_INLINE ssize_t ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf *data, - ACE_Str_Buf *cntl, - int *flags) + ACE_Str_Buf *cntl, + int *flags) { ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); if (ACE_OS::getmsg (this->get_handle (), @@ -92,9 +92,9 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf *data, ACE_INLINE ssize_t ACE_FIFO_Recv_Msg::recv (int *band, - ACE_Str_Buf *data, - ACE_Str_Buf *cntl, - int *flags) + ACE_Str_Buf *data, + ACE_Str_Buf *cntl, + int *flags) { ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); if (ACE_OS::getpmsg (this->get_handle (), @@ -107,3 +107,5 @@ ACE_FIFO_Recv_Msg::recv (int *band, return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } #endif /* ACE_HAS_STREAM_PIPES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Send.cpp b/ace/FIFO_Send.cpp index 9e347ef67ee..d494f418c44 100644 --- a/ace/FIFO_Send.cpp +++ b/ace/FIFO_Send.cpp @@ -1,4 +1,3 @@ -// FIFO_Send.cpp // $Id$ #include "ace/FIFO_Send.h" @@ -10,6 +9,8 @@ ACE_RCSID(ace, FIFO_Send, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Send) void @@ -53,3 +54,5 @@ ACE_FIFO_Send::ACE_FIFO_Send (const ACE_TCHAR *fifo_name, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_FIFO_Send::ACE_FIFO_Send"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Send.h b/ace/FIFO_Send.h index 125f1a42e15..b60db0536bc 100644 --- a/ace/FIFO_Send.h +++ b/ace/FIFO_Send.h @@ -25,6 +25,8 @@ #include "ace/os_include/os_fcntl.h" #include "ace/Default_Constants.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FIFO_Send * @@ -62,6 +64,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FIFO_Send.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FIFO_Send.inl b/ace/FIFO_Send.inl index eb503d9b831..12491058e2c 100644 --- a/ace/FIFO_Send.inl +++ b/ace/FIFO_Send.inl @@ -1,11 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// FIFO_Send.i - #include "ace/ACE.h" #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_FIFO_Send::send (const void *buf, size_t len) { @@ -19,3 +20,5 @@ ACE_FIFO_Send::send_n (const void *buf, size_t n) ACE_TRACE ("ACE_FIFO_Send::send_n"); return ACE::send_n (this->get_handle (), buf, n); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Send_Msg.cpp b/ace/FIFO_Send_Msg.cpp index 1575f7ae98c..0a04f65117e 100644 --- a/ace/FIFO_Send_Msg.cpp +++ b/ace/FIFO_Send_Msg.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, FIFO_Send_Msg, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Send_Msg) void @@ -57,8 +59,8 @@ ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (void) int ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name, - int flags, - int perms, + int flags, + int perms, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO_Send_Msg::open"); @@ -66,11 +68,13 @@ ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name, } ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (const ACE_TCHAR *fifo_name, - int flags, - int perms, + int flags, + int perms, LPSECURITY_ATTRIBUTES sa) { ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg"); if (this->ACE_FIFO_Send_Msg::open (fifo_name, flags, perms, sa) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_FIFO_Send_Msg"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FIFO_Send_Msg.h b/ace/FIFO_Send_Msg.h index b7f0e104177..88a1c8a425b 100644 --- a/ace/FIFO_Send_Msg.h +++ b/ace/FIFO_Send_Msg.h @@ -25,6 +25,8 @@ # include "ace/OS_NS_stropts.h" #endif /* ACE_HAS_STREAM_PIPES */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward Decls class ACE_Str_Buf; @@ -79,6 +81,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FIFO_Send_Msg.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FIFO_Send_Msg.inl b/ace/FIFO_Send_Msg.inl index 34bb88aabc3..74392656597 100644 --- a/ace/FIFO_Send_Msg.inl +++ b/ace/FIFO_Send_Msg.inl @@ -4,6 +4,8 @@ #include "ace/OS_NS_stropts.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_FIFO_Send_Msg::send (const void *buf, size_t len) { @@ -16,8 +18,8 @@ ACE_FIFO_Send_Msg::send (const void *buf, size_t len) #if defined (ACE_HAS_STREAM_PIPES) ACE_INLINE ssize_t ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data, - const ACE_Str_Buf *cntl, - int flags) + const ACE_Str_Buf *cntl, + int flags) { ACE_TRACE ("ACE_FIFO_Send_Msg::send"); if (ACE_OS::putmsg (this->get_handle (), @@ -31,9 +33,9 @@ ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data, ACE_INLINE ssize_t ACE_FIFO_Send_Msg::send (int band, - const ACE_Str_Buf *data, - const ACE_Str_Buf *cntl, - int flags) + const ACE_Str_Buf *data, + const ACE_Str_Buf *cntl, + int flags) { ACE_TRACE ("ACE_FIFO_Send_Msg::send"); @@ -47,3 +49,5 @@ ACE_FIFO_Send_Msg::send (int band, return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } #endif /* ACE_HAS_STREAM_PIPES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE.cpp b/ace/FILE.cpp index de7c294cc6e..d2578b42a04 100644 --- a/ace/FILE.cpp +++ b/ace/FILE.cpp @@ -15,6 +15,8 @@ ACE_RCSID(ace, FILE, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FILE) void @@ -145,3 +147,5 @@ ACE_FILE::unlink (void) return ACE_OS::unlink (this->addr_.get_path_name ()); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE.h b/ace/FILE.h index 9291e24dd61..ba791f46428 100644 --- a/ace/FILE.h +++ b/ace/FILE.h @@ -35,6 +35,8 @@ #define ACE_FILE_STREAM ACE_FILE_IO, ACE_FILE_Addr #endif /* ACE_TEMPLATE_TYPEDEFS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FILE_Info * @@ -127,6 +129,8 @@ protected: ACE_FILE_Addr addr_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FILE.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FILE.inl b/ace/FILE.inl index 934f5d7aa98..fdd65029d3a 100644 --- a/ace/FILE.inl +++ b/ace/FILE.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_FILE::disable (int signum) const { @@ -12,3 +15,4 @@ ACE_FILE::disable (int signum) const #endif /* ACE_WIN32 */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE_Addr.cpp b/ace/FILE_Addr.cpp index 6378b9aefa5..09d87c0d9b1 100644 --- a/ace/FILE_Addr.cpp +++ b/ace/FILE_Addr.cpp @@ -13,6 +13,8 @@ ACE_RCSID(ace, FILE_Addr, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Addr) ACE_FILE_Addr::ACE_FILE_Addr (void) @@ -123,3 +125,4 @@ ACE_FILE_Addr::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE_Addr.h b/ace/FILE_Addr.h index c1955e7994a..815319a834b 100644 --- a/ace/FILE_Addr.h +++ b/ace/FILE_Addr.h @@ -24,6 +24,8 @@ #include "ace/Flag_Manip.h" #include "ace/os_include/os_dirent.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FILE_Addr * @@ -78,6 +80,8 @@ private: ACE_TCHAR filename_[MAXPATHLEN + 1]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FILE_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FILE_Addr.inl b/ace/FILE_Addr.inl index cf6432bcefa..e03cd2ab156 100644 --- a/ace/FILE_Addr.inl +++ b/ace/FILE_Addr.inl @@ -5,6 +5,8 @@ #include "ace/SString.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Compare two addresses for equality. ACE_INLINE bool @@ -18,7 +20,7 @@ ACE_FILE_Addr::operator == (const ACE_FILE_Addr &sap) const ACE_INLINE bool ACE_FILE_Addr::operator != (const ACE_FILE_Addr &sap) const { - return !((*this) == sap); // This is lazy, of course... ;-) + return !((*this) == sap); // This is lazy, of course... ;-) } // Return the path name used for the rendezvous point. @@ -28,3 +30,5 @@ ACE_FILE_Addr::get_path_name (void) const { return this->filename_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE_Connector.cpp b/ace/FILE_Connector.cpp index 8a8c0625a92..c3991c309ea 100644 --- a/ace/FILE_Connector.cpp +++ b/ace/FILE_Connector.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, FILE_Connector, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Connector) void @@ -84,3 +86,5 @@ ACE_FILE_Connector::connect (ACE_FILE_IO &new_io, new_io.set_handle (handle); return handle == ACE_INVALID_HANDLE ? -1 : 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE_Connector.h b/ace/FILE_Connector.h index f59f13f4413..038f97ee5a1 100644 --- a/ace/FILE_Connector.h +++ b/ace/FILE_Connector.h @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FILE_Connector * @@ -103,6 +105,8 @@ public: typedef ACE_FILE_IO PEER_STREAM; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FILE_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FILE_Connector.inl b/ace/FILE_Connector.inl index 5a3e909072d..7fbc9db5b33 100644 --- a/ace/FILE_Connector.inl +++ b/ace/FILE_Connector.inl @@ -1,22 +1,23 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// FILE_Connector.i - // Creates a Local ACE_FILE. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_FILE_Connector::ACE_FILE_Connector (ACE_FILE_IO &new_io, - const ACE_FILE_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) + const ACE_FILE_Addr &remote_sap, + ACE_Time_Value *timeout, + const ACE_Addr &local_sap, + int reuse_addr, + int flags, + int perms) { ACE_TRACE ("ACE_FILE_Connector::ACE_FILE_Connector"); if (this->connect (new_io, remote_sap, timeout, local_sap, - reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE + reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME)) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("address %s, %p\n"), @@ -31,3 +32,5 @@ ACE_FILE_Connector::reset_new_handle (ACE_HANDLE handle) // Nothing to do here since the handle is not a socket return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE_IO.cpp b/ace/FILE_IO.cpp index 7528447b7fd..11def212b4e 100644 --- a/ace/FILE_IO.cpp +++ b/ace/FILE_IO.cpp @@ -13,6 +13,8 @@ ACE_RCSID(ace, FILE_IO, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_FILE_IO) void @@ -136,3 +138,5 @@ ACE_FILE_IO::recvv (iovec *io_vec) else return length; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FILE_IO.h b/ace/FILE_IO.h index 0bc7c98e187..ada2266c618 100644 --- a/ace/FILE_IO.h +++ b/ace/FILE_IO.h @@ -30,6 +30,8 @@ # include "ace/OS_NS_stropts.h" #endif /* ACE_HAS_STREAM_PIPES */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. class ACE_Message_Block; class ACE_Time_Value; @@ -158,6 +160,8 @@ public: typedef ACE_FILE_Addr PEER_ADDR; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/FILE_IO.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/FILE_IO.inl b/ace/FILE_IO.inl index a55024798b0..7db33a0c717 100644 --- a/ace/FILE_IO.inl +++ b/ace/FILE_IO.inl @@ -1,12 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// FILE_IO.i - #include "ace/ACE.h" #include "ace/OS_NS_sys_uio.h" #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_FILE_IO::sendv_n (const iovec iov[], int n) const { @@ -147,3 +148,5 @@ ACE_FILE_IO::recv (void *buf, size_t n, } #endif /* ACE_HAS_STREAM_PIPES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/File_Lock.cpp b/ace/File_Lock.cpp index 5f227e5c4e8..038e0224820 100644 --- a/ace/File_Lock.cpp +++ b/ace/File_Lock.cpp @@ -9,6 +9,8 @@ ACE_RCSID(ace, File_Lock, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_File_Lock) void @@ -67,14 +69,4 @@ ACE_File_Lock::~ACE_File_Lock (void) this->remove (this->unlink_in_destructor_); } -// These are instantiated both with and without ACE_HAS_THREADS. - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -// template class ACE_Guard<ACE_File_Lock>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -// #pragma instantiate ACE_Guard<ACE_File_Lock> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/File_Lock.h b/ace/File_Lock.h index 4fc5ee2889e..aaa9ac67699 100644 --- a/ace/File_Lock.h +++ b/ace/File_Lock.h @@ -27,6 +27,8 @@ #include "ace/OS_NS_stdio.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_File_Lock * @@ -58,7 +60,7 @@ public: int unlink_in_destructor = 1); /// Open the <filename> with <flags> and <mode> and set the result to - /// <handle_>. + /// <handle_>. int open (const ACE_TCHAR *filename, int flags, mode_t mode = 0); @@ -163,6 +165,8 @@ private: ACE_File_Lock (const ACE_File_Lock &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/File_Lock.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/File_Lock.inl b/ace/File_Lock.inl index a0dc79dcc7b..be9c149b8d8 100644 --- a/ace/File_Lock.inl +++ b/ace/File_Lock.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_File_Lock::acquire_read (short whence, off_t start, off_t len) { @@ -87,3 +90,5 @@ ACE_File_Lock::set_handle (ACE_HANDLE h) this->lock_.handle_ = h; this->removed_ = 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp index ace8bc594a4..e709b2bf358 100644 --- a/ace/Filecache.cpp +++ b/ace/Filecache.cpp @@ -42,6 +42,8 @@ ACE_RCSID (ace, // static const int WCOPY_FLAGS = O_RDWR | O_CREAT | O_TRUNC; #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // static data members ACE_Filecache *ACE_Filecache::cvf_ = 0; @@ -759,3 +761,5 @@ template class ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache #pragma instantiate ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Filecache.h b/ace/Filecache.h index c6986bd465d..f6c1bef7b3b 100644 --- a/ace/Filecache.h +++ b/ace/Filecache.h @@ -28,6 +28,8 @@ #include "ace/RW_Thread_Mutex.h" #include "ace/OS_NS_sys_stat.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + enum ACE_Filecache_Flag { ACE_NOMAP = 0, @@ -344,6 +346,7 @@ private: ACE_SYNCH_RW_MUTEX &lock_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" diff --git a/ace/FlReactor.cpp b/ace/FlReactor.cpp index 1eed0acf20d..f45ce67a994 100644 --- a/ace/FlReactor.cpp +++ b/ace/FlReactor.cpp @@ -6,12 +6,14 @@ ACE_RCSID(ace, FlReactor, "$Id$") #include /**/ <FL/Fl.h> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_FlReactor) // Must be called with lock held ACE_FlReactor::ACE_FlReactor (size_t size, - int restart, - ACE_Sig_Handler *h) + int restart, + ACE_Sig_Handler *h) : ACE_Select_Reactor (size, restart, h) { // When the ACE_Select_Reactor is constructed it creates the notify @@ -40,7 +42,7 @@ ACE_FlReactor::~ACE_FlReactor (void) int ACE_FlReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, - ACE_Time_Value *max_wait_time) + ACE_Time_Value *max_wait_time) { ACE_TRACE ("ACE_FlReactor::wait_for_multiple_events"); int nfound; @@ -124,9 +126,9 @@ ACE_FlReactor::fl_io_proc (int fd, void* reactor) wait_set.ex_mask_.set_bit (handle); int result = ACE_OS::select (fd + 1, - wait_set.rd_mask_, - wait_set.wr_mask_, - wait_set.ex_mask_, &zero); + wait_set.rd_mask_, + wait_set.wr_mask_, + wait_set.ex_mask_, &zero); ACE_Select_Reactor_Handle_Set dispatch_set; @@ -134,11 +136,11 @@ ACE_FlReactor::fl_io_proc (int fd, void* reactor) if (result > 0) { if (wait_set.rd_mask_.is_set (handle)) - dispatch_set.rd_mask_.set_bit (handle); + dispatch_set.rd_mask_.set_bit (handle); if (wait_set.wr_mask_.is_set (handle)) - dispatch_set.wr_mask_.set_bit (handle); + dispatch_set.wr_mask_.set_bit (handle); if (wait_set.ex_mask_.is_set (handle)) - dispatch_set.ex_mask_.set_bit (handle); + dispatch_set.ex_mask_.set_bit (handle); self->dispatch (1, dispatch_set); } @@ -158,8 +160,8 @@ ACE_FlReactor::fl_timeout_proc (void* reactor) int ACE_FlReactor::register_handler_i (ACE_HANDLE handle, - ACE_Event_Handler *handler, - ACE_Reactor_Mask mask) + ACE_Event_Handler *handler, + ACE_Reactor_Mask mask) { ACE_TRACE ("ACE_FlReactor::register_handler_i"); @@ -195,8 +197,8 @@ ACE_FlReactor::register_handler_i (ACE_HANDLE handle, int ACE_FlReactor::register_handler_i (const ACE_Handle_Set &handles, - ACE_Event_Handler *handler, - ACE_Reactor_Mask mask) + ACE_Event_Handler *handler, + ACE_Reactor_Mask mask) { return ACE_Select_Reactor::register_handler_i (handles, handler, @@ -205,7 +207,7 @@ ACE_FlReactor::register_handler_i (const ACE_Handle_Set &handles, int ACE_FlReactor::remove_handler_i (ACE_HANDLE handle, - ACE_Reactor_Mask mask) + ACE_Reactor_Mask mask) { ACE_TRACE ("ACE_FlReactor::remove_handler_i"); @@ -223,10 +225,10 @@ ACE_FlReactor::remove_handler_i (ACE_HANDLE handle, int ACE_FlReactor::remove_handler_i (const ACE_Handle_Set &handles, - ACE_Reactor_Mask mask) + ACE_Reactor_Mask mask) { return ACE_Select_Reactor::remove_handler_i (handles, - mask); + mask); } // The following function ensures there's an Fl timeout for the first @@ -271,9 +273,9 @@ ACE_FlReactor::reset_timer_interval long ACE_FlReactor::schedule_timer (ACE_Event_Handler *event_handler, - const void *arg, + const void *arg, const ACE_Time_Value &delay, - const ACE_Time_Value &interval) + const ACE_Time_Value &interval) { ACE_TRACE ("ACE_FlReactor::schedule_timer"); ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1)); @@ -293,12 +295,12 @@ ACE_FlReactor::schedule_timer (ACE_Event_Handler *event_handler, int ACE_FlReactor::cancel_timer (ACE_Event_Handler *handler, - int dont_call_handle_close) + int dont_call_handle_close) { ACE_TRACE ("ACE_FlReactor::cancel_timer"); if (ACE_Select_Reactor::cancel_timer (handler, - dont_call_handle_close) == -1) + dont_call_handle_close) == -1) return -1; else { @@ -309,14 +311,14 @@ ACE_FlReactor::cancel_timer (ACE_Event_Handler *handler, int ACE_FlReactor::cancel_timer (long timer_id, - const void **arg, - int dont_call_handle_close) + const void **arg, + int dont_call_handle_close) { ACE_TRACE ("ACE_FlReactor::cancel_timer"); if (ACE_Select_Reactor::cancel_timer (timer_id, - arg, - dont_call_handle_close) == -1) + arg, + dont_call_handle_close) == -1) return -1; else { @@ -324,3 +326,5 @@ ACE_FlReactor::cancel_timer (long timer_id, return 0; } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/FlReactor.h b/ace/FlReactor.h index b1813fdd9bd..75d88b0ab5c 100644 --- a/ace/FlReactor.h +++ b/ace/FlReactor.h @@ -28,6 +28,8 @@ #include "ace/ACE_FlReactor_export.h" #include "ace/Select_Reactor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_FlReactor * @@ -102,5 +104,7 @@ private: ACE_FlReactor &operator = (const ACE_FlReactor &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_FLREACTOR_H */ diff --git a/ace/Flag_Manip.cpp b/ace/Flag_Manip.cpp index e1b1c25b7a6..632ee14bf1c 100644 --- a/ace/Flag_Manip.cpp +++ b/ace/Flag_Manip.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, Flag_Manip, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Flags are file status flags to turn on. int @@ -89,3 +91,5 @@ ACE::clr_flags (ACE_HANDLE handle, int flags) return 0; #endif /* ACE_LACKS_FCNTL */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Flag_Manip.h b/ace/Flag_Manip.h index 28646f98350..e1f3fc1d997 100644 --- a/ace/Flag_Manip.h +++ b/ace/Flag_Manip.h @@ -31,6 +31,7 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE { @@ -47,6 +48,8 @@ namespace ACE ACE_NAMESPACE_INLINE_FUNCTION int get_flags (ACE_HANDLE handle); } +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Flag_Manip.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Flag_Manip.inl b/ace/Flag_Manip.inl index 0009be56695..38739d62e2d 100644 --- a/ace/Flag_Manip.inl +++ b/ace/Flag_Manip.inl @@ -1,10 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Return flags currently associated with handle. - #include "ace/OS_NS_fcntl.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Return flags currently associated with handle. ACE_INLINE int ACE::get_flags (ACE_HANDLE handle) { @@ -20,3 +22,5 @@ ACE::get_flags (ACE_HANDLE handle) return ACE_OS::fcntl (handle, F_GETFL, 0); #endif /* ACE_LACKS_FCNTL */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Framework_Component.cpp b/ace/Framework_Component.cpp index 6b035cc922e..17c112f06c9 100644 --- a/ace/Framework_Component.cpp +++ b/ace/Framework_Component.cpp @@ -15,6 +15,8 @@ ACE_RCSID(ace, Framework_Component, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Framework_Component::~ACE_Framework_Component (void) { ACE_TRACE ("ACE_Framework_Component::~ACE_Framework_Component"); @@ -274,3 +276,5 @@ ACE_Framework_Repository::ACE_Framework_Repository (int size) ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_Framework_Repository"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Framework_Component.h b/ace/Framework_Component.h index 318867773ba..bfcd053d7e4 100644 --- a/ace/Framework_Component.h +++ b/ace/Framework_Component.h @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- + //============================================================================= /** * @file Framework_Component.h @@ -47,6 +48,8 @@ #define ACE_DEFAULT_FRAMEWORK_REPOSITORY_SIZE 1024 +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Framework_Component * @@ -185,6 +188,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Framework_Repository &operator= (const ACE_Framework_Repository &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Framework_Component.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Framework_Component.inl b/ace/Framework_Component.inl index 2d3662642bd..6e6146114f7 100644 --- a/ace/Framework_Component.inl +++ b/ace/Framework_Component.inl @@ -1,13 +1,14 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Framework_Component.inl - #include "ace/ACE.h" #include "ace/Guard_T.h" -ACE_INLINE -ACE_Framework_Component::ACE_Framework_Component (void *_this, +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE +ACE_Framework_Component::ACE_Framework_Component (void *_this, const ACE_TCHAR *dll_name, const ACE_TCHAR *name) : this_ (_this), @@ -34,3 +35,5 @@ ACE_Framework_Repository::total_size (void) const ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->lock_, -1)); return this->total_size_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Framework_Component_T.cpp b/ace/Framework_Component_T.cpp index cbaf65463d8..509d6609daf 100644 --- a/ace/Framework_Component_T.cpp +++ b/ace/Framework_Component_T.cpp @@ -1,11 +1,11 @@ -// Framework_Component_T.cpp // $Id$ + #ifndef ACE_FRAMEWORK_COMPONENT_T_CPP #define ACE_FRAMEWORK_COMPONENT_T_CPP #include "ace/Framework_Component_T.h" -ACE_RCSID(ace, Framework_Component_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class Concrete> ACE_Framework_Component_T<Concrete>::ACE_Framework_Component_T (Concrete *concrete) @@ -28,4 +28,6 @@ ACE_Framework_Component_T<Concrete>::close_singleton (void) Concrete::close_singleton (); } -#endif /*ACE_FRAWORK_COMPONENT_T_CPP*/ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_FRAMEWORK_COMPONENT_T_CPP */ diff --git a/ace/Framework_Component_T.h b/ace/Framework_Component_T.h index 226fabbd432..13440ea88ae 100644 --- a/ace/Framework_Component_T.h +++ b/ace/Framework_Component_T.h @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- + //============================================================================= /** * @file Framework_Component_T.h @@ -18,6 +19,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Framework_Component_T * @@ -47,6 +50,8 @@ public: void close_singleton (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + // This macro should be called in the instance() method // of the Concrete class that will be managed. Along // with the appropriate template instantiation. diff --git a/ace/Free_List.cpp b/ace/Free_List.cpp index d0d24e2ba05..60dfabafb1c 100644 --- a/ace/Free_List.cpp +++ b/ace/Free_List.cpp @@ -10,13 +10,11 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Empty constructor +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class T> ACE_Free_List<T>::~ACE_Free_List (void) { - // Nothing } // Default constructor that takes in a preallocation number @@ -57,13 +55,13 @@ ACE_Locked_Free_List<T, ACE_LOCK>::~ACE_Locked_Free_List (void) // elements withing and it pasts the high water mark, delete the // element) -template <class T, class ACE_LOCK> void +template <class T, class ACE_LOCK> void ACE_Locked_Free_List<T, ACE_LOCK>::add (T *element) { ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_)); // Check to see that we not at the high water mark. - if (this->mode_ == ACE_PURE_FREE_LIST + if (this->mode_ == ACE_PURE_FREE_LIST || this->size_ < this->hwm_) { element->set_next (this->free_list_); @@ -102,7 +100,7 @@ ACE_Locked_Free_List<T, ACE_LOCK>::remove (void) // Returns the current size of the free list -template <class T, class ACE_LOCK> size_t +template <class T, class ACE_LOCK> size_t ACE_Locked_Free_List<T, ACE_LOCK>::size (void) { return this->size_; @@ -110,7 +108,7 @@ ACE_Locked_Free_List<T, ACE_LOCK>::size (void) // Resizes the free list to <newsize> -template <class T, class ACE_LOCK> void +template <class T, class ACE_LOCK> void ACE_Locked_Free_List<T, ACE_LOCK>::resize (size_t newsize) { ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_)); @@ -120,7 +118,7 @@ ACE_Locked_Free_List<T, ACE_LOCK>::resize (size_t newsize) // Check to see if we grow or shrink if (newsize < this->size_) this->dealloc (this->size_ - newsize); - else + else this->alloc (newsize - this->size_); } @@ -154,4 +152,6 @@ ACE_Locked_Free_List<T, ACE_LOCK>::dealloc (size_t n) } } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_FREE_LIST_CPP */ diff --git a/ace/Free_List.h b/ace/Free_List.h index b229406c991..726e7fe988c 100644 --- a/ace/Free_List.h +++ b/ace/Free_List.h @@ -24,6 +24,8 @@ #include "ace/Default_Constants.h" #include "ace/os_include/os_stddef.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Free_List * @@ -134,6 +136,8 @@ private: ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Locked_Free_List<T, ACE_LOCK> &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Free_List.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Functor.cpp b/ace/Functor.cpp index b42375de277..3e943fe3d54 100644 --- a/ace/Functor.cpp +++ b/ace/Functor.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ // $Id$ // ============================================================================ @@ -29,9 +28,6 @@ // // ============================================================================ -#if !defined (ACE_FUNCTOR_C) -#define ACE_FUNCTOR_C - #include "ace/Functor_T.h" #include "ace/Functor.h" @@ -41,12 +37,10 @@ ACE_RCSID(ace, Functor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Command_Base::~ACE_Command_Base (void) { } -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - -#endif /* ACE_FUNCTOR_C */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Functor.h b/ace/Functor.h index ffe25656413..39dc3b8722c 100644 --- a/ace/Functor.h +++ b/ace/Functor.h @@ -41,6 +41,8 @@ #include "ace/ACE_export.h" #include "ace/Basic_Types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ////////////////////////////////////////////////////////////// // GOF Command Pattern Classes and Template Specializations // ////////////////////////////////////////////////////////////// @@ -469,6 +471,8 @@ public: #endif // ACE_HAS_WCHAR +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Functor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Functor.inl b/ace/Functor.inl index 4d32149257b..07e5e9fa9bd 100644 --- a/ace/Functor.inl +++ b/ace/Functor.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ // ============================================================================ @@ -7,7 +8,7 @@ // ace // // = FILENAME -// Functor.i +// Functor.inl // // = DESCRIPTION // Inlinable method definitions for non-templatized classes @@ -32,6 +33,8 @@ #include "ace/ACE.h" #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ////////////////////////////////////////////////////////////// // GOF Command Pattern Classes and Template Specializations // ////////////////////////////////////////////////////////////// @@ -224,3 +227,5 @@ ACE_Less_Than<wchar_t *>::operator () (const wchar_t *lhs, const wchar_t *rhs) c } #endif // ACE_HAS_WCHAR + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Functor_String.h b/ace/Functor_String.h index dc28e0dcf95..712a7dcc1f8 100644 --- a/ace/Functor_String.h +++ b/ace/Functor_String.h @@ -11,7 +11,6 @@ * could be placed in Functor.h. But we don't want to couple string * types to the rest of ACE+TAO. Hence they are placed in a seperate * file. - * */ //========================================================================== #ifndef ACE_FUNCTOR_STRING_H @@ -27,6 +26,8 @@ #include "ace/ACE_export.h" #include "ace/SStringfwd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + //////////////////////////////////////////////////////////// // STL-style Functor Classes and Template Specializations // //////////////////////////////////////////////////////////// @@ -128,6 +129,8 @@ public: const ACE_WString &rhs) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /*ACE_USES_WCHAR*/ #if defined (__ACE_INLINE__) #include "ace/Functor_String.inl" diff --git a/ace/Functor_String.inl b/ace/Functor_String.inl index 083b2f488ec..82e8775a718 100644 --- a/ace/Functor_String.inl +++ b/ace/Functor_String.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/ACE.h" #include "ace/String_Base.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE unsigned long ACE_Hash<ACE_CString>::operator () (const ACE_CString &t) const { @@ -49,3 +52,5 @@ ACE_Less_Than<ACE_WString>::operator () (const ACE_WString &lhs, } #endif /*ACE_USES_WCHAR*/ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Functor_T.cpp b/ace/Functor_T.cpp index c29f9029f75..53e8f170fc1 100644 --- a/ace/Functor_T.cpp +++ b/ace/Functor_T.cpp @@ -1,8 +1,7 @@ -/* -*- C++ -*- */ // $Id$ -#ifndef ACE_FUNCTOR_T_C -#define ACE_FUNCTOR_T_C +#ifndef ACE_FUNCTOR_T_CPP +#define ACE_FUNCTOR_T_CPP #include "ace/Functor_T.h" @@ -14,7 +13,7 @@ #include "ace/Functor_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Functor_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Command_Callback) @@ -45,5 +44,6 @@ ACE_Command_Callback<RECEIVER, ACTION>::execute (void *arg) return (receiver_.*action_) (arg); } +ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_FUNCTOR_T_C */ +#endif /* ACE_FUNCTOR_T_CPP */ diff --git a/ace/Functor_T.h b/ace/Functor_T.h index e960cad0d26..554820e3c0b 100644 --- a/ace/Functor_T.h +++ b/ace/Functor_T.h @@ -37,6 +37,9 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Functor_String.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /////////////////////////////////// // GOF Command Pattern Templates // /////////////////////////////////// @@ -136,6 +139,8 @@ public: const TYPE &rhs) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Functor_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Functor_T.inl b/ace/Functor_T.inl index 51caa11825d..6441c091b76 100644 --- a/ace/Functor_T.inl +++ b/ace/Functor_T.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class TYPE> ACE_INLINE unsigned long ACE_Hash<TYPE>::operator () (const TYPE &t) const { @@ -36,3 +38,5 @@ ACE_Less_Than<TYPE>::operator () (const TYPE &lhs, { return lhs < rhs; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Future.cpp b/ace/Future.cpp index 2dc0fa5ddb8..3ca6f8225ba 100644 --- a/ace/Future.cpp +++ b/ace/Future.cpp @@ -16,6 +16,8 @@ ACE_RCSID (ace, Future, "$Id$") # include "ace/Guard_T.h" # include "ace/Recursive_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_Future_Holder<T>::ACE_Future_Holder (void) { @@ -425,5 +427,8 @@ ACE_Future<T>::get_rep () return this->future_rep_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ + #endif /* ACE_FUTURE_CPP */ diff --git a/ace/Future.h b/ace/Future.h index 9d1e0f7800b..e4956f13c3b 100644 --- a/ace/Future.h +++ b/ace/Future.h @@ -30,6 +30,8 @@ #include "ace/Recursive_Thread_Mutex.h" #include "ace/Condition_Recursive_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. template <class T> class ACE_Future_Holder; template <class T> class ACE_Future_Observer; @@ -206,7 +208,7 @@ private: int ref_count_; typedef ACE_Future_Observer<T> - OBSERVER; + OBSERVER; typedef ACE_Unbounded_Set<OBSERVER *> OBSERVER_COLLECTION; @@ -371,6 +373,8 @@ private: FUTURE_REP *future_rep_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Future.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Future_Set.cpp b/ace/Future_Set.cpp index feac0b0d54f..d9b9e2a1ac9 100644 --- a/ace/Future_Set.cpp +++ b/ace/Future_Set.cpp @@ -1,4 +1,3 @@ -// Future.cpp // $Id$ #ifndef ACE_FUTURE_SET_CPP @@ -10,10 +9,10 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID (ace, Future_Set, "$Id$") - #if defined (ACE_HAS_THREADS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_Future_Set<T>::ACE_Future_Set (ACE_Message_Queue<ACE_SYNCH> *new_queue) : delete_queue_ (0) @@ -119,8 +118,8 @@ ACE_Future_Set<T>::next_readable (ACE_Future<T> &future, // Remove the hash map entry with the specified future rep from our map. FUTURE_HOLDER *future_holder; - if ( this->future_map_.find (future_rep, - future_holder) != -1 ) + if (this->future_map_.find (future_rep, + future_holder) != -1) { future = future_holder->item_; this->future_map_.unbind (future_rep); @@ -131,5 +130,7 @@ ACE_Future_Set<T>::next_readable (ACE_Future<T> &future, return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ #endif /* ACE_FUTURE_SET_CPP */ diff --git a/ace/Future_Set.h b/ace/Future_Set.h index fcd17324d46..a601099b1a9 100644 --- a/ace/Future_Set.h +++ b/ace/Future_Set.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -26,6 +26,8 @@ #if defined (ACE_HAS_THREADS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Future_Set * @@ -115,7 +117,7 @@ private: FUTURE_HOLDER *, FUTURE_REP_HASH, FUTURE_REP_COMPARE, - ACE_Null_Mutex> FUTURE_HASH_MAP; + ACE_Null_Mutex> FUTURE_HASH_MAP; /// Map of <ACE_Futures>, subjects, which have not been written to by /// client's writer thread. @@ -129,6 +131,8 @@ private: int delete_queue_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Future_Set.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp index 6f4bc932549..59b6c4f2a5c 100644 --- a/ace/Get_Opt.cpp +++ b/ace/Get_Opt.cpp @@ -87,6 +87,8 @@ ACE_RCSID (ace, * POSSIBILITY OF SUCH DAMAGE. */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt) ACE_Get_Opt::ACE_Get_Opt (int argc, @@ -745,3 +747,5 @@ template class ACE_Array_Base<ACE_Get_Opt::ACE_Get_Opt_Long_Option *>; #pragma instantiate ACE_Array<ACE_Get_Opt::ACE_Get_Opt_Long_Option *> #pragma instantiate ACE_Array_Base<ACE_Get_Opt::ACE_Get_Opt_Long_Option *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Get_Opt.h b/ace/Get_Opt.h index 5a29f57b575..5cba19a17c7 100644 --- a/ace/Get_Opt.h +++ b/ace/Get_Opt.h @@ -26,6 +26,8 @@ #undef optarg #undef opterr +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /* * These definitions are for backward compatibility with previous versions. * of ACE_Get_Opt. @@ -458,6 +460,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Get_Opt &operator= (const ACE_Get_Opt &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Get_Opt.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Get_Opt.inl b/ace/Get_Opt.inl index f6583402b76..cbe5f167e55 100644 --- a/ace/Get_Opt.inl +++ b/ace/Get_Opt.inl @@ -2,6 +2,7 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE bool ACE_Get_Opt::ACE_Get_Opt_Long_Option::operator < (const ACE_Get_Opt_Long_Option &rhs) @@ -38,3 +39,5 @@ ACE_Get_Opt::opt_ind (void) { return this->optind; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Global_Macros.h b/ace/Global_Macros.h index 7d0be4f3921..907589936a5 100644 --- a/ace/Global_Macros.h +++ b/ace/Global_Macros.h @@ -48,6 +48,9 @@ # if defined (_DEBUG) && !defined (ACE_HAS_WINCE) && !defined (__BORLANDC__) # include /**/ <crtdbg.h> +// Open versioned namespace, if enabled by the user. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Export ACE_No_Heap_Check { public: @@ -58,6 +61,10 @@ public: private: int old_state; }; + +// Close versioned namespace, if enabled by the user. +ACE_END_VERSIONED_NAMESPACE_DECL + # define ACE_NO_HEAP_CHECK ACE_No_Heap_Check ____no_heap; # else /* !_DEBUG */ # define ACE_NO_HEAP_CHECK @@ -586,6 +593,13 @@ static ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS; #endif /* !ACE_LACKS_STATIC_CONSTRUCTORS */ +// Preprocessor symbols will not be expanded if they are +// concatenated. Force the preprocessor to expand them during the +// argument prescan by calling a macro that itself calls another that +// performs the actual concatenation. +#define ACE_PREPROC_CONCATENATE_IMPL(A,B) A ## B +#define ACE_PREPROC_CONCATENATE(A,B) ACE_PREPROC_CONCATENATE_IMPL(A,B) + #if defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1 // Preprocessor symbols will not be expanded if they are // concatenated. Force the preprocessor to expand them during the diff --git a/ace/Guard_T.cpp b/ace/Guard_T.cpp index 00cbfb4ebf1..bd60ebd2356 100644 --- a/ace/Guard_T.cpp +++ b/ace/Guard_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_GUARD_T_C -#define ACE_GUARD_T_C +#ifndef ACE_GUARD_T_CPP +#define ACE_GUARD_T_CPP #include "ace/Guard_T.h" @@ -9,8 +9,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Guard_T, "$Id$") - #if !defined (__ACE_INLINE__) #include "ace/Guard_T.inl" #endif /* __ACE_INLINE__ */ @@ -20,6 +18,9 @@ ACE_RCSID(ace, Guard_T, "$Id$") #endif /* ACE_HAS_DUMP */ // **************************************************************** + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // ACE_ALLOC_HOOK_DEFINE(ACE_Guard) template <class ACE_LOCK> void @@ -55,4 +56,6 @@ ACE_Read_Guard<ACE_LOCK>::dump (void) const ACE_Guard<ACE_LOCK>::dump (); } -#endif /* ACE_GUARD_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_GUARD_T_CPP */ diff --git a/ace/Guard_T.h b/ace/Guard_T.h index 552385b298e..2e64d9e5a66 100644 --- a/ace/Guard_T.h +++ b/ace/Guard_T.h @@ -25,6 +25,8 @@ #include "ace/Global_Macros.h" #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Guard * @@ -342,6 +344,9 @@ public: // ACE_ALLOC_HOOK_DECLARE; // Declare the dynamic allocation hooks. }; + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) */ #if defined (__ACE_INLINE__) diff --git a/ace/Guard_T.inl b/ace/Guard_T.inl index 0ce34431d2c..8c2e281f447 100644 --- a/ace/Guard_T.inl +++ b/ace/Guard_T.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/RW_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class ACE_LOCK> ACE_INLINE int ACE_Guard<ACE_LOCK>::acquire (void) { @@ -164,3 +167,5 @@ ACE_Read_Guard<ACE_LOCK>::ACE_Read_Guard (ACE_LOCK &m, else this->tryacquire_read (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Handle_Gobbler.h b/ace/Handle_Gobbler.h index 8b3e472e7b8..0640b113666 100644 --- a/ace/Handle_Gobbler.h +++ b/ace/Handle_Gobbler.h @@ -1,3 +1,4 @@ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Handle_Gobbler * @@ -58,6 +61,8 @@ private: HANDLE_SET handle_set_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include "ace/Handle_Gobbler.inl" #include /**/ "ace/post.h" diff --git a/ace/Handle_Gobbler.inl b/ace/Handle_Gobbler.inl index 12887593086..6b51908e45e 100644 --- a/ace/Handle_Gobbler.inl +++ b/ace/Handle_Gobbler.inl @@ -1,3 +1,5 @@ +// -*- C++ -*- +// // $Id$ // Since this is only included in Handle_Gobbler.h, these should be @@ -7,6 +9,8 @@ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_fcntl.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + inline void ACE_Handle_Gobbler::close_remaining_handles (void) { @@ -89,3 +93,5 @@ ACE_Handle_Gobbler::consume_handles (size_t n_handles_to_keep_available) return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Handle_Ops.cpp b/ace/Handle_Ops.cpp index eb373af8020..eae24314864 100644 --- a/ace/Handle_Ops.cpp +++ b/ace/Handle_Ops.cpp @@ -10,6 +10,9 @@ ACE_RCSID (ace, Handle_Ops, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_HANDLE ACE::handle_timed_open (ACE_Time_Value *timeout, const ACE_TCHAR *name, @@ -43,3 +46,5 @@ ACE::handle_timed_open (ACE_Time_Value *timeout, else return ACE_OS::open (name, flags, perms, sa); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Handle_Ops.h b/ace/Handle_Ops.h index 7f50eba8270..de6918753a9 100644 --- a/ace/Handle_Ops.h +++ b/ace/Handle_Ops.h @@ -6,9 +6,7 @@ * * $Id$ * - * This class consolidates the operations on the Handles. - * - * @author Priyanka Gontla <pgontla@ece.uci.edu> + * Handle operations. */ //============================================================================= @@ -25,6 +23,8 @@ #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; // = Operations on HANDLEs. @@ -43,6 +43,8 @@ namespace ACE LPSECURITY_ATTRIBUTES sa = 0); } +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_HANDLE_OPS_H */ diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp index a24605a5367..b6aabfd39f8 100644 --- a/ace/Handle_Set.cpp +++ b/ace/Handle_Set.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, Handle_Set, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set) // ACE_MSB_MASK is only used here. @@ -572,3 +574,5 @@ ACE_Handle_Set_Iterator::reset_state (void) } #endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Handle_Set.h b/ace/Handle_Set.h index d732dfe4ef5..0b8af83e621 100644 --- a/ace/Handle_Set.h +++ b/ace/Handle_Set.h @@ -40,6 +40,8 @@ # define ACE_DEFAULT_SELECT_REACTOR_SIZE ACE_FD_SETSIZE #endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Handle_Set * @@ -236,6 +238,8 @@ private: #endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Handle_Set.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Handle_Set.inl b/ace/Handle_Set.inl index d00fb384863..a450ea1f120 100644 --- a/ace/Handle_Set.inl +++ b/ace/Handle_Set.inl @@ -1,7 +1,7 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Handle_Set.i #include "ace/Log_Msg.h" // todo: This should be cleaned up a bit. @@ -21,6 +21,8 @@ # include "ace/os_include/os_strings.h" #endif /* ACE_HAS_STRINGS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Initialize the bitmask to all 0s and reset the associated fields. ACE_INLINE void @@ -184,3 +186,5 @@ ACE_INLINE ACE_Handle_Set_Iterator::~ACE_Handle_Set_Iterator (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Hash_Cache_Map_Manager_T.cpp b/ace/Hash_Cache_Map_Manager_T.cpp index 72b84d88715..5baac0ae1a0 100644 --- a/ace/Hash_Cache_Map_Manager_T.cpp +++ b/ace/Hash_Cache_Map_Manager_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_HASH_CACHE_MAP_MANAGER_T_C -#define ACE_HASH_CACHE_MAP_MANAGER_T_C +#ifndef ACE_HASH_CACHE_MAP_MANAGER_T_CPP +#define ACE_HASH_CACHE_MAP_MANAGER_T_CPP #include "ace/Hash_Cache_Map_Manager_T.h" @@ -13,7 +13,7 @@ #include "ace/Hash_Cache_Map_Manager_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Hash_Cache_Map_Manager_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Cache_Map_Manager) @@ -224,7 +224,9 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::unbind (CACHE_ENTRY *entry) return unbind_result; } +ACE_END_VERSIONED_NAMESPACE_DECL + #undef ACE_T1 #undef ACE_T2 -#endif /* ACE_HASH_CACHE_MAP_MANAGER_T_C */ +#endif /* ACE_HASH_CACHE_MAP_MANAGER_T_CPP */ diff --git a/ace/Hash_Cache_Map_Manager_T.h b/ace/Hash_Cache_Map_Manager_T.h index 26ccbf78432..023e9d17568 100644 --- a/ace/Hash_Cache_Map_Manager_T.h +++ b/ace/Hash_Cache_Map_Manager_T.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -13,6 +13,7 @@ #ifndef HASH_CACHE_MAP_MANAGER_T_H #define HASH_CACHE_MAP_MANAGER_T_H + #include /**/ "ace/pre.h" #include "ace/Hash_Map_Manager_T.h" @@ -24,6 +25,8 @@ #include "ace/Null_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration. class ACE_Allocator; @@ -191,6 +194,8 @@ protected: typedef ACE_CACHE_MAP_MANAGER ACE_HCMM_BASE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Hash_Cache_Map_Manager_T.inl" @@ -205,4 +210,5 @@ protected: #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #include /**/ "ace/post.h" + #endif /* HASH_CACHE_MAP_MANAGER_T_H */ diff --git a/ace/Hash_Cache_Map_Manager_T.inl b/ace/Hash_Cache_Map_Manager_T.inl index 84d40bffbb6..0388abd6c6e 100644 --- a/ace/Hash_Cache_Map_Manager_T.inl +++ b/ace/Hash_Cache_Map_Manager_T.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #define ACE_T1 class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES #define ACE_T2 KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <ACE_T1> ACE_INLINE int ACE_Hash_Cache_Map_Manager<ACE_T2>::bind (const KEY &key, const VALUE &value) @@ -64,5 +67,7 @@ ACE_Hash_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key, value); } +ACE_END_VERSIONED_NAMESPACE_DECL + #undef ACE_T1 #undef ACE_T2 diff --git a/ace/Hash_Map_Manager.cpp b/ace/Hash_Map_Manager.cpp deleted file mode 100644 index 4378551c7f8..00000000000 --- a/ace/Hash_Map_Manager.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Hash_Map_Manager.cpp -// -// = AUTHOR -// Douglas C. Schmidt <schmidt@cs.wustl.edu> -// -// ============================================================================ - -#include "ace/Hash_Map_Manager.h" - -ACE_RCSID(ace, Hash_Map_Manager, "$Id$") - diff --git a/ace/Hash_Map_Manager.h b/ace/Hash_Map_Manager.h index 4468cda5af0..ad9cc390295 100644 --- a/ace/Hash_Map_Manager.h +++ b/ace/Hash_Map_Manager.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -6,6 +6,8 @@ * * $Id$ * + * Backward compatibility header. + * * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> */ //============================================================================= diff --git a/ace/Hash_Map_Manager_T.cpp b/ace/Hash_Map_Manager_T.cpp index 4d442a61234..448bcb1293e 100644 --- a/ace/Hash_Map_Manager_T.cpp +++ b/ace/Hash_Map_Manager_T.cpp @@ -38,7 +38,7 @@ #include "ace/Malloc_Base.h" -ACE_RCSID(ace, Hash_Map_Manager_T, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class EXT_ID, class INT_ID> ACE_Hash_Map_Entry<EXT_ID, INT_ID>::ACE_Hash_Map_Entry (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next, @@ -518,4 +518,6 @@ ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_ return this->index_ >= 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HASH_MAP_MANAGER_T_CPP */ diff --git a/ace/Hash_Map_Manager_T.h b/ace/Hash_Map_Manager_T.h index eefd5862f89..3450e212874 100644 --- a/ace/Hash_Map_Manager_T.h +++ b/ace/Hash_Map_Manager_T.h @@ -24,6 +24,8 @@ #include "ace/Functor_T.h" #include "ace/Log_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Hash_Map_Entry * @@ -934,6 +936,8 @@ public: operator= (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) // Include ace/Hash_Map_Manager_T.i on all platforms excluding SunCC. // This nonsense is necessary since SunCC (version 4.2) cannot inline diff --git a/ace/Hash_Map_Manager_T.inl b/ace/Hash_Map_Manager_T.inl index 05383a07e69..6dd3626dea3 100644 --- a/ace/Hash_Map_Manager_T.inl +++ b/ace/Hash_Map_Manager_T.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Guard_T.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Manager_Ex (size_t size, ACE_Allocator *alloc) @@ -980,3 +983,5 @@ ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator= (const ACE_Ha return *this; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Hash_Map_With_Allocator_T.cpp b/ace/Hash_Map_With_Allocator_T.cpp index 20587b9d7ba..9927147e865 100644 --- a/ace/Hash_Map_With_Allocator_T.cpp +++ b/ace/Hash_Map_With_Allocator_T.cpp @@ -1,4 +1,3 @@ -// Hash_Map_With_Allocator_T.cpp // $Id$ #ifndef ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP @@ -14,6 +13,8 @@ #include "ace/Hash_Map_With_Allocator_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class EXT_ID, class INT_ID> ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator (ACE_Allocator *alloc) : ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_Null_Mutex> (alloc) @@ -29,4 +30,6 @@ ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator (size_t ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator"); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP */ diff --git a/ace/Hash_Map_With_Allocator_T.h b/ace/Hash_Map_With_Allocator_T.h index 6ae11547c0c..788d8f12047 100644 --- a/ace/Hash_Map_With_Allocator_T.h +++ b/ace/Hash_Map_With_Allocator_T.h @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- + //============================================================================= /** * @file Hash_Map_With_Allocator_T.h @@ -21,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Hash_Map_With_Allocator * @@ -86,6 +89,8 @@ public: int close (ACE_Allocator *alloc); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Hash_Map_With_Allocator_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Hash_Map_With_Allocator_T.inl b/ace/Hash_Map_With_Allocator_T.inl index 5b8c42dde3d..67f2f8247f8 100644 --- a/ace/Hash_Map_With_Allocator_T.inl +++ b/ace/Hash_Map_With_Allocator_T.inl @@ -1,8 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Hash_Map_With_Allocator_T.i - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class EXT_ID, class INT_ID> ACE_INLINE int ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::close (ACE_Allocator *alloc) @@ -71,3 +71,5 @@ ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::find (const EXT_ID &ext_id, this->allocator_ = alloc; return this->find_i (ext_id); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Hashable.cpp b/ace/Hashable.cpp index fca05cf96c5..cab51f7aa26 100644 --- a/ace/Hashable.cpp +++ b/ace/Hashable.cpp @@ -12,6 +12,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Hashable::~ACE_Hashable (void) { } @@ -26,7 +28,9 @@ ACE_Hashable::hash (void) const // relative to the simple comparison. if (this->hash_value_ == 0) - (const_cast <ACE_Hashable *> (this))->hash_value_ = this->hash_i (); + this->hash_value_ = this->hash_i (); return this->hash_value_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Hashable.h b/ace/Hashable.h index 3544feb5290..1a4a7011c28 100644 --- a/ace/Hashable.h +++ b/ace/Hashable.h @@ -21,6 +21,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Hashable @@ -49,10 +50,11 @@ protected: protected: /// Pre-computed hash-value. - unsigned long hash_value_; + mutable unsigned long hash_value_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Hashable.inl" diff --git a/ace/Hashable.inl b/ace/Hashable.inl index 55f28b31da4..7ec54ea1337 100644 --- a/ace/Hashable.inl +++ b/ace/Hashable.inl @@ -3,8 +3,12 @@ // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Hashable::ACE_Hashable (void) : hash_value_ (0) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp index 48365670554..6e0df4c8174 100644 --- a/ace/High_Res_Timer.cpp +++ b/ace/High_Res_Timer.cpp @@ -23,6 +23,8 @@ ACE_RCSID(ace, High_Res_Timer, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_High_Res_Timer) // For Intel platforms, a scale factor is required for @@ -533,3 +535,5 @@ ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env) #endif /* !ACE_HAS_WINCE */ return -1; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/High_Res_Timer.h b/ace/High_Res_Timer.h index 194143b097b..2b869dfe23d 100644 --- a/ace/High_Res_Timer.h +++ b/ace/High_Res_Timer.h @@ -24,6 +24,8 @@ #include "ace/OS_NS_time.h" #include "ace/Time_Value.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_High_Res_Timer * @@ -310,6 +312,8 @@ private: static int global_scale_factor_status_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/High_Res_Timer.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/High_Res_Timer.inl b/ace/High_Res_Timer.inl index 49fff1aabe4..1b37f522439 100644 --- a/ace/High_Res_Timer.inl +++ b/ace/High_Res_Timer.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- */ +// // $Id$ #include "ace/Global_Macros.h" @@ -7,9 +8,11 @@ # include "ace/OS_NS_sys_time.h" #endif /* ACE_WIN32 */ -// Be very carefull before changing the calculations inside +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Be very careful before changing the calculations inside // ACE_High_Res_Timer. The precision matters and we are using integer -// calculations not floating point. Also look good at the emulated 64 +// calculations not floating point. Also look closely at the emulated 64 // bit int class (inside Basic_Types{h,i,cpp} before changing // anything. It's operator/ only returns 32 bits not 64 bits, among // other things. @@ -170,3 +173,5 @@ ACE_High_Res_Timer::global_scale_factor (ACE_UINT32 gsf) { global_scale_factor_ = gsf; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/ICMP_Socket.cpp b/ace/ICMP_Socket.cpp index 52ae288631b..2904524d25c 100644 --- a/ace/ICMP_Socket.cpp +++ b/ace/ICMP_Socket.cpp @@ -9,15 +9,14 @@ #include "ace/OS_NS_netdb.h" #include "ace/OS_NS_sys_socket.h" -#if !defined (__ACE_INLINE__) -# include "ace/ICMP_Socket.inl" -#endif /* !__ACE_INLINE__ */ - ACE_RCSID (ace, ICMP_Socket, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_ICMP_Socket) @@ -182,4 +181,6 @@ ACE_ICMP_Socket::calculate_checksum (unsigned short * paddress, return (answer); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ICMP_SUPPORT == 1 */ diff --git a/ace/ICMP_Socket.h b/ace/ICMP_Socket.h index 795817f65db..77e2a018984 100644 --- a/ace/ICMP_Socket.h +++ b/ace/ICMP_Socket.h @@ -28,8 +28,10 @@ #include "ace/Time_Value.h" #include "ace/os_include/netinet/os_in.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** - * @class ICMP_Socket + * @class ACE_ICMP_Socket * * @brief An abstract class that forms the basis for usage of the ICMP * protocol (that is, support for things such as ping). @@ -39,8 +41,6 @@ class ACE_Export ACE_ICMP_Socket : public ACE_SOCK public: // = Initialization methods. - ~ACE_ICMP_Socket (void); - /** * @name Data transfer routines. * @@ -101,9 +101,7 @@ protected: int len); }; -#if defined (__ACE_INLINE__) -# include "ace/ICMP_Socket.inl" -#endif /* __ACE_INLINE__ */ +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_ICMP_SUPPORT == 1 */ diff --git a/ace/ICMP_Socket.inl b/ace/ICMP_Socket.inl deleted file mode 100644 index bda45ff8c61..00000000000 --- a/ace/ICMP_Socket.inl +++ /dev/null @@ -1,9 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -ACE_INLINE -ACE_ICMP_Socket::~ACE_ICMP_Socket (void) -{ - ACE_TRACE ("ACE_ICMP_Socket::~ACE_ICMP_Socket"); -} diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp index 3c72504ff95..71827dacd8e 100644 --- a/ace/INET_Addr.cpp +++ b/ace/INET_Addr.cpp @@ -22,6 +22,8 @@ ACE_RCSID (ace, INET_Addr, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_INET_Addr) // Transform the current address into string format. @@ -35,9 +37,10 @@ ACE_INET_Addr::addr_to_string (ACE_TCHAR s[], // XXX Can we (should we) include the scope id for IPv6 addresses? - size_t total_len = (ipaddr_format == 0 ? - ACE_OS::strlen (this->get_host_name ()) : - ACE_OS::strlen (this->get_host_addr ())) + size_t const total_len = + (ipaddr_format == 0 + ? ACE_OS::strlen (this->get_host_name ()) + : ACE_OS::strlen (this->get_host_addr ())) + ACE_OS::strlen ("65536") // Assume the max port number. + sizeof (':') + sizeof ('\0'); // For trailing '\0'. @@ -111,7 +114,7 @@ ACE_INET_Addr::hash (void) const } ACE_INET_Addr::ACE_INET_Addr (void) - : ACE_Addr (this->determine_type(), sizeof (inet_addr_)) + : ACE_Addr (this->determine_type (), sizeof (inet_addr_)) { // ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); this->reset (); @@ -1089,3 +1092,5 @@ ACE_INET_Addr::get_ip_address (void) const #endif /* ACE_HAS_IPV6 */ return ntohl (ACE_UINT32 (this->inet_addr_.in4_.sin_addr.s_addr)); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/INET_Addr.h b/ace/INET_Addr.h index 2b7777ade01..cf0dcc997c4 100644 --- a/ace/INET_Addr.h +++ b/ace/INET_Addr.h @@ -27,6 +27,8 @@ # include /**/ "inetLib.h" #endif /* VXWORKS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_INET_Addr * @@ -361,6 +363,8 @@ private: #endif }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/INET_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/INET_Addr.inl b/ace/INET_Addr.inl index ea8dc04813b..0f695b0a4fd 100644 --- a/ace/INET_Addr.inl +++ b/ace/INET_Addr.inl @@ -7,6 +7,7 @@ #include "ace/Global_Macros.h" #include "ace/OS_NS_arpa_inet.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_INET_Addr::reset (void) @@ -205,3 +206,4 @@ ACE_INET_Addr::is_ipv4_compat_ipv6 (void) const } #endif /* ACE_HAS_IPV6 */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/IOStream.cpp b/ace/IOStream.cpp index 1ad5c0f3aca..23790425eeb 100644 --- a/ace/IOStream.cpp +++ b/ace/IOStream.cpp @@ -1,7 +1,7 @@ // $Id$ -#if !defined (ACE_IOSTREAM_C) -#define ACE_IOSTREAM_C +#ifndef ACE_IOSTREAM_CPP +#define ACE_IOSTREAM_CPP #include "ace/IOStream.h" @@ -86,6 +86,8 @@ ACE_RCSID(ace, IOStream, "$Id$") // function will be invoked by the first >>. Since it returns // a myiostream&, the second >> will be invoked as desired. */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_HANDLE ACE_Streambuf::get_handle (void) { @@ -657,5 +659,7 @@ u_char ACE_Streambuf::timeout (void) return rval; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_ACE_IOSTREAM */ -#endif /* ACE_IOSTREAM_C */ +#endif /* ACE_IOSTREAM_CPP */ diff --git a/ace/IOStream.h b/ace/IOStream.h index 66aa738227a..2c8b889fb6a 100644 --- a/ace/IOStream.h +++ b/ace/IOStream.h @@ -40,18 +40,26 @@ # if defined (ACE_HAS_STRING_CLASS) # if defined (ACE_WIN32) && defined (_MSC_VER) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef CString ACE_IOStream_String; +ACE_END_VERSIONED_NAMESPACE_DECL # else # if !defined (ACE_HAS_STDCPP_STL_INCLUDES) #include /**/ <String.h> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef String ACE_IOStream_String; +ACE_END_VERSIONED_NAMESPACE_DECL # else # include /**/ <string> # if defined(ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef std::string ACE_IOStream_String; +ACE_END_VERSIONED_NAMESPACE_DECL # else +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef string ACE_IOStream_String; +ACE_END_VERSIONED_NAMESPACE_DECL # endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ # endif /* ! ACE_HAS_STDCPP_STL_INCLUDES */ # endif /* ACE_WIN32 && defined (_MSC_VER) */ @@ -64,6 +72,8 @@ typedef string ACE_IOStream_String; # endif /* __DECCXX_VER < 50700000 */ # endif /* __DECCXX_VER */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Export ACE_Quoted_String : public ACE_IOStream_String { public: @@ -88,11 +98,15 @@ public: # endif /* ACE_WIN32 && defined (_MSC_VER) */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + # endif /* ACE_HAS_STRING_CLASS */ # include "ace/Time_Value.h" # include "ace/os_include/sys/os_types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Streambuf * @@ -342,6 +356,8 @@ protected: # endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + /////////////////////////////////////////////////////////////////////////// // These typedefs are provided by G++ (on some systems?) without the diff --git a/ace/IOStream_T.cpp b/ace/IOStream_T.cpp index 237ce56b8bc..082274256fe 100644 --- a/ace/IOStream_T.cpp +++ b/ace/IOStream_T.cpp @@ -16,6 +16,8 @@ #include "ace/IOStream_T.inl" #endif /* !__ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // We will be given a STREAM by the iostream object which creates us. // See the ACE_IOStream template for how that works. Like other // streambuf objects, we can be input-only, output-only or both. @@ -238,6 +240,8 @@ operator<< (STREAM &stream, return stream; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_STRING_CLASS */ #endif /* ACE_LACKS_ACE_IOSTREAM */ #endif /* ACE_IOSTREAM_T_CPP */ diff --git a/ace/IOStream_T.h b/ace/IOStream_T.h index e6577e041d8..39d28703c1b 100644 --- a/ace/IOStream_T.h +++ b/ace/IOStream_T.h @@ -28,13 +28,14 @@ #if !defined (ACE_LACKS_ACE_IOSTREAM) # include "ace/INET_Addr.h" -# include "ace/Handle_Set.h" # include "ace/Global_Macros.h" # if defined (ACE_LACKS_IOSTREAM_FX) # include "ace/os_include/os_ctype.h" # endif /**/ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_STRING_CLASS) template <class STREAM> STREAM & operator>> (STREAM &stream, ACE_Quoted_String &str); template <class STREAM> STREAM & operator<< (STREAM &stream, ACE_Quoted_String &str); @@ -277,6 +278,8 @@ protected: ACE_INET_Addr peer_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (__ACE_INLINE__) # include "ace/IOStream_T.inl" # endif /* __ACE_INLINE__ */ diff --git a/ace/IOStream_T.inl b/ace/IOStream_T.inl index 9d2fd414ca1..73e00fa7bbf 100644 --- a/ace/IOStream_T.inl +++ b/ace/IOStream_T.inl @@ -1,9 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +#include "ace/Handle_Set.h" #include "ace/OS_NS_errno.h" #include "ace/OS_NS_sys_select.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class STREAM> ACE_INLINE int ACE_IOStream<STREAM>::eof (void) const { @@ -113,3 +117,5 @@ ACE_SOCK_Dgram_SC<STREAM>::get_remote_addr (ACE_INET_Addr &addr) const addr = peer_; return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/IO_Cntl_Msg.cpp b/ace/IO_Cntl_Msg.cpp index 3fac7c4abe6..aab5bd3c124 100644 --- a/ace/IO_Cntl_Msg.cpp +++ b/ace/IO_Cntl_Msg.cpp @@ -1,4 +1,3 @@ -// IO_Cntl_Msg.cpp // $Id$ #include "ace/IO_Cntl_Msg.h" @@ -16,6 +15,8 @@ ACE_RCSID(ace, IO_Cntl_Msg, "$Id$") #include "ace/Intrusive_List.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl template <class SYNCH> class ACE_Module; @@ -43,5 +44,8 @@ private: ACE_Module *mod_lower_; int count_; }; + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif diff --git a/ace/IO_Cntl_Msg.h b/ace/IO_Cntl_Msg.h index 95277235643..c3101c7fac4 100644 --- a/ace/IO_Cntl_Msg.h +++ b/ace/IO_Cntl_Msg.h @@ -23,6 +23,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_IO_Cntl_Msg * @@ -99,6 +101,8 @@ private: int rval_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/IO_Cntl_Msg.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/IO_Cntl_Msg.inl b/ace/IO_Cntl_Msg.inl index 215ea8caf8c..0fbf4190f35 100644 --- a/ace/IO_Cntl_Msg.inl +++ b/ace/IO_Cntl_Msg.inl @@ -1,6 +1,9 @@ // -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_IO_Cntl_Msg::ACE_IO_Cntl_Msg (ACE_IO_Cntl_Cmds c) { @@ -55,3 +58,4 @@ ACE_IO_Cntl_Msg::rval (int r) this->rval_ = r; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/IO_SAP.cpp b/ace/IO_SAP.cpp index b5c45f1b128..d65bc34c091 100644 --- a/ace/IO_SAP.cpp +++ b/ace/IO_SAP.cpp @@ -1,4 +1,3 @@ -// IO_SAP.cpp // $Id$ #include "ace/IO_SAP.h" @@ -15,6 +14,8 @@ ACE_RCSID(ace, IO_SAP, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_IO_SAP) // This is the do-nothing constructor. It does not perform a @@ -137,3 +138,5 @@ ACE_IO_SAP::disable (int value) const } return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/IO_SAP.h b/ace/IO_SAP.h index 50d530de4ae..b4ed13e451c 100644 --- a/ace/IO_SAP.h +++ b/ace/IO_SAP.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -22,6 +22,9 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_IO_SAP * @@ -83,6 +86,8 @@ private: static pid_t pid_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/IO_SAP.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/IO_SAP.inl b/ace/IO_SAP.inl index d120cd91b17..9d7d244e4db 100644 --- a/ace/IO_SAP.inl +++ b/ace/IO_SAP.inl @@ -1,10 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// IO_SAP.i - #include "ace/OS_NS_stropts.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_IO_SAP::~ACE_IO_SAP (void) { @@ -38,4 +39,4 @@ ACE_IO_SAP::control (int cmd, void *arg) const return ACE_OS::ioctl (this->handle_, cmd, arg); } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/IPC_SAP.cpp b/ace/IPC_SAP.cpp index a67e8a2bd95..3cbda202434 100644 --- a/ace/IPC_SAP.cpp +++ b/ace/IPC_SAP.cpp @@ -14,6 +14,8 @@ ACE_RCSID(ace, IPC_SAP, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_IPC_SAP) void @@ -187,3 +189,5 @@ ACE_IPC_SAP::disable (int value) const #endif /* ! ACE_WIN32 && ! VXWORKS */ /* NOTREACHED */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/IPC_SAP.h b/ace/IPC_SAP.h index 72828c8f74c..98aa2bbf450 100644 --- a/ace/IPC_SAP.h +++ b/ace/IPC_SAP.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_IPC_SAP * @@ -30,8 +32,6 @@ class ACE_Export ACE_IPC_SAP { public: - /// Default dtor. - ~ACE_IPC_SAP (void); /// Interface for <ioctl>. int control (int cmd, void *) const; @@ -65,10 +65,19 @@ public: ACE_ALLOC_HOOK_DECLARE; protected: + // = Ensure that ACE_IPC_SAP is an abstract base class. /// Default constructor. ACE_IPC_SAP (void); + /// Protected destructor. + /** + * Not a virtual destructor. Protected destructor to prevent + * operator delete() from being called through a base class + * ACE_IPC_SAP pointer/reference. + */ + ~ACE_IPC_SAP (void); + private: /// Underlying I/O handle. ACE_HANDLE handle_; @@ -77,6 +86,8 @@ private: static pid_t pid_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/IPC_SAP.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/IPC_SAP.inl b/ace/IPC_SAP.inl index 69a5befa3b1..0adcb6e9b09 100644 --- a/ace/IPC_SAP.inl +++ b/ace/IPC_SAP.inl @@ -1,11 +1,10 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// IPC_SAP.i - #include "ace/OS_NS_stropts.h" -// Used to return the underlying handle_. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_IPC_SAP::~ACE_IPC_SAP (void) @@ -37,3 +36,5 @@ ACE_IPC_SAP::control (int cmd, void *arg) const ACE_TRACE ("ACE_IPC_SAP::control"); return ACE_OS::ioctl (this->handle_, cmd, arg); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/If_Then_Else.h b/ace/If_Then_Else.h index e9ca33a0631..391490a07c5 100644 --- a/ace/If_Then_Else.h +++ b/ace/If_Then_Else.h @@ -17,6 +17,8 @@ #ifndef ACE_IF_THEN_ELSE_H #define ACE_IF_THEN_ELSE_H +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE { @@ -80,4 +82,6 @@ namespace ACE } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_IF_THEN_ELSE_H */ diff --git a/ace/Init_ACE.cpp b/ace/Init_ACE.cpp index d1f098438bc..f997c09d4f8 100644 --- a/ace/Init_ACE.cpp +++ b/ace/Init_ACE.cpp @@ -7,6 +7,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + unsigned int ACE::init_fini_count_ = 0; int @@ -39,3 +41,5 @@ ACE::fini (void) // application! return -1; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Init_ACE.h b/ace/Init_ACE.h index 4d9d14da998..df2cea0c62f 100644 --- a/ace/Init_ACE.h +++ b/ace/Init_ACE.h @@ -8,8 +8,6 @@ * * Initialize ACE library services. Can be called only once per * program invocation. - * - * @author Priyanka Gontla <pgontla@ece.uci.edu> */ //============================================================================= @@ -25,12 +23,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -/** - * @class ACE_Init_ACE - * - * @brief - * - */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE { /** @@ -61,6 +55,8 @@ namespace ACE extern unsigned int init_fini_count_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_INIT_ACE_H */ diff --git a/ace/Intrusive_List.cpp b/ace/Intrusive_List.cpp index 7a23921288b..4a374c9b045 100644 --- a/ace/Intrusive_List.cpp +++ b/ace/Intrusive_List.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_INTRUSIVE_LIST_C -#define ACE_INTRUSIVE_LIST_C +#ifndef ACE_INTRUSIVE_LIST_CPP +#define ACE_INTRUSIVE_LIST_CPP #include "ace/Intrusive_List.h" @@ -13,7 +13,7 @@ #include "ace/Intrusive_List.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Intrusive_List, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class T> ACE_Intrusive_List<T>::ACE_Intrusive_List (void) @@ -148,4 +148,6 @@ ACE_Intrusive_List<T>::check_invariants (void) } #endif /* 0 */ -#endif /* ACE_INTRUSIVE_LIST_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_INTRUSIVE_LIST_CPP */ diff --git a/ace/Intrusive_List.h b/ace/Intrusive_List.h index a19e641c17d..fee24290712 100644 --- a/ace/Intrusive_List.h +++ b/ace/Intrusive_List.h @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Intrusive_List * @@ -117,6 +119,8 @@ private: T *tail_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Intrusive_List.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Intrusive_List.inl b/ace/Intrusive_List.inl index 2c513b4584f..56371fdd030 100644 --- a/ace/Intrusive_List.inl +++ b/ace/Intrusive_List.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class T> ACE_INLINE int ACE_Intrusive_List<T>::empty (void) const { @@ -17,3 +21,5 @@ ACE_Intrusive_List<T>::tail (void) const { return this->tail_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Intrusive_List_Node.cpp b/ace/Intrusive_List_Node.cpp index 58002653d2e..cd39a0cc91e 100644 --- a/ace/Intrusive_List_Node.cpp +++ b/ace/Intrusive_List_Node.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_INTRUSIVE_LIST_NODE_C -#define ACE_INTRUSIVE_LIST_NODE_C +#ifndef ACE_INTRUSIVE_LIST_NODE_CPP +#define ACE_INTRUSIVE_LIST_NODE_CPP #include "ace/Intrusive_List_Node.h" @@ -13,7 +13,7 @@ #include "ace/Intrusive_List_Node.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Intrusive_List_Node, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template<class T> ACE_Intrusive_List_Node<T>::ACE_Intrusive_List_Node (void) @@ -22,4 +22,6 @@ ACE_Intrusive_List_Node<T>::ACE_Intrusive_List_Node (void) { } -#endif /* ACE_INTRUSIVE_LIST_NODE_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_INTRUSIVE_LIST_NODE_CPP */ diff --git a/ace/Intrusive_List_Node.h b/ace/Intrusive_List_Node.h index b37b1c0204b..161a359f226 100644 --- a/ace/Intrusive_List_Node.h +++ b/ace/Intrusive_List_Node.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Intrusive_List_Node * @@ -65,6 +67,8 @@ private: T *next_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Intrusive_List_Node.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Intrusive_List_Node.inl b/ace/Intrusive_List_Node.inl index e7f2c5ee3eb..0672be2f345 100644 --- a/ace/Intrusive_List_Node.inl +++ b/ace/Intrusive_List_Node.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class T> ACE_INLINE T* ACE_Intrusive_List_Node<T>::prev (void) const { @@ -23,3 +27,5 @@ ACE_Intrusive_List_Node<T>::next (T *x) { this->next_ = x; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/LOCK_SOCK_Acceptor.cpp b/ace/LOCK_SOCK_Acceptor.cpp index 7c3f1763f14..183338b7efa 100644 --- a/ace/LOCK_SOCK_Acceptor.cpp +++ b/ace/LOCK_SOCK_Acceptor.cpp @@ -6,7 +6,7 @@ #include "ace/Guard_T.h" #include "ace/LOCK_SOCK_Acceptor.h" -ACE_RCSID(ace, LOCK_SOCK_Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class ACE_LOCK> int ACE_LOCK_SOCK_Acceptor<ACE_LOCK>::accept (ACE_SOCK_Stream &stream, @@ -30,4 +30,6 @@ ACE_LOCK_SOCK_Acceptor<ACE_LOCK>::lock (void) return this->lock_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LOCK_SOCK_ACCEPTOR_CPP */ diff --git a/ace/LOCK_SOCK_Acceptor.h b/ace/LOCK_SOCK_Acceptor.h index 36a0afe19c8..ae7775d3039 100644 --- a/ace/LOCK_SOCK_Acceptor.h +++ b/ace/LOCK_SOCK_Acceptor.h @@ -1,3 +1,4 @@ +// -*- C++ -*- //============================================================================= /** @@ -20,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_LOCK_SOCK_Acceptor * @@ -50,6 +53,8 @@ protected: ACE_LOCK lock_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/LOCK_SOCK_Acceptor.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/LSOCK.cpp b/ace/LSOCK.cpp index 694744f01be..a1b210424ea 100644 --- a/ace/LSOCK.cpp +++ b/ace/LSOCK.cpp @@ -13,6 +13,8 @@ ACE_RCSID(ace, LSOCK, "$Id$") #include "ace/LSOCK.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK) void @@ -173,4 +175,7 @@ ACE_LSOCK::recv_handle (ACE_HANDLE &handle, char *pbuf, ssize_t *len) const return ACE_INVALID_HANDLE; } #endif /* ACE_HAS_MSG */ + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/ace/LSOCK.h b/ace/LSOCK.h index 18921ef6d2f..0db791efa9d 100644 --- a/ace/LSOCK.h +++ b/ace/LSOCK.h @@ -31,6 +31,8 @@ #include "ace/SOCK.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_LSOCK * @@ -76,6 +78,8 @@ private: ACE_HANDLE aux_handle_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/LSOCK.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/LSOCK.inl b/ace/LSOCK.inl index fcd0e6887fc..5dbbb0626a1 100644 --- a/ace/LSOCK.inl +++ b/ace/LSOCK.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Simple-minded constructor. ACE_INLINE @@ -36,3 +39,5 @@ ACE_LSOCK::ACE_LSOCK (ACE_HANDLE handle) { ACE_TRACE ("ACE_LSOCK::ACE_LSOCK"); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/LSOCK_Acceptor.cpp b/ace/LSOCK_Acceptor.cpp index e8674429e77..ee154e3e087 100644 --- a/ace/LSOCK_Acceptor.cpp +++ b/ace/LSOCK_Acceptor.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, LSOCK_Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Acceptor) // Return the local endpoint address. @@ -47,50 +49,50 @@ ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor (void) int ACE_LSOCK_Acceptor::open (const ACE_Addr &remote_sap, - int reuse_addr, - int protocol_family, - int backlog, - int protocol) + int reuse_addr, + int protocol_family, + int backlog, + int protocol) { ACE_TRACE ("ACE_LSOCK_Acceptor::open"); this->local_addr_ = *((ACE_UNIX_Addr *) &remote_sap); // This is a gross hack... return ACE_SOCK_Acceptor::open (remote_sap, reuse_addr, - protocol_family, backlog, protocol); + protocol_family, backlog, protocol); } // General purpose routine for performing server ACE_SOCK creation. ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor (const ACE_Addr &remote_sap, - int reuse_addr, - int protocol_family, - int backlog, - int protocol) + int reuse_addr, + int protocol_family, + int backlog, + int protocol) { ACE_TRACE ("ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor"); if (this->open (remote_sap, - reuse_addr, - protocol_family, - backlog, - protocol) == -1) + reuse_addr, + protocol_family, + backlog, + protocol) == -1) ACE_ERROR ((LM_ERROR, - "ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor")); + "ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor")); } // General purpose routine for accepting new connections. int ACE_LSOCK_Acceptor::accept (ACE_LSOCK_Stream &new_stream, - ACE_Addr *remote_addr, - ACE_Time_Value *timeout, - int restart, + ACE_Addr *remote_addr, + ACE_Time_Value *timeout, + int restart, int reset_new_handle) const { ACE_TRACE ("ACE_LSOCK_Acceptor::accept"); int in_blocking_mode = 0; if (this->shared_accept_start (timeout, - restart, - in_blocking_mode) == -1) + restart, + in_blocking_mode) == -1) return -1; else { @@ -98,30 +100,30 @@ ACE_LSOCK_Acceptor::accept (ACE_LSOCK_Stream &new_stream, int len = 0; if (remote_addr != 0) - { - len = remote_addr->get_size (); - addr = (sockaddr *) remote_addr->get_addr (); - } + { + len = remote_addr->get_size (); + addr = (sockaddr *) remote_addr->get_addr (); + } do - new_stream.set_handle (ACE_OS::accept (this->get_handle (), - addr, - &len)); + new_stream.set_handle (ACE_OS::accept (this->get_handle (), + addr, + &len)); while (new_stream.get_handle () == ACE_INVALID_HANDLE - && restart != 0 - && errno == EINTR - && timeout == 0); + && restart != 0 + && errno == EINTR + && timeout == 0); // Reset the size of the addr, which is only necessary for UNIX // domain sockets. if (new_stream.get_handle () != ACE_INVALID_HANDLE - && remote_addr != 0) - remote_addr->set_size (len); + && remote_addr != 0) + remote_addr->set_size (len); } return this->shared_accept_finish (new_stream, - in_blocking_mode, - reset_new_handle); + in_blocking_mode, + reset_new_handle); } // Close down the UNIX domain stream and remove the rendezvous point @@ -136,4 +138,6 @@ ACE_LSOCK_Acceptor::remove (void) || result == -1 ? -1 : 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/ace/LSOCK_Acceptor.h b/ace/LSOCK_Acceptor.h index cc7c1dca103..94a52f05581 100644 --- a/ace/LSOCK_Acceptor.h +++ b/ace/LSOCK_Acceptor.h @@ -27,6 +27,8 @@ #include "ace/UNIX_Addr.h" #include "ace/LSOCK_Stream.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. class ACE_Reactor; @@ -86,6 +88,8 @@ private: ACE_UNIX_Addr local_addr_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ #include /**/ "ace/post.h" #endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */ diff --git a/ace/LSOCK_CODgram.cpp b/ace/LSOCK_CODgram.cpp index 4e58022b36c..17f80b9836f 100644 --- a/ace/LSOCK_CODgram.cpp +++ b/ace/LSOCK_CODgram.cpp @@ -1,4 +1,3 @@ -// LSOCK_CODgram.cpp // $Id$ #include "ace/LSOCK_CODgram.h" @@ -12,6 +11,8 @@ ACE_RCSID(ace, LSOCK_CODgram, "$Id$") #include "ace/LSOCK_CODgram.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_CODgram) void @@ -31,13 +32,13 @@ ACE_LSOCK_CODgram::dump (void) const int ACE_LSOCK_CODgram::open (const ACE_Addr &remote, - const ACE_Addr &local, - int protocol_family, - int protocol) + const ACE_Addr &local, + int protocol_family, + int protocol) { ACE_TRACE ("ACE_LSOCK_CODgram::open"); if (ACE_SOCK_CODgram::open (remote, local, protocol_family, - protocol) == -1) + protocol) == -1) return -1; ACE_LSOCK::set_handle (this->get_handle ()); return 0; @@ -46,13 +47,16 @@ ACE_LSOCK_CODgram::open (const ACE_Addr &remote, /* Create a local ACE_SOCK datagram. */ ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (const ACE_Addr &remote, - const ACE_Addr &local, - int protocol_family, - int protocol) + const ACE_Addr &local, + int protocol_family, + int protocol) { ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram"); if (this->open (remote, local, protocol_family, - protocol) == -1) + protocol) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_LSOCK_CODgram"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/ace/LSOCK_CODgram.h b/ace/LSOCK_CODgram.h index e0c8cfc6dfb..f3d8e1e54c3 100644 --- a/ace/LSOCK_CODgram.h +++ b/ace/LSOCK_CODgram.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -27,6 +27,8 @@ #include "ace/SOCK_CODgram.h" #include "ace/Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_LSOCK_CODgram * @@ -65,6 +67,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/LSOCK_CODgram.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/LSOCK_CODgram.inl b/ace/LSOCK_CODgram.inl index 48c7280459f..d27ee2fd881 100644 --- a/ace/LSOCK_CODgram.inl +++ b/ace/LSOCK_CODgram.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Do nothing constructor. ACE_INLINE @@ -23,3 +26,5 @@ ACE_LSOCK_CODgram::get_handle (void) const ACE_TRACE ("ACE_LSOCK_CODgram::get_handle"); return this->ACE_SOCK_CODgram::get_handle (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/LSOCK_Connector.cpp b/ace/LSOCK_Connector.cpp index 4b29ff1e0cf..f495744b1b8 100644 --- a/ace/LSOCK_Connector.cpp +++ b/ace/LSOCK_Connector.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, LSOCK_Connector, "$Id$") #include "ace/LSOCK_Connector.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Connector) void @@ -32,16 +34,16 @@ ACE_LSOCK_Connector::ACE_LSOCK_Connector (void) // Establish a connection. ACE_LSOCK_Connector::ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream, - const ACE_UNIX_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) + const ACE_UNIX_Addr &remote_sap, + ACE_Time_Value *timeout, + const ACE_Addr &local_sap, + int reuse_addr, + int flags, + int perms) : ACE_SOCK_Connector (new_stream, remote_sap, timeout, - local_sap, + local_sap, reuse_addr, flags, perms) @@ -52,4 +54,6 @@ ACE_LSOCK_Connector::ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream, new_stream.set_handle (new_stream.get_handle ()); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/ace/LSOCK_Connector.h b/ace/LSOCK_Connector.h index 558fc4a8f81..af8856ae5b8 100644 --- a/ace/LSOCK_Connector.h +++ b/ace/LSOCK_Connector.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -26,6 +26,8 @@ #include "ace/LSOCK_Stream.h" #include "ace/UNIX_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_LSOCK_Connector * @@ -78,6 +80,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/LSOCK_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/LSOCK_Connector.inl b/ace/LSOCK_Connector.inl index 3638a687297..65579ad7e83 100644 --- a/ace/LSOCK_Connector.inl +++ b/ace/LSOCK_Connector.inl @@ -1,24 +1,27 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Establish a connection. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +// Establish a connection. ACE_INLINE int ACE_LSOCK_Connector::connect (ACE_LSOCK_Stream &new_stream, - const ACE_UNIX_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) + const ACE_UNIX_Addr &remote_sap, + ACE_Time_Value *timeout, + const ACE_Addr &local_sap, + int reuse_addr, + int flags, + int perms) { ACE_TRACE ("ACE_LSOCK_Connector::connect"); int result = ACE_SOCK_Connector::connect (new_stream, remote_sap, - timeout, local_sap, - reuse_addr, flags, perms); + timeout, local_sap, + reuse_addr, flags, perms); if (result != -1) // This is necessary due to the weird inheritance relationships of ACE_LSOCK_Stream. new_stream.set_handle (new_stream.get_handle ()); return result; } +ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ace/LSOCK_Dgram.cpp b/ace/LSOCK_Dgram.cpp index 9b4cebddc89..3c65d24b88c 100644 --- a/ace/LSOCK_Dgram.cpp +++ b/ace/LSOCK_Dgram.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, LSOCK_Dgram, "$Id$") #include "ace/LSOCK_Dgram.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Dgram) void @@ -37,13 +39,13 @@ ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (void) int ACE_LSOCK_Dgram::open (const ACE_Addr &local, - int protocol_family, - int protocol) + int protocol_family, + int protocol) { ACE_TRACE ("ACE_LSOCK_Dgram::open"); if (ACE_SOCK_Dgram::open (local, protocol_family, - protocol) == -1) + protocol) == -1) return -1; ACE_LSOCK::set_handle (this->ACE_SOCK_Dgram::get_handle ()); return 0; @@ -52,16 +54,18 @@ ACE_LSOCK_Dgram::open (const ACE_Addr &local, // Create a local ACE_SOCK datagram. ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local, - int protocol_family, - int protocol) + int protocol_family, + int protocol) { ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram"); if (this->open (local, protocol_family, - protocol) == -1) + protocol) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_LSOCK_Dgram"))); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/ace/LSOCK_Dgram.h b/ace/LSOCK_Dgram.h index 4d6939e1c73..fd9bc9509cf 100644 --- a/ace/LSOCK_Dgram.h +++ b/ace/LSOCK_Dgram.h @@ -1,5 +1,4 @@ -/* -*- C++ -*- */ - +// -*- C++ -*- //============================================================================= /** @@ -27,6 +26,8 @@ #include "ace/SOCK_Dgram.h" #include "ace/LSOCK.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_LSOCK_Dgram * @@ -62,6 +63,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/LSOCK_Dgram.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/LSOCK_Dgram.inl b/ace/LSOCK_Dgram.inl index 14c415ceaa8..2c29136e06d 100644 --- a/ace/LSOCK_Dgram.inl +++ b/ace/LSOCK_Dgram.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// LSOCK_Dgram.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_LSOCK_Dgram::set_handle (ACE_HANDLE h) @@ -18,3 +19,4 @@ ACE_LSOCK_Dgram::get_handle (void) const return this->ACE_SOCK_Dgram::get_handle (); } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/LSOCK_Stream.cpp b/ace/LSOCK_Stream.cpp index 51cbaa74db0..6ac123661cf 100644 --- a/ace/LSOCK_Stream.cpp +++ b/ace/LSOCK_Stream.cpp @@ -1,4 +1,3 @@ -// LSOCK_Stream.cpp // $Id$ #include "ace/LSOCK_Stream.h" @@ -13,6 +12,8 @@ ACE_RCSID(ace, LSOCK_Stream, "$Id$") #include "ace/LSOCK_Stream.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Stream) int @@ -91,7 +92,7 @@ ACE_LSOCK_Stream::send_msg (const iovec iov[], #endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ return ACE_OS::sendmsg (this->ACE_SOCK_Stream::get_handle (), - &send_msg, 0); + &send_msg, 0); } // Read a readv-style vector of buffers, along with an open I/O @@ -99,8 +100,8 @@ ACE_LSOCK_Stream::send_msg (const iovec iov[], ssize_t ACE_LSOCK_Stream::recv_msg (iovec iov[], - size_t n, - ACE_HANDLE &handle) + size_t n, + ACE_HANDLE &handle) { ACE_TRACE ("ACE_LSOCK_Stream::recv_msg"); msghdr recv_msg; @@ -118,7 +119,7 @@ ACE_LSOCK_Stream::recv_msg (iovec iov[], recv_msg.msg_control = cmsgbuf; recv_msg.msg_controllen = sizeof cmsgbuf; ssize_t result = ACE_OS::recvmsg (this->ACE_SOCK_Stream::get_handle (), - &recv_msg, 0); + &recv_msg, 0); handle = *(ACE_HANDLE*) CMSG_DATA (cmsgptr) ; return result; #else @@ -126,8 +127,11 @@ ACE_LSOCK_Stream::recv_msg (iovec iov[], recv_msg.msg_accrightslen = sizeof handle; return ACE_OS::recvmsg (this->ACE_SOCK_Stream::get_handle (), - &recv_msg, 0); + &recv_msg, 0); #endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ } #endif /* ACE_HAS_MSG */ + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/ace/LSOCK_Stream.h b/ace/LSOCK_Stream.h index 639047db334..47e2038ca06 100644 --- a/ace/LSOCK_Stream.h +++ b/ace/LSOCK_Stream.h @@ -27,6 +27,8 @@ #include "ace/UNIX_Addr.h" #include "ace/LSOCK.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_LSOCK_Stream * @@ -69,6 +71,8 @@ public: int get_remote_addr (ACE_Addr &) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/LSOCK_Stream.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/LSOCK_Stream.inl b/ace/LSOCK_Stream.inl index 7b94768e3c7..bf7e45b376d 100644 --- a/ace/LSOCK_Stream.inl +++ b/ace/LSOCK_Stream.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Sets both the file descriptors... Overrides handle from the base // classes. @@ -19,5 +22,4 @@ ACE_LSOCK_Stream::get_handle (void) const return this->ACE_SOCK_Stream::get_handle (); } - - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Lib_Find.cpp b/ace/Lib_Find.cpp index 2a78e8cc94c..546b1469f8d 100644 --- a/ace/Lib_Find.cpp +++ b/ace/Lib_Find.cpp @@ -25,6 +25,8 @@ extern "C" int LIB$FIND_IMAGE_SYMBOL(...); ACE_RCSID(ace, Lib_Find, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if ! defined (ACE_PSOS_DIAB_MIPS) int ACE::ldfind (const ACE_TCHAR* filename, @@ -703,3 +705,5 @@ ACE::strrepl (wchar_t *s, wchar_t search, wchar_t replace) return replaced; } #endif /* ACE_HAS_WCHAR */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Lib_Find.h b/ace/Lib_Find.h index a66422a1f9d..aee1fa72aee 100644 --- a/ace/Lib_Find.h +++ b/ace/Lib_Find.h @@ -8,8 +8,6 @@ * libraries. * * $Id$ - * - * @author Priyanka Gontla <pgontla@ece.uci.edu> */ //============================================================================= @@ -21,6 +19,7 @@ #include "ace/ACE_export.h" #include "ace/os_include/os_stdio.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE { @@ -102,5 +101,7 @@ namespace ACE #endif /* ACE_HAS_WCHAR */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_LIB_FIND_H */ diff --git a/ace/Local_Memory_Pool.cpp b/ace/Local_Memory_Pool.cpp index c7029c0c951..c1b9c922145 100644 --- a/ace/Local_Memory_Pool.cpp +++ b/ace/Local_Memory_Pool.cpp @@ -8,6 +8,8 @@ ACE_RCSID(ace, Local_Memory_Pool, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Local_Memory_Pool) void @@ -148,3 +150,5 @@ template class ACE_Unbounded_Set_Iterator<char *>; #pragma instantiate ACE_Unbounded_Set<char *> #pragma instantiate ACE_Unbounded_Set_Iterator<char *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Local_Memory_Pool.h b/ace/Local_Memory_Pool.h index f5762b9bc14..caf22055273 100644 --- a/ace/Local_Memory_Pool.h +++ b/ace/Local_Memory_Pool.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #include "ace/Unbounded_Set.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Local_Memory_Pool_Options * @@ -125,5 +127,7 @@ protected: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_LOCAL_MEMORY_POOL_H */ diff --git a/ace/Local_Name_Space.cpp b/ace/Local_Name_Space.cpp index d7382c3266c..476450119b9 100644 --- a/ace/Local_Name_Space.cpp +++ b/ace/Local_Name_Space.cpp @@ -7,6 +7,8 @@ ACE_RCSID (ace, Local_Name_Space, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_NS_String::~ACE_NS_String (void) { if (this->delete_rep_) @@ -212,3 +214,4 @@ template class ACE_Write_Guard<ACE_RW_Process_Mutex>; #pragma instantiate ACE_Write_Guard<ACE_RW_Process_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Local_Name_Space.h b/ace/Local_Name_Space.h index e8b8b4b39ca..728ac8afb1c 100644 --- a/ace/Local_Name_Space.h +++ b/ace/Local_Name_Space.h @@ -23,6 +23,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_NS_WString; /** @@ -120,6 +122,8 @@ private: const char *type_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + // Include the ACE_Local_Name_Space templates stuff at this point. #include "ace/Local_Name_Space_T.h" diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 87638b4b6f2..1523370d947 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -1,3 +1,5 @@ +// $Id$ + #ifndef ACE_LOCAL_NAME_SPACE_T_CPP #define ACE_LOCAL_NAME_SPACE_T_CPP @@ -14,10 +16,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_unistd.h" -ACE_RCSID (ace, - Local_Name_Space_T, - "$Id$") - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class ALLOCATOR> ACE_Name_Space_Map<ALLOCATOR>::ACE_Name_Space_Map (ALLOCATOR *alloc) @@ -965,4 +964,6 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LOCAL_NAME_SPACE_T_CPP */ diff --git a/ace/Local_Name_Space_T.h b/ace/Local_Name_Space_T.h index 97602b7019f..3580be7a05e 100644 --- a/ace/Local_Name_Space_T.h +++ b/ace/Local_Name_Space_T.h @@ -27,6 +27,8 @@ #include "ace/Local_Name_Space.h" #include "ace/Null_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /// A short-hand name for our set of name/value/type tuples passed back /// to callers. typedef ACE_Unbounded_Set<ACE_NS_WString> ACE_WSTRING_SET; @@ -256,6 +258,8 @@ private: ACE_LOCK *lock_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Local_Name_Space_T.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Local_Tokens.cpp b/ace/Local_Tokens.cpp index c575ac63735..c2a174930ec 100644 --- a/ace/Local_Tokens.cpp +++ b/ace/Local_Tokens.cpp @@ -17,6 +17,8 @@ ACE_RCSID (ace, Local_Tokens, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Tokens::dump (void) const { @@ -1638,4 +1640,6 @@ template class ACE_Node <ACE_TPQ_Entry *>; #pragma instantiate ACE_Node <ACE_TPQ_Entry *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TOKENS_LIBRARY */ diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h index 6e68856d02e..4ed2c1222a0 100644 --- a/ace/Local_Tokens.h +++ b/ace/Local_Tokens.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -67,6 +67,8 @@ # define ACE_NO_TSS_TOKENS 1 #endif /* !(defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)) */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // 1. /** * @class ACE_TOKEN_CONST @@ -77,9 +79,8 @@ * this class is necessary to fight the compiler with order of * declaration errors. */ -class ACE_Export ACE_TOKEN_CONST +namespace ACE_TOKEN_CONST { -public: #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) // ACE platform supports some form of threading. typedef ACE_Condition_Thread_Mutex COND_VAR; @@ -90,7 +91,7 @@ public: typedef ACE_Null_Mutex MUTEX; typedef ACE_Guard<ACE_Null_Mutex> GUARD; #endif /* ACE_HAS_THREADS */ -}; +} // Forward decl. class ACE_Token_Proxy; @@ -105,7 +106,7 @@ class ACE_Token_Proxy; */ class ACE_Export ACE_TPQ_Entry { -friend class ACE_Token_Manager; + friend class ACE_Token_Manager; public: typedef void (*PTVF) (void *); @@ -1109,6 +1110,8 @@ protected: ACE_Tokens *create_token (const ACE_TCHAR *name); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TOKENS_LIBRARY */ #if defined (__ACE_INLINE__) diff --git a/ace/Local_Tokens.inl b/ace/Local_Tokens.inl index 3008f25c69a..ddbbf0343cf 100644 --- a/ace/Local_Tokens.inl +++ b/ace/Local_Tokens.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #if defined (ACE_HAS_TOKENS_LIBRARY) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // ************************************************************ ACE_INLINE int @@ -281,4 +284,6 @@ ACE_Token_Name::operator== (const ACE_Token_Name &rhs) const return (ACE_OS::strcmp (this->token_name_, rhs.name ()) == 0); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TOKENS_LIBRARY */ diff --git a/ace/Lock.cpp b/ace/Lock.cpp index e0ea8397846..dca934b8067 100644 --- a/ace/Lock.cpp +++ b/ace/Lock.cpp @@ -8,6 +8,8 @@ ACE_RCSID(ace, Lock, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Lock::~ACE_Lock (void) { } @@ -82,3 +84,5 @@ ACE_Adaptive_Lock::dump (void) const // return this->lock_->dump (); #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Lock.h b/ace/Lock.h index 68bacb35dd8..3a8eac292e4 100644 --- a/ace/Lock.h +++ b/ace/Lock.h @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Lock * @@ -149,6 +151,8 @@ protected: ACE_Lock *lock_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Lock.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Lock.inl b/ace/Lock.inl index bd6d1585cc9..7e4842a0e33 100644 --- a/ace/Lock.inl +++ b/ace/Lock.inl @@ -1,8 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Lock::ACE_Lock (void) { } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Lock_Adapter_T.cpp b/ace/Lock_Adapter_T.cpp index d71a1fbd2fc..ec0c013a220 100644 --- a/ace/Lock_Adapter_T.cpp +++ b/ace/Lock_Adapter_T.cpp @@ -14,6 +14,7 @@ #include "ace/Lock_Adapter_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // This constructor isn't inlined, because SunPRO C++ 4.2 + patch // 104631-07 has trouble compiling TAO with it inline. @@ -111,4 +112,6 @@ ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::tryacquire_write_upgrade (void) return this->lock_->tryacquire_write_upgrade (); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_LOCK_ADAPTER_T_CPP */ diff --git a/ace/Lock_Adapter_T.h b/ace/Lock_Adapter_T.h index 76445506e0a..93ee250de4b 100644 --- a/ace/Lock_Adapter_T.h +++ b/ace/Lock_Adapter_T.h @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Lock_Adapter * @@ -103,6 +105,8 @@ private: int delete_lock_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Lock_Adapter_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Lock_Adapter_T.inl b/ace/Lock_Adapter_T.inl index 2ecd393d56d..f3b09bc0ab7 100644 --- a/ace/Lock_Adapter_T.inl +++ b/ace/Lock_Adapter_T.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class ACE_LOCKING_MECHANISM> ACE_INLINE ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter ( @@ -10,3 +12,5 @@ ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter ( delete_lock_ (0) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 688fb9e3227..c276ee42e23 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -43,6 +43,8 @@ ACE_RCSID(ace, Log_Msg, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg) // only used here... dhinton @@ -240,7 +242,7 @@ ACE_Log_Msg_Manager::close (void) # endif /* ACE_HAS_THR_C_DEST */ LOCAL_EXTERN_PREFIX void -ACE_TSS_cleanup (void *ptr) +ACE_TSS_CLEANUP_NAME (void *ptr) { #if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT) // Delegate to thr_desc if this not has terminated @@ -307,7 +309,7 @@ ACE_Log_Msg::instance (void) { ACE_NO_HEAP_CHECK; if (ACE_Thread::keycreate (log_msg_tss_key (), - &ACE_TSS_cleanup) != 0) + &ACE_TSS_CLEANUP_NAME) != 0) { if (1 == ACE_OS_Object_Manager::starting_up()) //This function is called before ACE_OS_Object_Manager is @@ -2652,3 +2654,5 @@ ACE_Log_Msg::inherit_hook (ACE_OS_Thread_Descriptor *thr_desc, # endif /* ACE_PSOS */ #endif /* ! ACE_THREADS_DONT_INHERIT_LOG_MSG && ! ACE_HAS_MINIMAL_ACE_OS */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h index 4ade1db3b4c..498864c3439 100644 --- a/ace/Log_Msg.h +++ b/ace/Log_Msg.h @@ -113,6 +113,8 @@ # undef THREAD #endif /* THREAD */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Log_Msg_Callback; class ACE_Log_Msg_Backend; @@ -701,6 +703,8 @@ private: ACE_Log_Msg (const ACE_Log_Msg &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) # if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ defined (ACE_HAS_TSS_EMULATION) @@ -710,9 +714,25 @@ private: # else # define LOCAL_EXTERN_PREFIX # endif /* ACE_HAS_THR_C_DEST */ + +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + && !(defined (_MSC_VER) && _MSC_VER <= 1200) +// MSVC++ 6's preprocessor can't handle macro expansions required by +// the versioned namespace support. *sigh* + +# define ACE_TSS_CLEANUP_NAME ACE_ ## ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _TSS_cleanup) + +#else + +# define ACE_TSS_CLEANUP_NAME ACE_TSS_cleanup + +#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ + + LOCAL_EXTERN_PREFIX void -ACE_TSS_cleanup (void *ptr); +ACE_TSS_CLEANUP_NAME (void *ptr); # endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ #endif /* ACE_MT_SAFE */ diff --git a/ace/Log_Msg_Backend.cpp b/ace/Log_Msg_Backend.cpp index 8e4ae6208f3..de9b9c22b7b 100644 --- a/ace/Log_Msg_Backend.cpp +++ b/ace/Log_Msg_Backend.cpp @@ -4,6 +4,11 @@ ACE_RCSID(ace, Log_Msg_Backend, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Log_Msg_Backend::~ACE_Log_Msg_Backend (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Log_Msg_Backend.h b/ace/Log_Msg_Backend.h index 50392cd92cf..6203287011d 100644 --- a/ace/Log_Msg_Backend.h +++ b/ace/Log_Msg_Backend.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Log_Record; /** @@ -60,5 +62,7 @@ public: virtual int log (ACE_Log_Record &log_record) = 0; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_LOG_MSG_BACKEND_H */ diff --git a/ace/Log_Msg_Callback.cpp b/ace/Log_Msg_Callback.cpp index c2ab8da127c..2fcf5206dd1 100644 --- a/ace/Log_Msg_Callback.cpp +++ b/ace/Log_Msg_Callback.cpp @@ -4,6 +4,10 @@ ACE_RCSID(ace, Log_Msg_Callback, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Log_Msg_Callback::~ACE_Log_Msg_Callback (void) { } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Log_Msg_Callback.h b/ace/Log_Msg_Callback.h index 4de1b85bb8a..2d3af46a1b3 100644 --- a/ace/Log_Msg_Callback.h +++ b/ace/Log_Msg_Callback.h @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Log_Record; /** @@ -47,7 +49,7 @@ class ACE_Log_Record; * 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 - * new thread. + * new thread. */ class ACE_Export ACE_Log_Msg_Callback { @@ -61,5 +63,7 @@ public: virtual void log (ACE_Log_Record &log_record) = 0; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_LOG_MSG_CALLBACK_H */ diff --git a/ace/Log_Msg_IPC.cpp b/ace/Log_Msg_IPC.cpp index aa410e3150d..e6da947d80e 100644 --- a/ace/Log_Msg_IPC.cpp +++ b/ace/Log_Msg_IPC.cpp @@ -5,6 +5,8 @@ ACE_RCSID(ace, Log_Msg_IPC, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Log_Msg_IPC::ACE_Log_Msg_IPC (void) { } @@ -68,3 +70,5 @@ ACE_Log_Msg_IPC::log (ACE_Log_Record &log_record) log_record.length ()); #endif /* ACE_HAS_STREAM_PIPES */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Log_Msg_IPC.h b/ace/Log_Msg_IPC.h index fa7f90ba59f..2b05c02de02 100644 --- a/ace/Log_Msg_IPC.h +++ b/ace/Log_Msg_IPC.h @@ -25,16 +25,22 @@ // problems it can't be... #if defined (ACE_HAS_STREAM_PIPES) # include "ace/SPIPE_Connector.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_SPIPE_Stream ACE_LOG_MSG_IPC_STREAM; typedef ACE_SPIPE_Connector ACE_LOG_MSG_IPC_CONNECTOR; typedef ACE_SPIPE_Addr ACE_LOG_MSG_IPC_ADDR; +ACE_END_VERSIONED_NAMESPACE_DECL #else # include "ace/SOCK_Connector.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC_STREAM; typedef ACE_SOCK_Connector ACE_LOG_MSG_IPC_CONNECTOR; typedef ACE_INET_Addr ACE_LOG_MSG_IPC_ADDR; +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_STREAM_PIPES */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /// Defines the interfaces for ACE_Log_Msg backend. /** * Implement an ACE_Log_Msg_Backend that logs to a remote logging @@ -59,5 +65,7 @@ private: ACE_LOG_MSG_IPC_STREAM message_queue_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_LOG_MSG_H */ diff --git a/ace/Log_Msg_NT_Event_Log.cpp b/ace/Log_Msg_NT_Event_Log.cpp index 1d51bbad03b..8053624283c 100644 --- a/ace/Log_Msg_NT_Event_Log.cpp +++ b/ace/Log_Msg_NT_Event_Log.cpp @@ -12,6 +12,8 @@ ACE_RCSID(ace, Log_Msg_NT_Event_Log, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Log_Msg_NT_Event_Log::ACE_Log_Msg_NT_Event_Log (void) : evlog_handle_(0) { @@ -153,4 +155,6 @@ ACE_Log_Msg_NT_Event_Log::log (ACE_Log_Record &log_record) return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */ diff --git a/ace/Log_Msg_NT_Event_Log.h b/ace/Log_Msg_NT_Event_Log.h index f4c975011f8..3edc049aea3 100644 --- a/ace/Log_Msg_NT_Event_Log.h +++ b/ace/Log_Msg_NT_Event_Log.h @@ -24,6 +24,8 @@ #include "ace/Log_Msg_Backend.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Log_Msg_NT_Event_Log * @@ -62,6 +64,8 @@ private: HANDLE evlog_handle_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */ #include /**/ "ace/post.h" diff --git a/ace/Log_Msg_UNIX_Syslog.cpp b/ace/Log_Msg_UNIX_Syslog.cpp index 9353190f191..23b90ef3c34 100644 --- a/ace/Log_Msg_UNIX_Syslog.cpp +++ b/ace/Log_Msg_UNIX_Syslog.cpp @@ -11,6 +11,8 @@ #include "ace/OS_NS_string.h" #include "ace/os_include/os_syslog.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // NOTE: // The ACE_Log_Msg_UNIX_Syslog class can use the openlog(), // setlogmask(), syslog() and closelog() routines in a thread safe @@ -200,4 +202,6 @@ ACE_Log_Msg_UNIX_Syslog::convert_log_mask (int lm_mask) return syslog_mask; } -#endif /* !defined (ACE_LACKS_UNIX_SYSLOG) */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* !ACE_LACKS_UNIX_SYSLOG */ diff --git a/ace/Log_Msg_UNIX_Syslog.h b/ace/Log_Msg_UNIX_Syslog.h index 78ed77bfcd4..0031e043431 100644 --- a/ace/Log_Msg_UNIX_Syslog.h +++ b/ace/Log_Msg_UNIX_Syslog.h @@ -24,6 +24,8 @@ #include "ace/Log_Msg_Backend.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Log_Msg_UNIX_Syslog * @@ -66,6 +68,8 @@ private: int convert_log_mask (int lm_mask); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_UNIX_SYSLOG */ #include /**/ "ace/post.h" diff --git a/ace/Log_Priority.h b/ace/Log_Priority.h index d648dff381b..c1084bbeee5 100644 --- a/ace/Log_Priority.h +++ b/ace/Log_Priority.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -12,16 +12,23 @@ #ifndef ACE_LOG_PRIORITY_H #define ACE_LOG_PRIORITY_H + #include /**/ "ace/pre.h" +#include "ace/config-lite.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** + * @enum ACE_Log_Priority + * * @brief This data type indicates the relative priorities of the - * logging messages, from lowest to highest priority. + * logging messages, from lowest to highest priority. * * These values are defined using powers of two so that it's * possible to form a mask to turn them on or off dynamically. * We only use 12 bits, however, so users are free to use the - * remaining 19 bits to define their own priority masks. + * remaining 19 bits to define their own priority masks. */ enum ACE_Log_Priority { @@ -72,5 +79,7 @@ enum ACE_Log_Priority LM_ENSURE_32_BITS = 0x7FFFFFFF }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_LOG_PRIORITY_H */ diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp index 19931a6283a..d4b87b50ed8 100644 --- a/ace/Log_Record.cpp +++ b/ace/Log_Record.cpp @@ -18,48 +18,54 @@ ACE_RCSID(ace, Log_Record, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Log_Record) -const ACE_TCHAR *ACE_Log_Record::priority_names_[] = +namespace { - ACE_LIB_TEXT ("LM_SHUTDOWN"), - ACE_LIB_TEXT ("LM_TRACE"), - ACE_LIB_TEXT ("LM_DEBUG"), - ACE_LIB_TEXT ("LM_INFO"), - ACE_LIB_TEXT ("LM_NOTICE"), - ACE_LIB_TEXT ("LM_WARNING"), - ACE_LIB_TEXT ("LM_STARTUP"), - ACE_LIB_TEXT ("LM_ERROR"), - ACE_LIB_TEXT ("LM_CRITICAL"), - ACE_LIB_TEXT ("LM_ALERT"), - ACE_LIB_TEXT ("LM_EMERGENCY"), - ACE_LIB_TEXT ("LM_UNK(04000)"), - ACE_LIB_TEXT ("LM_UNK(010000)"), - ACE_LIB_TEXT ("LM_UNK(020000)"), - ACE_LIB_TEXT ("LM_UNK(040000)"), - ACE_LIB_TEXT ("LM_UNK(0100000)"), - ACE_LIB_TEXT ("LM_UNK(0200000)"), - ACE_LIB_TEXT ("LM_UNK(0400000)"), - ACE_LIB_TEXT ("LM_UNK(01000000)"), - ACE_LIB_TEXT ("LM_UNK(02000000)"), - ACE_LIB_TEXT ("LM_UNK(04000000)"), - ACE_LIB_TEXT ("LM_UNK(010000000)"), - ACE_LIB_TEXT ("LM_UNK(020000000)"), - ACE_LIB_TEXT ("LM_UNK(040000000)"), - ACE_LIB_TEXT ("LM_UNK(0100000000)"), - ACE_LIB_TEXT ("LM_UNK(0200000000)"), - ACE_LIB_TEXT ("LM_UNK(0400000000)"), - ACE_LIB_TEXT ("LM_UNK(01000000000)"), - ACE_LIB_TEXT ("LM_UNK(02000000000)"), - ACE_LIB_TEXT ("LM_UNK(04000000000)"), - ACE_LIB_TEXT ("LM_UNK(010000000000)"), - ACE_LIB_TEXT ("LM_UNK(020000000000)") -}; + // Symbolic names for the <ACE_Log_Priority> enumerators. + ACE_TCHAR const * ace_priority_names[] = + { + ACE_LIB_TEXT ("LM_SHUTDOWN"), + ACE_LIB_TEXT ("LM_TRACE"), + ACE_LIB_TEXT ("LM_DEBUG"), + ACE_LIB_TEXT ("LM_INFO"), + ACE_LIB_TEXT ("LM_NOTICE"), + ACE_LIB_TEXT ("LM_WARNING"), + ACE_LIB_TEXT ("LM_STARTUP"), + ACE_LIB_TEXT ("LM_ERROR"), + ACE_LIB_TEXT ("LM_CRITICAL"), + ACE_LIB_TEXT ("LM_ALERT"), + ACE_LIB_TEXT ("LM_EMERGENCY"), + ACE_LIB_TEXT ("LM_UNK(04000)"), + ACE_LIB_TEXT ("LM_UNK(010000)"), + ACE_LIB_TEXT ("LM_UNK(020000)"), + ACE_LIB_TEXT ("LM_UNK(040000)"), + ACE_LIB_TEXT ("LM_UNK(0100000)"), + ACE_LIB_TEXT ("LM_UNK(0200000)"), + ACE_LIB_TEXT ("LM_UNK(0400000)"), + ACE_LIB_TEXT ("LM_UNK(01000000)"), + ACE_LIB_TEXT ("LM_UNK(02000000)"), + ACE_LIB_TEXT ("LM_UNK(04000000)"), + ACE_LIB_TEXT ("LM_UNK(010000000)"), + ACE_LIB_TEXT ("LM_UNK(020000000)"), + ACE_LIB_TEXT ("LM_UNK(040000000)"), + ACE_LIB_TEXT ("LM_UNK(0100000000)"), + ACE_LIB_TEXT ("LM_UNK(0200000000)"), + ACE_LIB_TEXT ("LM_UNK(0400000000)"), + ACE_LIB_TEXT ("LM_UNK(01000000000)"), + ACE_LIB_TEXT ("LM_UNK(02000000000)"), + ACE_LIB_TEXT ("LM_UNK(04000000000)"), + ACE_LIB_TEXT ("LM_UNK(010000000000)"), + ACE_LIB_TEXT ("LM_UNK(020000000000)") + }; +} const ACE_TCHAR * ACE_Log_Record::priority_name (ACE_Log_Priority p) { - return ACE_Log_Record::priority_names_[ACE::log2 (p)]; + return ace_priority_names[ACE::log2 (p)]; } void @@ -67,7 +73,7 @@ ACE_Log_Record::priority_name (ACE_Log_Priority p, const ACE_TCHAR *name) { // Name must be a statically allocated string - ACE_Log_Record::priority_names_[ACE::log2 (p)] = name; + ace_priority_names[ACE::log2 (p)] = name; } u_long @@ -290,3 +296,5 @@ ACE_Log_Record::print (const ACE_TCHAR host_name[], } #endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Log_Record.h b/ace/Log_Record.h index 8e7ff3980a0..e7690afd062 100644 --- a/ace/Log_Record.h +++ b/ace/Log_Record.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -29,6 +29,8 @@ #include "ace/Basic_Types.h" #include "ace/iosfwd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /// Defines the structure of an ACE logging record. @@ -189,10 +191,10 @@ private: /// Logging record data ACE_TCHAR msg_data_[MAXLOGMSGLEN + 1]; // Add one for NUL-terminator. - /// Symbolic names for the <ACE_Log_Priority> enums. - static const ACE_TCHAR *priority_names_[]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Log_Record.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Log_Record.inl b/ace/Log_Record.inl index 0b81be7c7ec..6cb36d488c1 100644 --- a/ace/Log_Record.inl +++ b/ace/Log_Record.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Global_Macros.h" @@ -6,6 +7,8 @@ #include "ace/Time_Value.h" #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Log_Record::~ACE_Log_Record (void) { @@ -108,3 +111,5 @@ ACE_Log_Record::msg_data_len (void) const ACE_TRACE ("ACE_Log_Record::msg_data_len"); return ACE_OS::strlen (this->msg_data_) + 1; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Logging_Strategy.cpp b/ace/Logging_Strategy.cpp index c07d59538fa..8e393a81e31 100644 --- a/ace/Logging_Strategy.cpp +++ b/ace/Logging_Strategy.cpp @@ -20,6 +20,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Parse the string containing (thread) priorities and set them // accordingly. @@ -360,7 +362,7 @@ ACE_Logging_Strategy::init (int argc, ACE_TCHAR *argv[]) if (output_file->rdstate () != ios::goodbit) { - if (delete_ostream) + if (delete_ostream) delete output_file; return -1; } @@ -547,9 +549,10 @@ ACE_Logging_Strategy::log_msg (ACE_Log_Msg *log_msg) this->log_msg_ = log_msg; } +ACE_END_VERSIONED_NAMESPACE_DECL + // The following is a "Factory" used by the ACE_Service_Config and // svc.conf file to dynamically initialize the state of the // Logging_Strategy. ACE_FACTORY_DEFINE (ACE, ACE_Logging_Strategy) - diff --git a/ace/Logging_Strategy.h b/ace/Logging_Strategy.h index b4123221622..d8ee19bba76 100644 --- a/ace/Logging_Strategy.h +++ b/ace/Logging_Strategy.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -6,8 +6,8 @@ * * $Id$ * - * @author Prashant Jain <pjain@cs.wustl.edu> and - * Orlando Ribeiro <oribeiro@inescporto.pt> + * @author Prashant Jain <pjain@cs.wustl.edu> + * @author Orlando Ribeiro <oribeiro@inescporto.pt> */ //============================================================================= @@ -25,6 +25,8 @@ #define ACE_DEFAULT_LOGFILE_POLL_INTERVAL 600 /* Seconds */ #endif /* ACE_DEFAULT_LOGFILE_POLL_INTERVAL */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Logging_Strategy * @@ -62,10 +64,10 @@ * to set the reactor used by @c ACE_Logging_Strategy to something * other than the singleton reactor you'll need to get a pointer to * the @c ACE_Logging_Strategy instance and do this - * + * * ACE_Reactor my_reactor; * ACE_Logging_Strategy *logging_strategy = ...... // Get instance. - * + * * logging_strategy->reactor (&my_reactor); * * and then logging_strategy will use your reactor. If you're @@ -181,6 +183,8 @@ protected: ACE_Log_Msg *log_msg_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + ACE_FACTORY_DECLARE (ACE, ACE_Logging_Strategy) #endif /* ACE_LOGGING_STRATEGY_H */ diff --git a/ace/MEM_Acceptor.cpp b/ace/MEM_Acceptor.cpp index 3f1b9828576..bf72cfe8e0d 100644 --- a/ace/MEM_Acceptor.cpp +++ b/ace/MEM_Acceptor.cpp @@ -1,4 +1,3 @@ -// MEM_Acceptor.cpp // $Id$ #include "ace/MEM_Acceptor.h" @@ -16,6 +15,8 @@ ACE_RCSID(ace, MEM_Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Acceptor) void @@ -260,4 +261,6 @@ ACE_MEM_Acceptor::shared_accept_finish (ACE_MEM_Stream new_stream, return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ace/MEM_Acceptor.h b/ace/MEM_Acceptor.h index a33cb5f5dce..7445ec7d585 100644 --- a/ace/MEM_Acceptor.h +++ b/ace/MEM_Acceptor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -36,6 +36,8 @@ #include "ace/OS_QoS.h" #endif // ACE_HAS_WINCE +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. class ACE_Reactor; @@ -183,6 +185,8 @@ private: ACE_MEM_IO::Signal_Strategy preferred_strategy_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/MEM_Acceptor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/MEM_Acceptor.inl b/ace/MEM_Acceptor.inl index d7e3f66f18f..388e1541cdf 100644 --- a/ace/MEM_Acceptor.inl +++ b/ace/MEM_Acceptor.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_MEM_Acceptor::open (const ACE_Addr &local_sap, ACE_Protocol_Info *protocolinfo, @@ -96,3 +99,5 @@ ACE_MEM_Acceptor::malloc_options (void) return this->malloc_options_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MEM_Addr.cpp b/ace/MEM_Addr.cpp index e4ad1f353f0..42fed32e400 100644 --- a/ace/MEM_Addr.cpp +++ b/ace/MEM_Addr.cpp @@ -16,8 +16,10 @@ #include "ace/os_include/os_netdb.h" ACE_RCSID (ace, - MEM_Addr, - "$Id$") + MEM_Addr, + "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Addr) @@ -163,4 +165,6 @@ ACE_MEM_Addr::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ace/MEM_Addr.h b/ace/MEM_Addr.h index 497443de8d6..e263121e281 100644 --- a/ace/MEM_Addr.h +++ b/ace/MEM_Addr.h @@ -30,6 +30,8 @@ #include "ace/INET_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_MEM_Addr * @@ -147,6 +149,8 @@ private: ACE_INET_Addr internal_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/MEM_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/MEM_Addr.inl b/ace/MEM_Addr.inl index dd52742637d..ca2c0de2089 100644 --- a/ace/MEM_Addr.inl +++ b/ace/MEM_Addr.inl @@ -5,6 +5,7 @@ #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Set the port number. @@ -106,3 +107,5 @@ ACE_MEM_Addr::operator != (const ACE_INET_Addr &sap) const ACE_TRACE ("ACE_MEM_Addr::operator !="); return !((*this) == sap); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MEM_Connector.cpp b/ace/MEM_Connector.cpp index 59136b02154..a2e33cedc81 100644 --- a/ace/MEM_Connector.cpp +++ b/ace/MEM_Connector.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, MEM_Connector, "$Id$") #include "ace/MEM_Connector.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Connector) void @@ -142,4 +144,6 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream, return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ace/MEM_Connector.h b/ace/MEM_Connector.h index 868cec68656..a4caa391813 100644 --- a/ace/MEM_Connector.h +++ b/ace/MEM_Connector.h @@ -31,6 +31,8 @@ #include "ace/MEM_Stream.h" #include "ace/MEM_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_MEM_Connector * @@ -170,6 +172,8 @@ private: ACE_MEM_IO::Signal_Strategy preferred_strategy_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/MEM_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/MEM_Connector.inl b/ace/MEM_Connector.inl index 15bf7c9ee75..024ab5d8b5b 100644 --- a/ace/MEM_Connector.inl +++ b/ace/MEM_Connector.inl @@ -1,10 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// MEM_Connector.i - // Establish a connection. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_MEM_IO::Signal_Strategy ACE_MEM_Connector::preferred_strategy (void) const { @@ -25,3 +26,5 @@ ACE_MEM_Connector::malloc_options (void) return this->malloc_options_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MEM_IO.cpp b/ace/MEM_IO.cpp index a3ebd3a839e..99b3fa17604 100644 --- a/ace/MEM_IO.cpp +++ b/ace/MEM_IO.cpp @@ -12,9 +12,11 @@ ACE_RCSID(ace, MEM_IO, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_MEM_IO) -ACE_Reactive_MEM_IO::~ACE_Reactive_MEM_IO () +ACE_Reactive_MEM_IO::~ACE_Reactive_MEM_IO (void) { } @@ -536,4 +538,6 @@ ACE_MEM_IO::recv (size_t n, ...) const } #endif /* 0 */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ace/MEM_IO.h b/ace/MEM_IO.h index ecf4588f2ba..bb611b76a2a 100644 --- a/ace/MEM_IO.h +++ b/ace/MEM_IO.h @@ -24,7 +24,6 @@ #include "ace/SOCK.h" #include "ace/MEM_SAP.h" -#include "ace/Memory_Pool.h" #include "ace/Message_Block.h" #include "ace/Process_Semaphore.h" #include "ace/Process_Mutex.h" @@ -35,6 +34,8 @@ #if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Memory_Export ACE_Reactive_MEM_IO : public ACE_MEM_SAP { public: @@ -301,6 +302,8 @@ private: ssize_t cur_offset_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/MEM_IO.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/MEM_IO.inl b/ace/MEM_IO.inl index 7d4685334cf..07f13764e94 100644 --- a/ace/MEM_IO.inl +++ b/ace/MEM_IO.inl @@ -1,10 +1,10 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ - -// MEM_IO.i - #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Reactive_MEM_IO::ACE_Reactive_MEM_IO () { @@ -229,3 +229,5 @@ ACE_MEM_IO::send (const void *buf, ACE_TRACE ("ACE_MEM_IO::send"); return this->send (buf, len, 0, timeout); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MEM_SAP.cpp b/ace/MEM_SAP.cpp index f1e79c29851..b663fd7aca5 100644 --- a/ace/MEM_SAP.cpp +++ b/ace/MEM_SAP.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, MEM_SAP, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_IPC_SAP) void @@ -105,3 +107,5 @@ template class ACE_Based_Pointer_Basic<ACE_MEM_SAP_Node>; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MEM_SAP.h b/ace/MEM_SAP.h index dcbad75b584..7104ff6ed6b 100644 --- a/ace/MEM_SAP.h +++ b/ace/MEM_SAP.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -10,9 +10,9 @@ */ //============================================================================= - #ifndef ACE_MEM_SAP_H #define ACE_MEM_SAP_H + #include /**/ "ace/pre.h" #ifdef ACE_MEMORY_BUILD_DLL @@ -35,6 +35,8 @@ #include "ace/MMAP_Memory_Pool.h" #include "ace/Process_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_MEM_SAP; class ACE_Reactive_MEM_IO; class ACE_MT_MEM_IO; @@ -160,6 +162,8 @@ protected: ACE_MEM_SAP (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/MEM_SAP.inl" #endif /* __ACE_INLINE__ */ @@ -167,4 +171,5 @@ protected: #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ #include /**/ "ace/post.h" + #endif /* ACE_SOCK_IO_H */ diff --git a/ace/MEM_SAP.inl b/ace/MEM_SAP.inl index e687618b7f8..3c2a4eb9d9a 100644 --- a/ace/MEM_SAP.inl +++ b/ace/MEM_SAP.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/RW_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_MEM_SAP_Node::ACE_MEM_SAP_Node (size_t cap) : capacity_ (cap), @@ -57,3 +60,5 @@ ACE_MEM_SAP::release_buffer (ACE_MEM_SAP_Node *buf) this->shm_malloc_->free (buf); return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MEM_Stream.cpp b/ace/MEM_Stream.cpp index dc32670142a..0e8edb9ced7 100644 --- a/ace/MEM_Stream.cpp +++ b/ace/MEM_Stream.cpp @@ -1,4 +1,3 @@ -// MEM_Stream.cpp // $Id$ #include "ace/MEM_Stream.h" @@ -11,6 +10,8 @@ ACE_RCSID(ace, MEM_Stream, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Stream) void @@ -41,4 +42,6 @@ ACE_MEM_Stream::close (void) return ACE_SOCK::close (); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ace/MEM_Stream.h b/ace/MEM_Stream.h index e513be87387..fad77f06b06 100644 --- a/ace/MEM_Stream.h +++ b/ace/MEM_Stream.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -29,6 +29,8 @@ # define ACE_MEM_STREAM_MIN_BUFFER 4096 #endif /* ACE_MEM_STREAM_MIN_BUFFER */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_MEM_Acceptor; class ACE_MEM_Connector; @@ -144,6 +146,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/MEM_Stream.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/MEM_Stream.inl b/ace/MEM_Stream.inl index df33caaf630..c29459ed35c 100644 --- a/ace/MEM_Stream.inl +++ b/ace/MEM_Stream.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/MEM_Stream.h" #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_MEM_Stream::ACE_MEM_Stream (void) { @@ -173,3 +176,5 @@ ACE_MEM_Stream::recv_urg (void *ptr, timeout); } #endif /* 0 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MMAP_Memory_Pool.cpp b/ace/MMAP_Memory_Pool.cpp index 3329c3f5292..6ddec5d7621 100644 --- a/ace/MMAP_Memory_Pool.cpp +++ b/ace/MMAP_Memory_Pool.cpp @@ -15,6 +15,8 @@ ACE_RCSID(ace, MMAP_Memory_Pool, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_MMAP_Memory_Pool) void @@ -530,3 +532,5 @@ ACE_Lite_MMAP_Memory_Pool::sync (void *, size_t, int) ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::sync"); return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/MMAP_Memory_Pool.h b/ace/MMAP_Memory_Pool.h index 63da965b80d..f1f33a4bd89 100644 --- a/ace/MMAP_Memory_Pool.h +++ b/ace/MMAP_Memory_Pool.h @@ -32,6 +32,8 @@ #include "ace/Signal.h" #include "ace/Mem_Map.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_MMAP_Memory_Pool_Options * @@ -296,5 +298,7 @@ public: virtual int sync (void *addr, size_t len, int flags = MS_SYNC); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_MMAP_MEMORY_POOL_H */ diff --git a/ace/Makefile.am b/ace/Makefile.am index 581d1a47b9f..0ad3b4edca4 100644 --- a/ace/Makefile.am +++ b/ace/Makefile.am @@ -69,7 +69,6 @@ libACE_la_SOURCES = \ Connection_Recycling_Strategy.cpp \ Container_Instantiations.cpp \ Containers.cpp \ - Copy_Disabled.cpp \ Countdown_Time.cpp \ DEV.cpp \ DEV_Addr.cpp \ @@ -104,7 +103,6 @@ libACE_la_SOURCES = \ Get_Opt.cpp \ Handle_Ops.cpp \ Handle_Set.cpp \ - Hash_Map_Manager.cpp \ Hashable.cpp \ High_Res_Timer.cpp \ ICMP_Socket.cpp \ @@ -553,7 +551,6 @@ nobase_include_HEADERS = \ High_Res_Timer.h \ High_Res_Timer.inl \ ICMP_Socket.h \ - ICMP_Socket.inl \ INET_Addr.h \ INET_Addr.inl \ IOStream.h \ diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp index 6ef923634ba..21a6f27b220 100644 --- a/ace/Malloc.cpp +++ b/ace/Malloc.cpp @@ -16,6 +16,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Process-wide ACE_Allocator. ACE_Allocator *ACE_Allocator::allocator_ = 0; @@ -205,3 +207,5 @@ template class ACE_Atomic_Op_Ex<ACE_PROCESS_MUTEX, int>; #pragma instantiate ACE_Atomic_Op_Ex<ACE_PROCESS_MUTEX, int> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /*ACE_HAS_MALLOC_STATS*/ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Malloc.h b/ace/Malloc.h index d19a5f12ebb..fd8c67e5654 100644 --- a/ace/Malloc.h +++ b/ace/Malloc.h @@ -33,6 +33,9 @@ # define ACE_PROCESS_MUTEX ACE_SV_Semaphore_Simple # endif /* ACE_HAS_THREADS */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT; /****************************************************************** @@ -380,6 +383,8 @@ public: void dump (void) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Malloc.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Malloc.inl b/ace/Malloc.inl index 76722f13fb7..fdfbd1a612d 100644 --- a/ace/Malloc.inl +++ b/ace/Malloc.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Control_Block::ACE_Name_Node::~ACE_Name_Node (void) { @@ -19,3 +22,5 @@ ACE_Control_Block::ACE_Name_Node::init_ptr { *ptr = init; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Malloc_Allocator.cpp b/ace/Malloc_Allocator.cpp index ec12aa32954..deeaffc54eb 100644 --- a/ace/Malloc_Allocator.cpp +++ b/ace/Malloc_Allocator.cpp @@ -1,16 +1,5 @@ // $Id$ -// FILENAME -// Malloc_Allocator.cpp -// -// AUTHOR -// Priyanka Gontla <pgontla@uci.edu> -// -// ========================================================================== - -#if !defined (ACE_MALLOC_ALLOCATOR_CPP) -#define ACE_MALLOC_ALLOCATOR_CPP - #include "ace/Malloc_Allocator.h" #include "ace/Object_Manager.h" @@ -25,6 +14,8 @@ ACE_RCSID (ace, Malloc_Allocator, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Allocator * ACE_Allocator::instance (void) { @@ -367,4 +358,4 @@ ACE_Static_Allocator_Base::dump (void) const #endif /* ACE_HAS_DUMP */ } -#endif /* ACE_MALLOC_ALLOCATOR_CPP */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Malloc_Allocator.inl b/ace/Malloc_Allocator.inl index 7ec860c8591..87a96099c1a 100644 --- a/ace/Malloc_Allocator.inl +++ b/ace/Malloc_Allocator.inl @@ -1,11 +1,16 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE -ACE_Static_Allocator_Base::ACE_Static_Allocator_Base (char *buffer, +ACE_Static_Allocator_Base::ACE_Static_Allocator_Base (char * buffer, size_t size) : buffer_ (buffer), size_ (size), offset_ (0) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Malloc_Base.h b/ace/Malloc_Base.h index 34605eb05bf..491e832d59a 100644 --- a/ace/Malloc_Base.h +++ b/ace/Malloc_Base.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -25,6 +25,8 @@ #include "ace/os_include/sys/os_mman.h" #include "ace/os_include/sys/os_types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // The definition of this class is located in Malloc.cpp. /** @@ -156,5 +158,7 @@ private: static int delete_allocator_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_MALLOC_BASE_H */ diff --git a/ace/Malloc_Instantiations.cpp b/ace/Malloc_Instantiations.cpp index 90ffee4b1f1..87ad264e60f 100644 --- a/ace/Malloc_Instantiations.cpp +++ b/ace/Malloc_Instantiations.cpp @@ -3,6 +3,8 @@ #include "ace/Malloc.h" #include "ace/Null_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX>; @@ -32,3 +34,5 @@ template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_ # endif /* ACE_HAS_THREADS */ #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index e228f89c6c5..09be7afda35 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -17,6 +17,8 @@ #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T, class ACE_LOCK> ACE_Cached_Allocator<T, ACE_LOCK>::ACE_Cached_Allocator (size_t n_chunks) : pool_ (0), @@ -1251,4 +1253,6 @@ ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::start (void) return this->curr_ != 0; } -#endif /* ACE_MALLOC_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_MALLOC_T_CPP */ diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h index ac95db68e89..88083f36b07 100644 --- a/ace/Malloc_T.h +++ b/ace/Malloc_T.h @@ -25,6 +25,8 @@ #include "ace/Free_List.h" #include "ace/Guard_T.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Cached_Mem_Pool_Node * @@ -888,6 +890,8 @@ public: ACE_LOCK * operator () (const ACE_TCHAR *myname); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Malloc_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Malloc_T.inl b/ace/Malloc_T.inl index ff9fc26f4be..2de748456af 100644 --- a/ace/Malloc_T.inl +++ b/ace/Malloc_T.inl @@ -4,6 +4,8 @@ #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_INLINE T * ACE_Cached_Mem_Pool_Node<T>::addr (void) { @@ -167,7 +169,6 @@ ACE_Malloc_FIFO_Iterator<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc_FIFO_Iterator (AC } - #if 0 template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE void ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::init_malloc_header_ptr (void* ptr) @@ -178,4 +179,6 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::init_malloc_header_ptr (void* pt ACE_UNUSED_ARG (ptr); #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ } -#endif +#endif /* 0 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Managed_Object.cpp b/ace/Managed_Object.cpp index cd798b2216d..53381f88a7e 100644 --- a/ace/Managed_Object.cpp +++ b/ace/Managed_Object.cpp @@ -13,11 +13,13 @@ #include "ace/Managed_Object.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Managed_Object, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class TYPE> ACE_Cleanup_Adapter<TYPE>::~ACE_Cleanup_Adapter (void) { } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_MANAGED_OBJECT_CPP */ diff --git a/ace/Managed_Object.h b/ace/Managed_Object.h index 041e7c2d82a..9fb0bc662a4 100644 --- a/ace/Managed_Object.h +++ b/ace/Managed_Object.h @@ -24,6 +24,8 @@ #include "ace/Object_Manager.h" #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Cleanup_Adapter * @@ -136,15 +138,19 @@ public: // Note: the function definition is inlined here so that it compiles // on AIX 4.1 w/xlC v. 3.01. -private: +protected: + // Disallow instantiation of this class. ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object (void)) + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object (const ACE_Managed_Object<TYPE> &)) ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Managed_Object<TYPE> &)) - - friend class this_prevents_compiler_warning_about_only_private_constructors; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Managed_Object.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Managed_Object.inl b/ace/Managed_Object.inl index d4dd6043418..0619691d8a6 100644 --- a/ace/Managed_Object.inl +++ b/ace/Managed_Object.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class TYPE> ACE_INLINE ACE_Cleanup_Adapter<TYPE>::ACE_Cleanup_Adapter (void) @@ -16,3 +19,5 @@ ACE_Cleanup_Adapter<TYPE>::object (void) { return this->object_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Manual_Event.cpp b/ace/Manual_Event.cpp index e6eaca44ec6..57543a6d840 100644 --- a/ace/Manual_Event.cpp +++ b/ace/Manual_Event.cpp @@ -9,6 +9,8 @@ ACE_RCSID(ace, Manual_Event, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Manual_Event::ACE_Manual_Event (int initial_state, int type, const char *name, @@ -43,3 +45,4 @@ ACE_Manual_Event::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Manual_Event.h b/ace/Manual_Event.h index 784f5cfa6f5..77de173788e 100644 --- a/ace/Manual_Event.h +++ b/ace/Manual_Event.h @@ -24,6 +24,8 @@ #include "ace/Event.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Manual_Event * @@ -61,6 +63,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Manual_Event.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Manual_Event.inl b/ace/Manual_Event.inl index 1e4d560a855..42bf94f6404 100644 --- a/ace/Manual_Event.inl +++ b/ace/Manual_Event.inl @@ -1,7 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Manual_Event::~ACE_Manual_Event (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Map.cpp b/ace/Map.cpp deleted file mode 100644 index 1faa6c18f23..00000000000 --- a/ace/Map.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Map.cpp -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#include "ace/Map_T.h" - -ACE_RCSID(ace, Map, "$Id$") - diff --git a/ace/Map.h b/ace/Map.h index 1da1db7a4a5..0e7c00b30b5 100644 --- a/ace/Map.h +++ b/ace/Map.h @@ -6,6 +6,8 @@ * * $Id$ * + * Backward compatibility header. + * * @author Irfan Pyarali */ //============================================================================= diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp index 5c6267f2b5f..f39124ce9d9 100644 --- a/ace/Map_Manager.cpp +++ b/ace/Map_Manager.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_MAP_MANAGER_C -#define ACE_MAP_MANAGER_C +#ifndef ACE_MAP_MANAGER_CPP +#define ACE_MAP_MANAGER_CPP #include "ace/Map_Manager.h" @@ -15,20 +15,14 @@ #include "ace/Map_Manager.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Map_Manager, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Map_Entry) - ACE_ALLOC_HOOK_DEFINE(ACE_Map_Manager) - ACE_ALLOC_HOOK_DEFINE(ACE_Map_Const_Iterator_Base) - ACE_ALLOC_HOOK_DEFINE(ACE_Map_Iterator_Base) - ACE_ALLOC_HOOK_DEFINE(ACE_Map_Const_Iterator) - ACE_ALLOC_HOOK_DEFINE(ACE_Map_Iterator) - ACE_ALLOC_HOOK_DEFINE(ACE_Map_Reverse_Iterator) template <class EXT_ID, class INT_ID, class ACE_LOCK> int @@ -702,4 +696,6 @@ ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::dump (void) const #endif /* ACE_HAS_DUMP */ } -#endif /* ACE_MAP_MANAGER_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_MAP_MANAGER_CPP */ diff --git a/ace/Map_Manager.h b/ace/Map_Manager.h index 1cf39698914..e39d1ebc5f9 100644 --- a/ace/Map_Manager.h +++ b/ace/Map_Manager.h @@ -21,8 +21,10 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Log_Msg.h" #include "ace/Basic_Types.h" +#include "ace/Global_Macros.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Forward declaration. class ACE_Allocator; @@ -696,6 +698,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Map_Manager.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Map_Manager.inl b/ace/Map_Manager.inl index 7ef6fdfbf3b..c40a72d79f1 100644 --- a/ace/Map_Manager.inl +++ b/ace/Map_Manager.inl @@ -3,6 +3,9 @@ // $Id$ #include "ace/Guard_T.h" +#include "ace/Log_Msg.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL # if ! defined (ACE_HAS_BROKEN_NOOP_DTORS) template <class EXT_ID, class INT_ID> ACE_INLINE @@ -714,3 +717,5 @@ ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator-- (int) --*this; return retv; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Map_T.cpp b/ace/Map_T.cpp index 8aab011ffef..2487481edc3 100644 --- a/ace/Map_T.cpp +++ b/ace/Map_T.cpp @@ -13,6 +13,8 @@ #include "ace/Map_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class KEY, class VALUE> ACE_Map<KEY, VALUE>::~ACE_Map (void) { @@ -1336,4 +1338,6 @@ ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::rend_impl (void) return temp; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_MAP_T_CPP */ diff --git a/ace/Map_T.h b/ace/Map_T.h index 9ff658d4a7d..942b8bf1156 100644 --- a/ace/Map_T.h +++ b/ace/Map_T.h @@ -23,6 +23,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Noop_Key_Generator * @@ -1591,6 +1593,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Map_Manager_Adapter (const ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR> &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Map_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Map_T.inl b/ace/Map_T.inl index 91a9f678ccc..8dea4a198b3 100644 --- a/ace/Map_T.inl +++ b/ace/Map_T.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> ACE_INLINE int ACE_Noop_Key_Generator<T>::operator() (T &) { @@ -408,3 +411,5 @@ ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::key_generator (void) { return this->key_generator_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp index 086051a79d9..b5c27adc303 100644 --- a/ace/Mem_Map.cpp +++ b/ace/Mem_Map.cpp @@ -23,6 +23,8 @@ ACE_RCSID(ace, Mem_Map, "Mem_Map.cpp,v 4.39 2003/11/01 11:15:13 dhinton Exp") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Mem_Map) #if defined (ACE_USE_MAPPING_NAME) @@ -392,3 +394,5 @@ ACE_Mem_Map::remove (void) else return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Mem_Map.h b/ace/Mem_Map.h index 8f270f633ac..b47eede9250 100644 --- a/ace/Mem_Map.h +++ b/ace/Mem_Map.h @@ -32,6 +32,8 @@ #include "ace/os_include/os_fcntl.h" #include "ace/Default_Constants.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Mem_Map * @@ -217,6 +219,8 @@ private: ACE_UNIMPLEMENTED_FUNC (void operator = (const ACE_Mem_Map &)) }; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Mem_Map.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Mem_Map.inl b/ace/Mem_Map.inl index 3293b9a1365..0d67cfc5b02 100644 --- a/ace/Mem_Map.inl +++ b/ace/Mem_Map.inl @@ -1,9 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_sys_mman.h" #include "ace/OS_NS_sys_stat.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_HANDLE ACE_Mem_Map::handle (void) const { @@ -253,3 +257,5 @@ ACE_Mem_Map::close_handle (void) return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp index ce66c19dcfc..dc1bfd8f6c7 100644 --- a/ace/Message_Block.cpp +++ b/ace/Message_Block.cpp @@ -16,6 +16,8 @@ ACE_RCSID (ace, Message_Block, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_Message_Block) #if defined (ACE_ENABLE_TIMEPROBES) @@ -1380,3 +1382,5 @@ template class ACE_Guard <ACE_Lock>; // #pragma instantiate ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> // #pragma instantiate ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Message_Block.h b/ace/Message_Block.h index f5111c199db..d226becf2c2 100644 --- a/ace/Message_Block.h +++ b/ace/Message_Block.h @@ -26,6 +26,8 @@ #include "ace/Global_Macros.h" #include "ace/Time_Value.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration. class ACE_Allocator; class ACE_Data_Block; @@ -1033,6 +1035,8 @@ public: virtual void dump (void) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Message_Block.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Message_Block.inl b/ace/Message_Block.inl index b1d5152fbe7..2f67cc25078 100644 --- a/ace/Message_Block.inl +++ b/ace/Message_Block.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Message_Block.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Data_Block * ACE_Message_Block::data_block (void) const @@ -621,3 +622,5 @@ ACE_Dynamic_Message_Strategy::priority_status (ACE_Message_Block & mb, return status; } // returns the priority status of the message + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Message_Block_T.cpp b/ace/Message_Block_T.cpp index 70621872a19..4c20ed48a6b 100644 --- a/ace/Message_Block_T.cpp +++ b/ace/Message_Block_T.cpp @@ -1,9 +1,7 @@ // $Id$ -#if !defined (ACE_MESSAGE_BLOCK_T_C) -#define ACE_MESSAGE_BLOCK_T_C - -ACE_RCSID(ace, Message_Block_T, "$Id$") +#ifndef ACE_MESSAGE_BLOCK_T_CPP +#define ACE_MESSAGE_BLOCK_T_CPP #include "ace/Malloc_Base.h" /* Need ACE_Allocator */ @@ -13,6 +11,8 @@ ACE_RCSID(ace, Message_Block_T, "$Id$") #include "ace/os_include/os_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class L> ACE_Locked_Data_Block<L>::~ACE_Locked_Data_Block (void) { @@ -46,4 +46,6 @@ ACE_Locked_Data_Block<ACE_LOCK>::clone_nocopy (ACE_Message_Block::Message_Flags return nb; } -#endif /* ACE_MESSAGE_BLOCK_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_MESSAGE_BLOCK_T_CPP */ diff --git a/ace/Message_Block_T.h b/ace/Message_Block_T.h index f2f1732c56a..c1b4818a880 100644 --- a/ace/Message_Block_T.h +++ b/ace/Message_Block_T.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Locked_Data_Block * @@ -67,6 +69,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Locked_Data_Block (const ACE_Locked_Data_Block<ACE_LOCK> &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Message_Block_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Message_Block_T.inl b/ace/Message_Block_T.inl index 279dcaa704d..6829bd6c360 100644 --- a/ace/Message_Block_T.inl +++ b/ace/Message_Block_T.inl @@ -1,8 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Message_Block_T.i - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template<class ACE_LOCK> ACE_INLINE ACE_Locked_Data_Block<ACE_LOCK>::ACE_Locked_Data_Block (void) @@ -27,3 +27,5 @@ ACE_Locked_Data_Block (size_t size, data_block_allocator) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Message_Queue.cpp b/ace/Message_Queue.cpp index 019835e1cef..f35a0824fe1 100644 --- a/ace/Message_Queue.cpp +++ b/ace/Message_Queue.cpp @@ -13,6 +13,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Message_Queue_Base::~ACE_Message_Queue_Base (void) { } @@ -605,3 +607,5 @@ ACE_Message_Queue_NT::dump (void) const } #endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Message_Queue.h b/ace/Message_Queue.h index 0abb4156312..dc0b67e094b 100644 --- a/ace/Message_Queue.h +++ b/ace/Message_Queue.h @@ -22,6 +22,8 @@ #include "ace/IO_Cntl_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decls. class ACE_Notification_Strategy; template <ACE_SYNCH_DECL> class ACE_Message_Queue_Iterator; @@ -598,6 +600,7 @@ private: }; #endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */ +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Message_Queue.inl" diff --git a/ace/Message_Queue.inl b/ace/Message_Queue.inl index 4280f5b1c5b..4ae6c43f3eb 100644 --- a/ace/Message_Queue.inl +++ b/ace/Message_Queue.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Message_Queue_Base::ACE_Message_Queue_Base (void) { @@ -136,3 +139,5 @@ ACE_Message_Queue_NT::notification_strategy (ACE_Notification_Strategy *) } #endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp index 6d60aa90ad4..595660a11a5 100644 --- a/ace/Message_Queue_T.cpp +++ b/ace/Message_Queue_T.cpp @@ -15,6 +15,8 @@ #include "ace/Notification_Strategy.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Message_Queue) ACE_ALLOC_HOOK_DEFINE(ACE_Dynamic_Message_Queue) ACE_ALLOC_HOOK_DEFINE(ACE_Message_Queue_Ex) @@ -2663,4 +2665,7 @@ ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_NT_message_queue (size_t max_th #endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */ #endif /* defined (VXWORKS) */ + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_MESSAGE_QUEUE_T_CPP */ diff --git a/ace/Message_Queue_T.h b/ace/Message_Queue_T.h index 86c562f9890..214770b60f6 100644 --- a/ace/Message_Queue_T.h +++ b/ace/Message_Queue_T.h @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (VXWORKS) class ACE_Message_Queue_Vx; #endif /* defined (VXWORKS) */ @@ -1214,6 +1216,8 @@ protected: ACE_Message_Queue<ACE_SYNCH_USE> queue_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Message_Queue_T.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Method_Object.h b/ace/Method_Object.h index eee59175ea5..ffabf82d454 100644 --- a/ace/Method_Object.h +++ b/ace/Method_Object.h @@ -26,9 +26,13 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Maintain backwards compatibility so that Steve Huston doesn't go // postal... ;-) typedef ACE_Method_Request ACE_Method_Object; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_METHOD_OBJECT_H */ diff --git a/ace/Method_Request.cpp b/ace/Method_Request.cpp index 3215e1042d2..283a087905f 100644 --- a/ace/Method_Request.cpp +++ b/ace/Method_Request.cpp @@ -4,6 +4,8 @@ ACE_RCSID (ace, Method_Request, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Method_Request::ACE_Method_Request (unsigned long prio) : priority_ (prio) { @@ -24,3 +26,5 @@ ACE_Method_Request::priority (unsigned long prio) { this->priority_ = prio; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Method_Request.h b/ace/Method_Request.h index ca048863079..fd6c8efb902 100644 --- a/ace/Method_Request.h +++ b/ace/Method_Request.h @@ -30,6 +30,8 @@ #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Method_Request * @@ -93,6 +95,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Method_Request (const ACE_Method_Request &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_METHOD_REQUEST_H */ diff --git a/ace/Metrics_Cache_T.cpp b/ace/Metrics_Cache_T.cpp index de520773da7..3868df80269 100644 --- a/ace/Metrics_Cache_T.cpp +++ b/ace/Metrics_Cache_T.cpp @@ -1,14 +1,19 @@ // $Id$ -#ifndef METRICS_CACHE_CPP -#define METRICS_CACHE_CPP +#ifndef ACE_METRICS_CACHE_CPP +#define ACE_METRICS_CACHE_CPP //#define ACE_BUILD_DLL +#include "ace/Metrics_Cache_T.h" + #if defined (ACE_COMPILE_TIMEPROBES) #include "ace/Metrics_Cache.h" -#include "ace/Metrics_Cache_T.h" + +#if !defined (__ACE_INLINE__) +#include "ace/Metrics_Cache_T.inl" +#endif /* __ACE_INLINE__ */ // Const strings for timeprobe event type descriptions. @@ -20,6 +25,7 @@ static const char * event_description_strings [] = "resume" }; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ///////////////////////////////// // class ACE_Metrics_Timeprobe // @@ -58,8 +64,8 @@ ACE_Metrics_Timeprobe (ALLOCATOR *alloc, const char *name, u_long size) : - ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR> (size), - id_ (id), + ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR> (size), + id_ (id), name_ (0) { if (name == 0) @@ -95,11 +101,11 @@ ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::~ACE_Metrics_Timeprobe () template <class ACE_LOCK, class ALLOCATOR> int ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::is_event (const ACE_Metrics_Timeprobe<ACE_LOCK, - ALLOCATOR>:: - ACE_METRICS_TIMEPROBE_DATA_TYPE &t, + ALLOCATOR>:: + ACE_METRICS_TIMEPROBE_DATA_TYPE &t, ACE_Metrics_Timeprobe<ACE_LOCK, - ALLOCATOR>:: - event_id id) + ALLOCATOR>:: + event_id id) { return (t.event_.event_number_ == (u_long) id) ? 1 : 0; } @@ -226,16 +232,8 @@ flush_ACE_Metrics_Cache () { } - -#if !defined (__ACE_INLINE__) -#include "ace/Metrics_Cache_T.inl" -#endif /* __ACE_INLINE__ */ +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* defined (ACE_COMPILE_TIMEPROBES) */ -#endif /* METRICS_CACHE_CPP */ - - - - - +#endif /* ACE_METRICS_CACHE_CPP */ diff --git a/ace/Metrics_Cache_T.h b/ace/Metrics_Cache_T.h index d101ae734b8..8d6c44acd13 100644 --- a/ace/Metrics_Cache_T.h +++ b/ace/Metrics_Cache_T.h @@ -1,3 +1,5 @@ +// -*- C++ -*- + //============================================================================= /** * @file Metrics_Cache_T.h @@ -9,8 +11,8 @@ //============================================================================= -#ifndef METRICS_CACHE_T_H -#define METRICS_CACHE_T_H +#ifndef ACE_METRICS_CACHE_T_H +#define ACE_METRICS_CACHE_T_H #include "ace/config-all.h" @@ -30,6 +32,8 @@ #define METRICS_DEFAULT_TIMEPROBE_TABLE_SIZE METRICS_MIN_TIMEPROBE_TABLE_SIZE #define METRICS_DEFAULT_TIMEPROBE_COUNT 6 +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Metrics_Timeprobe * @@ -220,6 +224,8 @@ private: void operator = (const ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR> &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Metrics_Cache_T.inl" #endif /* __ACE_INLINE__ */ @@ -234,4 +240,4 @@ private: #endif /* defined (ACE_COMPILE_TIMEPROBES) */ -#endif /* METRICS_CACHE_T_H */ +#endif /* ACE_METRICS_CACHE_T_H */ diff --git a/ace/Metrics_Cache_T.inl b/ace/Metrics_Cache_T.inl index 6d48c917059..e0f542ab366 100644 --- a/ace/Metrics_Cache_T.inl +++ b/ace/Metrics_Cache_T.inl @@ -1,7 +1,11 @@ +// -*- C++ -*- +// // $Id$ -\ -#ifndef METRICS_CACHE_T_I -#define METRICS_CACHE_T_I + +#ifndef ACE_METRICS_CACHE_T_INL +#define ACE_METRICS_CACHE_T_INL + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ///////////////////////////// // Class ACE_Metrics_Cache // @@ -14,8 +18,8 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_start (u_long i) { if (i < this->probe_set_size_) { - u_long & count = - this->enqueue_count_ [this->supplier_index_] [i]; + u_long & count = + this->enqueue_count_ [this->supplier_index_] [i]; ++count; if (! this->interval_initialized_) @@ -23,15 +27,15 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_start (u_long i) this->interval_initialized_ = 1; ACE_hrtime_t hrtime_now = ACE_OS::gethrtime (); ACE_High_Res_Timer::hrtime_to_tv (this->interval_start_, - hrtime_now); + hrtime_now); this->interval_end_.set (this->interval_start_.sec(), this->interval_start_.usec()); } - + // Take the metrics timeprobe last, to avoid measuring the above // metrics processing. ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = - this->enqueue_probes_ [this->supplier_index_][i]; + this->enqueue_probes_ [this->supplier_index_][i]; probe-> timeprobe (ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::WORK_START); } @@ -47,13 +51,13 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_stop (u_long i) // Take the metrics timeprobe first, to avoid measuring the below // metrics processing. ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = - this->enqueue_probes_ [this->supplier_index_][i]; + this->enqueue_probes_ [this->supplier_index_][i]; probe-> timeprobe (ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::WORK_STOP); ACE_hrtime_t hrtime_now = ACE_OS::gethrtime (); ACE_High_Res_Timer::hrtime_to_tv (this->interval_end_, - hrtime_now); + hrtime_now); u_long & count = enqueue_count_ [this->supplier_index_][i]; ++count; @@ -71,8 +75,8 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_suspend (u_long i) ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = this->enqueue_probes_ [this->supplier_index_][i]; probe-> - timeprobe (ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::WORK_SUSPEND); - u_long & count = + timeprobe (ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::WORK_SUSPEND); + u_long & count = this->enqueue_count_ [this->supplier_index_] [i]; ++count; } @@ -85,11 +89,11 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_resume (u_long i) { if (i < this->probe_set_size_) { - u_long & count = - this->enqueue_count_ [this->supplier_index_] [i]; + u_long & count = + this->enqueue_count_ [this->supplier_index_] [i]; ++count; ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = - this->enqueue_probes_ [this->supplier_index_][i]; + this->enqueue_probes_ [this->supplier_index_][i]; probe-> timeprobe (ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::WORK_RESUME); } @@ -103,7 +107,7 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_start (u_long i) if (i < this->probe_set_size_) { u_long & count = - this->dequeue_count_ [this->supplier_index_] [i]; + this->dequeue_count_ [this->supplier_index_] [i]; ++count; if (! this->interval_initialized_) @@ -111,7 +115,7 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_start (u_long i) this->interval_initialized_ = 1; ACE_hrtime_t hrtime_now = ACE_OS::gethrtime (); ACE_High_Res_Timer::hrtime_to_tv (this->interval_start_, - hrtime_now); + hrtime_now); this->interval_end_.set (this->interval_start_.sec(), this->interval_start_.usec()); } @@ -136,12 +140,12 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_stop (u_long i) // metrics processing below. ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = this->dequeue_probes_ [this->supplier_index_][i]; - + probe->timeprobe (ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::WORK_STOP); ACE_hrtime_t hrtime_now = ACE_OS::gethrtime (); ACE_High_Res_Timer::hrtime_to_tv (this->interval_end_, - hrtime_now); + hrtime_now); u_long & count = dequeue_count_ [this->supplier_index_] [i]; ++count; @@ -156,7 +160,7 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_suspend (u_long i) if (i < this->probe_set_size_) { u_long & count = - this->dequeue_count_ [this->supplier_index_] [i]; + this->dequeue_count_ [this->supplier_index_] [i]; ++count; ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = this->dequeue_probes_ [this->supplier_index_][i]; @@ -172,8 +176,8 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_resume (u_long i) { if (i < this->probe_set_size_) { - u_long & count = - this->dequeue_count_ [this->supplier_index_] [i]; + u_long & count = + this->dequeue_count_ [this->supplier_index_] [i]; ++count; ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> * probe = this->dequeue_probes_ [this->supplier_index_][i]; @@ -184,7 +188,7 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_resume (u_long i) template <class ACE_LOCK, class ALLOCATOR> -ACE_INLINE void +ACE_INLINE void ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::reset_base_statistics () { this->interval_initialized_ = 0; @@ -200,7 +204,7 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::reset_base_statistics () this->enqueue_probes_ [this->consumer_index_][i]; probe->reset (); probe = - this->dequeue_probes_ [this->consumer_index_][i]; + this->dequeue_probes_ [this->consumer_index_][i]; probe->reset (); } } @@ -218,17 +222,19 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::flip_supplier_and_consumer () } template <class ACE_LOCK, class ALLOCATOR> -ACE_INLINE void +ACE_INLINE void ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::metrics_enabled(int enabled) { metrics_enabled_ = enabled; } template <class ACE_LOCK, class ALLOCATOR> -ACE_INLINE int +ACE_INLINE int ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::metrics_enabled(void) const { return metrics_enabled_; } -#endif /* METRICS_CACHE_T_I */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_METRICS_CACHE_T_INL */ diff --git a/ace/Min_Max.h b/ace/Min_Max.h index e961b510ee8..7bff181088e 100644 --- a/ace/Min_Max.h +++ b/ace/Min_Max.h @@ -24,6 +24,9 @@ # endif /* ACE_LACKS_PRAGMA_ONCE */ # if !defined (ACE_LACKS_MIN_MAX_TEMPLATES) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T> inline const T & ace_min (const T &t1, const T &t2) @@ -58,6 +61,9 @@ ace_range (const T &min, const T &max, const T &val) { return ace_min (ace_max (min, val), max); } + +ACE_END_VERSIONED_NAMESPACE_DECL + # else // These macros should only be used if a C++ compiler can't grok the // inline templates diff --git a/ace/Module.cpp b/ace/Module.cpp index ef101352e0b..20e5638e367 100644 --- a/ace/Module.cpp +++ b/ace/Module.cpp @@ -1,8 +1,7 @@ -// Module.cpp // $Id$ -#ifndef ACE_MODULE_C -#define ACE_MODULE_C +#ifndef ACE_MODULE_CPP +#define ACE_MODULE_CPP #include "ace/Module.h" @@ -16,7 +15,7 @@ #include "ace/Module.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Module, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Module) @@ -268,4 +267,7 @@ ACE_Module<ACE_SYNCH_USE>::close_i (int which, return result; } -#endif /* ACE_MODULE_C */ + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_MODULE_CPP */ diff --git a/ace/Module.h b/ace/Module.h index a3e6f4126b8..7aeae1d2c3a 100644 --- a/ace/Module.h +++ b/ace/Module.h @@ -1,4 +1,5 @@ // -*- C++ -*- + //========================================================================== /** * @file Module.h @@ -23,6 +24,8 @@ #include "ace/Task_T.h" #include "ace/os_include/os_dirent.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Module_Base * @@ -192,6 +195,8 @@ private: int flags_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Module.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Module.inl b/ace/Module.inl index ba93e8e5df7..483d436aa69 100644 --- a/ace/Module.inl +++ b/ace/Module.inl @@ -1,9 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Module.i #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <ACE_SYNCH_DECL> ACE_INLINE void * ACE_Module<ACE_SYNCH_USE>::arg (void) const { @@ -34,7 +36,7 @@ ACE_Module<ACE_SYNCH_USE>::name (const ACE_TCHAR *n) template <ACE_SYNCH_DECL> ACE_INLINE ACE_Task<ACE_SYNCH_USE> * ACE_Module<ACE_SYNCH_USE>::writer (void) -{ +{ ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::writer"); return this->q_pair_[1]; } @@ -54,10 +56,10 @@ ACE_Module<ACE_SYNCH_USE>::next (void) } template <ACE_SYNCH_DECL> ACE_INLINE void -ACE_Module<ACE_SYNCH_USE>::next (ACE_Module<ACE_SYNCH_USE> *m) +ACE_Module<ACE_SYNCH_USE>::next (ACE_Module<ACE_SYNCH_USE> *m) { ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::next"); this->next_ = m; } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Msg_WFMO_Reactor.cpp b/ace/Msg_WFMO_Reactor.cpp index dfe86740efc..ee6fe44c144 100644 --- a/ace/Msg_WFMO_Reactor.cpp +++ b/ace/Msg_WFMO_Reactor.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, Msg_WFMO_Reactor, "$Id$") #include "ace/Msg_WFMO_Reactor.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Msg_WFMO_Reactor::ACE_Msg_WFMO_Reactor (ACE_Sig_Handler *sh, ACE_Timer_Queue *tq) : ACE_WFMO_Reactor (sh, tq) @@ -87,4 +89,6 @@ ACE_Msg_WFMO_Reactor::poll_remaining_handles (DWORD slot) QS_ALLINPUT); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ diff --git a/ace/Msg_WFMO_Reactor.h b/ace/Msg_WFMO_Reactor.h index af6c2bad214..84bea304297 100644 --- a/ace/Msg_WFMO_Reactor.h +++ b/ace/Msg_WFMO_Reactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -31,6 +31,8 @@ #include "ace/WFMO_Reactor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Msg_WFMO_Reactor * @@ -111,11 +113,13 @@ protected: virtual int dispatch_window_messages (void); }; -#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Msg_WFMO_Reactor.inl" #endif /* __ACE_INLINE__ */ +#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ + #include /**/ "ace/post.h" #endif /* ACE_MSG_WFMO_REACTOR_H */ diff --git a/ace/Msg_WFMO_Reactor.inl b/ace/Msg_WFMO_Reactor.inl index c8d7f25c8d7..be021dc58a5 100644 --- a/ace/Msg_WFMO_Reactor.inl +++ b/ace/Msg_WFMO_Reactor.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Msg_WFMO_Reactor::handle_events (ACE_Time_Value &how_long) { @@ -27,4 +30,6 @@ ACE_Msg_WFMO_Reactor::alertable_handle_events (ACE_Time_Value *how_long) return this->event_handling (how_long, MWMO_ALERTABLE); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */ diff --git a/ace/Multihomed_INET_Addr.cpp b/ace/Multihomed_INET_Addr.cpp index 294f2858c37..33430262e9d 100644 --- a/ace/Multihomed_INET_Addr.cpp +++ b/ace/Multihomed_INET_Addr.cpp @@ -13,6 +13,8 @@ ACE_RCSID (ace, Multihomed_INET_Addr, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Multihomed_INET_Addr) // Default constructor @@ -303,4 +305,6 @@ template class ACE_Array<ACE_INET_Addr>; #pragma instantiate ACE_Array_Base<ACE_INET_Addr> #pragma instantiate ACE_Array<ACE_INET_Addr> -#endif /*ACE_HAS_TEMPLATE_INSTANTIATION*/ +#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Multihomed_INET_Addr.h b/ace/Multihomed_INET_Addr.h index 0d9e2657709..07dc27d33e2 100644 --- a/ace/Multihomed_INET_Addr.h +++ b/ace/Multihomed_INET_Addr.h @@ -29,6 +29,7 @@ #include "ace/INET_Addr.h" #include "ace/Containers_T.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Multihomed_INET_Addr @@ -191,6 +192,8 @@ private: ACE_Array<ACE_INET_Addr> secondaries_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) # include "ace/Multihomed_INET_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Multihomed_INET_Addr.inl b/ace/Multihomed_INET_Addr.inl index 71ec578a177..50f67c01191 100644 --- a/ace/Multihomed_INET_Addr.inl +++ b/ace/Multihomed_INET_Addr.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Accessor implementations ACE_INLINE size_t @@ -8,3 +11,5 @@ ACE_Multihomed_INET_Addr::get_num_secondary_addresses() const { return this->secondaries_.size(); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Multiplexor.h b/ace/Multiplexor.h index 12336afaac9..6afb5a653c5 100644 --- a/ace/Multiplexor.h +++ b/ace/Multiplexor.h @@ -10,7 +10,6 @@ * Note that these classes have never been implemented due to lack * of need. * - * * @author Doug Schmidt */ //============================================================================= @@ -20,17 +19,21 @@ #define ACE_MULTIPLEXOR_H #include /**/ "ace/pre.h" -#include "ace/Module.h" +#include "ace/config-all.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Map_Manager.h" - #if defined (ACE_HAS_THREADS) #if 0 + +#include "ace/Module.h" +#include "ace/Map_Manager.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Driver * @@ -70,6 +73,8 @@ public: virtual int unlink_from_below (ACE_Module *mod); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Multiplexor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Multiplexor.inl b/ace/Multiplexor.inl index 18e022ac911..76e9d267006 100644 --- a/ace/Multiplexor.inl +++ b/ace/Multiplexor.inl @@ -1,9 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Multiplexor.i #if 0 +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int Driver::link_from_below (ACE_Module *stream_head) { @@ -88,4 +90,6 @@ ACE_Multiplexor::unlink_from_below (ACE_Module *) return -1; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* 0 */ diff --git a/ace/Mutex.cpp b/ace/Mutex.cpp index a427703eca5..83261c5d39d 100644 --- a/ace/Mutex.cpp +++ b/ace/Mutex.cpp @@ -15,6 +15,7 @@ ACE_RCSID (ace, Mutex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Mutex) @@ -120,3 +121,5 @@ ACE_Mutex::~ACE_Mutex (void) // ACE_TRACE ("ACE_Mutex::~ACE_Mutex"); this->remove (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Mutex.h b/ace/Mutex.h index e0a7dc7e518..278e0a9ab9d 100644 --- a/ace/Mutex.h +++ b/ace/Mutex.h @@ -35,6 +35,8 @@ # define ACE_DEFAULT_MUTEX ACE_LIB_TEXT (ACE_DEFAULT_MUTEX_A) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -177,6 +179,8 @@ private: ACE_Mutex (const ACE_Mutex &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Mutex.inl b/ace/Mutex.inl index a038aa6d9be..26fb51a0c50 100644 --- a/ace/Mutex.inl +++ b/ace/Mutex.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_sys_mman.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Mutex::acquire_read (void) { @@ -168,3 +171,5 @@ ACE_Mutex::remove (void) #endif /* CHORUS || ACE_HAS_PTHREADS || ACE_HAS_STHREADS */ return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/NT_Service.cpp b/ace/NT_Service.cpp index 7a60f27fdaf..0a1e249cb4f 100644 --- a/ace/NT_Service.cpp +++ b/ace/NT_Service.cpp @@ -14,6 +14,8 @@ #include "ace/Service_Object.h" #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_NT_Service) // ACE_NT_Service destructor. @@ -611,4 +613,6 @@ ACE_NT_Service::wait_for_service_state (DWORD desired_state, return; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */ diff --git a/ace/NT_Service.h b/ace/NT_Service.h index 5f7c206e405..6eba99986a4 100644 --- a/ace/NT_Service.h +++ b/ace/NT_Service.h @@ -38,6 +38,8 @@ #define ACE_NT_SERVICE_START_TIMEOUT 5000 #endif /* ACE_NT_SERVICE_TIMEOUT */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_NT_Service * @@ -367,6 +369,8 @@ protected: ACE_OS_Log_Msg_Attributes log_msg_attributes_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + // These macros help to get things set up correctly at compile time // and to take most of the grudge work out of creating the proper // functions and doing the registrations. diff --git a/ace/NT_Service.inl b/ace/NT_Service.inl index a1a9e9469b8..bd9b7ea5b63 100644 --- a/ace/NT_Service.inl +++ b/ace/NT_Service.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_NT_Service::ACE_NT_Service (DWORD start_timeout, DWORD service_type, @@ -78,3 +81,5 @@ ACE_NT_Service::svc_handle(const SERVICE_STATUS_HANDLE new_svc_handle) this->svc_handle_ = new_svc_handle; return; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Name_Proxy.cpp b/ace/Name_Proxy.cpp index 5a3e61cbb16..82d0bd27eca 100644 --- a/ace/Name_Proxy.cpp +++ b/ace/Name_Proxy.cpp @@ -1,4 +1,3 @@ -// Name_Proxy.cpp // $Id$ #include "ace/Name_Proxy.h" @@ -7,6 +6,8 @@ ACE_RCSID(ace, Name_Proxy, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Name_Proxy::dump (void) const { @@ -33,7 +34,7 @@ ACE_Name_Proxy::ACE_Name_Proxy (void) int ACE_Name_Proxy::open (const ACE_INET_Addr &remote_addr, - ACE_Synch_Options& options) + ACE_Synch_Options& options) { ACE_TRACE ("ACE_Name_Proxy::open"); ACE_Time_Value *timeout = 0; @@ -154,7 +155,7 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply) default: ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p got %d bytes, expected %d bytes\n"), - ACE_LIB_TEXT ("recv failed"), + ACE_LIB_TEXT ("recv failed"), n, sizeof (ACE_UINT32))); // FALLTHROUGH @@ -171,14 +172,14 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply) // @@ beware of blocking read!!!. n = this->peer_.recv ((void *) (((char *) &reply) + sizeof (ACE_UINT32)), - length - sizeof (ACE_UINT32)); + length - sizeof (ACE_UINT32)); // Subtract off the size of the part we skipped over... if (n != ssize_t (length - sizeof (ACE_UINT32))) { ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p expected %d, got %d\n"), - ACE_LIB_TEXT ("invalid length"), + ACE_LIB_TEXT ("invalid length"), length, n)); return -1; @@ -204,3 +205,5 @@ ACE_Name_Proxy::~ACE_Name_Proxy (void) ACE_TRACE ("ACE_Name_Proxy::~ACE_Name_Proxy"); this->peer_.close (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Name_Proxy.h b/ace/Name_Proxy.h index 594df3c3c2a..16411b17334 100644 --- a/ace/Name_Proxy.h +++ b/ace/Name_Proxy.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -34,6 +34,8 @@ #include "ace/Name_Request_Reply.h" #include "ace/Event_Handler.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Name_Proxy * @@ -93,5 +95,7 @@ private: ACE_Name_Proxy &operator= (const ACE_Name_Proxy &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NAME_PROXY_H */ diff --git a/ace/Name_Request_Reply.cpp b/ace/Name_Request_Reply.cpp index 0c2b29493e6..f92bbf3c15d 100644 --- a/ace/Name_Request_Reply.cpp +++ b/ace/Name_Request_Reply.cpp @@ -8,6 +8,7 @@ ACE_RCSID (ace, Name_Request_Reply, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Default "do nothing" constructor. @@ -563,3 +564,5 @@ ACE_Name_Reply::dump (void) const } #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Name_Request_Reply.h b/ace/Name_Request_Reply.h index 130099a55cc..07e4b61d95b 100644 --- a/ace/Name_Request_Reply.h +++ b/ace/Name_Request_Reply.h @@ -27,6 +27,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -256,6 +258,8 @@ private: Transfer transfer_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NAME_REQUEST_REPLY_H */ diff --git a/ace/Name_Space.cpp b/ace/Name_Space.cpp index b3939f4095e..4a5d7e9d71a 100644 --- a/ace/Name_Space.cpp +++ b/ace/Name_Space.cpp @@ -7,6 +7,8 @@ ACE_RCSID(ace, Name_Space, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Name_Binding::ACE_Name_Binding (void) : type_ (ACE_OS::strdup ("")) { @@ -65,3 +67,5 @@ ACE_Name_Space::~ACE_Name_Space (void) { ACE_TRACE ("ACE_Name_Space::~ACE_Name_Space"); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Name_Space.h b/ace/Name_Space.h index aedaf801276..18bda096326 100644 --- a/ace/Name_Space.h +++ b/ace/Name_Space.h @@ -25,6 +25,8 @@ #include "ace/SString.h" #include "ace/Unbounded_Set.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + typedef ACE_Unbounded_Set<ACE_NS_WString> ACE_WSTRING_SET; /** @@ -157,6 +159,8 @@ public: virtual void dump (void) const = 0; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NAME_SPACE_H */ diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp index 7f79e6edb22..281fbfdfe84 100644 --- a/ace/Naming_Context.cpp +++ b/ace/Naming_Context.cpp @@ -5,7 +5,7 @@ #include "ace/Remote_Name_Space.h" #include "ace/Local_Name_Space_T.h" #include "ace/Registry_Name_Space.h" -#include "ace/Memory_Pool.h" +#include "ace/MMAP_Memory_Pool.h" #include "ace/RW_Process_Mutex.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_unistd.h" @@ -16,25 +16,13 @@ ACE_RCSID(ace, Naming_Context, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Make life easier later on... typedef ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LOCAL_NAME_SPACE; typedef ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LITE_LOCAL_NAME_SPACE; -// The following Factory is used by the ACE_Service_Config and -// svc.conf file to dynamically initialize the state of the Name -// Server client. - -ACE_FACTORY_DEFINE (ACE, ACE_Naming_Context) -ACE_STATIC_SVC_DEFINE (ACE_Naming_Context, - ACE_LIB_TEXT ("ACE_Naming_Context"), - ACE_SVC_OBJ_T, - &ACE_SVC_NAME (ACE_Naming_Context), - ACE_Service_Type::DELETE_THIS | - ACE_Service_Type::DELETE_OBJ, - 0) -ACE_STATIC_SVC_REQUIRE (ACE_Naming_Context) - // The ACE_Naming_Context static service object is now defined // by the ACE_Object_Manager, in Object_Manager.cpp. @@ -703,3 +691,19 @@ template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_M #pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > > #pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL + +// The following Factory is used by the ACE_Service_Config and +// svc.conf file to dynamically initialize the state of the Name +// Server client. + +ACE_FACTORY_DEFINE (ACE, ACE_Naming_Context) +ACE_STATIC_SVC_DEFINE (ACE_Naming_Context, + ACE_LIB_TEXT ("ACE_Naming_Context"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (ACE_Naming_Context), + ACE_Service_Type::DELETE_THIS | + ACE_Service_Type::DELETE_OBJ, + 0) +ACE_STATIC_SVC_REQUIRE (ACE_Naming_Context) diff --git a/ace/Naming_Context.h b/ace/Naming_Context.h index e66783f48ca..7bef675b23f 100644 --- a/ace/Naming_Context.h +++ b/ace/Naming_Context.h @@ -26,6 +26,8 @@ #include "ace/Name_Space.h" #include "ace/os_include/os_netdb.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl class ACE_Name_Options; class ACE_Static_Svc_Descriptor; @@ -372,6 +374,8 @@ private: ACE_Naming_Context::Context_Scope_Type context_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + ACE_FACTORY_DECLARE (ACE, ACE_Naming_Context) ACE_STATIC_SVC_DECLARE_EXPORT (ACE, ACE_Naming_Context) diff --git a/ace/Node.cpp b/ace/Node.cpp index 91e989d739b..8976a9c379e 100644 --- a/ace/Node.cpp +++ b/ace/Node.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_NODE_C -#define ACE_NODE_C +#ifndef ACE_NODE_CPP +#define ACE_NODE_CPP #include "ace/Node.h" @@ -9,7 +9,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Node, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Node) @@ -43,4 +43,6 @@ ACE_Node<T>::ACE_Node (const ACE_Node<T> &s) // ACE_TRACE ("ACE_Node<T>::ACE_Node"); } -#endif /* ACE_NODE_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_NODE_CPP */ diff --git a/ace/Node.h b/ace/Node.h index 607d0b6f137..941f5d1c686 100644 --- a/ace/Node.h +++ b/ace/Node.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations. template <class T> class ACE_Unbounded_Set; template <class T> class ACE_Unbounded_Set_Iterator; @@ -67,6 +69,8 @@ private: T item_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Node.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Notification_Strategy.cpp b/ace/Notification_Strategy.cpp index 77d5dc235b0..f12bf3a569e 100644 --- a/ace/Notification_Strategy.cpp +++ b/ace/Notification_Strategy.cpp @@ -6,6 +6,8 @@ ACE_RCSID(ace, Strategies, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Notification_Strategy::ACE_Notification_Strategy (ACE_Event_Handler *eh, ACE_Reactor_Mask mask) : eh_ (eh), @@ -16,3 +18,5 @@ ACE_Notification_Strategy::ACE_Notification_Strategy (ACE_Event_Handler *eh, ACE_Notification_Strategy::~ACE_Notification_Strategy (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Notification_Strategy.h b/ace/Notification_Strategy.h index 07e1a179563..751868152b4 100644 --- a/ace/Notification_Strategy.h +++ b/ace/Notification_Strategy.h @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- + //============================================================================= /** * @file Notification_Strategy.h @@ -18,6 +19,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decls. class ACE_Reactor; @@ -64,6 +67,7 @@ protected: ACE_Reactor_Mask mask_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Notification_Strategy.inl" diff --git a/ace/Notification_Strategy.inl b/ace/Notification_Strategy.inl index fac4b0cd3b6..47479030ab6 100644 --- a/ace/Notification_Strategy.inl +++ b/ace/Notification_Strategy.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// //$Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Event_Handler * ACE_Notification_Strategy::event_handler (void) { @@ -24,3 +27,5 @@ ACE_Notification_Strategy::mask (ACE_Reactor_Mask m) { this->mask_ = m; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Null_Barrier.h b/ace/Null_Barrier.h index 0c5f5609972..9b3bc16912a 100644 --- a/ace/Null_Barrier.h +++ b/ace/Null_Barrier.h @@ -16,6 +16,8 @@ #define ACE_NULL_BARRIER_H #include /**/ "ace/pre.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // All methods in this class are inline, so there is no // need to import or export on Windows. -- CAE 12/18/2003 @@ -51,5 +53,7 @@ private: ACE_Null_Barrier (const ACE_Null_Barrier &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NULL_BARRIER_H */ diff --git a/ace/Null_Condition.h b/ace/Null_Condition.h index eb1fa10e436..8889d7632a3 100644 --- a/ace/Null_Condition.h +++ b/ace/Null_Condition.h @@ -26,6 +26,8 @@ #include "ace/os_include/os_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -77,5 +79,7 @@ private: ACE_Null_Condition (const ACE_Null_Condition &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NULL_CONDITION_H */ diff --git a/ace/Null_Mutex.h b/ace/Null_Mutex.h index a0c9bf8d374..2f912ebe2e5 100644 --- a/ace/Null_Mutex.h +++ b/ace/Null_Mutex.h @@ -27,6 +27,9 @@ #include "ace/Global_Macros.h" #include "ace/OS_Memory.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -215,5 +218,7 @@ public: } }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NULL_MUTEX_H */ diff --git a/ace/Null_Semaphore.h b/ace/Null_Semaphore.h index 43349202541..5921d90a7b3 100644 --- a/ace/Null_Semaphore.h +++ b/ace/Null_Semaphore.h @@ -24,6 +24,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -96,5 +98,7 @@ public: //ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_NULL_SEMAPHORE_H */ @@ -336,7 +336,7 @@ class ACE_Timeout_Manager; * efficient system programs on Win32, POSIX and other versions * of UNIX, and various real-time operating systems. * - * This class encapsulates the differences between various OS + * This namespace encapsulates the differences between various OS * platforms. When porting ACE to a new platform, this class is * the place to focus on. Once this file is ported to a new * platform, pretty much everything else comes for "free." See @@ -347,12 +347,7 @@ class ACE_Timeout_Manager; */ namespace ACE_OS { - - - // = A set of wrappers for miscellaneous operations. - - } /* namespace ACE_OS */ # if defined (ACE_HAS_INLINED_OSCALLS) diff --git a/ace/OS_Errno.cpp b/ace/OS_Errno.cpp index 7e1d6f93cc0..8170ef82466 100644 --- a/ace/OS_Errno.cpp +++ b/ace/OS_Errno.cpp @@ -20,6 +20,8 @@ ACE_RCSID(ace, OS_Errno, "$Id$") #include "ace/OS_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_CE_Errno *ACE_CE_Errno::instance_ = 0; DWORD ACE_CE_Errno::errno_key_ = 0xffffffff; @@ -39,4 +41,6 @@ ACE_CE_Errno::fini () ACE_CE_Errno::instance_ = 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ diff --git a/ace/OS_Errno.h b/ace/OS_Errno.h index 82446047842..e92837af318 100644 --- a/ace/OS_Errno.h +++ b/ace/OS_Errno.h @@ -22,6 +22,8 @@ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Errno_Guard * @@ -81,6 +83,8 @@ private: int error_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + // Inlining this class on debug builds with gcc on Solaris can cause // deadlocks during static initialization. #if defined (ACE_HAS_INLINED_OSCALLS) && \ diff --git a/ace/OS_Errno.inl b/ace/OS_Errno.inl index 9330c37deb4..2fe5e6c54e2 100644 --- a/ace/OS_Errno.inl +++ b/ace/OS_Errno.inl @@ -1,6 +1,9 @@ // -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Errno_Guard::ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref, int error) @@ -60,3 +63,5 @@ ACE_Errno_Guard::operator!= (int error) { return this->error_ != error; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_Log_Msg_Attributes.h b/ace/OS_Log_Msg_Attributes.h index f86011147ea..5da968d0ba7 100644 --- a/ace/OS_Log_Msg_Attributes.h +++ b/ace/OS_Log_Msg_Attributes.h @@ -24,13 +24,18 @@ #include "ace/os_include/os_stdio.h" #include "ace/iosfwd.h" -/// The attributes required by ACE_Log_Msg. +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** + * @class ACE_OS_Log_Msg_Attributes + * + * @brief The attributes required by ACE_Log_Msg. + * * When a new thread is created the TSS resources for the Log_Msg * class in the new thread may be inherited by the creator thread. * The base_attributes are encapsulated in this class to simplify their * manipulation and destruction. - * + * @par * The contents of the class must be made available to the OS layer, * because they are part of the thread descriptor. */ @@ -71,6 +76,8 @@ private: ACE_OS_Log_Msg_Attributes &operator= (const ACE_OS_Log_Msg_Attributes &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_Log_Msg_Attributes.inl b/ace/OS_Log_Msg_Attributes.inl index 3ece871ea06..29725ef4d7c 100644 --- a/ace/OS_Log_Msg_Attributes.inl +++ b/ace/OS_Log_Msg_Attributes.inl @@ -1,7 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_OS_Log_Msg_Attributes::ACE_OS_Log_Msg_Attributes (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_Thread.cpp b/ace/OS_NS_Thread.cpp index 140adaf7ed7..52f4b797da2 100644 --- a/ace/OS_NS_Thread.cpp +++ b/ace/OS_NS_Thread.cpp @@ -23,8 +23,9 @@ ACE_RCSID (ace, #include "ace/Condition_T.h" #include "ace/Guard_T.h" + extern "C" void -ace_mutex_lock_cleanup_adapter (void *args) +ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args) { ACE_OS::mutex_lock_cleanup (args); } @@ -87,6 +88,8 @@ HANDLE WINAPI __IBMCPP__beginthreadex(void *stack, /*****************************************************************************/ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Thread_ID::to_string (char *thr_string) const { @@ -5394,6 +5397,8 @@ ACE_OS::unique_name (const void *object, } #endif +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (VXWORKS) # include /**/ <usrLib.h> /* for ::sp() */ diff --git a/ace/OS_NS_Thread.h b/ace/OS_NS_Thread.h index d2a793e089e..39115efd303 100644 --- a/ace/OS_NS_Thread.h +++ b/ace/OS_NS_Thread.h @@ -54,6 +54,8 @@ # include /**/ <sys/tspriocntl.h> # endif /* ACE_HAS_PRIOCNTL */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_PSOS) // Use pSOS semaphores, wrapped . . . typedef struct @@ -115,6 +117,8 @@ typedef DWORD ACE_OS_thread_key_t; # endif /* ! ACE_HAS_TSS_EMULATION */ # endif /* ACE_WIN32 */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if !defined (ACE_HAS_POSIX_SEM) && defined (ACE_USES_FIFO_SEM) extern "C" { @@ -150,6 +154,9 @@ extern "C" { # if defined (ACE_HAS_PTHREADS) // moved to pthread.h # elif defined (ACE_HAS_STHREADS) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Solaris threads, without PTHREADS. // Typedefs to help compatibility with Windows NT and Pthreads. typedef thread_t ACE_thread_t; @@ -181,6 +188,8 @@ struct ACE_Export ACE_mutexattr_t typedef ACE_thread_t ACE_hthread_t; typedef ACE_mutex_t ACE_thread_mutex_t; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # define THR_CANCEL_DISABLE 0 # define THR_CANCEL_ENABLE 0 # define THR_CANCEL_DEFERRED 0 @@ -192,6 +201,8 @@ typedef ACE_mutex_t ACE_thread_mutex_t; # elif defined (ACE_PSOS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Some versions of pSOS provide native mutex support. For others, // implement ACE_thread_mutex_t and ACE_mutex_t using pSOS semaphores. // Either way, the types are all u_longs. @@ -233,6 +244,8 @@ typedef u_int ACE_OS_thread_key_t; typedef ACE_OS_thread_key_t ACE_thread_key_t; # endif /* ! ACE_HAS_TSS_EMULATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + # define THR_CANCEL_DISABLE 0 /* thread can never be cancelled */ # define THR_CANCEL_ENABLE 0 /* thread can be cancelled */ # define THR_CANCEL_DEFERRED 0 /* cancellation deferred to cancellation point */ @@ -317,6 +330,8 @@ typedef u_int ACE_OS_thread_key_t; # define USYNC_PROCESS 1 /* It's all global on VxWorks (without MMU option). */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + typedef SEM_ID ACE_mutex_t; // Implement ACE_thread_mutex_t with ACE_mutex_t because there's just // one process . . . @@ -346,12 +361,16 @@ typedef u_int ACE_OS_thread_key_t; typedef ACE_OS_thread_key_t ACE_thread_key_t; # endif /* ! ACE_HAS_TSS_EMULATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + // Marker for ACE_Thread_Manager to indicate that it allocated // an ACE_thread_t. It is placed at the beginning of the ID. # define ACE_THR_ID_ALLOCATED '\022' # elif defined (ACE_HAS_WTHREADS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + typedef CRITICAL_SECTION ACE_thread_mutex_t; typedef struct @@ -396,6 +415,8 @@ public: # endif /* ACE_USES_WINCE_SEMA_SIMULATION */ # endif /* defined (ACE_WIN32) */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // These need to be different values, neither of which can be 0... # define USYNC_THREAD 1 # define USYNC_PROCESS 2 @@ -423,6 +444,9 @@ public: // takes care of it) unless we're on Windows. Win32 mutexes, semaphores, // and condition variables are not yet supported in PACE. # if defined (ACE_LACKS_COND_T) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_cond_t * @@ -481,10 +505,15 @@ struct ACE_Export ACE_mutexattr_t { int type; }; + +ACE_END_VERSIONED_NAMESPACE_DECL + # endif /* ACE_LACKS_COND_T */ # if defined (ACE_LACKS_RWLOCK_T) && !defined (ACE_HAS_PTHREADS_UNIX98_EXT) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_rwlock_t * @@ -524,11 +553,18 @@ public: /// Condition for the upgrading reader ACE_cond_t waiting_important_writer_; }; + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # elif defined (ACE_HAS_PTHREADS_UNIX98_EXT) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef pthread_rwlock_t ACE_rwlock_t; +ACE_END_VERSIONED_NAMESPACE_DECL # elif defined (ACE_HAS_STHREADS) # include /**/ <synch.h> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef rwlock_t ACE_rwlock_t; +ACE_END_VERSIONED_NAMESPACE_DECL # endif /* ACE_LACKS_RWLOCK_T */ // Define some default thread priorities on all threaded platforms, if @@ -578,6 +614,9 @@ typedef rwlock_t ACE_rwlock_t; // and recursive_mutex_cond_relock() methods to maintain the expected // state when the wait finishes. # if defined (ACE_HAS_RECURSIVE_MUTEXES) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + typedef ACE_thread_mutex_t ACE_recursive_thread_mutex_t; # if defined (ACE_WIN32) // Windows has recursive mutexes, but doesn't have condition variables, @@ -593,7 +632,13 @@ struct ACE_recursive_mutex_state // No need for special handling; just need a type for method signatures. typedef int ACE_recursive_mutex_state; # endif /* ACE_WIN32 */ + +ACE_END_VERSIONED_NAMESPACE_DECL + # else + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_recursive_thread_mutex_t * @@ -628,6 +673,9 @@ struct ACE_recursive_mutex_state int nesting_level_; ACE_thread_t owner_id_; }; + +ACE_END_VERSIONED_NAMESPACE_DECL + # endif /* ACE_HAS_RECURSIVE_MUTEXES */ # else /* !ACE_HAS_THREADS, i.e., the OS/platform doesn't support threading. */ @@ -694,6 +742,8 @@ struct ACE_recursive_mutex_state # define THR_SCOPE_SYSTEM 0 # endif /* ! THR_SCOPE_SYSTEM */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // These are dummies needed for class OS.h typedef int ACE_cond_t; struct ACE_Export ACE_condattr_t @@ -723,6 +773,8 @@ typedef unsigned int ACE_OS_thread_key_t; typedef ACE_OS_thread_key_t ACE_thread_key_t; # endif /* ! ACE_HAS_TSS_EMULATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + // Ensure that ACE_THR_PRI_FIFO_DEF and ACE_THR_PRI_OTHER_DEF are // defined on non-threaded platforms, to support application source // code compatibility. ACE_THR_PRI_FIFO_DEF should be used by @@ -737,6 +789,8 @@ typedef unsigned int ACE_OS_thread_key_t; # endif /* ACE_HAS_THREADS ***********************************************/ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Thread_ID * @@ -1103,9 +1157,26 @@ private: # define ACE_KEY_INDEX(OBJ,KEY) u_int OBJ = KEY # endif /* ACE_HAS_NONSCALAR_THREAD_KEY_T */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + && !(defined (_MSC_VER) && _MSC_VER <= 1200) +// MSVC++ 6's preprocessor can't handle macro expansions required by +// the versioned namespace support. *sigh* + +# define ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ace_mutex_lock_cleanup_adapter) + +#else + +# define ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME ace_mutex_lock_cleanup_adapter + +#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ + + # if defined (ACE_HAS_THR_C_FUNC) // This is necessary to work around nasty problems with MVS C++. -extern "C" ACE_Export void ace_mutex_lock_cleanup_adapter (void *args); +extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args); # define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ace_mutex_lock_cleanup_adapter, (void *) A); # define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A) # elif defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CLEANUP) @@ -1113,7 +1184,7 @@ extern "C" ACE_Export void ace_mutex_lock_cleanup_adapter (void *args); // pthread_cleanup_push, it is undone by the Solaris header file // /usr/include/pthread.h. So this macro generates a warning under Solaris // with SunCC. This is a bug in the Solaris header file. -extern "C" ACE_Export void ace_mutex_lock_cleanup_adapter (void *args); +extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args); # define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ace_mutex_lock_cleanup_adapter, (void *) A); # define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A) # else @@ -1121,6 +1192,8 @@ extern "C" ACE_Export void ace_mutex_lock_cleanup_adapter (void *args); # define ACE_PTHREAD_CLEANUP_POP(A) # endif /* ACE_HAS_THR_C_FUNC */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if !defined (ACE_WIN32) // forward decl's class ACE_event_t; @@ -2013,6 +2086,8 @@ protected: const ACE_OS_Recursive_Thread_Mutex_Guard &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + // used in time and unistd # define ACE_OS_GUARD \ ACE_OS_Thread_Mutex_Guard ace_os_guard__ (*(ACE_thread_mutex_t *) \ diff --git a/ace/OS_NS_Thread.inl b/ace/OS_NS_Thread.inl index 6b52a3ec524..4e3444a33a2 100644 --- a/ace/OS_NS_Thread.inl +++ b/ace/OS_NS_Thread.inl @@ -23,6 +23,8 @@ # include /**/ <sys/priocntl.h> #endif /* ACE_HAS_PRIOCNTL */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /*****************************************************************************/ #if defined (ACE_LACKS_COND_T) && defined (ACE_HAS_THREADS) @@ -3163,8 +3165,8 @@ ACE_OS::thr_setconcurrency (int hint) # elif defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_PTHREAD_SETCONCURRENCY) int result; ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setconcurrency (hint), - result), - int, -1); + result), + int, -1); # else ACE_UNUSED_ARG (hint); ACE_NOTSUP_RETURN (-1); @@ -3770,3 +3772,5 @@ ACE_Thread_ID::operator!= (const ACE_Thread_ID &rhs) const { return !(*this == rhs); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_arpa_inet.cpp b/ace/OS_NS_arpa_inet.cpp index 6d6ffaeb0ee..cf02135db3c 100644 --- a/ace/OS_NS_arpa_inet.cpp +++ b/ace/OS_NS_arpa_inet.cpp @@ -9,6 +9,8 @@ ACE_RCSID(ace, OS_NS_arpa_inet, "$Id$") # include "ace/OS_NS_arpa_inet.inl" #endif /* ACE_HAS_INLINED_OS_CALLS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_OS::inet_aton (const char *host_name, struct in_addr *addr) { @@ -66,3 +68,5 @@ ACE_OS::inet_ntoa (const struct in_addr addr) return addrstr; } #endif /* defined (ACE_PSOS) */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_arpa_inet.h b/ace/OS_NS_arpa_inet.h index b6032d61338..9b7a7028975 100644 --- a/ace/OS_NS_arpa_inet.h +++ b/ace/OS_NS_arpa_inet.h @@ -33,6 +33,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION @@ -62,6 +64,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_arpa_inet.inl b/ace/OS_NS_arpa_inet.inl index 31a6b9a3f34..b81b2c88059 100644 --- a/ace/OS_NS_arpa_inet.inl +++ b/ace/OS_NS_arpa_inet.inl @@ -5,6 +5,8 @@ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_stdio.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE unsigned long ACE_OS::inet_addr (const char *name) { @@ -119,3 +121,5 @@ ACE_OS::inet_pton (int family, const char *strptr, void *addrptr) ACE_NOTSUP_RETURN(-1); #endif /* ACE_HAS_IPV6 */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_ctype.h b/ace/OS_NS_ctype.h index ce9fc51fd19..32abbe0e053 100644 --- a/ace/OS_NS_ctype.h +++ b/ace/OS_NS_ctype.h @@ -32,6 +32,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { // these are non-standard names... @@ -114,6 +116,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_ctype.inl b/ace/OS_NS_ctype.inl index 96d50465c4c..e7199338653 100644 --- a/ace/OS_NS_ctype.inl +++ b/ace/OS_NS_ctype.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/os_include/os_ctype.h" @@ -6,6 +7,8 @@ # include "ace/os_include/os_wctype.h" #endif /* ACE_HAS_WCHAR */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::ace_isalnum (ACE_TCHAR c) { @@ -143,3 +146,5 @@ ACE_OS::ace_towupper (wint_t c) return towupper (c); } #endif /* ACE_HAS_WCHAR && !ACE_LACKS_TOWUPPER */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_dirent.cpp b/ace/OS_NS_dirent.cpp index 57446ce5364..fe09a9448cd 100644 --- a/ace/OS_NS_dirent.cpp +++ b/ace/OS_NS_dirent.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_dirent.h" @@ -42,6 +41,8 @@ extern "C" # endif /* INVALID_SET_FILE_POINTER */ #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_OS::closedir_emulation (ACE_DIR *d) { @@ -286,3 +287,5 @@ ACE_OS::scandir_emulation (const ACE_TCHAR *dirname, return nfiles; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_dirent.h b/ace/OS_NS_dirent.h index c5bf0efd859..f394c941a90 100644 --- a/ace/OS_NS_dirent.h +++ b/ace/OS_NS_dirent.h @@ -33,6 +33,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION @@ -85,6 +87,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_dirent.inl b/ace/OS_NS_dirent.inl index 28ea14b7531..3083f65a5be 100644 --- a/ace/OS_NS_dirent.inl +++ b/ace/OS_NS_dirent.inl @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void ACE_OS::closedir (ACE_DIR *d) { @@ -123,7 +126,7 @@ ACE_OS::readdir_r (ACE_DIR *dirp, *result = entry; return ::readdir_r (dirp, entry); #elif defined(__GNUC__) && defined (_AIX) - return ::readdir_r (dirp, entry, result); + return ::readdir_r (dirp, entry, result); # else // <result> had better not be 0! *result = ::readdir_r (dirp, entry); @@ -200,3 +203,5 @@ ACE_OS::telldir (ACE_DIR *d) ACE_NOTSUP_RETURN (-1); #endif /* ! ACE_HAS_DIRENT || ACE_LACKS_TELLDIR */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_dlfcn.cpp b/ace/OS_NS_dlfcn.cpp index d0707dde1c2..67cae58a1fe 100644 --- a/ace/OS_NS_dlfcn.cpp +++ b/ace/OS_NS_dlfcn.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_dlfcn.h" diff --git a/ace/OS_NS_dlfcn.h b/ace/OS_NS_dlfcn.h index 6bcaac31488..ac92efbbe46 100644 --- a/ace/OS_NS_dlfcn.h +++ b/ace/OS_NS_dlfcn.h @@ -33,6 +33,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { //@{ @name A set of wrappers for explicit dynamic linking. @@ -53,6 +55,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_dlfcn.inl b/ace/OS_NS_dlfcn.inl index a325fa74af6..a53dea1fb09 100644 --- a/ace/OS_NS_dlfcn.inl +++ b/ace/OS_NS_dlfcn.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_macros.h" @@ -19,6 +20,8 @@ # include "ace/OS_NS_string.h" #endif /* ACE_USES_ASM_SYMBOL_IN_DLSYM */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::dlclose (ACE_SHLIB_HANDLE handle) { @@ -185,8 +188,8 @@ ACE_OS::dlopen (const ACE_TCHAR *fname, if ( (loaderror != 0) && (handle != 0) ) { // ouch something went wrong most likely unresolved externals - if (handle) - ::unldByModuleId ( handle, 0 ); + if (handle) + ::unldByModuleId ( handle, 0 ); handle = 0; } } @@ -286,3 +289,5 @@ ACE_OS::dlsym (ACE_SHLIB_HANDLE handle, # endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_errno.h b/ace/OS_NS_errno.h index a3fcaabfb7c..e8e6ce9f536 100644 --- a/ace/OS_NS_errno.h +++ b/ace/OS_NS_errno.h @@ -33,6 +33,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION @@ -75,6 +77,8 @@ private: static DWORD errno_key_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + # define errno (* (ACE_CE_Errno::instance ())) #endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ diff --git a/ace/OS_NS_errno.inl b/ace/OS_NS_errno.inl index 63eaaba1c14..b8d82f3fd24 100644 --- a/ace/OS_NS_errno.inl +++ b/ace/OS_NS_errno.inl @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/config-all.h" /* Need ACE_TRACE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::last_error (void) { @@ -94,3 +97,5 @@ ACE_CE_Errno::operator= (int x) } #endif /* ACE_HAS_WINCE_BROKEN_ERRNO */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_fcntl.cpp b/ace/OS_NS_fcntl.cpp index 3b6d205cb3d..1d9d5bf2bcc 100644 --- a/ace/OS_NS_fcntl.cpp +++ b/ace/OS_NS_fcntl.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_fcntl.h" @@ -14,6 +13,8 @@ ACE_RCSID(ace, OS_NS_fcntl, "$Id$") #include "ace/OS_NS_macros.h" #include "ace/Object_Manager_Base.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_HANDLE ACE_OS::open (const char *filename, int mode, @@ -266,3 +267,5 @@ ACE_OS::open (const wchar_t *filename, #endif /* ACE_WIN32 */ } #endif /* ACE_HAS_WCHAR */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_fcntl.h b/ace/OS_NS_fcntl.h index a903316cdaa..9334a1a075e 100644 --- a/ace/OS_NS_fcntl.h +++ b/ace/OS_NS_fcntl.h @@ -34,6 +34,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION @@ -79,6 +81,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_fcntl.inl b/ace/OS_NS_fcntl.inl index 0e541c90575..6714b0fe389 100644 --- a/ace/OS_NS_fcntl.inl +++ b/ace/OS_NS_fcntl.inl @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg) { @@ -16,3 +19,5 @@ ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg) ACE_OSCALL_RETURN (::fcntl (handle, cmd, arg), int, -1); # endif /* ACE_LACKS_FCNTL */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_math.cpp b/ace/OS_NS_math.cpp index dc009cad8ba..85e2e92c034 100644 --- a/ace/OS_NS_math.cpp +++ b/ace/OS_NS_math.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_math.h" diff --git a/ace/OS_NS_math.h b/ace/OS_NS_math.h index 370a65026f2..55ff1edc2e5 100644 --- a/ace/OS_NS_math.h +++ b/ace/OS_NS_math.h @@ -32,7 +32,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ /// This method computes the largest integral value not greater than x. ACE_NAMESPACE_INLINE_FUNCTION @@ -42,9 +45,10 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION double ceil (double x); - } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_math.inl b/ace/OS_NS_math.inl index 6a55a57480a..6c1ed7b724f 100644 --- a/ace/OS_NS_math.inl +++ b/ace/OS_NS_math.inl @@ -1,6 +1,9 @@ // -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { ACE_INLINE double @@ -22,3 +25,5 @@ namespace ACE_OS { } } // ACE_OS namespace + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_netdb.cpp b/ace/OS_NS_netdb.cpp index 163c33208b4..497f2924789 100644 --- a/ace/OS_NS_netdb.cpp +++ b/ace/OS_NS_netdb.cpp @@ -17,6 +17,8 @@ ACE_RCSID(ace, OS_NS_netdb, "$Id$") #include "ace/OS_NS_stropts.h" #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (VXWORKS) struct hostent * @@ -307,14 +309,14 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) (struct sockaddr_in *)&(ar.arp_pa); ACE_OS::memset (&ar, - 0, - sizeof (struct arpreq)); + 0, + sizeof (struct arpreq)); psa->sin_family = AF_INET; ACE_OS::memcpy (&(psa->sin_addr), - *paddrs, - sizeof (struct in_addr)); + *paddrs, + sizeof (struct in_addr)); if (ACE_OS::ioctl (handle, SIOCGARP, @@ -386,3 +388,5 @@ ACE_OS::netdb_release (void) ACE_OS_Object_Manager::ACE_OS_MONITOR_LOCK]); } # endif /* defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_netdb.h b/ace/OS_NS_netdb.h index f25d97c9426..13c28d722b9 100644 --- a/ace/OS_NS_netdb.h +++ b/ace/OS_NS_netdb.h @@ -15,7 +15,7 @@ //============================================================================= #ifndef ACE_OS_NS_NETDB_H -# define ACE_OS_NS_NETDB_H +#define ACE_OS_NS_NETDB_H # include /**/ "ace/pre.h" @@ -33,10 +33,13 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ #if defined (VXWORKS) - extern ACE_Export + extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* VXWORKS */ @@ -45,7 +48,7 @@ namespace ACE_OS { int type); #if defined (VXWORKS) - extern ACE_Export + extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* VXWORKS */ @@ -57,14 +60,14 @@ namespace ACE_OS { int *h_errnop); #if defined (VXWORKS) - extern ACE_Export + extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* VXWORKS */ struct hostent *gethostbyname (const char *name); #if defined (VXWORKS) - extern ACE_Export + extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* VXWORKS */ @@ -75,7 +78,7 @@ namespace ACE_OS { #if defined (VXWORKS) - extern ACE_Export + extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* VXWORKS */ @@ -83,7 +86,7 @@ namespace ACE_OS { int family); #if defined (VXWORKS) - extern ACE_Export + extern ACE_Export #else ACE_NAMESPACE_INLINE_FUNCTION #endif /* VXWORKS */ @@ -98,7 +101,7 @@ namespace ACE_OS { unsigned char node[6]; }; - extern ACE_Export + extern ACE_Export int getmacaddress (struct macaddr_node_t *node); ACE_NAMESPACE_INLINE_FUNCTION @@ -128,15 +131,17 @@ namespace ACE_OS { ACE_SERVENT_DATA buf); # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) - extern ACE_Export + extern ACE_Export int netdb_acquire (void); - extern ACE_Export + extern ACE_Export int netdb_release (void); # endif /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ } /* namespace ACE_OS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_netdb.inl b/ace/OS_NS_netdb.inl index fed8aa4ebbb..294ff9ea2d3 100644 --- a/ace/OS_NS_netdb.inl +++ b/ace/OS_NS_netdb.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_macros.h" @@ -39,6 +40,8 @@ # endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */ #endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if !defined (VXWORKS) ACE_INLINE struct hostent * @@ -526,3 +529,5 @@ ACE_OS::getservbyname_r (const char *svc, 0); #endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_poll.cpp b/ace/OS_NS_poll.cpp index c109c2f097e..5ffdc327eb7 100644 --- a/ace/OS_NS_poll.cpp +++ b/ace/OS_NS_poll.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_poll.h" diff --git a/ace/OS_NS_poll.h b/ace/OS_NS_poll.h index 43fe0a2f2fb..6d8f5c38346 100644 --- a/ace/OS_NS_poll.h +++ b/ace/OS_NS_poll.h @@ -33,9 +33,12 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; -namespace ACE_OS { +namespace ACE_OS +{ ACE_NAMESPACE_INLINE_FUNCTION int poll (struct pollfd *pollfds, @@ -49,6 +52,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_poll.inl b/ace/OS_NS_poll.inl index 8d808fbd6f5..ab1b2d8b54e 100644 --- a/ace/OS_NS_poll.inl +++ b/ace/OS_NS_poll.inl @@ -1,9 +1,12 @@ // -*- C++ -*- +// // $Id$ #include "ace/Time_Value.h" #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::poll (struct pollfd *pollfds, unsigned long len, @@ -38,3 +41,5 @@ ACE_OS::poll (struct pollfd *pollfds, ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_POLL */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_pwd.cpp b/ace/OS_NS_pwd.cpp index 61da06a1e7c..7888142f39f 100644 --- a/ace/OS_NS_pwd.cpp +++ b/ace/OS_NS_pwd.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_pwd.h" diff --git a/ace/OS_NS_pwd.h b/ace/OS_NS_pwd.h index 9c61269f00b..b8360dc3d1d 100644 --- a/ace/OS_NS_pwd.h +++ b/ace/OS_NS_pwd.h @@ -15,7 +15,7 @@ //============================================================================= #ifndef ACE_OS_NS_PWD_H -# define ACE_OS_NS_PWD_H +#define ACE_OS_NS_PWD_H # include /**/ "ace/pre.h" @@ -39,7 +39,10 @@ struct passwd; -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ //@{ @name A set of wrappers for password routines. @@ -64,6 +67,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_pwd.inl b/ace/OS_NS_pwd.inl index 62f5e1813f8..d25d3b2173c 100644 --- a/ace/OS_NS_pwd.inl +++ b/ace/OS_NS_pwd.inl @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Accessors to PWD file. ACE_INLINE void @@ -114,3 +117,5 @@ ACE_OS::setpwent (void) ::setpwent (); #endif /* ! ACE_LACKS_PWD_FUNCTIONS */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_regex.cpp b/ace/OS_NS_regex.cpp index 88fc9f3beb4..dfefedf5231 100644 --- a/ace/OS_NS_regex.cpp +++ b/ace/OS_NS_regex.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_regex.h" diff --git a/ace/OS_NS_regex.h b/ace/OS_NS_regex.h index ac311494088..434224af16e 100644 --- a/ace/OS_NS_regex.h +++ b/ace/OS_NS_regex.h @@ -32,7 +32,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ // non=standard.. //@{ @name A set of wrappers for regular expressions. @@ -48,6 +51,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_regex.inl b/ace/OS_NS_regex.inl index b1f445f0e67..884bd88c718 100644 --- a/ace/OS_NS_regex.inl +++ b/ace/OS_NS_regex.inl @@ -1,9 +1,12 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" #include "ace/os_include/os_regex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE char * ACE_OS::compile (const char *instring, char *expbuf, char *endbuf) { @@ -33,3 +36,4 @@ ACE_OS::step (const char *str, char *expbuf) #endif /* ACE_HAS_REGEX */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_signal.cpp b/ace/OS_NS_signal.cpp index 3dc5e1c56fe..ab65f204095 100644 --- a/ace/OS_NS_signal.cpp +++ b/ace/OS_NS_signal.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_signal.h" @@ -22,3 +21,6 @@ siginfo_t::siginfo_t (ACE_HANDLE *handles) { } #endif /* ACE_HAS_SIGINFO_T */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_signal.h b/ace/OS_NS_signal.h index 74351b3a192..d8f050cb313 100644 --- a/ace/OS_NS_signal.h +++ b/ace/OS_NS_signal.h @@ -68,6 +68,8 @@ extern "C" } #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { //@{ @name A set of wrappers for Signals. @@ -120,6 +122,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_signal.inl b/ace/OS_NS_signal.inl index a2159ad2604..f563cec381d 100644 --- a/ace/OS_NS_signal.inl +++ b/ace/OS_NS_signal.inl @@ -1,10 +1,14 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_macros.h" #include "ace/OS_NS_errno.h" -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ ACE_INLINE int kill (pid_t pid, int signum) @@ -271,3 +275,5 @@ sigsuspend (const sigset_t *sigset) } } /* end namespace ACE_OS */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp index 62221f597e8..b370b46ee49 100644 --- a/ace/OS_NS_stdio.cpp +++ b/ace/OS_NS_stdio.cpp @@ -14,8 +14,10 @@ ACE_RCSID (ace, # if defined (ACE_WIN32) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL OSVERSIONINFO ACE_OS::win32_versioninfo_; HINSTANCE ACE_OS::win32_resource_module_; +ACE_END_VERSIONED_NAMESPACE_DECL # if defined (ACE_HAS_DLL) && (ACE_HAS_DLL == 1) && !defined (ACE_HAS_WINCE) // This function is called by the OS when the ACE DLL is loaded. We @@ -38,6 +40,8 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID) # endif /* ACE_HAS_DLL && ACE_HAS_DLL == 1 */ # endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_OS::ace_flock_t::dump (void) const { @@ -398,3 +402,5 @@ ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...) # endif /* XPG5 || ACE_HAS_DINKUM_STL */ } #endif /* ACE_HAS_WCHAR */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_stdio.h b/ace/OS_NS_stdio.h index 08f0311116d..165f15b9c4c 100644 --- a/ace/OS_NS_stdio.h +++ b/ace/OS_NS_stdio.h @@ -94,6 +94,8 @@ struct flock # endif /* ! VXWORKS */ # endif /* ACE_LACKS_FILELOCKS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { /** @@ -412,6 +414,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_stdio.inl b/ace/OS_NS_stdio.inl index e24575c839f..66862c501c0 100644 --- a/ace/OS_NS_stdio.inl +++ b/ace/OS_NS_stdio.inl @@ -35,6 +35,8 @@ fileno (FILE *fp) /*****************************************************************************/ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) ACE_INLINE void ACE_OS::flock_adjust_params (ACE_OS::ace_flock_t *lock, @@ -630,8 +632,8 @@ ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode) ACE_OS_TRACE ("ACE_OS::fdopen"); # if defined (ACE_HAS_WINCE) ACE_OSCALL_RETURN (::_wfdopen (handle, ACE_TEXT_ALWAYS_WCHAR (mode)), - FILE*, - 0); + FILE*, + 0); # elif defined (ACE_WIN32) // kernel file handle -> FILE* conversion... // Options: _O_APPEND, _O_RDONLY and _O_TEXT are lost @@ -781,9 +783,9 @@ ACE_OS::freopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode, FILE* stream) ACE_OS_TRACE ("ACE_OS::freopen"); #if defined (ACE_WIN32) && (defined(ACE_USES_WCHAR) || defined(ACE_HAS_WINCE)) ACE_OSCALL_RETURN (::_wfreopen (ACE_TEXT_ALWAYS_WCHAR (filename), - ACE_TEXT_ALWAYS_WCHAR (mode), - stream), - FILE *, 0); + ACE_TEXT_ALWAYS_WCHAR (mode), + stream), + FILE *, 0); #else ACE_OSCALL_RETURN (ACE_STD_NAMESPACE::freopen (ACE_TEXT_ALWAYS_CHAR (filename), @@ -1209,3 +1211,5 @@ ACE_OS::default_win32_security_attributes_r (LPSECURITY_ATTRIBUTES sa, #endif /* ACE_WIN32 */ #endif + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_stdlib.cpp b/ace/OS_NS_stdlib.cpp index 936e5c47427..566de3bf950 100644 --- a/ace/OS_NS_stdlib.cpp +++ b/ace/OS_NS_stdlib.cpp @@ -30,6 +30,8 @@ ACE_RCSID (ace, # endif #endif /* ACE_LACKS_MKSTEMP */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_EXIT_HOOK ACE_OS::exit_hook_ = 0; void * @@ -685,3 +687,5 @@ ACE_OS::mkstemp_emulation (ACE_TCHAR * s) return ACE_INVALID_HANDLE; } #endif /* ACE_LACKS_MKSTEMP */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_stdlib.h b/ace/OS_NS_stdlib.h index 38fcd9e9187..8e0747b7ffd 100644 --- a/ace/OS_NS_stdlib.h +++ b/ace/OS_NS_stdlib.h @@ -50,6 +50,8 @@ extern "C" { } #endif /* ACE_WIN32 && _MSC_VER */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { /** @name Non-standard functions @@ -273,9 +275,10 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION int system (const ACE_TCHAR *s); - } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_stdlib.inl b/ace/OS_NS_stdlib.inl index 3373a706c24..b33a3c12635 100644 --- a/ace/OS_NS_stdlib.inl +++ b/ace/OS_NS_stdlib.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/config-all.h" /* Need ACE_TRACE */ @@ -14,6 +15,8 @@ # define ACE_WCHAR_STD_NAMESPACE ACE_STD_NAMESPACE #endif /* ACE_WCHAR_IN_STD_NAMESPACE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Doesn't need a macro since it *never* returns! ACE_INLINE void @@ -496,3 +499,5 @@ ACE_OS::system (const ACE_TCHAR *s) ACE_OSCALL_RETURN (::system (ACE_TEXT_ALWAYS_CHAR (s)), int, -1); #endif /* !CHORUS */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_string.cpp b/ace/OS_NS_string.cpp index a40a20dee7c..d5d921743de 100644 --- a/ace/OS_NS_string.cpp +++ b/ace/OS_NS_string.cpp @@ -20,6 +20,8 @@ ACE_RCSID (ace, # include "ace/OS_NS_stdio.h" #endif /* ACE_LACKS_STRERROR */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if !defined (ACE_HAS_MEMCHR) const void * ACE_OS::memchr_emulation (const void *s, int c, size_t len) @@ -407,3 +409,5 @@ ACE_OS::strtok_r_emulation (ACE_WCHAR_T *s, return s ; } # endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSTOK */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_string.h b/ace/OS_NS_string.h index 302411b5033..b142ccf188c 100644 --- a/ace/OS_NS_string.h +++ b/ace/OS_NS_string.h @@ -15,7 +15,7 @@ //============================================================================= #ifndef ACE_OS_NS_STRING_H -# define ACE_OS_NS_STRING_H +#define ACE_OS_NS_STRING_H # include /**/ "ace/pre.h" @@ -34,6 +34,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { /** @name Functions from <cstring> @@ -456,6 +458,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_string.inl b/ace/OS_NS_string.inl index 0a3a8a699a6..40d0190f7e1 100644 --- a/ace/OS_NS_string.inl +++ b/ace/OS_NS_string.inl @@ -7,6 +7,8 @@ #include "ace/OS_NS_wchar.h" #include "ace/os_include/os_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE const void * ACE_OS::memchr (const void *s, int c, size_t len) { @@ -486,3 +488,5 @@ ACE_OS::strtok_r (ACE_WCHAR_T *s, const ACE_WCHAR_T *tokens, ACE_WCHAR_T **lasts #endif /* ACE_LACKS_WCSTOK */ } #endif // ACE_HAS_WCHAR + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_strings.cpp b/ace/OS_NS_strings.cpp index 67ca3a809b8..50c5630c9d2 100644 --- a/ace/OS_NS_strings.cpp +++ b/ace/OS_NS_strings.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_strings.h" @@ -13,6 +12,8 @@ ACE_RCSID(ace, OS_NS_strings, "$Id$") # include "ace/OS_NS_ctype.h" #endif /* ACE_LACKS_STRCASECMP */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_LACKS_STRCASECMP) int ACE_OS::strcasecmp_emulation (const char *s, const char *t) @@ -79,3 +80,5 @@ ACE_OS::strncasecmp_emulation (const char *s, return ACE_OS::ace_tolower (*scan1) - ACE_OS::ace_tolower (*scan2); } #endif /* ACE_LACKS_STRCASECMP */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_strings.h b/ace/OS_NS_strings.h index e0def73a3d5..70d8e17cf5b 100644 --- a/ace/OS_NS_strings.h +++ b/ace/OS_NS_strings.h @@ -15,7 +15,7 @@ //============================================================================= #ifndef ACE_OS_NS_STRINGS_H -# define ACE_OS_NS_STRINGS_H +#define ACE_OS_NS_STRINGS_H # include /**/ "ace/pre.h" @@ -33,9 +33,12 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; -namespace ACE_OS { +namespace ACE_OS +{ /// Compares two strings (case insensitive const char version). ACE_NAMESPACE_INLINE_FUNCTION @@ -69,6 +72,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_strings.inl b/ace/OS_NS_strings.inl index 588bf40ded3..2b2012b2f38 100644 --- a/ace/OS_NS_strings.inl +++ b/ace/OS_NS_strings.inl @@ -1,10 +1,13 @@ // -*- C++ -*- +// // $Id$ #if defined (ACE_HAS_WCHAR) # include "ace/OS_NS_wchar.h" #endif /* ACE_HAS_WCHAR */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::strcasecmp (const char *s, const char *t) { @@ -53,3 +56,4 @@ ACE_OS::strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) } #endif /* ACE_HAS_WCHAR */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_stropts.cpp b/ace/OS_NS_stropts.cpp index a8f4710a1f7..5ddc71d3982 100644 --- a/ace/OS_NS_stropts.cpp +++ b/ace/OS_NS_stropts.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_stropts.h" @@ -9,6 +8,8 @@ ACE_RCSID(ace, OS_NS_stropts, "$Id$") # include "ace/OS_NS_stropts.inl" #endif /* ACE_HAS_INLINED_OS_CALLS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_OS::ioctl (ACE_HANDLE socket, unsigned long io_control_code, @@ -190,3 +191,5 @@ ACE_OS::ioctl (ACE_HANDLE socket, # endif /* ACE_HAS_WINSOCK2 */ } #endif /* ACE_HAS_WINCE */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_stropts.h b/ace/OS_NS_stropts.h index 9b1f6fc2f56..6f190ac6d13 100644 --- a/ace/OS_NS_stropts.h +++ b/ace/OS_NS_stropts.h @@ -15,7 +15,7 @@ //============================================================================= #ifndef ACE_OS_NS_STROPTS_H -# define ACE_OS_NS_STROPTS_H +#define ACE_OS_NS_STROPTS_H # include /**/ "ace/pre.h" @@ -38,6 +38,8 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) typedef WSAPROTOCOL_INFO ACE_Protocol_Info; @@ -113,7 +115,7 @@ namespace ACE_OS { void * = 0); /// QoS-enabled <ioctl>. - extern ACE_Export + extern ACE_Export int ioctl (ACE_HANDLE socket, unsigned long io_control_code, void *in_buffer_p, @@ -127,7 +129,7 @@ namespace ACE_OS { #if !defined (ACE_HAS_WINCE) /// QoS-enabled <ioctl> when the I/O control code is either /// SIO_SET_QOS or SIO_GET_QOS. - extern ACE_Export + extern ACE_Export int ioctl (ACE_HANDLE socket, unsigned long io_control_code, ACE_QoS &ace_qos, @@ -156,6 +158,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_stropts.inl b/ace/OS_NS_stropts.inl index 38663c67cba..84f14d8ec24 100644 --- a/ace/OS_NS_stropts.inl +++ b/ace/OS_NS_stropts.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/os_include/os_errno.h" @@ -8,6 +9,8 @@ #include "ace/OS_Memory.h" #include "ace/OS_QoS.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_LACKS_CONST_STRBUF_PTR) typedef struct strbuf *ACE_STRBUF_TYPE; #else @@ -196,3 +199,5 @@ ACE_OS::putpmsg (ACE_HANDLE handle, return ACE_OS::putmsg (handle, ctl, data, flags); #endif /* ACE_HAS_STREAM_PIPES */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_mman.cpp b/ace/OS_NS_sys_mman.cpp index 5a9c10ce148..5b1f5712186 100644 --- a/ace/OS_NS_sys_mman.cpp +++ b/ace/OS_NS_sys_mman.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_mman.h" diff --git a/ace/OS_NS_sys_mman.h b/ace/OS_NS_sys_mman.h index 1ce8939525f..6315c32bbff 100644 --- a/ace/OS_NS_sys_mman.h +++ b/ace/OS_NS_sys_mman.h @@ -35,7 +35,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ //@{ @name A set of wrappers for memory mapped files. ACE_NAMESPACE_INLINE_FUNCTION @@ -80,6 +83,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_mman.inl b/ace/OS_NS_sys_mman.inl index a3850c9057a..eb7449779fb 100644 --- a/ace/OS_NS_sys_mman.inl +++ b/ace/OS_NS_sys_mman.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_fcntl.h" @@ -11,6 +12,8 @@ # include "ace/OS_NS_sys_stat.h" #endif /* __Lynx__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_VOIDPTR_MMAP) // Needed for some odd OS's (e.g., SGI). typedef void *ACE_MMAP_TYPE; @@ -326,3 +329,4 @@ ACE_OS::shm_unlink (const ACE_TCHAR *path) # endif /* ACE_HAS_SHM_OPEN */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_msg.cpp b/ace/OS_NS_sys_msg.cpp index 917121a8680..328f3ec6975 100644 --- a/ace/OS_NS_sys_msg.cpp +++ b/ace/OS_NS_sys_msg.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_msg.h" diff --git a/ace/OS_NS_sys_msg.inl b/ace/OS_NS_sys_msg.inl index 7f71a4a75cc..129b4c389c1 100644 --- a/ace/OS_NS_sys_msg.inl +++ b/ace/OS_NS_sys_msg.inl @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::msgctl (int msqid, int cmd, struct msqid_ds *val) { @@ -71,3 +74,5 @@ ACE_OS::msgsnd (int int_id, const void *buf, size_t len, int flags) ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_SYSV_IPC */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_resource.cpp b/ace/OS_NS_sys_resource.cpp index 3499e4bfc5c..44a1e9584c0 100644 --- a/ace/OS_NS_sys_resource.cpp +++ b/ace/OS_NS_sys_resource.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_resource.h" diff --git a/ace/OS_NS_sys_resource.h b/ace/OS_NS_sys_resource.h index 7486dd2a1c7..3c73ad0ab9d 100644 --- a/ace/OS_NS_sys_resource.h +++ b/ace/OS_NS_sys_resource.h @@ -33,7 +33,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ ACE_NAMESPACE_INLINE_FUNCTION int getrlimit (int resource, @@ -50,6 +53,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_resource.inl b/ace/OS_NS_sys_resource.inl index ea6fc92849d..132c088925d 100644 --- a/ace/OS_NS_sys_resource.inl +++ b/ace/OS_NS_sys_resource.inl @@ -1,9 +1,12 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::getrlimit (int resource, struct rlimit *rl) { @@ -78,7 +81,7 @@ ACE_OS::setrlimit (int resource, const struct rlimit *rl) ACE_OSCALL_RETURN (::setrlimit ((ACE_HAS_RLIMIT_RESOURCE_ENUM) resource, resource, ), int, -1); -# endif /* ACE_HAS_NONCONST_SETRLIMIT */ +# endif /* ACE_HAS_NONCONST_SETRLIMIT */ # else /* ACE_HAS_RLIMIT_RESOURCE_ENUM */ # if defined (ACE_HAS_NONCONST_SETRLIMIT) ACE_OSCALL_RETURN (::setrlimit (resource, const_cast<struct rlimit *>(rl) @@ -86,7 +89,8 @@ ACE_OS::setrlimit (int resource, const struct rlimit *rl) # else ACE_OSCALL_RETURN (::setrlimit (resource, rl), int, -1); # endif /* ACE_HAS_NONCONST_SETRLIMIT */ -# endif /* ACE_HAS_RLIMIT_RESOURCE_ENUM */ +# endif /* ACE_HAS_RLIMIT_RESOURCE_ENUM */ #endif /* ACE_LACKS_RLIMIT */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_select.cpp b/ace/OS_NS_sys_select.cpp index fb2bc11b1b2..eafd1f2caae 100644 --- a/ace/OS_NS_sys_select.cpp +++ b/ace/OS_NS_sys_select.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_select.h" diff --git a/ace/OS_NS_sys_select.h b/ace/OS_NS_sys_select.h index 1a33c485e56..443d594ae09 100644 --- a/ace/OS_NS_sys_select.h +++ b/ace/OS_NS_sys_select.h @@ -40,10 +40,12 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -class ACE_Time_Value; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL -namespace ACE_OS { +class ACE_Time_Value; +namespace ACE_OS +{ // Should be moved to cpp or inl. ACE_NAMESPACE_INLINE_FUNCTION int select (int width, @@ -61,6 +63,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_select.inl b/ace/OS_NS_sys_select.inl index a46dc4bc800..734c1cd1eb4 100644 --- a/ace/OS_NS_sys_select.inl +++ b/ace/OS_NS_sys_select.inl @@ -1,10 +1,13 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_macros.h" #include "ace/Time_Value.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // It would be really cool to add another version of select that would // function like the one we're defending against below! ACE_INLINE int @@ -76,3 +79,4 @@ ACE_OS::select (int width, #undef ___ACE_TIMEOUT } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_shm.cpp b/ace/OS_NS_sys_shm.cpp index 5feb509e5db..16b10605b82 100644 --- a/ace/OS_NS_sys_shm.cpp +++ b/ace/OS_NS_sys_shm.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_shm.h" diff --git a/ace/OS_NS_sys_shm.h b/ace/OS_NS_sys_shm.h index de1214a9bb1..d19414b114f 100644 --- a/ace/OS_NS_sys_shm.h +++ b/ace/OS_NS_sys_shm.h @@ -33,7 +33,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ //@{ @name A set of wrappers for System V shared memory. ACE_NAMESPACE_INLINE_FUNCTION @@ -57,6 +60,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_shm.inl b/ace/OS_NS_sys_shm.inl index 1df7d9c7764..1061765f356 100644 --- a/ace/OS_NS_sys_shm.inl +++ b/ace/OS_NS_sys_shm.inl @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void * ACE_OS::shmat (int int_id, void *shmaddr, int shmflg) { @@ -60,3 +63,5 @@ ACE_OS::shmget (key_t key, size_t size, int flags) ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_SYSV_IPC */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_socket.cpp b/ace/OS_NS_sys_socket.cpp index 78ea8a5fcfd..b7781de24f2 100644 --- a/ace/OS_NS_sys_socket.cpp +++ b/ace/OS_NS_sys_socket.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_socket.h" @@ -9,6 +8,8 @@ ACE_RCSID(ace, OS_NS_sys_socket, "$Id$") # include "ace/OS_NS_sys_socket.inl" #endif /* ACE_HAS_INLINED_OS_CALLS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) int ACE_OS::socket_initialized_; #endif /* ACE_WIN32 */ @@ -157,3 +158,4 @@ ACE_OS::socket_fini (void) return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_socket.h b/ace/OS_NS_sys_socket.h index c984c30758a..1ca99d0e88b 100644 --- a/ace/OS_NS_sys_socket.h +++ b/ace/OS_NS_sys_socket.h @@ -60,10 +60,13 @@ #define ACE_SHUTDOWN_BOTH 2 #endif /* SD_BOTH */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Accept_QoS_Params; class ACE_QoS_Params; -namespace ACE_OS { +namespace ACE_OS +{ # if defined (ACE_WIN32) /// Keeps track of whether we've already initialized WinSock... @@ -285,6 +288,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_socket.inl b/ace/OS_NS_sys_socket.inl index 801e6858d02..2ecbfd2c380 100644 --- a/ace/OS_NS_sys_socket.inl +++ b/ace/OS_NS_sys_socket.inl @@ -15,6 +15,8 @@ #include "ace/OS_NS_string.h" #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_VOIDPTR_SOCKOPT) typedef void *ACE_SOCKOPT_TYPE1; #elif defined (ACE_HAS_CHARPTR_SOCKOPT) @@ -954,3 +956,5 @@ ACE_OS::if_freenameindex (struct if_nameindex *ptr) ::if_freenameindex (ptr); } #endif /* __linux__ && ACE_HAS_IPV6 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_stat.cpp b/ace/OS_NS_sys_stat.cpp index fa50a6b040d..a372f414075 100644 --- a/ace/OS_NS_sys_stat.cpp +++ b/ace/OS_NS_sys_stat.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_stat.h" diff --git a/ace/OS_NS_sys_stat.h b/ace/OS_NS_sys_stat.h index f954938b816..be971dcbea8 100644 --- a/ace/OS_NS_sys_stat.h +++ b/ace/OS_NS_sys_stat.h @@ -34,13 +34,16 @@ #endif #define ACE_EXPORT_MACRO ACE_Export +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (__BORLANDC__) && !defined(__IBMCPP__) typedef struct _stat ACE_stat; # else typedef struct stat ACE_stat; # endif /* ACE_WIN32 */ -namespace ACE_OS { +namespace ACE_OS +{ ACE_NAMESPACE_INLINE_FUNCTION ACE_HANDLE creat (const ACE_TCHAR *filename, @@ -99,6 +102,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_stat.inl b/ace/OS_NS_sys_stat.inl index 397f8a5b3bf..377e8847738 100644 --- a/ace/OS_NS_sys_stat.inl +++ b/ace/OS_NS_sys_stat.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_unistd.h" @@ -6,7 +7,10 @@ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_macros.h" -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ ACE_INLINE ACE_HANDLE creat (const ACE_TCHAR *filename, mode_t mode) @@ -364,3 +368,5 @@ namespace ACE_OS { } } // ACE_OS namespace + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_time.cpp b/ace/OS_NS_sys_time.cpp index 2109fa005e0..be0a28d76b7 100644 --- a/ace/OS_NS_sys_time.cpp +++ b/ace/OS_NS_sys_time.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_time.h" diff --git a/ace/OS_NS_sys_time.h b/ace/OS_NS_sys_time.h index 23be37b8d29..2bbcb30415f 100644 --- a/ace/OS_NS_sys_time.h +++ b/ace/OS_NS_sys_time.h @@ -33,7 +33,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ #if defined (ACE_WIN32) && defined (_WIN32_WCE) // Something is a bit brain-damaged here and I'm not sure what... this code // compiled before the OS reorg for ACE 5.4. Since then it hasn't - eVC @@ -43,13 +46,17 @@ namespace ACE_OS { // - Steve Huston, 23-Aug-2004 extern "C++" { #endif + ACE_NAMESPACE_INLINE_FUNCTION ACE_Time_Value gettimeofday (void); + #if defined (ACE_WIN32) && defined (_WIN32_WCE) } #endif } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_time.inl b/ace/OS_NS_sys_time.inl index 6aec9b145dc..1d3b40936fb 100644 --- a/ace/OS_NS_sys_time.inl +++ b/ace/OS_NS_sys_time.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/os_include/sys/os_time.h" @@ -8,6 +9,8 @@ # include "ace/OS_NS_time.h" #endif /* VXWORKS || CHORUS || ACE_PSOS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) && defined (_WIN32_WCE) // Something is a bit brain-damaged here and I'm not sure what... this code // compiled before the OS reorg for ACE 5.4. Since then it hasn't - eVC @@ -89,3 +92,5 @@ ACE_OS::gettimeofday (void) #if defined (ACE_WIN32) && defined (_WIN32_WCE) } #endif + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_uio.cpp b/ace/OS_NS_sys_uio.cpp index 5b7563dc7fd..708ea5701a3 100644 --- a/ace/OS_NS_sys_uio.cpp +++ b/ace/OS_NS_sys_uio.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_uio.h" @@ -13,6 +12,8 @@ ACE_RCSID(ace, OS_NS_sys_uio, "$Id$") #include "ace/OS_NS_string.h" #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_LACKS_READV) // "Fake" readv for operating systems without it. Note that this is @@ -125,3 +126,5 @@ ACE_OS::writev_emulation (ACE_HANDLE handle, const iovec *iov, int n) return bytes_sent; } # endif /* ACE_LACKS_WRITEV */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_uio.h b/ace/OS_NS_sys_uio.h index 2978b95501f..597a06919d9 100644 --- a/ace/OS_NS_sys_uio.h +++ b/ace/OS_NS_sys_uio.h @@ -33,7 +33,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ ACE_NAMESPACE_INLINE_FUNCTION ssize_t readv (ACE_HANDLE handle, @@ -63,6 +66,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_uio.inl b/ace/OS_NS_sys_uio.inl index c216e9d0a8f..b8d112bba84 100644 --- a/ace/OS_NS_sys_uio.inl +++ b/ace/OS_NS_sys_uio.inl @@ -4,6 +4,8 @@ #include "ace/os_include/os_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ssize_t ACE_OS::readv (ACE_HANDLE handle, const iovec *iov, @@ -16,11 +18,11 @@ ACE_OS::readv (ACE_HANDLE handle, -1); #else /* ACE_LACKS_READV */ #if defined (ACE_HAS_NONCONST_READV) - ACE_OSCALL_RETURN (::readv (handle, - const_cast<iovec *>(iov), + ACE_OSCALL_RETURN (::readv (handle, + const_cast<iovec *>(iov), iovlen), ssize_t, -1); #else - ACE_OSCALL_RETURN (::readv (handle, + ACE_OSCALL_RETURN (::readv (handle, iov, iovlen), ssize_t, -1); #endif /* ACE_HAS_NONCONST_READV */ @@ -49,3 +51,5 @@ ACE_OS::writev (ACE_HANDLE handle, #endif /* ACE_HAS_NONCONST_WRITEV */ #endif /* ACE_LACKS_WRITEV */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_utsname.cpp b/ace/OS_NS_sys_utsname.cpp index be9c24a089c..ca2b23cf5d5 100644 --- a/ace/OS_NS_sys_utsname.cpp +++ b/ace/OS_NS_sys_utsname.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_utsname.h" @@ -15,9 +14,11 @@ ACE_RCSID(ace, OS_NS_sys_utsname, "$Id$") #if defined (VXWORKS) // for sysBspRev(), sysModel() -# include /**/ <sysLib.h> +# include /**/ <sysLib.h> #endif /* VXWORKS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) || defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS) // Don't inline on those platforms because this function contains // string literals, and some compilers, e.g., g++, don't handle those @@ -234,3 +235,5 @@ ACE_OS::uname (ACE_utsname *name) #endif /* ACE_WIN32 */ } #endif /* ACE_WIN32 || VXWORKS */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_utsname.h b/ace/OS_NS_sys_utsname.h index b65268a37f4..82394184bdd 100644 --- a/ace/OS_NS_sys_utsname.h +++ b/ace/OS_NS_sys_utsname.h @@ -39,6 +39,7 @@ # if !defined (_SYS_NMLN) # define _SYS_NMLN SYS_NMLN # endif /* _SYS_NMLN */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL struct ACE_utsname { ACE_TCHAR sysname[_SYS_NMLN]; @@ -47,11 +48,16 @@ struct ACE_utsname ACE_TCHAR version[_SYS_NMLN]; ACE_TCHAR machine[_SYS_NMLN]; }; +ACE_END_VERSIONED_NAMESPACE_DECL # else # include "ace/os_include/sys/os_utsname.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef struct utsname ACE_utsname; +ACE_END_VERSIONED_NAMESPACE_DECL # endif /* ACE_LACKS_UTSNAME_T */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { #if !defined (ACE_WIN32) && !defined (VXWORKS) && !defined (CHORUS) && !defined (ACE_PSOS) @@ -63,6 +69,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_utsname.inl b/ace/OS_NS_sys_utsname.inl index eb660f2cad6..b0eca7f659d 100644 --- a/ace/OS_NS_sys_utsname.inl +++ b/ace/OS_NS_sys_utsname.inl @@ -4,6 +4,8 @@ #include "ace/os_include/os_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { #if !defined (ACE_WIN32) && !defined (VXWORKS) && !defined (CHORUS) && !defined (ACE_PSOS) @@ -31,3 +33,5 @@ namespace ACE_OS } #endif /* ! ACE_WIN32 && ! VXWORKS && ! CHORUS */ } // namespace ACE_OS + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_sys_wait.cpp b/ace/OS_NS_sys_wait.cpp index 0a1b8ee4d50..0e0e6abcbe1 100644 --- a/ace/OS_NS_sys_wait.cpp +++ b/ace/OS_NS_sys_wait.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_sys_wait.h" diff --git a/ace/OS_NS_sys_wait.h b/ace/OS_NS_sys_wait.h index 5fccad22916..8a9248f19f0 100644 --- a/ace/OS_NS_sys_wait.h +++ b/ace/OS_NS_sys_wait.h @@ -33,7 +33,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ /// Calls OS <::wait> function, so it's only portable to UNIX/POSIX /// platforms. @@ -71,6 +74,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_sys_wait.inl b/ace/OS_NS_sys_wait.inl index 85afcb961ce..d8d3247cbcf 100644 --- a/ace/OS_NS_sys_wait.inl +++ b/ace/OS_NS_sys_wait.inl @@ -1,9 +1,12 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE pid_t ACE_OS::wait (int *status) { @@ -109,4 +112,4 @@ ACE_OS::wait (pid_t pid, handle); } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_time.cpp b/ace/OS_NS_time.cpp index 1ff3be39f7f..ffcce8dec0f 100644 --- a/ace/OS_NS_time.cpp +++ b/ace/OS_NS_time.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_time.h" @@ -18,26 +17,41 @@ ACE_RCSID(ace, OS_NS_time, "$Id$") #if defined (ACE_HAS_WINCE) # include "ace/OS_NS_stdio.h" /* Need ACE_OS::sprintf() */ -const ACE_TCHAR *ACE_OS::day_of_week_name[7] = - {ACE_LIB_TEXT ("Sun"), - ACE_LIB_TEXT ("Mon"), - ACE_LIB_TEXT ("Tue"), - ACE_LIB_TEXT ("Wed"), - ACE_LIB_TEXT ("Thu"), - ACE_LIB_TEXT ("Fri"), - ACE_LIB_TEXT ("Sat")}; - -const ACE_TCHAR *ACE_OS::month_name[12] = - {ACE_LIB_TEXT ("Jan"), ACE_LIB_TEXT ("Feb"), - ACE_LIB_TEXT ("Mar"), ACE_LIB_TEXT ("Apr"), - ACE_LIB_TEXT ("May"), ACE_LIB_TEXT ("Jun"), - ACE_LIB_TEXT ("Jul"), ACE_LIB_TEXT ("Aug"), - ACE_LIB_TEXT ("Sep"), ACE_LIB_TEXT ("Oct"), - ACE_LIB_TEXT ("Nov"), ACE_LIB_TEXT ("Dec") }; - -static const ACE_TCHAR *ACE_OS_CTIME_R_FMTSTR = ACE_LIB_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); + +namespace +{ + ACE_TCHAR const * const ACE_OS_day_of_week_name[] = + { + ACE_LIB_TEXT ("Sun"), + ACE_LIB_TEXT ("Mon"), + ACE_LIB_TEXT ("Tue"), + ACE_LIB_TEXT ("Wed"), + ACE_LIB_TEXT ("Thu"), + ACE_LIB_TEXT ("Fri"), + ACE_LIB_TEXT ("Sat") + }; + + ACE_TCHAR const * const ACE_OS_month_name[] = + { + ACE_LIB_TEXT ("Jan"), + ACE_LIB_TEXT ("Feb"), + ACE_LIB_TEXT ("Mar"), + ACE_LIB_TEXT ("Apr"), + ACE_LIB_TEXT ("May"), + ACE_LIB_TEXT ("Jun"), + ACE_LIB_TEXT ("Jul"), + ACE_LIB_TEXT ("Aug"), + ACE_LIB_TEXT ("Sep"), + ACE_LIB_TEXT ("Oct"), + ACE_LIB_TEXT ("Nov"), + ACE_LIB_TEXT ("Dec") + }; + + static ACE_TCHAR const ACE_OS_CTIME_R_FMTSTR[] = ACE_LIB_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n"); #endif /* ACE_HAS_WINCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_PSOS) // bit masks and shifts for prying info out of the pSOS time encoding @@ -237,8 +251,8 @@ ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) FileTimeToLocalFileTime (&file_time, &localtime); FileTimeToSystemTime (&localtime, &systime); ACE_OS::sprintf (buf, ACE_OS_CTIME_R_FMTSTR, - ACE_OS::day_of_week_name[systime.wDayOfWeek], - ACE_OS::month_name[systime.wMonth - 1], + ACE_OS_day_of_week_name[systime.wDayOfWeek], + ACE_OS_month_name[systime.wMonth - 1], systime.wDay, systime.wHour, systime.wMinute, @@ -791,3 +805,5 @@ ACE_OS::strptime_getnum (char *buf, } # endif /* ACE_LACKS_NATIVE_STRPTIME */ #endif /* ACE_HAS_STRPTIME */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_time.h b/ace/OS_NS_time.h index a9a4186a928..3f45bef6e44 100644 --- a/ace/OS_NS_time.h +++ b/ace/OS_NS_time.h @@ -40,6 +40,8 @@ # undef asctime_r # endif /* ACE_HAS_BROKEN_R_ROUTINES */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Type-safe, and unsigned. static const ACE_UINT32 ACE_U_ONE_SECOND_IN_MSECS = 1000U; static const ACE_UINT32 ACE_U_ONE_SECOND_IN_USECS = 1000000U; @@ -154,14 +156,14 @@ inline long ace_timezone() #elif defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) // The XPG/POSIX specification does not require gettimeofday to // set the timezone struct (it leaves the behavior of passing a - // non-null struct undefined). + // non-null struct undefined). long result = 0; struct timeval time; struct timezone zone; ACE_UNUSED_ARG (result); ACE_OSCALL (::gettimeofday (&time, &zone), int, -1, result); return zone.tz_minuteswest * 60; -#else +#else ACE_NOTSUP_RETURN (0); #endif } @@ -222,14 +224,10 @@ typedef long long ACE_hrtime_t; # define ACE_HRTIME_TO_U64(VAL) (VAL) # endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL -namespace ACE_OS { - -# if defined (ACE_HAS_WINCE) - /// Supporting data for ctime and ctime_r functions on WinCE. - const ACE_TCHAR *day_of_week_name[]; - const ACE_TCHAR *month_name[]; -# endif /* ACE_HAS_WINCE */ +namespace ACE_OS +{ # if defined (CHORUS) && !defined (CHORUS_4) // We must format this code as follows to avoid confusing OSE. @@ -265,7 +263,7 @@ namespace ACE_OS { ACE_NAMESPACE_INLINE_FUNCTION int clock_settime (clockid_t, - const struct timespec *); + const struct timespec *); ACE_NAMESPACE_INLINE_FUNCTION ACE_TCHAR *ctime (const time_t *t); @@ -356,6 +354,19 @@ namespace ACE_OS { //@} } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + && defined (ghs) \ + && defined (ACE_HAS_PENTIUM) \ + && !defined (ACE_WIN32) +#define ACE_GETHRTIME_NAME ACE_ ## ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _gethrtime) +#else +# define ACE_GETHRTIME_NAME ACE_gethrtime +#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ + + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_time.inl b/ace/OS_NS_time.inl index 3c17ea969c4..de085159658 100644 --- a/ace/OS_NS_time.inl +++ b/ace/OS_NS_time.inl @@ -1,4 +1,5 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_string.h" @@ -7,6 +8,8 @@ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_sys_time.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE char * ACE_OS::asctime (const struct tm *t) { @@ -216,7 +219,7 @@ ACE_OS::difftime (time_t t1, time_t t0) #endif /* ! ACE_LACKS_DIFFTIME */ #if defined (ghs) && defined (ACE_HAS_PENTIUM) && !defined (ACE_WIN32) - extern "C" ACE_hrtime_t ACE_gethrtime (); + extern "C" ACE_hrtime_t ACE_GETHRTIME_NAME (); #endif /* ghs && ACE_HAS_PENTIUM */ ACE_INLINE ACE_hrtime_t @@ -237,7 +240,7 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) #elif defined (ghs) && defined (ACE_HAS_PENTIUM) && !defined (ACE_WIN32) ACE_UNUSED_ARG (op); // Use .obj/gethrtime.o, which was compiled with g++. - return ACE_gethrtime (); + return ACE_GETHRTIME_NAME (); #elif (defined(__KCC) || defined (__GNUG__) || defined (__INTEL_COMPILER)) && !defined (ACE_WIN32) && !defined(ACE_VXWORKS) && defined (ACE_HAS_PENTIUM) ACE_UNUSED_ARG (op); # if defined (ACE_LACKS_LONGLONG_T) @@ -554,3 +557,5 @@ ACE_OS::tzset (void) errno = ENOTSUP; # endif /* ACE_HAS_WINCE && !VXWORKS && !ACE_PSOS && !__rtems__ && !ACE_HAS_DINKUM_STL */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_unistd.cpp b/ace/OS_NS_unistd.cpp index 93221770440..c38bf483f48 100644 --- a/ace/OS_NS_unistd.cpp +++ b/ace/OS_NS_unistd.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_unistd.h" @@ -39,6 +38,8 @@ ftruncate (ACE_HANDLE handle, long len) /*****************************************************************************/ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_OS::argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf, @@ -311,7 +312,7 @@ ACE_OS::num_processors (void) int num_processors; int mib[2] = { CTL_HW, HW_NCPU }; size_t len = sizeof (num_processors); - + sysctl(mib, 2, &num_processors, &len, NULL, 0); return num_processors; #else @@ -342,7 +343,7 @@ ACE_OS::num_processors_online (void) int num_processors; int mib[2] = { CTL_HW, HW_NCPU }; size_t len = sizeof (num_processors); - + sysctl(mib, 2, &num_processors, &len, NULL, 0); return num_processors; #else @@ -776,3 +777,4 @@ ACE_OS::write_n (ACE_HANDLE handle, return bytes_transferred; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_unistd.h b/ace/OS_NS_unistd.h index 5ec959b713c..43157b80266 100644 --- a/ace/OS_NS_unistd.h +++ b/ace/OS_NS_unistd.h @@ -41,7 +41,10 @@ extern "C" ACE_Export int ftruncate (ACE_HANDLE handle, long len); #endif /* ACE_NEEDS_FTRUNCATE */ -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ ACE_NAMESPACE_INLINE_FUNCTION int access (const char *path, int amode); @@ -342,6 +345,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl index 49329c034ee..51ddb61ce9f 100644 --- a/ace/OS_NS_unistd.inl +++ b/ace/OS_NS_unistd.inl @@ -22,6 +22,8 @@ # include "ace/os_include/os_unistd.h" #endif /* VXWORKS || ACE_HAS_WINCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_OS::access (const char *path, int amode) { @@ -1350,3 +1352,5 @@ ACE_OS::write (ACE_HANDLE handle, return ACE_OS::write (handle, buf, nbyte); #endif /* ACE_WIN32 */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_wchar.cpp b/ace/OS_NS_wchar.cpp index 5e09dfc0a8d..bc6fd7bae93 100644 --- a/ace/OS_NS_wchar.cpp +++ b/ace/OS_NS_wchar.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_NS_wchar.h" @@ -51,6 +50,8 @@ ACE_RCSID(ace, OS_NS_wchar, "$Id$") * SUCH DAMAGE. */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_WCHAR) && defined (ACE_LACKS_WCSCAT) wchar_t * ACE_OS::wcscat_emulation (wchar_t *destination, @@ -373,3 +374,4 @@ ACE_OS::wcsstr_emulation (const wchar_t *string, } #endif /* ACE_HAS_WCHAR && ACE_LACKS_WCSSTR */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_NS_wchar.h b/ace/OS_NS_wchar.h index 3c8d5756fa1..55999db6e59 100644 --- a/ace/OS_NS_wchar.h +++ b/ace/OS_NS_wchar.h @@ -37,7 +37,10 @@ #endif #define ACE_EXPORT_MACRO ACE_Export -namespace ACE_OS { +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +namespace ACE_OS +{ typedef ACE_WCHAR_T WChar; @@ -182,6 +185,8 @@ namespace ACE_OS { } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_NS_wchar.inl b/ace/OS_NS_wchar.inl index c25d5159b53..7f2abac8d8f 100644 --- a/ace/OS_NS_wchar.inl +++ b/ace/OS_NS_wchar.inl @@ -1,6 +1,9 @@ // -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_WCHAR) ACE_INLINE wint_t ACE_OS::fgetwc (FILE* fp) @@ -81,3 +84,4 @@ ACE_OS::ungetwc (wint_t c, FILE* fp) } #endif /* ACE_HAS_WCHAR */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_QoS.cpp b/ace/OS_QoS.cpp index 8240231b9c5..0b2c23f11c6 100644 --- a/ace/OS_QoS.cpp +++ b/ace/OS_QoS.cpp @@ -13,6 +13,8 @@ #include "ace/OS_QoS.h" #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Flow_Spec::ACE_Flow_Spec (unsigned long token_rate, unsigned long token_bucket_size, unsigned long peak_bandwidth, @@ -470,3 +472,5 @@ ACE_Accept_QoS_Params::callback_data (unsigned long cd) { this->callback_data_ = cd; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_QoS.h b/ace/OS_QoS.h index 7a58dec9a6c..c8df7c58eec 100644 --- a/ace/OS_QoS.h +++ b/ace/OS_QoS.h @@ -5,9 +5,9 @@ * @file OS_QoS.h * * $Id$ - * + * * @brief Contains OS specific data structures for QoS networking. - * + * * @author Craig Rodrigues <crodrigu@bbn.com> */ //============================================================================= @@ -25,6 +25,8 @@ #include "ace/os_include/sys/os_uio.h" #include "ace/OS_NS_stropts.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) #if defined (ACE_HAS_WINSOCK2_GQOS) typedef SERVICETYPE ACE_SERVICE_TYPE; @@ -384,6 +386,7 @@ private: unsigned long callback_data_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" #endif /* ACE_OS_QOS_H */ diff --git a/ace/OS_TLI.h b/ace/OS_TLI.h index 130c276904e..fbacd2a5c9a 100644 --- a/ace/OS_TLI.h +++ b/ace/OS_TLI.h @@ -147,6 +147,8 @@ extern "C" { # endif /* ACE_HAS_XTI || ACE_HAS_TLI */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @namespace ACE_OS * @@ -260,6 +262,8 @@ namespace ACE_OS } /* namespace ACE_OS */ +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_INLINED_OSCALLS) # if defined (ACE_INLINE) # undef ACE_INLINE diff --git a/ace/OS_TLI.inl b/ace/OS_TLI.inl index 307a53f6fa0..e76fd2bc0d3 100644 --- a/ace/OS_TLI.inl +++ b/ace/OS_TLI.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + namespace ACE_OS { ACE_INLINE int @@ -383,3 +386,5 @@ t_unbind (ACE_HANDLE handle) } } /* end namespace ACE_OS */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_Thread_Adapter.cpp b/ace/OS_Thread_Adapter.cpp index 1f7e94a2890..1bdeacc24ee 100644 --- a/ace/OS_Thread_Adapter.cpp +++ b/ace/OS_Thread_Adapter.cpp @@ -11,6 +11,8 @@ ACE_RCSID (ace, #include "ace/Global_Macros.h" #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_OS_Thread_Adapter::ACE_OS_Thread_Adapter ( ACE_THR_FUNC user_func , void *arg @@ -171,3 +173,5 @@ ACE_OS_Thread_Adapter::invoke (void) return status; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/OS_Thread_Adapter.h b/ace/OS_Thread_Adapter.h index 73ad99989e6..3776339b2a7 100644 --- a/ace/OS_Thread_Adapter.h +++ b/ace/OS_Thread_Adapter.h @@ -1,3 +1,4 @@ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +22,8 @@ #include "ace/ACE_export.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_OS_Thread_Adapter * @@ -42,7 +45,7 @@ public: /// Constructor. ACE_OS_Thread_Adapter (ACE_THR_FUNC user_func, void *arg, - ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ace_thread_adapter + ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME # if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) , ACE_SEH_EXCEPT_HANDLER selector = 0 , ACE_SEH_EXCEPT_HANDLER handler = 0 @@ -56,15 +59,14 @@ public: */ virtual ACE_THR_FUNC_RETURN invoke (void); -private: - /// Ensure that this object must be allocated on the heap. +protected: + + /// Ensure that this object is allocated on the heap. ~ACE_OS_Thread_Adapter (void); -private: - /// Friend declaration to avoid compiler warning: only defines a private - /// destructor and has no friends. - friend class ACE_Thread_Adapter_Has_Private_Destructor; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_THREAD_ADAPTER_H */ diff --git a/ace/OS_main.cpp b/ace/OS_main.cpp index 62cc9ff3148..c94728d7326 100644 --- a/ace/OS_main.cpp +++ b/ace/OS_main.cpp @@ -1,4 +1,3 @@ -// -*- C++ -*- // $Id$ #include "ace/OS_main.h" @@ -70,6 +69,8 @@ ACE_MAIN () /* user's entry point, e.g., "main" w/out argc, argv */ # endif /* ACE_PSOSIM */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_VXWORKS) ace_main_proc_ptr vx_ace_main_i_ptr = 0; @@ -139,4 +140,7 @@ int ACE_Main_Base::run (HINSTANCE, } # endif /* !ACE_HAS_WINCE */ + +ACE_END_VERSIONED_NAMESPACE_DECL + # endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */ diff --git a/ace/OS_main.h b/ace/OS_main.h index a47e4b069e2..c2a5113e409 100644 --- a/ace/OS_main.h +++ b/ace/OS_main.h @@ -108,6 +108,9 @@ ace_main_i # elif !defined (ACE_HAS_WINCE) # if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Export ACE_Main_Base { public: @@ -132,8 +135,12 @@ ACE_WMAIN (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., wmain */ \ int \ ace_wmain_i +ACE_END_VERSIONED_NAMESPACE_DECL + # else /* ! (ACE_WIN32 && ACE_USES_WCHAR) */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Export ACE_Main_Base { public: @@ -158,10 +165,14 @@ ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., wmain */ \ int \ ace_main_i +ACE_END_VERSIONED_NAMESPACE_DECL + # endif /* ACE_WIN32 && ACE_USES_WCHAR */ # else /* ACE_HAS_WINCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Export ACE_Main_Base { public: @@ -169,6 +180,8 @@ public: virtual int run_i (int, ACE_TCHAR *[]) = 0; }; +ACE_END_VERSIONED_NAMESPACE_DECL + # if defined (ACE_TMAIN) // Use WinMain on CE; others give warning/error. # undef ACE_TMAIN # endif // ACE_TMAIN diff --git a/ace/PI_Malloc.cpp b/ace/PI_Malloc.cpp index fbe0d925e6f..46ff39867d6 100644 --- a/ace/PI_Malloc.cpp +++ b/ace/PI_Malloc.cpp @@ -17,6 +17,8 @@ ACE_RCSID (ace, #include "ace/Process_Mutex.h" #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_PI_Control_Block::ACE_Malloc_Header::dump (void) const { @@ -172,6 +174,8 @@ template class ACE_Based_Pointer<ACE_PI_Control_Block::ACE_Name_Node>; #pragma instantiate ACE_Based_Pointer<ACE_PI_Control_Block::ACE_Name_Node> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1*/ #endif /* ACE_PI_MALLOC_CPP */ diff --git a/ace/PI_Malloc.h b/ace/PI_Malloc.h index 6306b76708c..6908e77856e 100644 --- a/ace/PI_Malloc.h +++ b/ace/PI_Malloc.h @@ -32,6 +32,8 @@ #include "ace/Malloc.h" #include "ace/Based_Pointer_T.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // prepare for position independent malloc /** * @class ACE_PI_Control_Block @@ -195,6 +197,8 @@ private: ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Control_Block &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/PI_Malloc.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/PI_Malloc.inl b/ace/PI_Malloc.inl index b082b523618..1cb78d466e1 100644 --- a/ace/PI_Malloc.inl +++ b/ace/PI_Malloc.inl @@ -1,6 +1,11 @@ +// -*- C++ -*- +// // $Id$ #if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_PI_Control_Block::ACE_Name_Node::~ACE_Name_Node (void) { @@ -21,5 +26,8 @@ ACE_PI_Control_Block::ACE_Name_Node::init_ptr new ((void *) ptr) NAME_NODE_PTR (base_addr, 0); *ptr = init; } + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp index 9013b577e33..3fbcbe9adee 100644 --- a/ace/POSIX_Asynch_IO.cpp +++ b/ace/POSIX_Asynch_IO.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + size_t ACE_POSIX_Asynch_Result::bytes_transferred (void) const { @@ -2492,8 +2494,8 @@ template class ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Res #pragma instantiate ACE_Map_Const_Iterator<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX> #pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_POSIX_Asynch_Connect_Result *, ACE_SYNCH_NULL_MUTEX> - #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_AIO_CALLS */ diff --git a/ace/POSIX_Asynch_IO.h b/ace/POSIX_Asynch_IO.h index e25219070c4..57eb53e169c 100644 --- a/ace/POSIX_Asynch_IO.h +++ b/ace/POSIX_Asynch_IO.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -40,6 +40,8 @@ #include "ace/Null_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations class ACE_POSIX_Proactor; class ACE_Proactor_Impl; @@ -1296,5 +1298,7 @@ protected: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_AIO_CALLS */ #endif /* ACE_POSIX_ASYNCH_IO_H */ diff --git a/ace/POSIX_CB_Proactor.cpp b/ace/POSIX_CB_Proactor.cpp index 0c4df22b45e..9dc9f8a886a 100644 --- a/ace/POSIX_CB_Proactor.cpp +++ b/ace/POSIX_CB_Proactor.cpp @@ -13,6 +13,7 @@ ACE_RCSID (ace, POSIX_CB_Proactor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_POSIX_CB_Proactor::ACE_POSIX_CB_Proactor (size_t max_aio_operations) : ACE_POSIX_AIOCB_Proactor (max_aio_operations, @@ -178,4 +179,6 @@ ACE_POSIX_CB_Proactor::handle_events_i (u_long milli_seconds) return ret_aio + ret_que > 0 ? 1 : 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_AIO_CALLS && !__Lynx__ && !__FreeBSD__ */ diff --git a/ace/POSIX_CB_Proactor.h b/ace/POSIX_CB_Proactor.h index 6021b32a04f..f12b106c320 100644 --- a/ace/POSIX_CB_Proactor.h +++ b/ace/POSIX_CB_Proactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -31,6 +31,8 @@ typedef union sigval sigval_t; #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_POSIX_CB_Proactor * @@ -92,5 +94,7 @@ protected: ACE_SYNCH_SEMAPHORE sema_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_AIO_CALLS && !__Lynx__ && !__FreeBSD__ */ #endif /* ACE_POSIX_CB_PROACTOR_H*/ diff --git a/ace/POSIX_Proactor.cpp b/ace/POSIX_Proactor.cpp index f6bd0c26f86..c3e287945c8 100644 --- a/ace/POSIX_Proactor.cpp +++ b/ace/POSIX_Proactor.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ // $Id$ #include "ace/POSIX_Proactor.h" @@ -27,6 +26,9 @@ #endif /* sun */ // ********************************************************************* + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_POSIX_Wakeup_Completion * @@ -34,7 +36,7 @@ * ACE_Proactor interface to wake up all the threads blocking * for completions. */ -class ACE_Export ACE_POSIX_Wakeup_Completion : public ACE_POSIX_Asynch_Result +class ACE_POSIX_Wakeup_Completion : public ACE_POSIX_Asynch_Result { public: /// Constructor. @@ -624,7 +626,7 @@ ACE_POSIX_Proactor::get_impl_type (void) * message block to another <accept>, we update <wr_ptr> and put * it in its initial position. */ -class ACE_Export ACE_AIOCB_Notify_Pipe_Manager : public ACE_Handler +class ACE_AIOCB_Notify_Pipe_Manager : public ACE_Handler { public: /// Constructor. You need the posix proactor because you need to call @@ -1698,7 +1700,7 @@ ACE_POSIX_Proactor::Proactor_Type ACE_POSIX_SIG_Proactor::get_impl_type (void) { return PROACTOR_SIG; -} +} int ACE_POSIX_SIG_Proactor::handle_events (ACE_Time_Value &wait_time) @@ -2057,5 +2059,6 @@ ACE_POSIX_Wakeup_Completion::complete (size_t /* bytes_transferred */, handler->handle_wakeup (); } +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_AIO_CALLS */ diff --git a/ace/POSIX_Proactor.h b/ace/POSIX_Proactor.h index 0bacb0ee2db..a984321caea 100644 --- a/ace/POSIX_Proactor.h +++ b/ace/POSIX_Proactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -36,6 +36,8 @@ #define ACE_AIO_MAX_SIZE 2048 #define ACE_AIO_DEFAULT_SIZE 1024 +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_POSIX_Proactor * @@ -649,6 +651,8 @@ protected: ACE_Time_Value time_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/POSIX_Proactor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/POSIX_Proactor.inl b/ace/POSIX_Proactor.inl index eb358c0b8ae..ae5f727c2a8 100644 --- a/ace/POSIX_Proactor.inl +++ b/ace/POSIX_Proactor.inl @@ -2,8 +2,12 @@ // // $Id$ -ACE_INLINE +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_INLINE ACE_Asynch_Pseudo_Task& ACE_POSIX_Proactor::get_asynch_pseudo_task (void) { return this->pseudo_task_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Pagefile_Memory_Pool.cpp b/ace/Pagefile_Memory_Pool.cpp index 365140b6ed1..125dd041f9e 100644 --- a/ace/Pagefile_Memory_Pool.cpp +++ b/ace/Pagefile_Memory_Pool.cpp @@ -29,10 +29,13 @@ ACE_RCSID(ace, Pagefile_Memory_Pool, "$Id$") #else //if !defined (ACE_HAS_WINCE) #define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd)\ MapViewOfFile (_hnd, _access, _offHigh, _offLow, _nBytes) -#endif /* !defined (ACE_HAS_WINCE) */ +#endif /* !ACE_HAS_WINCE */ -ACE_Pagefile_Memory_Pool_Options::ACE_Pagefile_Memory_Pool_Options (void *base_addr, - size_t max_size) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Pagefile_Memory_Pool_Options::ACE_Pagefile_Memory_Pool_Options ( + void *base_addr, + size_t max_size) : base_addr_ (base_addr), max_size_ (max_size) { @@ -66,7 +69,7 @@ ACE_Pagefile_Memory_Pool::ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_sto { this->local_cb_.req_base_ = 0; this->local_cb_.mapped_base_ = 0; - this->local_cb_.sh_.max_size_ = + this->local_cb_.sh_.max_size_ = this->round_to_chunk_size (page_size_) ; this->local_cb_.sh_.mapped_size_ = 0; this->local_cb_.sh_.free_offset_ = @@ -376,5 +379,7 @@ ACE_Pagefile_Memory_Pool::map (int &first_time, return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 */ diff --git a/ace/Pagefile_Memory_Pool.h b/ace/Pagefile_Memory_Pool.h index 472e1a8731d..6033698d305 100644 --- a/ace/Pagefile_Memory_Pool.h +++ b/ace/Pagefile_Memory_Pool.h @@ -32,6 +32,8 @@ #include "ace/ACE.h" #include "ace/os_include/sys/os_mman.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Pagefile_Memory_Pool_Options * @@ -191,6 +193,8 @@ private: ACE_TCHAR backing_store_name_[MAXPATHLEN]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 */ #if defined (__ACE_INLINE__) diff --git a/ace/Pagefile_Memory_Pool.inl b/ace/Pagefile_Memory_Pool.inl index db8d7a00aa4..cf54da23f29 100644 --- a/ace/Pagefile_Memory_Pool.inl +++ b/ace/Pagefile_Memory_Pool.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #if defined (ACE_WIN32) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE size_t ACE_Pagefile_Memory_Pool::round_to_chunk_size (size_t nbytes) { @@ -45,4 +48,7 @@ ACE_Pagefile_Memory_Pool::base_addr (void) const { return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 */ diff --git a/ace/Pair.cpp b/ace/Pair.cpp deleted file mode 100644 index fce14f96302..00000000000 --- a/ace/Pair.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Pair.cpp -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#include "ace/Pair_T.h" - -ACE_RCSID(ace, Pair, "$Id$") - diff --git a/ace/Pair.h b/ace/Pair.h index b4a865c35f4..be0a78a87d9 100644 --- a/ace/Pair.h +++ b/ace/Pair.h @@ -6,6 +6,8 @@ * * $Id$ * + * ACE_Pair<> convenience header. + * * @author Irfan Pyarali */ //============================================================================= diff --git a/ace/Pair_T.cpp b/ace/Pair_T.cpp index eb4e10b33ac..fd38f8236ef 100644 --- a/ace/Pair_T.cpp +++ b/ace/Pair_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_PAIR_T_C -#define ACE_PAIR_T_C +#ifndef ACE_PAIR_T_CPP +#define ACE_PAIR_T_CPP #include "ace/Pair_T.h" @@ -13,6 +13,4 @@ #include "ace/Pair_T.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Pair_T, "$Id$") - -#endif /* ACE_PAIR_T_C */ +#endif /* ACE_PAIR_T_CPP */ diff --git a/ace/Pair_T.h b/ace/Pair_T.h index 37147794fd9..8c8c89f5c2e 100644 --- a/ace/Pair_T.h +++ b/ace/Pair_T.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Pair * @@ -109,6 +111,8 @@ protected: T2 &second_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Pair_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Pair_T.inl b/ace/Pair_T.inl index dafbb222cca..4ce4a4acae4 100644 --- a/ace/Pair_T.inl +++ b/ace/Pair_T.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class T1, class T2> ACE_INLINE ACE_Pair<T1, T2>::ACE_Pair (const T1 &t1, const T2 &t2) @@ -84,3 +86,5 @@ ACE_Reference_Pair<T1, T2>::operator== (const ACE_Reference_Pair<T1, T2> &rhs) c return (this->first_ == rhs.first_ && this->second_ == rhs.second_); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index e1923a02e61..e21fa47b40e 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -15,12 +15,13 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_Stream_Node) // Provide the class hierarchy that defines the parse tree of Service // Nodes. - void ACE_Stream_Node::dump (void) const { @@ -740,4 +741,6 @@ ACE_Static_Function_Node::~ACE_Static_Function_Node (void) delete[] const_cast<ACE_TCHAR *> (this->function_name_); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h index 5d7b5109de8..55d1ff6e34b 100644 --- a/ace/Parse_Node.h +++ b/ace/Parse_Node.h @@ -26,6 +26,7 @@ #include "ace/DLL.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /// Forward declarations. class ACE_Service_Config; @@ -391,6 +392,8 @@ private: /// program. extern ACE_Service_Config *ace_this_svc; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ #include /**/ "ace/post.h" diff --git a/ace/Ping_Socket.cpp b/ace/Ping_Socket.cpp index 9d1254a1bc3..810a14408d5 100644 --- a/ace/Ping_Socket.cpp +++ b/ace/Ping_Socket.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, Ping_Socket, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_Ping_Socket) //--------------------------------------------------------------------------- @@ -362,4 +364,6 @@ ACE_Ping_Socket::make_echo_check (ACE_INET_Addr & remote_addr, return this->receive_echo_reply (timeout); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_ICMP_SUPPORT == 1 */ diff --git a/ace/Ping_Socket.h b/ace/Ping_Socket.h index 943cd8d55a8..dc473495f67 100644 --- a/ace/Ping_Socket.h +++ b/ace/Ping_Socket.h @@ -26,6 +26,8 @@ #include "ace/ICMP_Socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_INET_Addr; /** @@ -104,6 +106,8 @@ private: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) # include "ace/Ping_Socket.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Ping_Socket.inl b/ace/Ping_Socket.inl index 27507dacdce..c331b21cea7 100644 --- a/ace/Ping_Socket.inl +++ b/ace/Ping_Socket.inl @@ -2,8 +2,12 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE char * ACE_Ping_Socket::icmp_recv_buff (void) { return this->icmp_recv_buff_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Pipe.cpp b/ace/Pipe.cpp index 9a94c458130..6bc6d1998be 100644 --- a/ace/Pipe.cpp +++ b/ace/Pipe.cpp @@ -19,6 +19,8 @@ ACE_RCSID(ace, Pipe, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Pipe::dump (void) const { @@ -333,3 +335,5 @@ ACE_Pipe::recv (size_t n, ...) const va_end (argp); return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Pipe.h b/ace/Pipe.h index f8f103dd9f0..7f208615da9 100644 --- a/ace/Pipe.h +++ b/ace/Pipe.h @@ -26,6 +26,8 @@ #include "ace/OS_NS_sys_uio.h" #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. class ACE_Message_Block; class ACE_Time_Value; @@ -37,7 +39,7 @@ class ACE_Time_Value; * * This class is designed to work with select()-based demuxers, such * as the ACE_Select_Reactor, which is why it uses sockets on Windows - * rather than Win32 pipes (which aren't select()'able). + * rather than Win32 pipes (which aren't select()'able). */ class ACE_Export ACE_Pipe { @@ -152,6 +154,8 @@ private: ACE_HANDLE handles_[2]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Pipe.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Pipe.inl b/ace/Pipe.inl index c5e31cc7061..15328c22a75 100644 --- a/ace/Pipe.inl +++ b/ace/Pipe.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Global_Macros.h" #include "ace/ACE.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Pipe::~ACE_Pipe (void) { @@ -181,3 +184,5 @@ ACE_Pipe::recv (void *buf, size_t n, return ACE_OS::read (this->read_handle (), (char *) buf, n, overlapped); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Priority_Reactor.cpp b/ace/Priority_Reactor.cpp index 8a996fdf79e..5e26b62948c 100644 --- a/ace/Priority_Reactor.cpp +++ b/ace/Priority_Reactor.cpp @@ -5,6 +5,8 @@ ACE_RCSID(ace, Priority_Reactor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + typedef ACE_Unbounded_Queue_Iterator<ACE_Event_Tuple> QUEUE_ITERATOR; // Its iterator. @@ -194,3 +196,5 @@ template class ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >; #pragma instantiate ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> > > #pragma instantiate ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Priority_Reactor.h b/ace/Priority_Reactor.h index dde598daa9e..3c4bc2917e5 100644 --- a/ace/Priority_Reactor.h +++ b/ace/Priority_Reactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -28,6 +28,8 @@ #include "ace/Select_Reactor.h" #include "ace/Unbounded_Queue.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Priority_Reactor * @@ -96,5 +98,7 @@ private: ACE_Priority_Reactor &operator = (const ACE_Priority_Reactor &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_PRIORITY_REACTOR_H */ diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp index c8012d7727b..0aaead3d025 100644 --- a/ace/Proactor.cpp +++ b/ace/Proactor.cpp @@ -38,6 +38,8 @@ ACE_RCSID (ace, #include "ace/Auto_Event.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /// Process-wide ACE_Proactor. ACE_Proactor *ACE_Proactor::proactor_ = 0; @@ -1236,4 +1238,6 @@ ACE_Proactor::event_loop_done (void) return sig_atomic_t (1); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/ diff --git a/ace/Proactor.h b/ace/Proactor.h index d05ad406ad0..3bc0a1a83d3 100644 --- a/ace/Proactor.h +++ b/ace/Proactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -37,6 +37,8 @@ # include "ace/Timer_Heap.h" # include "ace/Timer_Wheel.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations. class ACE_Proactor_Impl; class ACE_Proactor_Timer_Handler; @@ -676,6 +678,8 @@ public: static sig_atomic_t event_loop_done (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS*/ #include /**/ "ace/post.h" diff --git a/ace/Proactor.inl b/ace/Proactor.inl index c4c29697efc..37b887c14d6 100644 --- a/ace/Proactor.inl +++ b/ace/Proactor.inl @@ -1,11 +1,14 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Proactor::run_event_loop (void) { ACE_TRACE ("ACE_Proactor::run_event_loop"); - ACE_Proactor *p = ACE_Proactor::instance (); + ACE_Proactor * const p = ACE_Proactor::instance (); if (p == 0) return -1; @@ -17,12 +20,12 @@ ACE_INLINE int ACE_Proactor::run_event_loop (ACE_Time_Value &tv) { ACE_TRACE ("ACE_Proactor::run_event_loop (tv)"); - ACE_Proactor *p = ACE_Proactor::instance (); + ACE_Proactor * const p = ACE_Proactor::instance (); if (p == 0) return -1; - return p->proactor_run_event_loop + return p->proactor_run_event_loop (tv, ACE_Proactor::check_reconfiguration); } @@ -30,7 +33,7 @@ ACE_INLINE int ACE_Proactor::reset_event_loop(void) { ACE_TRACE ("ACE_Proactor::reset_event_loop"); - ACE_Proactor *p = ACE_Proactor::instance (); + ACE_Proactor * const p = ACE_Proactor::instance (); if (p == 0) return -1; @@ -42,7 +45,7 @@ ACE_INLINE int ACE_Proactor::end_event_loop (void) { ACE_TRACE ("ACE_Proactor::end_event_loop"); - ACE_Proactor *p = ACE_Proactor::instance (); + ACE_Proactor * const p = ACE_Proactor::instance (); if (p == 0) return -1; @@ -54,7 +57,7 @@ ACE_INLINE int ACE_Proactor::event_loop_done (void) { ACE_TRACE ("ACE_Proactor::event_loop_done"); - ACE_Proactor *p = ACE_Proactor::instance (); + ACE_Proactor * const p = ACE_Proactor::instance (); if (p == 0) return -1; @@ -66,10 +69,12 @@ ACE_INLINE int ACE_Proactor::post_wakeup_completions (int how_many) { ACE_TRACE ("ACE_Proactor::post_wakeup_completions"); - ACE_Proactor *p = ACE_Proactor::instance (); + ACE_Proactor * const p = ACE_Proactor::instance (); if (p == 0) return -1; return p->proactor_post_wakeup_completions (how_many); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Proactor_Impl.cpp b/ace/Proactor_Impl.cpp index 9d8a3b08377..0ab848c5920 100644 --- a/ace/Proactor_Impl.cpp +++ b/ace/Proactor_Impl.cpp @@ -3,15 +3,19 @@ #include "ace/Proactor_Impl.h" ACE_RCSID (ace, - Proactor_Impl, - "$Id$") + Proactor_Impl, + "$Id$") #if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))) // This only works on Win32 platforms and on Unix platforms supporting // aio calls. -ACE_Proactor_Impl::~ACE_Proactor_Impl() +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Proactor_Impl::~ACE_Proactor_Impl (void) { } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif diff --git a/ace/Proactor_Impl.h b/ace/Proactor_Impl.h index 262d3e66da3..c0e97268cb0 100644 --- a/ace/Proactor_Impl.h +++ b/ace/Proactor_Impl.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -26,6 +26,8 @@ #include "ace/Reactor.h" #include "ace/Countdown_Time.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Proactor_Impl * @@ -50,7 +52,7 @@ public: /// This method adds the <handle> to the I/O completion port. This /// function is a no-op function for Unix systems. virtual int register_handle (ACE_HANDLE handle, - const void *completion_key) = 0; + const void *completion_key) = 0; /** * Dispatch a single set of events. If <wait_time> elapses before @@ -256,6 +258,8 @@ public: virtual int post_wakeup_completions (int how_many) = 0; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* (ACE_WIN32 && ACE_HAS_WINCE) || ACE_HAS_AIO_CALLS */ #include /**/ "ace/post.h" #endif /* ACE_PROACTOR_IMPL_H */ diff --git a/ace/Process.cpp b/ace/Process.cpp index 07abb9de2a4..1aa0adbd4e9 100644 --- a/ace/Process.cpp +++ b/ace/Process.cpp @@ -31,6 +31,7 @@ sigchld_nop (int, siginfo_t *, ucontext_t *) #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Process::ACE_Process (void) : @@ -1110,10 +1111,6 @@ ACE_Process_Options::passed_handles (ACE_Handle_Set &set) const return 1; } -ACE_Managed_Process::ACE_Managed_Process (void) -{ -} - ACE_Managed_Process::~ACE_Managed_Process (void) { } @@ -1123,3 +1120,5 @@ ACE_Managed_Process::unmanage (void) { delete this; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process.h b/ace/Process.h index b746c0beb81..b086c515bdd 100644 --- a/ace/Process.h +++ b/ace/Process.h @@ -30,6 +30,8 @@ #include "ace/Global_Macros.h" #include "ace/os_include/sys/os_types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declaration class ACE_Time_Value; @@ -587,19 +589,19 @@ protected: class ACE_Threads_Export ACE_Managed_Process : public ACE_Process { public: - ACE_Managed_Process (); /// Cleanup by deleting @c this. virtual void unmanage (void); -private: +protected: + /// Make sure that we're allocated dynamically! virtual ~ACE_Managed_Process (void); - /// Keep G++ happy... - friend class ace_dewarn_gplusplus; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Process.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Process.inl b/ace/Process.inl index db6f410e9b3..3b9b18f6429 100644 --- a/ace/Process.inl +++ b/ace/Process.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/ACE.h" @@ -7,6 +8,8 @@ #include "ace/OS_NS_pwd.h" #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) ACE_INLINE PROCESS_INFORMATION @@ -377,35 +380,33 @@ ACE_Process_Options::process_name (void) // under CE. They are not empty on most other platforms. ACE_INLINE int -ACE_Process_Options::setenv (ACE_TCHAR *envp[]) +ACE_Process_Options::setenv (ACE_TCHAR * /* envp */[]) { - ACE_UNUSED_ARG (envp); return -1; } ACE_INLINE int -ACE_Process_Options::setenv (const ACE_TCHAR *format, ...) +ACE_Process_Options::setenv (const ACE_TCHAR * /* format */, ...) { return -1; } ACE_INLINE int -ACE_Process_Options::setenv (const ACE_TCHAR *variable_name, - const ACE_TCHAR *format, +ACE_Process_Options::setenv (const ACE_TCHAR * /* variable_name */, + const ACE_TCHAR * /* format */, ...) { return -1; } ACE_INLINE int -ACE_Process_Options::set_handles (ACE_HANDLE std_in, - ACE_HANDLE std_out, - ACE_HANDLE std_err) +ACE_Process_Options::set_handles (ACE_HANDLE /* std_in */, + ACE_HANDLE /* std_out */, + ACE_HANDLE /* std_err */) { - ACE_UNUSED_ARG (std_in); - ACE_UNUSED_ARG (std_out); - ACE_UNUSED_ARG (std_err); return -1; } #endif /* ACE_HAS_WINCE */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp index bcadb08c49e..0ff40500091 100644 --- a/ace/Process_Manager.cpp +++ b/ace/Process_Manager.cpp @@ -32,6 +32,8 @@ ACE_Process_Manager_cleanup (void *instance, void *arg) } #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Process_Manager::cleanup (void *, void *) { @@ -977,3 +979,5 @@ ACE_Process_Manager::notify_proc_handler (size_t i, return 0; } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process_Manager.h b/ace/Process_Manager.h index 6a122b7b395..12e6170b12b 100644 --- a/ace/Process_Manager.h +++ b/ace/Process_Manager.h @@ -35,6 +35,8 @@ # include "ace/Recursive_Thread_Mutex.h" #endif /* ACE_HAS_THREADS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Reactor; /** @@ -402,6 +404,8 @@ private: #endif /* ACE_HAS_THREADS */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Process_Manager.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Process_Manager.inl b/ace/Process_Manager.inl index c6ee1f25260..248acd4c8e0 100644 --- a/ace/Process_Manager.inl +++ b/ace/Process_Manager.inl @@ -1,8 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE size_t ACE_Process_Manager::managed (void) const { return current_count_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process_Mutex.cpp b/ace/Process_Mutex.cpp index 1cf0aaa1902..558585a8ce5 100644 --- a/ace/Process_Mutex.cpp +++ b/ace/Process_Mutex.cpp @@ -13,6 +13,8 @@ ACE_RCSID(ace, Process_Mutex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Process_Mutex) void @@ -99,3 +101,5 @@ template class ACE_Malloc_Lock_Adapter_T<ACE_Process_Mutex>; #pragma instantiate ACE_Malloc_Lock_Adapter_T<ACE_Process_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process_Mutex.h b/ace/Process_Mutex.h index 69a295e3225..130f59980f1 100644 --- a/ace/Process_Mutex.h +++ b/ace/Process_Mutex.h @@ -1,4 +1,5 @@ // -*- C++ -*- + //============================================================================= /** * @file Process_Mutex.h @@ -36,6 +37,8 @@ # include "ace/Mutex.h" #endif /* ACE_HAS_SYSV_IPC && !ACE_USES_MUTEX_FOR_PROCESS_MUTEX */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations class ACE_Time_Value; @@ -202,6 +205,8 @@ private: #endif /* _ACE_USE_SV_SEM */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Process_Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Process_Mutex.inl b/ace/Process_Mutex.inl index bf2c8c29ef6..6c19e8d6757 100644 --- a/ace/Process_Mutex.inl +++ b/ace/Process_Mutex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if !defined (_ACE_USE_SV_SEM) ACE_INLINE const ACE_mutex_t & ACE_Process_Mutex::lock (void) const @@ -111,3 +114,5 @@ ACE_Process_Mutex::tryacquire_write_upgrade (void) { return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process_Semaphore.cpp b/ace/Process_Semaphore.cpp index 5829ca5915a..952f20a99f6 100644 --- a/ace/Process_Semaphore.cpp +++ b/ace/Process_Semaphore.cpp @@ -12,6 +12,8 @@ ACE_RCSID(ace, Process_Semaphore, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Process_Semaphore::dump (void) const { @@ -40,10 +42,10 @@ ACE_Process_Semaphore::ACE_Process_Semaphore (u_int count, // ACE_TRACE ("ACE_Process_Semaphore::ACE_Process_Semaphore"); } -ACE_Process_Semaphore::~ACE_Process_Semaphore (void) -{ - // ACE_TRACE ("ACE_Process_Semaphore::~ACE_Process_Semaphore"); -} +// ACE_Process_Semaphore::~ACE_Process_Semaphore (void) +// { +// // ACE_TRACE ("ACE_Process_Semaphore::~ACE_Process_Semaphore"); +// } // Explicitly destroy the semaphore. @@ -111,3 +113,4 @@ ACE_Malloc_Lock_Adapter_T<ACE_Process_Semaphore>::operator () (const ACE_TCHAR * return p; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Process_Semaphore.h b/ace/Process_Semaphore.h index 295c79d5ce0..7ab286e423e 100644 --- a/ace/Process_Semaphore.h +++ b/ace/Process_Semaphore.h @@ -36,6 +36,8 @@ # include "ace/Semaphore.h" #endif /* !(ACE_WIN32 || ACE_HAS_POSIX_SEM || ACE_PSOS) */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Process_Semaphore * @@ -57,7 +59,7 @@ public: * If you want to remove the semaphore, you must call the <remove> * method explicitly. */ - ~ACE_Process_Semaphore (void); + // ~ACE_Process_Semaphore (void); /** * Explicitly destroy the semaphore. Note that only one thread @@ -161,6 +163,9 @@ public: ACE_Process_Semaphore * operator () (const ACE_TCHAR *name); }; +ACE_END_VERSIONED_NAMESPACE_DECL + + #if defined (__ACE_INLINE__) #include "ace/Process_Semaphore.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Process_Semaphore.inl b/ace/Process_Semaphore.inl index 8470291233c..98c29c9b9b6 100644 --- a/ace/Process_Semaphore.inl +++ b/ace/Process_Semaphore.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM) || defined (ACE_PSOS) ACE_INLINE const ACE_sema_t & ACE_Process_Semaphore::lock (void) const @@ -59,3 +62,5 @@ ACE_Process_Semaphore::tryacquire_write_upgrade (void) { return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Profile_Timer.cpp b/ace/Profile_Timer.cpp index c3fe6f5e0d6..c5d93d3f88d 100644 --- a/ace/Profile_Timer.cpp +++ b/ace/Profile_Timer.cpp @@ -11,12 +11,15 @@ ACE_RCSID(ace, Profile_Timer, "$Id$") -ACE_ALLOC_HOOK_DEFINE(ACE_Profile_Timer) - #if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32) #include "ace/OS_NS_stdio.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_ALLOC_HOOK_DEFINE(ACE_Profile_Timer) + + void ACE_Profile_Timer::dump (void) const { @@ -424,5 +427,7 @@ ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage) usage = 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) && !defined (ACE_WIN32) */ diff --git a/ace/Profile_Timer.h b/ace/Profile_Timer.h index e7475a0c586..3740d99002c 100644 --- a/ace/Profile_Timer.h +++ b/ace/Profile_Timer.h @@ -23,6 +23,8 @@ #include "ace/High_Res_Timer.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Profile_Timer * @@ -130,6 +132,8 @@ private: #endif /* ACE_WIN32 || !ACE_HAS_PRUSAGE_T && !ACE_HAS_GETRUSAGE */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) # include "ace/Profile_Timer.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Profile_Timer.inl b/ace/Profile_Timer.inl index 6256ad61868..b43bb910ece 100644 --- a/ace/Profile_Timer.inl +++ b/ace/Profile_Timer.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_sys_time.h" @@ -7,8 +8,9 @@ #if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32) -# if defined (ACE_HAS_PRUSAGE_T) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +# if defined (ACE_HAS_PRUSAGE_T) # include "ace/OS_NS_stropts.h" ACE_INLINE int @@ -108,4 +110,6 @@ ACE_Profile_Timer::~ACE_Profile_Timer (void) { } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */ diff --git a/ace/QtReactor.cpp b/ace/QtReactor.cpp index 10f66e42021..d859d843188 100644 --- a/ace/QtReactor.cpp +++ b/ace/QtReactor.cpp @@ -1,5 +1,9 @@ //$Id$ + #include "ace/QtReactor.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_QtReactor) // Must be called with lock held @@ -149,7 +153,7 @@ ACE_QtReactor::read_event (int p_handle) ACE_Reactor_Mask mask = 0; mask = mask_ops( handle, mask, ACE_Reactor::GET_MASK ); if ( -1 != mask ) - set_enable_flag_by_mask ( 1, handle, mask); + set_enable_flag_by_mask ( 1, handle, mask); #endif /* ACE_QTREACTOR_CLEAR_PENDING_EVENTS */ } @@ -178,7 +182,7 @@ ACE_QtReactor::write_event (int p_handle) ACE_Reactor_Mask mask = 0; mask = mask_ops( handle, mask, ACE_Reactor::GET_MASK ); if ( -1 != mask ) - set_enable_flag_by_mask ( 1, handle, mask); + set_enable_flag_by_mask ( 1, handle, mask); #endif /* ACE_QTREACTOR_CLEAR_PENDING_EVENTS */ } @@ -208,7 +212,7 @@ ACE_QtReactor::exception_event (int p_handle) ACE_Reactor_Mask mask = 0; mask = mask_ops( handle, mask, ACE_Reactor::GET_MASK ); if ( -1 != mask ) - set_enable_flag_by_mask ( 1, handle, mask); + set_enable_flag_by_mask ( 1, handle, mask); #endif /* ACE_QTREACTOR_CLEAR_PENDING_EVENTS */ } @@ -588,8 +592,9 @@ ACE_QtReactor::QtWaitForMultipleEvents (int width, // mbrudka: who needs wait_for_multiple_events? It seems it's cargo load now! int -ACE_QtReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, - ACE_Time_Value *max_wait_time) +ACE_QtReactor::wait_for_multiple_events ( + ACE_Select_Reactor_Handle_Set &handle_set, + ACE_Time_Value *max_wait_time) { ACE_TRACE ("ACE_QtReactor::wait_for_multiple_events"); @@ -634,3 +639,5 @@ template class ACE_Map_Reverse_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_ #pragma instantiate ACE_Map_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex> #pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/QtReactor.h b/ace/QtReactor.h index f15e45bcbf6..c3ccb82f7f3 100644 --- a/ace/QtReactor.h +++ b/ace/QtReactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -13,24 +13,26 @@ #ifndef ACE_QTREACTOR_H #define ACE_QTREACTOR_H -#include /**/ "ace/pre.h" +#include /**/ "ace/pre.h" -#include "ace/Select_Reactor.h" #include "ace/ACE_QtReactor_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "ace/Select_Reactor.h" #include "ace/Map_Manager.h" -// Qttoolkit specific includes. +// QT toolkit specific includes. #include /**/ <qapplication.h> #include /**/ <qobject.h> #include /**/ <qsocketnotifier.h> #include /**/ <qtimer.h> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_QtReactor * @@ -79,7 +81,9 @@ * it is not clear if the leak is introduced by QtReactor, or rather incorrect * memory management in QtReactor_Test. */ -class ACE_QtReactor_Export ACE_QtReactor : public QObject, public ACE_Select_Reactor +class ACE_QtReactor_Export ACE_QtReactor + : public QObject, + public ACE_Select_Reactor { Q_OBJECT @@ -212,5 +216,7 @@ private slots: void timeout_event (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_QTREACTOR_H */ diff --git a/ace/RB_Tree.cpp b/ace/RB_Tree.cpp index 909d8f386e5..d037e855e91 100644 --- a/ace/RB_Tree.cpp +++ b/ace/RB_Tree.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_RB_TREE_C -#define ACE_RB_TREE_C +#ifndef ACE_RB_TREE_CPP +#define ACE_RB_TREE_CPP #include "ace/Global_Macros.h" #include "ace/RB_Tree.h" @@ -17,9 +17,7 @@ #include "ace/Log_Msg.h" -ACE_RCSID (ace, - RB_Tree, - "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Constructor. @@ -544,12 +542,12 @@ void ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::delete_children_i { this->delete_children_i (parent->left ()); this->delete_children_i (parent->right ()); - ACE_DES_FREE_TEMPLATE2 + ACE_DES_FREE_TEMPLATE2 (parent->left (), this->allocator_->free, ACE_RB_Tree_Node, EXT_ID, INT_ID); - ACE_DES_FREE_TEMPLATE2 + ACE_DES_FREE_TEMPLATE2 (parent->right (), this->allocator_->free, ACE_RB_Tree_Node, @@ -645,7 +643,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, // The right subtree is empty: insert new node there. ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0; - ACE_NEW_MALLOC_RETURN + ACE_NEW_MALLOC_RETURN (tmp, (reinterpret_cast<ACE_RB_Tree_Node<EXT_ID, INT_ID>*> (this->allocator_->malloc (sizeof (*tmp)))), @@ -679,7 +677,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, { // The left subtree is empty: insert new node there. ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0; - ACE_NEW_MALLOC_RETURN + ACE_NEW_MALLOC_RETURN (tmp, (reinterpret_cast<ACE_RB_Tree_Node<EXT_ID, INT_ID>*> (this->allocator_->malloc (sizeof (*tmp)))), @@ -703,7 +701,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, { // The tree is empty: insert at the root and color the root // black. - ACE_NEW_MALLOC_RETURN + ACE_NEW_MALLOC_RETURN (this->root_, (reinterpret_cast<ACE_RB_Tree_Node<EXT_ID, INT_ID>*> (this->allocator_->malloc (sizeof (ACE_RB_Tree_Node<EXT_ID, INT_ID>)))), @@ -762,7 +760,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, { // The right subtree is empty: insert new node there. ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0; - ACE_NEW_MALLOC_RETURN + ACE_NEW_MALLOC_RETURN (tmp, (reinterpret_cast<ACE_RB_Tree_Node<EXT_ID, INT_ID>*> (this->allocator_->malloc (sizeof (*tmp)))), @@ -796,7 +794,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, { // The left subtree is empty: insert new node there. ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0; - ACE_NEW_MALLOC_RETURN + ACE_NEW_MALLOC_RETURN (tmp, (reinterpret_cast<ACE_RB_Tree_Node<EXT_ID, INT_ID>*> (this->allocator_->malloc (sizeof (*tmp)))), @@ -818,7 +816,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, else { // The tree is empty: insert at the root and color the root black. - ACE_NEW_MALLOC_RETURN + ACE_NEW_MALLOC_RETURN (this->root_, (reinterpret_cast<ACE_RB_Tree_Node<EXT_ID, INT_ID>*> (this->allocator_->malloc (sizeof (ACE_RB_Tree_Node<EXT_ID, INT_ID>)))), @@ -1199,5 +1197,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tr ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Reverse_Iterator"); } +ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* !defined (ACE_RB_TREE_C) */ +#endif /* !ACE_RB_TREE_CPP */ diff --git a/ace/RB_Tree.h b/ace/RB_Tree.h index fa6b88726cb..a8ebcb125e7 100644 --- a/ace/RB_Tree.h +++ b/ace/RB_Tree.h @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> class ACE_RB_Tree_Iterator_Base; @@ -880,6 +882,8 @@ public: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/RB_Tree.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/RB_Tree.inl b/ace/RB_Tree.inl index cad46c4cbc3..b630a2d2d44 100644 --- a/ace/RB_Tree.inl +++ b/ace/RB_Tree.inl @@ -6,6 +6,8 @@ #include "ace/Malloc_Base.h" #include "ace/Log_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ///////////////////////////////////////////////////// // template class ACE_RB_Tree_Node<EXT_ID, INT_ID> // ///////////////////////////////////////////////////// @@ -1151,3 +1153,5 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_ return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/RW_Mutex.cpp b/ace/RW_Mutex.cpp index cde11394329..54a9b17047d 100644 --- a/ace/RW_Mutex.cpp +++ b/ace/RW_Mutex.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ /** * @file RW_Mutex.cpp * @@ -21,6 +20,8 @@ ACE_RCSID(ace, RW_Mutex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_RW_Mutex::dump (void) const { @@ -49,4 +50,6 @@ ACE_RW_Mutex::~ACE_RW_Mutex (void) this->remove (); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ diff --git a/ace/RW_Mutex.h b/ace/RW_Mutex.h index fe20c589b25..1e920cf3a65 100644 --- a/ace/RW_Mutex.h +++ b/ace/RW_Mutex.h @@ -28,6 +28,8 @@ #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_RW_Mutex * @@ -126,6 +128,8 @@ private: ACE_RW_Mutex (const ACE_RW_Mutex &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/RW_Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/RW_Mutex.inl b/ace/RW_Mutex.inl index 4d5fb16be2c..47b95a3bb94 100644 --- a/ace/RW_Mutex.inl +++ b/ace/RW_Mutex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE const ACE_rwlock_t & ACE_RW_Mutex::lock (void) const { @@ -76,3 +79,5 @@ ACE_RW_Mutex::release (void) // ACE_TRACE ("ACE_RW_Mutex::release"); return ACE_OS::rw_unlock (&this->lock_); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/RW_Process_Mutex.cpp b/ace/RW_Process_Mutex.cpp index a0d0b15a2af..858c5f24bfa 100644 --- a/ace/RW_Process_Mutex.cpp +++ b/ace/RW_Process_Mutex.cpp @@ -16,6 +16,8 @@ ACE_RCSID(ace, RW_Process_Mutex, "$Id$") #include "ace/OS_NS_fcntl.h" #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_RW_Process_Mutex) const ACE_TCHAR * @@ -27,7 +29,7 @@ ACE_RW_Process_Mutex::unique_name (void) ACE_RW_Process_Mutex::ACE_RW_Process_Mutex (const ACE_TCHAR *name, int flags, - mode_t mode ) + mode_t mode ) : lock_ (name ? name : this->unique_name (), flags, mode) { // ACE_TRACE ("ACE_RW_Process_Mutex::ACE_RW_Process_Mutex"); @@ -63,3 +65,5 @@ template class ACE_Malloc_Lock_Adapter_T<ACE_RW_Process_Mutex>; #pragma instantiate ACE_Malloc_Lock_Adapter_T<ACE_RW_Process_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/RW_Process_Mutex.h b/ace/RW_Process_Mutex.h index cee7a1a6cb5..828a003fdac 100644 --- a/ace/RW_Process_Mutex.h +++ b/ace/RW_Process_Mutex.h @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// //============================================================================= /** * @file RW_Process_Mutex.h @@ -23,6 +24,8 @@ #include "ace/Default_Constants.h" #include "ace/OS_NS_fcntl.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_RW_Process_Mutex * @@ -33,16 +36,16 @@ * used between separate processes, rather than threads in the * same process. This isn't a limitation of ACE, it's simply * the file lock semantics on UNIX and Win32. - * \todo For systems with pthread_rwlockattr_setpshared one + * \todo For systems with pthread_rwlockattr_setpshared one * may consider using them to make the mutex faster. */ class ACE_Threads_Export ACE_RW_Process_Mutex { public: /// Create a readers/writer <Process_Mutex>, passing in the optional - /// <name>, <flags> and <mode> \sa ACE_File_Lock. - /// If not specified, a name is generated and flags and mode are set - /// to default platform values. + /// <name>, <flags> and <mode> \sa ACE_File_Lock. + /// If not specified, a name is generated and flags and mode are set + /// to default platform values. #if defined (ACE_WIN32) ACE_RW_Process_Mutex (const ACE_TCHAR *name = 0, int flags = O_CREAT|O_RDWR, @@ -50,7 +53,7 @@ public: #else ACE_RW_Process_Mutex (const ACE_TCHAR *name = 0, int flags = O_CREAT|O_RDWR, - mode_t mode = S_IRUSR | S_IWUSR ); + mode_t mode = S_IRUSR | S_IWUSR ); #endif /* ACE_WIN32 */ ~ACE_RW_Process_Mutex (void); @@ -120,6 +123,8 @@ private: ACE_File_Lock lock_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/RW_Process_Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/RW_Process_Mutex.inl b/ace/RW_Process_Mutex.inl index cc59bb9fc17..e3bced0449c 100644 --- a/ace/RW_Process_Mutex.inl +++ b/ace/RW_Process_Mutex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Explicitly destroy the mutex. ACE_INLINE int ACE_RW_Process_Mutex::remove (void) @@ -70,3 +73,5 @@ ACE_RW_Process_Mutex::lock (void) const // ACE_TRACE ("ACE_RW_Process_Mutex::lock"); return this->lock_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/RW_Thread_Mutex.cpp b/ace/RW_Thread_Mutex.cpp index 1f6ae3153eb..af60621e8df 100644 --- a/ace/RW_Thread_Mutex.cpp +++ b/ace/RW_Thread_Mutex.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ /** * @file RW_Thread_Mutex.cpp * @@ -21,6 +20,8 @@ ACE_RCSID(ace, RW_Thread_Mutex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_RW_Thread_Mutex) ACE_RW_Thread_Mutex::ACE_RW_Thread_Mutex (const ACE_TCHAR *name, @@ -51,4 +52,6 @@ template class ACE_Write_Guard<ACE_RW_Thread_Mutex>; #pragma instantiate ACE_Write_Guard<ACE_RW_Thread_Mutex> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ diff --git a/ace/RW_Thread_Mutex.h b/ace/RW_Thread_Mutex.h index 171006ad11a..9f5f43f93c4 100644 --- a/ace/RW_Thread_Mutex.h +++ b/ace/RW_Thread_Mutex.h @@ -29,6 +29,8 @@ #include "ace/RW_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_RW_Thread_Mutex * @@ -60,6 +62,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/RW_Thread_Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/RW_Thread_Mutex.inl b/ace/RW_Thread_Mutex.inl index 82b4beb7f15..9f4d315df4a 100644 --- a/ace/RW_Thread_Mutex.inl +++ b/ace/RW_Thread_Mutex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_RW_Thread_Mutex::tryacquire_write_upgrade (void) { @@ -12,3 +15,5 @@ ACE_INLINE ACE_RW_Thread_Mutex::~ACE_RW_Thread_Mutex (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp index d7fd9abd919..7fc7608ab21 100644 --- a/ace/Reactor.cpp +++ b/ace/Reactor.cpp @@ -2,7 +2,6 @@ #include "ace/Reactor.h" - //#if !defined (ACE_HAS_WINCE) # if !defined (ACE_LACKS_ACE_SVCCONF) # include "ace/Service_Config.h" @@ -60,6 +59,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Reactor) ACE_Reactor::ACE_Reactor (ACE_Reactor_Impl *impl, @@ -949,3 +950,5 @@ template class ACE_Framework_Component_T<ACE_Reactor>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Framework_Component_T<ACE_Reactor> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor.h b/ace/Reactor.h index a4055932def..58589f4b62f 100644 --- a/ace/Reactor.h +++ b/ace/Reactor.h @@ -30,6 +30,8 @@ // Event_Handler.h contains the definition of ACE_Reactor_Mask #include "ace/Event_Handler.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Reactor_Impl; class ACE_Handle_Set; class ACE_Sig_Action; @@ -38,7 +40,7 @@ class ACE_Sig_Set; /* * Hook to specialize the Reactor implementation with the concrete - * Reactor type, for exmaple, select, thread pool reactor known + * Reactor type, for exmaple, select, thread pool reactor known * at compile time. */ //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK @@ -852,6 +854,9 @@ protected: ACE_Reactor &operator = (const ACE_Reactor &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + + #if defined (__ACE_INLINE__) #include "ace/Reactor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Reactor.inl b/ace/Reactor.inl index 49132e29733..9b1344465ba 100644 --- a/ace/Reactor.inl +++ b/ace/Reactor.inl @@ -7,10 +7,12 @@ /* * Hook to specialize the Reactor with the concrete implementation - * known at compile time. + * known at compile time. */ //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Reactor::run_event_loop (void) { @@ -95,3 +97,5 @@ ACE_Reactor::event_loop_done (void) ACE_TRACE ("ACE_Reactor::event_loop_done"); return ACE_Reactor::instance ()->reactor_event_loop_done (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor_Impl.cpp b/ace/Reactor_Impl.cpp index 556d25c4ee5..96411b8b0c6 100644 --- a/ace/Reactor_Impl.cpp +++ b/ace/Reactor_Impl.cpp @@ -3,9 +3,13 @@ #include "ace/Reactor_Impl.h" ACE_RCSID (ace, - Reactor_Impl, - "$Id$") + Reactor_Impl, + "$Id$") -ACE_Reactor_Impl::~ACE_Reactor_Impl() +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Reactor_Impl::~ACE_Reactor_Impl (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor_Impl.h b/ace/Reactor_Impl.h index cfe7e943828..77114c6cbe8 100644 --- a/ace/Reactor_Impl.h +++ b/ace/Reactor_Impl.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -27,6 +27,8 @@ #include "ace/Event_Handler.h" #include "ace/Countdown_Time.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decls class ACE_Handle_Set; class ACE_Reactor_Impl; @@ -561,5 +563,7 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_REACTOR_IMPL_H */ diff --git a/ace/Reactor_Notification_Strategy.cpp b/ace/Reactor_Notification_Strategy.cpp index c902f30b929..a029e2c10c2 100644 --- a/ace/Reactor_Notification_Strategy.cpp +++ b/ace/Reactor_Notification_Strategy.cpp @@ -7,9 +7,12 @@ ACE_RCSID(ace, Reactor_Notification_Strategy, "$Id$") -ACE_Reactor_Notification_Strategy::ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor, - ACE_Event_Handler *eh, - ACE_Reactor_Mask mask) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ACE_Reactor_Notification_Strategy::ACE_Reactor_Notification_Strategy ( + ACE_Reactor *reactor, + ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) : ACE_Notification_Strategy (eh, mask), reactor_ (reactor) { @@ -31,3 +34,5 @@ ACE_Reactor_Notification_Strategy::notify (ACE_Event_Handler *eh, { return this->reactor_->notify (eh, mask); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor_Notification_Strategy.h b/ace/Reactor_Notification_Strategy.h index 4a38f37ec25..61ae0ce6120 100644 --- a/ace/Reactor_Notification_Strategy.h +++ b/ace/Reactor_Notification_Strategy.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -11,6 +11,7 @@ //============================================================================= #ifndef ACE_REACTOR_NOTIFICATION_STRATEGY_H #define ACE_REACTOR_NOTIFICATION_STRATEGY_H + #include /**/ "ace/pre.h" #include "ace/Notification_Strategy.h" @@ -19,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Reactor_Notification_Strategy * @@ -53,9 +56,12 @@ protected: ACE_Reactor *reactor_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Reactor_Notification_Strategy.inl" #endif /* __ACE_INLINE __ */ #include /**/ "ace/post.h" + #endif /*ACE_REACTOR_NOTIFICATION_STRATEGY_H */ diff --git a/ace/Reactor_Notification_Strategy.inl b/ace/Reactor_Notification_Strategy.inl index 260ec1d960a..328c2687a77 100644 --- a/ace/Reactor_Notification_Strategy.inl +++ b/ace/Reactor_Notification_Strategy.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Reactor * ACE_Reactor_Notification_Strategy::reactor (void) { @@ -12,3 +15,5 @@ ACE_Reactor_Notification_Strategy::reactor (ACE_Reactor *r) { this->reactor_ = r; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor_Timer_Interface.cpp b/ace/Reactor_Timer_Interface.cpp index ea457c207a9..6c07f21ac86 100644 --- a/ace/Reactor_Timer_Interface.cpp +++ b/ace/Reactor_Timer_Interface.cpp @@ -6,6 +6,11 @@ ACE_RCSID (ace, Reactor_Timer_Interface, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Reactor_Timer_Interface::~ACE_Reactor_Timer_Interface() { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor_Timer_Interface.h b/ace/Reactor_Timer_Interface.h index 91638c9c2bd..d370a128df2 100644 --- a/ace/Reactor_Timer_Interface.h +++ b/ace/Reactor_Timer_Interface.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Event_Handler; /** @@ -51,6 +53,8 @@ public: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_REACTOR_TIMER_INTERFACE_H */ diff --git a/ace/Reactor_Token_T.cpp b/ace/Reactor_Token_T.cpp index ede9bba4a1f..358b0b14f65 100644 --- a/ace/Reactor_Token_T.cpp +++ b/ace/Reactor_Token_T.cpp @@ -3,9 +3,7 @@ #include "ace/Log_Msg.h" #include "ace/Reactor_Token_T.h" -ACE_RCSID (ace, - Reactor_Token_T, - "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class ACE_TOKEN_TYPE> void ACE_Reactor_Token_T<ACE_TOKEN_TYPE>::dump (void) const @@ -68,3 +66,5 @@ ACE_Reactor_Token_T<ACE_TOKEN_TYPE>::sleep_hook (void) ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("sleep_hook failed"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Reactor_Token_T.h b/ace/Reactor_Token_T.h index 59e9409c17c..4aa1b3574e2 100644 --- a/ace/Reactor_Token_T.h +++ b/ace/Reactor_Token_T.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -18,6 +18,7 @@ #include "ace/Reactor_Impl.h" #include "ace/Token.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Reactor_Token_T @@ -56,7 +57,7 @@ public: // *** After ACE 5.5.1, change ACE_Token::FIFO to ACE_TOKEN_TYPE::FIFO. // **** This is only like this to work around MSVC 6 problems. ACE_Reactor_Token_T (ACE_Reactor_Impl &r, - int s_queue = ACE_Token::FIFO); + int s_queue = ACE_Token::FIFO); ACE_Reactor_Token_T (int s_queue = ACE_Token::FIFO); virtual ~ACE_Reactor_Token_T (void); @@ -80,6 +81,8 @@ private: ACE_Reactor_Impl *reactor_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Reactor_Token_T.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Read_Buffer.cpp b/ace/Read_Buffer.cpp index c6645957729..9401048f148 100644 --- a/ace/Read_Buffer.cpp +++ b/ace/Read_Buffer.cpp @@ -15,6 +15,9 @@ ACE_RCSID(ace, Read_Buffer, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Read_Buffer::dump (void) const { @@ -169,3 +172,5 @@ ACE_Read_Buffer::rec_read (int term, int search, int replace) return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Read_Buffer.h b/ace/Read_Buffer.h index f1075c70901..a28346518f2 100644 --- a/ace/Read_Buffer.h +++ b/ace/Read_Buffer.h @@ -25,6 +25,8 @@ #include "ace/Global_Macros.h" #include "ace/os_include/os_stdio.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Allocator; /** @@ -114,6 +116,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Read_Buffer (const ACE_Read_Buffer &)) }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) # include "ace/Read_Buffer.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Read_Buffer.inl b/ace/Read_Buffer.inl index 3534c62db2e..1517e9c17e3 100644 --- a/ace/Read_Buffer.inl +++ b/ace/Read_Buffer.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Accessor to the number of bytes in the buffer. ACE_INLINE size_t @@ -26,3 +29,4 @@ ACE_Read_Buffer::alloc (void) const return this->allocator_; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Recursive_Thread_Mutex.cpp b/ace/Recursive_Thread_Mutex.cpp index 15a809ed898..c8a1ac9bdf3 100644 --- a/ace/Recursive_Thread_Mutex.cpp +++ b/ace/Recursive_Thread_Mutex.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ /** * @file Recursive_Thread_Mutex.cpp * @@ -21,6 +20,8 @@ ACE_RCSID(ace, Recursive_Thread_Mutex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Recursive_Thread_Mutex) ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (const ACE_TCHAR *name, @@ -142,4 +143,6 @@ ACE_Recursive_Thread_Mutex::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ diff --git a/ace/Recursive_Thread_Mutex.h b/ace/Recursive_Thread_Mutex.h index 3732ff42334..c315151b7af 100644 --- a/ace/Recursive_Thread_Mutex.h +++ b/ace/Recursive_Thread_Mutex.h @@ -29,6 +29,8 @@ #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Recursive_Thread_Mutex * @@ -158,6 +160,8 @@ private: ACE_Recursive_Thread_Mutex (const ACE_Recursive_Thread_Mutex &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Recursive_Thread_Mutex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Recursive_Thread_Mutex.inl b/ace/Recursive_Thread_Mutex.inl index a1d84584315..5046cd01ec4 100644 --- a/ace/Recursive_Thread_Mutex.inl +++ b/ace/Recursive_Thread_Mutex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_recursive_thread_mutex_t & ACE_Recursive_Thread_Mutex::mutex (void) { @@ -57,3 +60,6 @@ ACE_Recursive_Thread_Mutex::tryacquire_write_upgrade (void) { return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL + diff --git a/ace/Recyclable.cpp b/ace/Recyclable.cpp index 483852486f1..5da42cc8d15 100644 --- a/ace/Recyclable.cpp +++ b/ace/Recyclable.cpp @@ -8,6 +8,7 @@ ACE_RCSID(ace, Recyclable, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Recyclable::ACE_Recyclable (ACE_Recyclable_State initial_state) : recycle_state_ (initial_state) @@ -17,3 +18,5 @@ ACE_Recyclable::ACE_Recyclable (ACE_Recyclable_State initial_state) ACE_Recyclable::~ACE_Recyclable (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Recyclable.h b/ace/Recyclable.h index 709c9d45a3f..2c3d088cacd 100644 --- a/ace/Recyclable.h +++ b/ace/Recyclable.h @@ -19,6 +19,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /// States of a recyclable object. enum ACE_Recyclable_State @@ -62,13 +63,17 @@ public: void recycle_state (ACE_Recyclable_State new_state); protected: - /// Protected constructor. + + /// Constructor. ACE_Recyclable (ACE_Recyclable_State initial_state); +protected: + /// Our state. ACE_Recyclable_State recycle_state_; }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Recyclable.inl" diff --git a/ace/Recyclable.inl b/ace/Recyclable.inl index c9a4318b2dc..ef096ff62be 100644 --- a/ace/Recyclable.inl +++ b/ace/Recyclable.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// //$Id$ - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Recyclable_State ACE_Recyclable::recycle_state (void) const @@ -12,8 +13,8 @@ ACE_Recyclable::recycle_state (void) const ACE_INLINE void ACE_Recyclable::recycle_state (ACE_Recyclable_State new_state) { - if (this->recycle_state_ == ACE_RECYCLABLE_CLOSED) - return; - - this->recycle_state_ = new_state; + if (this->recycle_state_ != ACE_RECYCLABLE_CLOSED) + this->recycle_state_ = new_state; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Refcountable.cpp b/ace/Refcountable.cpp index 0c77633f4d1..902e4362f65 100644 --- a/ace/Refcountable.cpp +++ b/ace/Refcountable.cpp @@ -11,7 +11,10 @@ ACE_RCSID (ace, Refcountable, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Refcountable::~ACE_Refcountable (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Refcountable.h b/ace/Refcountable.h index 8f1bc155705..192243bd256 100644 --- a/ace/Refcountable.h +++ b/ace/Refcountable.h @@ -20,6 +20,8 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Refcountable * @@ -45,6 +47,8 @@ protected: int refcount_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Refcountable.inl" diff --git a/ace/Refcountable.inl b/ace/Refcountable.inl index 1d9a03fb66a..993af65d452 100644 --- a/ace/Refcountable.inl +++ b/ace/Refcountable.inl @@ -1,5 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// //$Id$ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Refcountable::ACE_Refcountable (int refcount) : refcount_ (refcount) @@ -23,3 +27,5 @@ ACE_Refcountable::refcount (void) const { return this->refcount_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Refcounted_Auto_Ptr.cpp b/ace/Refcounted_Auto_Ptr.cpp index 8abc1d7768d..7dd9d862b64 100644 --- a/ace/Refcounted_Auto_Ptr.cpp +++ b/ace/Refcounted_Auto_Ptr.cpp @@ -5,10 +5,14 @@ #include "ace/Refcounted_Auto_Ptr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class X, class ACE_LOCK> ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::~ACE_Refcounted_Auto_Ptr (void) { AUTO_REFCOUNTED_PTR_REP::detach (rep_); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_REFCOUNTED_AUTO_PTR_CPP */ diff --git a/ace/Refcounted_Auto_Ptr.h b/ace/Refcounted_Auto_Ptr.h index adac3dd7cd3..d480c125c68 100644 --- a/ace/Refcounted_Auto_Ptr.h +++ b/ace/Refcounted_Auto_Ptr.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr_Rep; template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr; @@ -188,6 +190,8 @@ private: ~ACE_Refcounted_Auto_Ptr_Rep (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include "ace/Refcounted_Auto_Ptr.inl" #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/ace/Refcounted_Auto_Ptr.inl b/ace/Refcounted_Auto_Ptr.inl index e0dfaa2e63c..3635393ecfa 100644 --- a/ace/Refcounted_Auto_Ptr.inl +++ b/ace/Refcounted_Auto_Ptr.inl @@ -5,6 +5,8 @@ #include "ace/Guard_T.h" #include "ace/Log_Msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class X, class ACE_LOCK> inline int ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::count (void) const { @@ -212,3 +214,5 @@ ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::operator = (const ACE_Refcounted_Auto_Ptr< AUTO_REFCOUNTED_PTR_REP::assign (this->rep_, AUTO_REFCOUNTED_PTR_REP::attach (r.rep_)); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Registry.cpp b/ace/Registry.cpp index dcac2651071..ee625832df9 100644 --- a/ace/Registry.cpp +++ b/ace/Registry.cpp @@ -24,10 +24,15 @@ ACE_RCSID (ace, return 0; \ } while (0) +namespace +{ +#undef STRING_SEPARATOR -// Separator for components in a name -/* static */ -const ACE_TCHAR *ACE_Registry::STRING_SEPARATOR = ACE_LIB_TEXT ("\\"); + // Separator for components in a name + ACE_TCHAR const STRING_SEPARATOR[] = ACE_LIB_TEXT ("\\"); +} + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL bool ACE_Registry::Name_Component::operator== (const Name_Component &rhs) const @@ -623,7 +628,7 @@ ACE_Registry::make_string (const Name &const_name) { if (iterator != name.begin ()) // If this is not the first component, we will add separators - string += ACE_Registry::STRING_SEPARATOR; + string += STRING_SEPARATOR; const Name_Component &component = *iterator; // Add to string string += component.id_; @@ -646,7 +651,7 @@ ACE_Registry::make_name (const ACE_TString &string) { Name_Component component; // Find the separator - new_position = string.find (ACE_Registry::STRING_SEPARATOR, new_position); + new_position = string.find (STRING_SEPARATOR, new_position); if (new_position != ACE_TString::npos) // If we have not gone past the end { @@ -655,7 +660,7 @@ ACE_Registry::make_name (const ACE_TString &string) new_position - last_position); // Skip past the seperator new_position += - ACE_OS::strlen (ACE_Registry::STRING_SEPARATOR); + ACE_OS::strlen (STRING_SEPARATOR); } else { @@ -1150,4 +1155,6 @@ template class ACE_Unbounded_Set_Iterator<ACE_Registry::Name_Component>; #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Registry::Name_Component> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 */ diff --git a/ace/Registry.h b/ace/Registry.h index f4c311b0a60..1ee1dccbda4 100644 --- a/ace/Registry.h +++ b/ace/Registry.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -27,6 +27,8 @@ #include "ace/Containers.h" #include "ace/SString.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Registry * @@ -59,9 +61,6 @@ public: /// A Name is an ordered collections of components (ids) typedef ACE_Unbounded_Set<Name_Component> Name; - /// Separator for components in a name - static const ACE_TCHAR *STRING_SEPARATOR; - /// Convert a @a name to a @c string static ACE_TString make_string (const Name &name); @@ -561,6 +560,8 @@ private: typedef ACE_Registry::Binding Binding; #endif /* ACE_HAS_BROKEN_NESTED_TEMPLATES */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 */ #include /**/ "ace/post.h" #endif /* ACE_REGISTRY_H */ diff --git a/ace/Registry_Name_Space.cpp b/ace/Registry_Name_Space.cpp index b00b455f3a9..e382af8482e 100644 --- a/ace/Registry_Name_Space.cpp +++ b/ace/Registry_Name_Space.cpp @@ -7,6 +7,8 @@ ACE_RCSID(ace, Registry_Name_Space, "$Id$") #if (defined (ACE_WIN32) && defined (UNICODE)) // This only works on Win32 platforms when UNICODE is turned on +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Registry_Name_Space::ACE_Registry_Name_Space (void) { } @@ -286,5 +288,6 @@ ACE_Registry_Name_Space::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_WIN32 && UNICODE */ diff --git a/ace/Registry_Name_Space.h b/ace/Registry_Name_Space.h index 7635b0bafbe..cfd16ddec7e 100644 --- a/ace/Registry_Name_Space.h +++ b/ace/Registry_Name_Space.h @@ -1,4 +1,4 @@ -/*-*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -28,6 +28,8 @@ #include "ace/Naming_Context.h" #include "ace/Name_Space.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Registry_Name_Space * @@ -129,6 +131,10 @@ private: ACE_Registry::Naming_Context context_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_WIN32 && UNICODE */ + #include /**/ "ace/post.h" + #endif /* ACE_REGISTRY_NAME_SPACE_H */ diff --git a/ace/Remote_Name_Space.cpp b/ace/Remote_Name_Space.cpp index 55c50a275c7..6190237c1a8 100644 --- a/ace/Remote_Name_Space.cpp +++ b/ace/Remote_Name_Space.cpp @@ -8,6 +8,8 @@ ACE_RCSID (ace, Remote_Name_Space, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_Remote_Name_Space::open (const ACE_TCHAR *servername, u_short port) { @@ -380,3 +382,5 @@ template class ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Remote_Name_Space.h b/ace/Remote_Name_Space.h index 95c0d9c4531..a58ca4e83af 100644 --- a/ace/Remote_Name_Space.h +++ b/ace/Remote_Name_Space.h @@ -25,6 +25,7 @@ #include "ace/Name_Proxy.h" #include "ace/Name_Space.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_NS_WString; @@ -139,6 +140,8 @@ private: ACE_Name_Proxy ns_proxy_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_REMOTE_NAME_SPACE_H */ diff --git a/ace/Remote_Tokens.cpp b/ace/Remote_Tokens.cpp index f80fe9a3bf8..c5a25346f7c 100644 --- a/ace/Remote_Tokens.cpp +++ b/ace/Remote_Tokens.cpp @@ -1,4 +1,3 @@ -// Remote_Tokens.cpp // $Id$ #include "ace/Remote_Tokens.h" @@ -23,6 +22,8 @@ ACE_RCSID (ace, #define ACE_TSS_CONNECTION_MUTEX ACE_Null_Mutex #endif /* ACE_MT_SAFE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Make a typedef to simplify access to the Singleton below. typedef ACE_Singleton<ACE_TSS_Connection, ACE_TSS_CONNECTION_MUTEX> ACE_Token_Connections; @@ -110,8 +111,8 @@ ACE_Remote_Token_Proxy::~ACE_Remote_Token_Proxy (void) int ACE_Remote_Token_Proxy::open (const ACE_TCHAR *name, - int ignore_deadlock, - int debug) + int ignore_deadlock, + int debug) { ACE_TRACE ("ACE_Remote_Token_Proxy::open"); ignore_shadow_deadlock_ = ignore_deadlock; @@ -144,7 +145,7 @@ ACE_Remote_Token_Proxy::initiate_connection (void) int ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request, - ACE_Synch_Options &) + ACE_Synch_Options &) { ACE_TRACE ("ACE_Remote_Token_Proxy::request_reply"); void *buffer; @@ -169,68 +170,68 @@ ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request, // Receive reply via blocking read. if (peer->recv (&reply, sizeof reply) != sizeof reply) - ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("recv failed")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("recv failed")), -1); if (reply.decode () == -1) - ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("decode failed")), -1); + ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("decode failed")), -1); errno = int (reply.errnum ()); if (errno != 0) - ACE_RETURN (-1); + ACE_RETURN (-1); else - return 0; + return 0; } } int ACE_Remote_Token_Proxy::acquire (int notify, - void (*sleep_hook)(void *), - ACE_Synch_Options &options) + void (*sleep_hook)(void *), + ACE_Synch_Options &options) { ACE_TRACE ("ACE_Remote_Token_Proxy::acquire"); // First grab the local shadow mutex. if (ACE_Token_Proxy::acquire (notify, - sleep_hook, - ACE_Synch_Options::asynch) == -1) + sleep_hook, + ACE_Synch_Options::asynch) == -1) { // Acquire failed, deal with it... switch (errno) - { - case EWOULDBLOCK : - // Whoah, we detected wouldblock via the shadow mutex! - if (debug_) - ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) shadow: acquire will block, owner is %s\n"), - this->token_->owner_id ())); - // No error, but would block, - break; - - case EDEADLK : - if (debug_) - ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) shadow: deadlock detected\n"))); - - if (ignore_shadow_deadlock_) - break; - else - { - errno = EDEADLK; - ACE_RETURN (-1); - } - - default : - ACE_ERROR_RETURN ((LM_ERROR, - ACE_LIB_TEXT ("(%t) %p shadow acquire failed\n"), - ACE_LIB_TEXT ("ACE_Remote_Token_Proxy")), - -1); - } + { + case EWOULDBLOCK : + // Whoah, we detected wouldblock via the shadow mutex! + if (debug_) + ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) shadow: acquire will block, owner is %s\n"), + this->token_->owner_id ())); + // No error, but would block, + break; + + case EDEADLK : + if (debug_) + ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) shadow: deadlock detected\n"))); + + if (ignore_shadow_deadlock_) + break; + else + { + errno = EDEADLK; + ACE_RETURN (-1); + } + + default : + ACE_ERROR_RETURN ((LM_ERROR, + ACE_LIB_TEXT ("(%t) %p shadow acquire failed\n"), + ACE_LIB_TEXT ("ACE_Remote_Token_Proxy")), + -1); + } } ACE_Token_Request request (token_->type (), - this->type (), - ACE_Token_Request::ACQUIRE, - this->name (), - this->client_id (), - options); + this->type (), + ACE_Token_Request::ACQUIRE, + this->name (), + this->client_id (), + options); request.notify (notify); @@ -266,51 +267,51 @@ ACE_Remote_Token_Proxy::tryacquire (void (*sleep_hook)(void *)) if (ACE_Token_Proxy::tryacquire (sleep_hook) == -1) { if (debug_) - { + { // Save/restore errno. ACE_Errno_Guard error (errno); - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("shadow try acquire failed\n"))); - } + } return -1; } ACE_Token_Request request (token_->type (), - this->type (), - ACE_Token_Request::TRY_ACQUIRE, - this->name (), - this->client_id (), - ACE_Synch_Options::synch); + this->type (), + ACE_Token_Request::TRY_ACQUIRE, + this->name (), + this->client_id (), + ACE_Synch_Options::synch); return this->request_reply (request, - ACE_Synch_Options::synch); + ACE_Synch_Options::synch); } int ACE_Remote_Token_Proxy::renew (int requeue_position, - ACE_Synch_Options &options) + ACE_Synch_Options &options) { ACE_TRACE ("ACE_Remote_Token_Proxy::renew"); if (ACE_Token_Proxy::renew (requeue_position, - ACE_Synch_Options::asynch) == -1) + ACE_Synch_Options::asynch) == -1) { // Check for error. if (errno != EWOULDBLOCK) - return -1; + return -1; else if (debug_) - ACE_DEBUG ((LM_DEBUG, - ACE_LIB_TEXT ("(%t) shadow: renew would block. owner %s.\n"), - this->token_->owner_id ())); + ACE_DEBUG ((LM_DEBUG, + ACE_LIB_TEXT ("(%t) shadow: renew would block. owner %s.\n"), + this->token_->owner_id ())); } ACE_Token_Request request (token_->type (), - this->type (), - ACE_Token_Request::RENEW, - this->name (), - this->client_id (), - options); + this->type (), + ACE_Token_Request::RENEW, + this->name (), + this->client_id (), + options); request.requeue_position (requeue_position); @@ -330,7 +331,7 @@ ACE_Remote_Token_Proxy::renew (int requeue_position, else { if (debug_) - ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) renewed %s remotely.\n"), this->name ())); + ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) renewed %s remotely.\n"), this->name ())); // Make sure that the local shadow reflects our new ownership. token_->make_owner (waiter_); return result; @@ -343,11 +344,11 @@ ACE_Remote_Token_Proxy::release (ACE_Synch_Options &options) ACE_TRACE ("ACE_Remote_Token_Proxy::release"); ACE_Token_Request request (token_->type (), - this->type (), - ACE_Token_Request::RELEASE, - this->name (), - this->client_id (), - options); + this->type (), + ACE_Token_Request::RELEASE, + this->name (), + this->client_id (), + options); int result = this->request_reply (request, options); if (result == 0) @@ -374,8 +375,8 @@ ACE_Remote_Token_Proxy::token_acquired (ACE_TPQ_Entry *) { ACE_TRACE ("ACE_Remote_Token_Proxy::token_acquired"); ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("(%t) %s shadow token %s acquired\n"), - this->client_id (), - this->name ())); + this->client_id (), + this->name ())); // ACE_Token_Proxy::token_acquired (vp); } @@ -409,8 +410,8 @@ ACE_Remote_Mutex::clone (void) const ACE_Token_Proxy *temp; ACE_NEW_RETURN (temp, ACE_Remote_Mutex (this->name (), - ignore_deadlock_, - debug_), + ignore_deadlock_, + debug_), 0); return temp; } @@ -460,8 +461,8 @@ ACE_Remote_RLock::clone (void) const ACE_Token_Proxy *temp = 0; ACE_NEW_RETURN (temp, ACE_Remote_RLock (this->name (), - ignore_deadlock_, - debug_), + ignore_deadlock_, + debug_), 0); return temp; } @@ -529,4 +530,6 @@ template class ACE_Singleton <ACE_TSS_Connection, ACE_TSS_CONNECTION_MUTEX>; #pragma instantiate ACE_Singleton <ACE_TSS_Connection, ACE_TSS_CONNECTION_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TOKENS_LIBRARY */ diff --git a/ace/Remote_Tokens.h b/ace/Remote_Tokens.h index d9310592f7f..ec39d3d26eb 100644 --- a/ace/Remote_Tokens.h +++ b/ace/Remote_Tokens.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -13,6 +13,7 @@ #ifndef ACE_REMOTE_MUTEX_H #define ACE_REMOTE_MUTEX_H + #include /**/ "ace/pre.h" #include "ace/INET_Addr.h" @@ -29,6 +30,8 @@ #if defined (ACE_HAS_TOKENS_LIBRARY) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Remote_Token_Proxy * @@ -306,6 +309,8 @@ private: void operator= (const ACE_TSS_Connection &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TOKENS_LIBRARY */ #if defined (__ACE_INLINE__) @@ -313,4 +318,5 @@ private: #endif /* __ACE_INLINE__ */ #include /**/ "ace/post.h" + #endif /* ACE_REMOTE_TOKEN_H */ diff --git a/ace/Remote_Tokens.inl b/ace/Remote_Tokens.inl index 004fe75b7d4..50487075225 100644 --- a/ace/Remote_Tokens.inl +++ b/ace/Remote_Tokens.inl @@ -4,6 +4,8 @@ #if defined (ACE_HAS_TOKENS_LIBRARY) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Remote_Mutex::ACE_Remote_Mutex (void) { @@ -12,8 +14,8 @@ ACE_Remote_Mutex::ACE_Remote_Mutex (void) ACE_INLINE ACE_Remote_Mutex::ACE_Remote_Mutex (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) + int ignore_deadlock, + int debug) { ACE_TRACE ("ACE_Remote_Mutex::ACE_Remote_Mutex"); this->open (token_name, ignore_deadlock, debug); @@ -23,8 +25,8 @@ ACE_Remote_Mutex::ACE_Remote_Mutex (const ACE_TCHAR *token_name, ACE_INLINE ACE_Remote_RLock::ACE_Remote_RLock (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) + int ignore_deadlock, + int debug) { ACE_TRACE ("ACE_Remote_RLock::ACE_Remote_RLock"); this->open (token_name, ignore_deadlock, debug); @@ -34,11 +36,13 @@ ACE_Remote_RLock::ACE_Remote_RLock (const ACE_TCHAR *token_name, ACE_INLINE ACE_Remote_WLock::ACE_Remote_WLock (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) + int ignore_deadlock, + int debug) { ACE_TRACE ("ACE_Remote_WLock::ACE_Remote_WLock"); this->open (token_name, ignore_deadlock, debug); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TOKENS_LIBRARY */ diff --git a/ace/Reverse_Lock_T.cpp b/ace/Reverse_Lock_T.cpp index 0dc093cf7a5..348c81da62a 100644 --- a/ace/Reverse_Lock_T.cpp +++ b/ace/Reverse_Lock_T.cpp @@ -13,6 +13,7 @@ #include "ace/Reverse_Lock_T.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class ACE_LOCKING_MECHANISM> ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::~ACE_Reverse_Lock (void) @@ -87,4 +88,6 @@ ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_write_upgrade (void) ACE_NOTSUP_RETURN (-1); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_REVERSE_LOCK_T_CPP */ diff --git a/ace/Reverse_Lock_T.h b/ace/Reverse_Lock_T.h index 29f23b08c08..6bb06ae244e 100644 --- a/ace/Reverse_Lock_T.h +++ b/ace/Reverse_Lock_T.h @@ -22,10 +22,13 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** - * @class ACE_Acquire_Method + * @namespace ACE_Acquire_Method * - * @brief An enum class. + * @brief An enum namespace. * * These enums should have been inside the reverse lock class, but * some lame compilers cannot handle enums inside template classes. @@ -38,7 +41,7 @@ * represented here because we have to make sure that the release() * method on the reverse lock acquires a lock on the real lock. **/ -class ACE_Acquire_Method +namespace ACE_Acquire_Method { public: enum METHOD_TYPE @@ -47,7 +50,7 @@ public: ACE_READ, ACE_WRITE }; -}; +} /** * @class ACE_Reverse_Lock @@ -120,6 +123,8 @@ private: ACE_Acquire_Method::METHOD_TYPE acquire_method_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Reverse_Lock_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Reverse_Lock_T.inl b/ace/Reverse_Lock_T.inl index 84533466663..0f8598ffd23 100644 --- a/ace/Reverse_Lock_T.inl +++ b/ace/Reverse_Lock_T.inl @@ -5,6 +5,8 @@ #include "ace/config-all.h" #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class ACE_LOCKING_MECHANISM> ACE_INLINE ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::ACE_Reverse_Lock ( ACE_LOCKING_MECHANISM &lock, @@ -13,3 +15,5 @@ ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::ACE_Reverse_Lock ( acquire_method_ (acquire_method) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK.cpp b/ace/SOCK.cpp index 64bb4bc0210..f6618cdada4 100644 --- a/ace/SOCK.cpp +++ b/ace/SOCK.cpp @@ -1,4 +1,3 @@ -// SOCK.cpp // $Id$ #include "ace/SOCK.h" @@ -10,6 +9,8 @@ ACE_RCSID(ace, SOCK, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK) void @@ -180,3 +181,5 @@ ACE_SOCK::ACE_SOCK (int type, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_SOCK::ACE_SOCK"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK.h b/ace/SOCK.h index d9bfd0c5eec..8348d0f35d8 100644 --- a/ace/SOCK.h +++ b/ace/SOCK.h @@ -24,6 +24,8 @@ #include "ace/IPC_SAP.h" #include "ace/OS_NS_stropts.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SOCK * @@ -39,8 +41,6 @@ class ACE_Export ACE_SOCK : public ACE_IPC_SAP { public: - /// Default ctor/dtor. - ~ACE_SOCK (void); /// Wrapper around the <setsockopt> system call. int set_option (int level, @@ -96,6 +96,7 @@ public: int reuse_addr); protected: + /// Constructor with arguments to call the BSD-style <socket> system /// call (no QoS). ACE_SOCK (int type, @@ -117,8 +118,18 @@ protected: /// from being defined. ACE_SOCK (void); + /// Protected destructor. + /** + * Not a virtual destructor. Protected destructor to prevent + * operator delete() from being called through a base class ACE_SOCK + * pointer/reference. + */ + ~ACE_SOCK (void); + }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK.inl b/ace/SOCK.inl index f35fda782d1..c57fa36dfec 100644 --- a/ace/SOCK.inl +++ b/ace/SOCK.inl @@ -1,10 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SOCK.i - #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_SOCK::~ACE_SOCK (void) { @@ -13,24 +14,26 @@ ACE_SOCK::~ACE_SOCK (void) ACE_INLINE int ACE_SOCK::set_option (int level, - int option, - void *optval, - int optlen) const + int option, + void *optval, + int optlen) const { ACE_TRACE ("ACE_SOCK::set_option"); return ACE_OS::setsockopt (this->get_handle (), level, - option, (char *) optval, optlen); + option, (char *) optval, optlen); } // Provides access to the ACE_OS::getsockopt system call. ACE_INLINE int ACE_SOCK::get_option (int level, - int option, - void *optval, - int *optlen) const + int option, + void *optval, + int *optlen) const { ACE_TRACE ("ACE_SOCK::get_option"); return ACE_OS::getsockopt (this->get_handle (), level, - option, (char *) optval, optlen); + option, (char *) optval, optlen); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Acceptor.cpp b/ace/SOCK_Acceptor.cpp index ffb187b5e17..915d3d31f04 100644 --- a/ace/SOCK_Acceptor.cpp +++ b/ace/SOCK_Acceptor.cpp @@ -1,4 +1,3 @@ -// SOCK_Acceptor.cpp // $Id$ #include "ace/SOCK_Acceptor.h" @@ -18,6 +17,8 @@ ACE_RCSID(ace, SOCK_Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Acceptor) // Do nothing routine for constructor. @@ -401,3 +402,5 @@ ACE_SOCK_Acceptor::close (void) { return ACE_SOCK::close (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Acceptor.h b/ace/SOCK_Acceptor.h index bad9010bfcc..4341698c7c9 100644 --- a/ace/SOCK_Acceptor.h +++ b/ace/SOCK_Acceptor.h @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; class ACE_Accept_QoS_Params; @@ -166,6 +168,8 @@ private: int get_remote_addr (ACE_Addr &) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_Acceptor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_Acceptor.inl b/ace/SOCK_Acceptor.inl index db6fa00f4ba..a4456ed3ab6 100644 --- a/ace/SOCK_Acceptor.inl +++ b/ace/SOCK_Acceptor.inl @@ -1,10 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_SOCK_Acceptor::~ACE_SOCK_Acceptor (void) { ACE_TRACE ("ACE_SOCK_Acceptor::~ACE_SOCK_Acceptor"); } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_CODgram.cpp b/ace/SOCK_CODgram.cpp index 766819b1eb1..8bacd9d1220 100644 --- a/ace/SOCK_CODgram.cpp +++ b/ace/SOCK_CODgram.cpp @@ -1,4 +1,3 @@ -// SOCK_CODgram.cpp // $Id$ #include "ace/SOCK_CODgram.h" @@ -11,6 +10,8 @@ ACE_RCSID(ace, SOCK_CODgram, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_CODgram) void @@ -24,12 +25,12 @@ ACE_SOCK_CODgram::dump (void) const // Here's the general-purpose constructor. ACE_SOCK_CODgram::ACE_SOCK_CODgram (const ACE_Addr &remote, const ACE_Addr &local, - int protocol_family, int protocol, - int reuse_addr) + int protocol_family, int protocol, + int reuse_addr) { ACE_TRACE ("ACE_SOCK_CODgram::ACE_SOCK_CODgram"); if (this->open (remote, local, - protocol_family, protocol, reuse_addr) == -1) + protocol_family, protocol, reuse_addr) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_SOCK_CODgram"))); } @@ -39,71 +40,73 @@ ACE_SOCK_CODgram::ACE_SOCK_CODgram (const ACE_Addr &remote, const ACE_Addr &loca 1. remote == ACE_Addr::sap_any && local == ACE_Addr::sap_any if protocol_family == PF_INET then - bind the local address to a randomly generated port number... + bind the local address to a randomly generated port number... 2. remote == ACE_Addr::sap_any && local != ACE_Addr::sap_any we are just binding the local address - (used primarily by servers) + (used primarily by servers) 3. remote != ACE_Addr::sap_any && local == ACE_Addr::sap_any we are connecting to the remote address - (used primarily by clients) + (used primarily by clients) 4. remote != ACE_Addr::sap_any && local != ACE_Addr::sap_any we are binding to the local address - and connecting to the remote address + and connecting to the remote address */ int ACE_SOCK_CODgram::open (const ACE_Addr &remote, const ACE_Addr &local, - int protocol_family, int protocol, - int reuse_addr) + int protocol_family, int protocol, + int reuse_addr) { ACE_TRACE ("ACE_SOCK_CODgram::open"); if (ACE_SOCK::open (SOCK_DGRAM, protocol_family, - protocol, reuse_addr) == -1) + protocol, reuse_addr) == -1) return -1; else { int error = 0; if (local == ACE_Addr::sap_any && remote == ACE_Addr::sap_any) - { - // Assign an arbitrary port number from the transient range!! + { + // Assign an arbitrary port number from the transient range!! - if (protocol_family == PF_INET - && ACE::bind_port (this->get_handle ()) == -1) - error = 1; - } + if (protocol_family == PF_INET + && ACE::bind_port (this->get_handle ()) == -1) + error = 1; + } // We are binding just the local address. else if (local != ACE_Addr::sap_any && remote == ACE_Addr::sap_any) - { - if (ACE_OS::bind (this->get_handle (), (sockaddr *) local.get_addr (), - local.get_size ()) == -1) - error = 1; - } + { + if (ACE_OS::bind (this->get_handle (), (sockaddr *) local.get_addr (), + local.get_size ()) == -1) + error = 1; + } // We are connecting to the remote address. else if (local == ACE_Addr::sap_any && remote != ACE_Addr::sap_any) - { - if (ACE_OS::connect (this->get_handle (), (sockaddr *) remote.get_addr (), - remote.get_size ()) == -1) - error = 1; - } + { + if (ACE_OS::connect (this->get_handle (), (sockaddr *) remote.get_addr (), + remote.get_size ()) == -1) + error = 1; + } // We are binding to the local address and connecting to the // remote addresses. else - { - if (ACE_OS::bind (this->get_handle (), (sockaddr *) local.get_addr (), - local.get_size ()) == -1 - || ACE_OS::connect (this->get_handle (), (sockaddr *) remote.get_addr (), - remote.get_size ()) == -1) - error = 1; - } + { + if (ACE_OS::bind (this->get_handle (), (sockaddr *) local.get_addr (), + local.get_size ()) == -1 + || ACE_OS::connect (this->get_handle (), (sockaddr *) remote.get_addr (), + remote.get_size ()) == -1) + error = 1; + } if (error) - { - this->close (); - this->set_handle (ACE_INVALID_HANDLE); - } + { + this->close (); + this->set_handle (ACE_INVALID_HANDLE); + } return error ? -1 : 0; } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_CODgram.h b/ace/SOCK_CODgram.h index 7381b33f8f4..9027bd518bc 100644 --- a/ace/SOCK_CODgram.h +++ b/ace/SOCK_CODgram.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -31,6 +31,8 @@ #include "ace/Addr.h" #include "ace/INET_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SOCK_CODgram * @@ -72,6 +74,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_CODgram.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_CODgram.inl b/ace/SOCK_CODgram.inl index a921bb5df5a..de7b0570973 100644 --- a/ace/SOCK_CODgram.inl +++ b/ace/SOCK_CODgram.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SOCK_CODgram.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_SOCK_CODgram::ACE_SOCK_CODgram (void) @@ -15,4 +16,4 @@ ACE_SOCK_CODgram::~ACE_SOCK_CODgram (void) ACE_TRACE ("ACE_SOCK_CODgram::~ACE_SOCK_CODgram"); } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Connector.cpp b/ace/SOCK_Connector.cpp index 86c09b92f1d..dbbe3cb539c 100644 --- a/ace/SOCK_Connector.cpp +++ b/ace/SOCK_Connector.cpp @@ -1,4 +1,3 @@ -// SOCK_Connector.cpp // $Id$ #include "ace/SOCK_Connector.h" @@ -18,6 +17,8 @@ ACE_RCSID(ace, SOCK_Connector, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Connector) void @@ -325,3 +326,5 @@ ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream, ACE_LIB_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector"))); } #endif // ACE_HAS_WINCE + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Connector.h b/ace/SOCK_Connector.h index c3395fd3c82..a829634f6fc 100644 --- a/ace/SOCK_Connector.h +++ b/ace/SOCK_Connector.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_QoS_Params; class ACE_Time_Value; @@ -317,6 +319,8 @@ protected: int result); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_Connector.inl b/ace/SOCK_Connector.inl index 423ffcd942e..bdbf5cd19f6 100644 --- a/ace/SOCK_Connector.inl +++ b/ace/SOCK_Connector.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SOCK_Connector.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // This constructor is used by a client when it wants to connect to // the specified REMOTE_SAP address using a blocking open. @@ -33,3 +34,5 @@ ACE_SOCK_Connector::reset_new_handle (ACE_HANDLE handle) return 0; #endif /* ACE_WIN32 */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp index b3e2c96b2bc..244ab959a46 100644 --- a/ace/SOCK_Dgram.cpp +++ b/ace/SOCK_Dgram.cpp @@ -28,6 +28,8 @@ ACE_RCSID (ace, #define IMR_MULTIADDR imr_multiaddr #endif /* ! defined (IMR_MULTIADDR) */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_SOCK_Dgram) void @@ -734,3 +736,5 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq, return 0; } #endif /* __linux__ && ACE_HAS_IPV6 */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Dgram.h b/ace/SOCK_Dgram.h index f07b77c85bb..c78b731db40 100644 --- a/ace/SOCK_Dgram.h +++ b/ace/SOCK_Dgram.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -23,6 +23,8 @@ #include "ace/Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -227,6 +229,8 @@ private: int get_remote_addr (ACE_Addr &) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_Dgram.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_Dgram.inl b/ace/SOCK_Dgram.inl index 8e7cd56aa69..55343b13668 100644 --- a/ace/SOCK_Dgram.inl +++ b/ace/SOCK_Dgram.inl @@ -1,10 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ // SOCK_Dgram.i #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Here's the simple-minded constructor. ACE_INLINE @@ -23,18 +26,18 @@ ACE_SOCK_Dgram::~ACE_SOCK_Dgram (void) ACE_INLINE ssize_t ACE_SOCK_Dgram::send (const void *buf, - size_t n, - const ACE_Addr &addr, - int flags) const + size_t n, + const ACE_Addr &addr, + int flags) const { ACE_TRACE ("ACE_SOCK_Dgram::send"); sockaddr *saddr = (sockaddr *) addr.get_addr (); int len = addr.get_size (); return ACE_OS::sendto (this->get_handle (), - (const char *) buf, + (const char *) buf, n, flags, - (struct sockaddr *) saddr, + (struct sockaddr *) saddr, len); } @@ -42,19 +45,19 @@ ACE_SOCK_Dgram::send (const void *buf, ACE_INLINE ssize_t ACE_SOCK_Dgram::recv (void *buf, - size_t n, - ACE_Addr &addr, - int flags) const + size_t n, + ACE_Addr &addr, + int flags) const { ACE_TRACE ("ACE_SOCK_Dgram::recv"); sockaddr *saddr = (sockaddr *) addr.get_addr (); int addr_len = addr.get_size (); ssize_t status = ACE_OS::recvfrom (this->get_handle (), - (char *) buf, + (char *) buf, n, flags, - (sockaddr *) saddr, + (sockaddr *) saddr, &addr_len); addr.set_size (addr_len); addr.set_type (reinterpret_cast<sockaddr_in *> (saddr)->sin_family); @@ -78,7 +81,7 @@ ACE_SOCK_Dgram::send (const iovec buffers[], buffer_count, number_of_bytes_sent, flags, - (const sockaddr *) saddr, + (const sockaddr *) saddr, len, overlapped, func); @@ -98,11 +101,11 @@ ACE_SOCK_Dgram::recv (iovec buffers[], int addr_len = addr.get_size (); ssize_t status = ACE_OS::recvfrom (this->get_handle (), - buffers, + buffers, buffer_count, number_of_bytes_recvd, flags, - (sockaddr *) saddr, + (sockaddr *) saddr, &addr_len, overlapped, func); @@ -115,9 +118,9 @@ ACE_SOCK_Dgram::recv (iovec buffers[], ACE_INLINE ssize_t ACE_SOCK_Dgram::send (const void *buf, - size_t n, - const ACE_Addr &addr, - int flags, + size_t n, + const ACE_Addr &addr, + int flags, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const { @@ -140,9 +143,9 @@ ACE_SOCK_Dgram::send (const void *buf, ACE_INLINE ssize_t ACE_SOCK_Dgram::recv (void *buf, - size_t n, - ACE_Addr &addr, - int flags, + size_t n, + ACE_Addr &addr, + int flags, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const { @@ -160,3 +163,5 @@ ACE_SOCK_Dgram::recv (void *buf, overlapped, func); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Dgram_Bcast.cpp b/ace/SOCK_Dgram_Bcast.cpp index ac8ea8f00fe..4138d067c37 100644 --- a/ace/SOCK_Dgram_Bcast.cpp +++ b/ace/SOCK_Dgram_Bcast.cpp @@ -15,6 +15,8 @@ ACE_RCSID(ace, SOCK_Dgram_Bcast, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Dgram_Bcast) ACE_Bcast_Node::ACE_Bcast_Node (ACE_INET_Addr &addr, @@ -172,7 +174,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) There are addresses longer than sizeof (struct sockaddr) eg. IPv6 or QNX::links. In this case address does not fit into struct ifreq. The code below could be applied everywhere, but not every system - provides sockaddr.sa_len field. + provides sockaddr.sa_len field. */ for (int nbytes = ifc.ifc_len; nbytes >= (int) sizeof (struct ifreq) && ((ifr->ifr_addr.sa_len > sizeof (struct sockaddr)) ? @@ -225,8 +227,8 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) (char *) &flags) == -1) { ACE_ERROR ((LM_ERROR, "%p [%s]\n", - "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get interface flags)", - flags.ifr_name)); + "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get interface flags)", + flags.ifr_name)); continue; } @@ -234,8 +236,8 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) IFF_UP) == 0) { ACE_ERROR ((LM_ERROR, "%p [%s]\n", - "ACE_SOCK_Dgram_Bcast::mk_broadcast: Network interface is not up", - flags.ifr_name)); + "ACE_SOCK_Dgram_Bcast::mk_broadcast: Network interface is not up", + flags.ifr_name)); continue; } @@ -250,8 +252,8 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) SIOCGIFBRDADDR, (char *) &if_req) == -1) ACE_ERROR ((LM_ERROR, "%p [%s]\n", - "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get broadaddr)", - flags.ifr_name)); + "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get broadaddr)", + flags.ifr_name)); else { ACE_INET_Addr addr (reinterpret_cast <sockaddr_in *> @@ -374,3 +376,5 @@ ACE_SOCK_Dgram_Bcast::send (const iovec iov[], return ACE_SOCK_Dgram::send (iov, n, addr, flags); } #endif /* ACE_HAS_MSG */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Dgram_Bcast.h b/ace/SOCK_Dgram_Bcast.h index c9a7662ffb7..4ad28109d95 100644 --- a/ace/SOCK_Dgram_Bcast.h +++ b/ace/SOCK_Dgram_Bcast.h @@ -29,6 +29,8 @@ #include "ace/SOCK_Dgram.h" #include "ace/INET_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Bcast_Node * @@ -133,6 +135,8 @@ private: int get_remote_addr (ACE_Addr &) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_Dgram_Bcast.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_Dgram_Bcast.inl b/ace/SOCK_Dgram_Bcast.inl index 85c3312ef9d..00bb342be5e 100644 --- a/ace/SOCK_Dgram_Bcast.inl +++ b/ace/SOCK_Dgram_Bcast.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Bcast_Node::~ACE_Bcast_Node (void) { @@ -19,16 +22,16 @@ ACE_SOCK_Dgram_Bcast::~ACE_SOCK_Dgram_Bcast (void) ACE_INLINE ssize_t ACE_SOCK_Dgram_Bcast::send (const void *buf, - size_t n, - const ACE_Addr &addr, - int flags) const + size_t n, + const ACE_Addr &addr, + int flags) const { ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send"); sockaddr *saddr = (sockaddr *) addr.get_addr (); int len = addr.get_size (); return ACE_OS::sendto (this->get_handle (), (const char *) buf, n, flags, - (struct sockaddr *) saddr, len); + (struct sockaddr *) saddr, len); } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_IO.cpp b/ace/SOCK_IO.cpp index 844a70ef877..ed082f903b4 100644 --- a/ace/SOCK_IO.cpp +++ b/ace/SOCK_IO.cpp @@ -1,4 +1,3 @@ -// SOCK_IO.cpp // $Id$ #include "ace/SOCK_IO.h" @@ -14,6 +13,8 @@ ACE_RCSID(ace, SOCK_IO, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_IO) void @@ -169,3 +170,5 @@ ACE_SOCK_IO::recv (size_t n, ...) const va_end (argp); return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_IO.h b/ace/SOCK_IO.h index 650095ebf39..6353a823b72 100644 --- a/ace/SOCK_IO.h +++ b/ace/SOCK_IO.h @@ -23,6 +23,8 @@ #include "ace/ACE.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SOCK_IO * @@ -138,6 +140,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_IO.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_IO.inl b/ace/SOCK_IO.inl index 96950c2cd99..2c84b8ebb64 100644 --- a/ace/SOCK_IO.inl +++ b/ace/SOCK_IO.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_unistd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Send an n byte message to the connected socket. ACE_INLINE @@ -147,3 +150,5 @@ ACE_SOCK_IO::send (const void *buf, n, overlapped); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_SEQPACK_Acceptor.cpp b/ace/SOCK_SEQPACK_Acceptor.cpp index 7ec5fadbbde..69d832c41d0 100644 --- a/ace/SOCK_SEQPACK_Acceptor.cpp +++ b/ace/SOCK_SEQPACK_Acceptor.cpp @@ -15,6 +15,8 @@ ACE_RCSID(ace, SOCK_SEQPACK_Acceptor, "SOCK_SEQPACK_Acceptor.cpp,v 4.30 2002/03/08 23:18:09 spark Exp") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_SEQPACK_Acceptor) // Do nothing routine for constructor. @@ -591,3 +593,4 @@ ACE_SOCK_SEQPACK_Acceptor::close (void) return ACE_SOCK::close (); } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_SEQPACK_Acceptor.h b/ace/SOCK_SEQPACK_Acceptor.h index ae04541b404..921bcc86d0c 100644 --- a/ace/SOCK_SEQPACK_Acceptor.h +++ b/ace/SOCK_SEQPACK_Acceptor.h @@ -32,6 +32,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Time_Value; @@ -183,6 +184,8 @@ private: int get_remote_addr (ACE_Addr &) const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_SEQPACK_Acceptor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_SEQPACK_Acceptor.inl b/ace/SOCK_SEQPACK_Acceptor.inl index 39c1700b53c..0a0b591d75f 100644 --- a/ace/SOCK_SEQPACK_Acceptor.inl +++ b/ace/SOCK_SEQPACK_Acceptor.inl @@ -1,10 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_SOCK_SEQPACK_Acceptor::~ACE_SOCK_SEQPACK_Acceptor (void) { ACE_TRACE ("ACE_SOCK_SEQPACK_Acceptor::~ACE_SOCK_SEQPACK_Acceptor"); } - +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_SEQPACK_Association.cpp b/ace/SOCK_SEQPACK_Association.cpp index 45eed58d1a4..820bd0fb78f 100644 --- a/ace/SOCK_SEQPACK_Association.cpp +++ b/ace/SOCK_SEQPACK_Association.cpp @@ -13,6 +13,8 @@ ACE_RCSID(ace, SOCK_SEQPACK_Association, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_SEQPACK_Association) void @@ -341,3 +343,5 @@ template class ACE_Auto_Basic_Array_Ptr<sockaddr_in>; #pragma instantiate ACE_Auto_Array_Ptr<sockaddr_in> #pragma instantiate ACE_Auto_Basic_Array_Ptr<sockaddr_in> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_SEQPACK_Association.h b/ace/SOCK_SEQPACK_Association.h index c2b25065827..f0295275c07 100644 --- a/ace/SOCK_SEQPACK_Association.h +++ b/ace/SOCK_SEQPACK_Association.h @@ -35,6 +35,8 @@ #include "ace/Multihomed_INET_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations. class ACE_Message_Block; @@ -195,6 +197,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_SEQPACK_Association.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_SEQPACK_Association.inl b/ace/SOCK_SEQPACK_Association.inl index 3c33c96968e..a156a946257 100644 --- a/ace/SOCK_SEQPACK_Association.inl +++ b/ace/SOCK_SEQPACK_Association.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/SOCK_SEQPACK_Association.h" #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_SOCK_SEQPACK_Association::ACE_SOCK_SEQPACK_Association (void) { @@ -170,3 +173,5 @@ ACE_SOCK_SEQPACK_Association::recv_urg (void *ptr, MSG_OOB, timeout); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_SEQPACK_Connector.cpp b/ace/SOCK_SEQPACK_Connector.cpp index b7cb5471755..128beb23f22 100644 --- a/ace/SOCK_SEQPACK_Connector.cpp +++ b/ace/SOCK_SEQPACK_Connector.cpp @@ -20,6 +20,8 @@ ACE_RCSID(ace, SOCK_SEQPACK_Connector, "SOCK_SEQPACK_Connector.cpp,v 4.35 2002/03/08 23:18:09 spark Exp") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_SEQPACK_Connector) void @@ -166,14 +168,14 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association & // get sockaddr_in for the local handle if (ACE_OS::getsockname(new_association.get_handle (), reinterpret_cast<sockaddr *> (&portst), - &sn)) + &sn)) { ACE_Errno_Guard error (errno); - new_association.close (); + new_association.close (); return -1; } - // set the local port # assigned by the os to every secondary addr + // set the local port # assigned by the os to every secondary addr for (size_t i = 1; i < num_addresses; i++) { local_inet_addrs[i].sin_port = portst.sin_port; @@ -198,7 +200,7 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_start (ACE_SOCK_SEQPACK_Association & return -1; } - delete [] local_sockaddr; + delete [] local_sockaddr; } #else @@ -437,3 +439,5 @@ ACE_SOCK_SEQPACK_Connector::ACE_SOCK_SEQPACK_Connector (ACE_SOCK_SEQPACK_Associa ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_SOCK_SEQPACK_Connector::ACE_SOCK_SEQPACK_Connector"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_SEQPACK_Connector.h b/ace/SOCK_SEQPACK_Connector.h index 3c913d3ff82..ae5f0c7573a 100644 --- a/ace/SOCK_SEQPACK_Connector.h +++ b/ace/SOCK_SEQPACK_Connector.h @@ -9,7 +9,7 @@ * @author Patrick J. Lardieri <plardier@atl.lmco.com> * @author Gaurav Naik, Lockheed Martin ATL * @author based on SOCK_STREAM_Connector - * by Douglas C. Schmidt <schmidt@cs.wustl.edu> + * by Douglas C. Schmidt <schmidt@dre.vanderbilt.edu> * */ //============================================================================= @@ -33,6 +33,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations. class ACE_Time_Value; @@ -323,6 +325,8 @@ protected: int result); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_SEQPACK_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_SEQPACK_Connector.inl b/ace/SOCK_SEQPACK_Connector.inl index 6450abb6ce9..a89c41f4069 100644 --- a/ace/SOCK_SEQPACK_Connector.inl +++ b/ace/SOCK_SEQPACK_Connector.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // This constructor is used by a client when it wants to connect to // the specified REMOTE_SAP address using a blocking open. @@ -31,3 +34,5 @@ ACE_SOCK_SEQPACK_Connector::reset_new_handle (ACE_HANDLE handle) return 0; #endif /* ACE_WIN32 */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Stream.cpp b/ace/SOCK_Stream.cpp index ea794662356..2254f553413 100644 --- a/ace/SOCK_Stream.cpp +++ b/ace/SOCK_Stream.cpp @@ -1,4 +1,3 @@ -// SOCK_Stream.cpp // $Id$ #include "ace/SOCK_Stream.h" @@ -9,6 +8,8 @@ ACE_RCSID(ace, SOCK_Stream, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Stream) void @@ -26,3 +27,4 @@ ACE_SOCK_Stream::close (void) return ACE_SOCK::close (); } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SOCK_Stream.h b/ace/SOCK_Stream.h index 5cf0fadb8e8..92000947271 100644 --- a/ace/SOCK_Stream.h +++ b/ace/SOCK_Stream.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -22,6 +22,8 @@ #include "ace/INET_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward declarations. class ACE_Message_Block; @@ -159,6 +161,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SOCK_Stream.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SOCK_Stream.inl b/ace/SOCK_Stream.inl index 5ba88bc55c5..ed5e8b231b8 100644 --- a/ace/SOCK_Stream.inl +++ b/ace/SOCK_Stream.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/SOCK_Stream.h" #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_SOCK_Stream::ACE_SOCK_Stream (void) { @@ -170,3 +173,5 @@ ACE_SOCK_Stream::recv_urg (void *ptr, MSG_OOB, timeout); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE.cpp b/ace/SPIPE.cpp index f69c8b63b33..b6b1300b26d 100644 --- a/ace/SPIPE.cpp +++ b/ace/SPIPE.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, SPIPE, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE) // This is the do-nothing constructor. @@ -76,3 +78,5 @@ ACE_SPIPE::set_duplex_handle (ACE_HANDLE handle) this->duplex_pipe_handle_ = handle; } #endif /* ACE_HAS_STREAM_PIPES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE.h b/ace/SPIPE.h index 61278aac517..99bc370b84d 100644 --- a/ace/SPIPE.h +++ b/ace/SPIPE.h @@ -23,6 +23,8 @@ #include "ace/SPIPE_Addr.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SPIPE * @@ -104,6 +106,8 @@ protected: ACE_SPIPE_Addr local_addr_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SPIPE.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SPIPE.inl b/ace/SPIPE.inl index 2912e4d7493..45814117a51 100644 --- a/ace/SPIPE.inl +++ b/ace/SPIPE.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_SPIPE::disable (int signum) const { @@ -12,3 +15,4 @@ ACE_SPIPE::disable (int signum) const #endif /* ACE_WIN32 */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Acceptor.cpp b/ace/SPIPE_Acceptor.cpp index 84e3d517b2c..9473e0d629c 100644 --- a/ace/SPIPE_Acceptor.cpp +++ b/ace/SPIPE_Acceptor.cpp @@ -1,4 +1,3 @@ -// SPIPE_Acceptor.cpp // $Id$ #include "ace/SPIPE_Acceptor.h" @@ -12,6 +11,8 @@ ACE_RCSID(ace, SPIPE_Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor (void) #if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) : sa_ (0), pipe_handle_ (ACE_INVALID_HANDLE) @@ -302,3 +303,5 @@ ACE_SPIPE_Acceptor::accept (ACE_SPIPE_Stream &new_io, ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_STREAM_PIPES */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Acceptor.h b/ace/SPIPE_Acceptor.h index 0b73d2be05d..6e0bb7ed8aa 100644 --- a/ace/SPIPE_Acceptor.h +++ b/ace/SPIPE_Acceptor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -26,6 +26,8 @@ #include "ace/Manual_Event.h" #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SPIPE_Acceptor * @@ -41,7 +43,7 @@ * * @warning Works on non-Windows platforms only when @c ACE_HAS_STREAM_PIPES * is defined. - * + * */ class ACE_Export ACE_SPIPE_Acceptor : public ACE_SPIPE { @@ -160,5 +162,7 @@ private: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SPIPE_ACCEPTOR_H */ diff --git a/ace/SPIPE_Addr.cpp b/ace/SPIPE_Addr.cpp index beb73d68b2d..b4ec63e4fc3 100644 --- a/ace/SPIPE_Addr.cpp +++ b/ace/SPIPE_Addr.cpp @@ -1,4 +1,3 @@ -// SPIPE_Addr.cpp // $Id$ #include "ace/SPIPE_Addr.h" @@ -12,6 +11,8 @@ ACE_RCSID(ace, SPIPE_Addr, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE_Addr) void @@ -29,8 +30,8 @@ ACE_SPIPE_Addr::set_addr (void *addr, int len) this->ACE_Addr::base_set (AF_SPIPE, len); ACE_OS::memcpy ((void *) &this->SPIPE_addr_, - (void *) addr, - len); + (void *) addr, + len); } // Return the address. @@ -49,7 +50,7 @@ ACE_SPIPE_Addr::ACE_SPIPE_Addr (void) { (void) ACE_OS::memset ((void *) &this->SPIPE_addr_, 0, - sizeof this->SPIPE_addr_); + sizeof this->SPIPE_addr_); } int @@ -95,8 +96,8 @@ ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa) int ACE_SPIPE_Addr::set (const ACE_TCHAR *addr, - gid_t gid, - uid_t uid) + gid_t gid, + uid_t uid) { int len = sizeof (this->SPIPE_addr_.uid_); len += sizeof (this->SPIPE_addr_.gid_); @@ -156,9 +157,11 @@ ACE_SPIPE_Addr::set (const ACE_TCHAR *addr, // Create a ACE_Addr from a ACE_SPIPE pathname. ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_TCHAR *addr, - gid_t gid, - uid_t uid) + gid_t gid, + uid_t uid) : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_) { this->set (addr, gid, uid); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Addr.h b/ace/SPIPE_Addr.h index ffc150b98cd..e6791a8c656 100644 --- a/ace/SPIPE_Addr.h +++ b/ace/SPIPE_Addr.h @@ -1,4 +1,5 @@ // -*- C++ -*- + //========================================================================== /** * @file SPIPE_Addr.h @@ -25,6 +26,8 @@ #include "ace/os_include/sys/os_types.h" #include "ace/os_include/os_dirent.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SPIPE_Addr * @@ -109,6 +112,8 @@ private: // Contents of an SPIPE address. }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SPIPE_Addr.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SPIPE_Addr.inl b/ace/SPIPE_Addr.inl index 1c2858bc399..ea4c71ef682 100644 --- a/ace/SPIPE_Addr.inl +++ b/ace/SPIPE_Addr.inl @@ -5,6 +5,7 @@ #include "ace/SString.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Compare two addresses for equality. @@ -20,7 +21,7 @@ ACE_SPIPE_Addr::operator == (const ACE_SPIPE_Addr &sap) const ACE_INLINE bool ACE_SPIPE_Addr::operator != (const ACE_SPIPE_Addr &sap) const { - return !((*this) == sap); // This is lazy, of course... ;-) + return !((*this) == sap); // This is lazy, of course... ;-) } // Return the path name used for the rendezvous point. @@ -54,3 +55,5 @@ ACE_SPIPE_Addr::group_id (gid_t gid) { this->SPIPE_addr_.gid_ = gid; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Connector.cpp b/ace/SPIPE_Connector.cpp index b715aa67690..c7c9a0c10dc 100644 --- a/ace/SPIPE_Connector.cpp +++ b/ace/SPIPE_Connector.cpp @@ -12,6 +12,8 @@ ACE_RCSID(ace, SPIPE_Connector, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE_Connector) // Creates a Local ACE_SPIPE. @@ -156,3 +158,5 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io, return handle == ACE_INVALID_HANDLE ? -1 : 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Connector.h b/ace/SPIPE_Connector.h index 7648e63b4a4..f9fc2455ecc 100644 --- a/ace/SPIPE_Connector.h +++ b/ace/SPIPE_Connector.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SPIPE_Connector * @@ -106,6 +108,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SPIPE_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SPIPE_Connector.inl b/ace/SPIPE_Connector.inl index 4ca09d7887e..bbec9b8f468 100644 --- a/ace/SPIPE_Connector.inl +++ b/ace/SPIPE_Connector.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_SPIPE_Connector::reset_new_handle (ACE_HANDLE handle) { @@ -9,3 +12,4 @@ ACE_SPIPE_Connector::reset_new_handle (ACE_HANDLE handle) return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Stream.cpp b/ace/SPIPE_Stream.cpp index 40d96974ceb..fcc695d6271 100644 --- a/ace/SPIPE_Stream.cpp +++ b/ace/SPIPE_Stream.cpp @@ -1,4 +1,3 @@ -// SPIPE_Stream.cpp // $Id$ #include "ace/SPIPE_Stream.h" @@ -10,6 +9,8 @@ ACE_RCSID(ace, SPIPE_Stream, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE_Stream) void @@ -99,3 +100,5 @@ ACE_SPIPE_Stream::recv (size_t n, ...) const va_end (argp); return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SPIPE_Stream.inl b/ace/SPIPE_Stream.inl index 11b8fef5a9e..dbc3725782c 100644 --- a/ace/SPIPE_Stream.inl +++ b/ace/SPIPE_Stream.inl @@ -1,8 +1,7 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SPIPE_Stream.i - #include "ace/OS_NS_sys_uio.h" #include "ace/OS_NS_errno.h" #include "ace/OS_NS_unistd.h" @@ -10,6 +9,8 @@ #include "ace/OS_NS_sys_socket.h" #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Create an ACE_SPIPE_Stream. ACE_INLINE int @@ -272,3 +273,5 @@ ACE_SPIPE_Stream::sendv (const iovec iov[], n); } +ACE_END_VERSIONED_NAMESPACE_DECL + diff --git a/ace/SSL/SSL_Asynch_Stream.cpp b/ace/SSL/SSL_Asynch_Stream.cpp index ebde7e69e4b..1aad32cf9b4 100644 --- a/ace/SSL/SSL_Asynch_Stream.cpp +++ b/ace/SSL/SSL_Asynch_Stream.cpp @@ -1,5 +1,3 @@ -// -*- C++ -*- - #include "SSL_Asynch_Stream.h" ACE_RCSID (ACE_SSL, @@ -36,12 +34,14 @@ ACE_RCSID (ACE_SSL, #include <openssl/err.h> +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // ************************************************************ // SSL Asynchronous Write Result // ************************************************************ -class ACE_SSL_Export ACE_SSL_Asynch_Write_Stream_Result: - public AWS_RESULT +class ACE_SSL_Asynch_Write_Stream_Result + : public AWS_RESULT { /// Factory class will have special permissions. friend class ACE_SSL_Asynch_Stream; @@ -83,8 +83,8 @@ ACE_SSL_Asynch_Write_Stream_Result::ACE_SSL_Asynch_Write_Stream_Result // ************************************************************ // SSL Asynchronous Read Result // ************************************************************ -class ACE_SSL_Export ACE_SSL_Asynch_Read_Stream_Result: - public ARS_RESULT +class ACE_SSL_Asynch_Read_Stream_Result + : public ARS_RESULT { /// Factory class will have special permissions. friend class ACE_SSL_Asynch_Stream; @@ -1120,5 +1120,7 @@ ACE_SSL_Asynch_Stream::pending_BIO_count (void) return ret; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* OPENSSL_VERSION_NUMBER > 0x0090581fL && (ACE_WIN32 || ACE_HAS_AIO_CALLS) */ diff --git a/ace/SSL/SSL_Asynch_Stream.h b/ace/SSL/SSL_Asynch_Stream.h index e8d2b8f8c34..8e8f5534e3a 100644 --- a/ace/SSL/SSL_Asynch_Stream.h +++ b/ace/SSL/SSL_Asynch_Stream.h @@ -35,9 +35,9 @@ extern "C" BIO * BIO_new_ACE_Asynch (void *ssl_asynch_stream); } +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /// Forward declarations -class ACE_SSL_Asynch_Stream; class ACE_SSL_Asynch_Result; class ACE_SSL_Asynch_Read_Stream_Result; class ACE_SSL_Asynch_Write_Stream_Result; @@ -246,6 +246,7 @@ protected: }; +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* OPENSSL_VERSION_NUMBER > 0x0090581fL && (ACE_WIN32 || ACE_HAS_AIO_CALLS) */ diff --git a/ace/SSL/SSL_Context.cpp b/ace/SSL/SSL_Context.cpp index 191af4b4d28..bd7af2f3fce 100644 --- a/ace/SSL/SSL_Context.cpp +++ b/ace/SSL/SSL_Context.cpp @@ -1,5 +1,3 @@ -// -*- C++ -*- - #include "ace/OS_NS_string.h" #include "ace/ACE.h" #include "SSL_Context.h" @@ -25,10 +23,53 @@ ACE_RCSID (ACE_SSL, SSL_Context, "$Id$") + #ifdef ACE_HAS_THREADS -ACE_mutex_t * ACE_SSL_Context::lock_ = 0; +void +ACE_SSL_locking_callback (int mode, + int type, + const char * /* file */, + int /* line */) +{ + // #ifdef undef + // fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", + // CRYPTO_thread_id(), + // (mode&CRYPTO_LOCK)?"l":"u", + // (type&CRYPTO_READ)?"r":"w",file,line); + // #endif + // /* + // if (CRYPTO_LOCK_SSL_CERT == type) + // fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", + // CRYPTO_thread_id(), + // mode,file,line); + // */ + if (mode & CRYPTO_LOCK) + ACE_OS::mutex_lock (&(ACE_SSL_Context::lock_[type])); + else + ACE_OS::mutex_unlock (&(ACE_SSL_Context::lock_[type])); +} + +// ------------------------------- + +extern "C" +{ + /// Return the current thread ID. OpenSSL uses this on platforms + /// that need it. + unsigned long + ACE_SSL_thread_id (void) + { + return (unsigned long) ACE_OS::thr_self (); + } +} #endif /* ACE_HAS_THREADS */ +// **************************************************************** + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +#ifdef ACE_HAS_THREADS +ACE_mutex_t * ACE_SSL_Context::lock_ = 0; +#endif /* ACE_HAS_THREADS */ int ACE_SSL_Context::library_init_count_ = 0; @@ -486,47 +527,10 @@ ACE_SSL_Context::dh_params (const char *file_name, return 0; } -// **************************************************************** - -#ifdef ACE_HAS_THREADS - -void -ACE_SSL_locking_callback (int mode, - int type, - const char * /* file */, - int /* line */) -{ - // #ifdef undef - // fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", - // CRYPTO_thread_id(), - // (mode&CRYPTO_LOCK)?"l":"u", - // (type&CRYPTO_READ)?"r":"w",file,line); - // #endif - // /* - // if (CRYPTO_LOCK_SSL_CERT == type) - // fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - // CRYPTO_thread_id(), - // mode,file,line); - // */ - if (mode & CRYPTO_LOCK) - ACE_OS::mutex_lock (&(ACE_SSL_Context::lock_[type])); - else - ACE_OS::mutex_unlock (&(ACE_SSL_Context::lock_[type])); -} - - - -unsigned long -ACE_SSL_thread_id (void) -{ - return (unsigned long) ACE_OS::thr_self (); -} -#endif /* ACE_HAS_THREADS */ +ACE_END_VERSIONED_NAMESPACE_DECL // **************************************************************** - - #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Singleton<ACE_SSL_Context, ACE_SYNCH_MUTEX>; diff --git a/ace/SSL/SSL_Context.h b/ace/SSL/SSL_Context.h index 37a8de30496..e999e2ff26a 100644 --- a/ace/SSL/SSL_Context.h +++ b/ace/SSL/SSL_Context.h @@ -33,20 +33,16 @@ #ifdef ACE_HAS_THREADS extern "C" { - /// Mutex locking/unlocking callback for OpenSSL multithread /// support. void ACE_SSL_locking_callback (int mode, int type, const char * file, int line); - - /// Return the current thread ID. OpenSSL uses this on platforms - /// that need it. - unsigned long ACE_SSL_thread_id (void); } #endif /* ACE_HAS_THREADS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_SSL_Export ACE_SSL_Data_File { @@ -88,7 +84,7 @@ private: */ class ACE_SSL_Export ACE_SSL_Context { - friend void ACE_SSL_locking_callback (int, int, const char *, int); + friend void ::ACE_SSL_locking_callback (int, int, const char *, int); public: @@ -354,6 +350,8 @@ private: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined(__ACE_INLINE__) #include "SSL_Context.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SSL/SSL_Context.inl b/ace/SSL/SSL_Context.inl index 9008591e1c9..5fd50ec6d43 100644 --- a/ace/SSL/SSL_Context.inl +++ b/ace/SSL/SSL_Context.inl @@ -2,6 +2,7 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_SSL_Data_File::ACE_SSL_Data_File (void) @@ -104,3 +105,5 @@ ACE_SSL_Context::have_trusted_ca (void) const { return this->have_ca_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK.cpp b/ace/SSL/SSL_SOCK.cpp index 0f38ddb4206..c6f1af15388 100644 --- a/ace/SSL/SSL_SOCK.cpp +++ b/ace/SSL/SSL_SOCK.cpp @@ -1,8 +1,5 @@ -// -*- C++ -*- -// // $Id$ - #include "SSL_SOCK.h" #if !defined (__ACE_INLINE__) @@ -17,6 +14,8 @@ ACE_RCSID (ACE_SSL, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_SSL_SOCK::ACE_SSL_SOCK (void) { ACE_TRACE ("ACE_SSL_SOCK::ACE_SSL_SOCK"); @@ -69,3 +68,5 @@ ACE_SSL_SOCK::disable (int value) const return -1; } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK.h b/ace/SSL/SSL_SOCK.h index c5d65b35a72..0a86a1f5c9f 100644 --- a/ace/SSL/SSL_SOCK.h +++ b/ace/SSL/SSL_SOCK.h @@ -34,6 +34,8 @@ # define ACE_SSL_SOCK_STREAM ACE_SSL_SOCK_Stream, ACE_INET_Addr #endif /* ACE_HAS_TEMPLATE_TYPEDEFS */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SSL_SOCK * @@ -50,9 +52,6 @@ class ACE_SSL_Export ACE_SSL_SOCK : public ACE_SOCK { public: - /// Default destructor. - ~ACE_SSL_SOCK (void); - /** * Override ACE_SOCK base class implementations with these SSL * specific ones. @@ -79,8 +78,18 @@ protected: /// from being defined. ACE_SSL_SOCK (void); + /// Destructor + /** + * Not a virtual destructor. Protected destructor to prevent + * operator delete() from being called through a base class + * ACE_SSL_SOCK pointer/reference. + */ + ~ACE_SSL_SOCK (void); + }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "SSL_SOCK.i" #endif /* __ACE_INLINE__ */ diff --git a/ace/SSL/SSL_SOCK.i b/ace/SSL/SSL_SOCK.i index bd2b967b97a..1a39d5214dc 100644 --- a/ace/SSL/SSL_SOCK.i +++ b/ace/SSL/SSL_SOCK.i @@ -1,8 +1,11 @@ // -*- C++ -*- +// // $Id$ #include "ace/OS_NS_sys_socket.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void ACE_SSL_SOCK::set_handle (ACE_HANDLE fd) { @@ -25,9 +28,9 @@ ACE_SSL_SOCK::control (int cmd, void *arg) const ACE_INLINE int ACE_SSL_SOCK::set_option (int level, - int option, - void *optval, - int optlen) const + int option, + void *optval, + int optlen) const { // switch (option) // { @@ -37,9 +40,9 @@ ACE_SSL_SOCK::set_option (int level, // return ::BIO_set_read_buffer_size (this->io_bio_, *((int *) optval)); // default: return ACE_OS::setsockopt (this->get_handle (), - level, - option, (char *) optval, - optlen); + level, + option, (char *) optval, + optlen); // } } @@ -47,9 +50,9 @@ ACE_SSL_SOCK::set_option (int level, ACE_INLINE int ACE_SSL_SOCK::get_option (int level, - int option, - void *optval, - int *optlen) const + int option, + void *optval, + int *optlen) const { // switch (option) // { @@ -59,8 +62,10 @@ ACE_SSL_SOCK::get_option (int level, // return ::BIO_get_read_buffer_size (this->io_bio_, *((int *) optval)); // default: return ACE_OS::getsockopt (this->get_handle (), - level, - option, (char *) optval, - optlen); + level, + option, (char *) optval, + optlen); // } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK_Acceptor.cpp b/ace/SSL/SSL_SOCK_Acceptor.cpp index 6dedbf05bca..acad89fd219 100644 --- a/ace/SSL/SSL_SOCK_Acceptor.cpp +++ b/ace/SSL/SSL_SOCK_Acceptor.cpp @@ -22,6 +22,8 @@ ACE_RCSID (ACE_SSL, SSL_SOCK_Acceptor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_SSL_SOCK_Acceptor::~ACE_SSL_SOCK_Acceptor (void) { ACE_TRACE ("ACE_SSL_SOCK_Acceptor::~ACE_SSL_SOCK_Acceptor"); @@ -242,5 +244,6 @@ ACE_SSL_SOCK_Acceptor::accept (ACE_SSL_SOCK_Stream &new_stream, } return 0; - } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK_Acceptor.h b/ace/SSL/SSL_SOCK_Acceptor.h index 698ebcbefd9..0428365a753 100644 --- a/ace/SSL/SSL_SOCK_Acceptor.h +++ b/ace/SSL/SSL_SOCK_Acceptor.h @@ -29,6 +29,8 @@ #include "ace/SOCK_Acceptor.h" #include "ace/OS_QoS.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SSL_SOCK_Acceptor * @@ -68,10 +70,10 @@ public: * upon return. */ ACE_SSL_SOCK_Acceptor (const ACE_Addr &local_sap, - int reuse_addr = 0, - int protocol_family = PF_UNSPEC, - int backlog = ACE_DEFAULT_BACKLOG, - int protocol = 0); + int reuse_addr = 0, + int protocol_family = PF_UNSPEC, + int backlog = ACE_DEFAULT_BACKLOG, + int protocol = 0); /** * Initiate a passive-mode QoS-enabled acceptor socket. @@ -84,13 +86,13 @@ public: * upon return. */ ACE_SSL_SOCK_Acceptor (const ACE_Addr &local_sap, - ACE_Protocol_Info *protocolinfo, - ACE_SOCK_GROUP g, - u_long flags, - int reuse_addr, - int protocol_family = PF_UNSPEC, - int backlog = ACE_DEFAULT_BACKLOG, - int protocol = 0); + ACE_Protocol_Info *protocolinfo, + ACE_SOCK_GROUP g, + u_long flags, + int reuse_addr, + int protocol_family = PF_UNSPEC, + int backlog = ACE_DEFAULT_BACKLOG, + int protocol = 0); /** * Initiate a passive mode SSL/BSD-style acceptor socket. @@ -156,7 +158,7 @@ public: * @return 0 if success; -1 for failure (errno contains error code). */ int accept (ACE_SSL_SOCK_Stream &new_stream, - ACE_Accept_QoS_Params qos_params, + ACE_Accept_QoS_Params qos_params, ACE_Addr *remote_addr = 0, ACE_Time_Value *timeout = 0, int restart = 1, @@ -185,6 +187,8 @@ private: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "SSL_SOCK_Acceptor.i" #endif /* __ACE_INLINE__ */ diff --git a/ace/SSL/SSL_SOCK_Acceptor.i b/ace/SSL/SSL_SOCK_Acceptor.i index 01cc06fd8bb..7fd8cb04095 100644 --- a/ace/SSL/SSL_SOCK_Acceptor.i +++ b/ace/SSL/SSL_SOCK_Acceptor.i @@ -2,6 +2,7 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor (void) @@ -80,3 +81,5 @@ ACE_SSL_SOCK_Acceptor::close (void) return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK_Connector.cpp b/ace/SSL/SSL_SOCK_Connector.cpp index 5b6f2e09e0c..41e00ff6f4a 100644 --- a/ace/SSL/SSL_SOCK_Connector.cpp +++ b/ace/SSL/SSL_SOCK_Connector.cpp @@ -20,8 +20,9 @@ ACE_RCSID (ACE_SSL, SSL_SOCK_Connector, "$Id$") -ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Connector) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Connector) ACE_SSL_SOCK_Connector::~ACE_SSL_SOCK_Connector (void) { @@ -406,3 +407,5 @@ ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector ( reuse_addr, perms); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK_Connector.h b/ace/SSL/SSL_SOCK_Connector.h index 9ece41271a2..702dbbf82ec 100644 --- a/ace/SSL/SSL_SOCK_Connector.h +++ b/ace/SSL/SSL_SOCK_Connector.h @@ -30,6 +30,8 @@ #include "ace/SOCK_Connector.h" #include "ace/OS_QoS.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SSL_SOCK_Connector * @@ -258,13 +260,13 @@ public: int connect (ACE_SSL_SOCK_Stream &new_stream, const ACE_Addr &remote_sap, ACE_QoS_Params qos_params, - const ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, + const ACE_Time_Value *timeout = 0, + const ACE_Addr &local_sap = ACE_Addr::sap_any, ACE_Protocol_Info *protocolinfo = 0, ACE_SOCK_GROUP g = 0, u_long flags = 0, - int reuse_addr = 0, - int perms = 0); + int reuse_addr = 0, + int perms = 0); /** * Try to complete a non-blocking connection. @@ -305,6 +307,8 @@ private: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "SSL_SOCK_Connector.i" #endif /* __ACE_INLINE__ */ diff --git a/ace/SSL/SSL_SOCK_Connector.i b/ace/SSL/SSL_SOCK_Connector.i index f216828c622..67b5ef01540 100644 --- a/ace/SSL/SSL_SOCK_Connector.i +++ b/ace/SSL/SSL_SOCK_Connector.i @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SSL_SOCK_Connector.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector (void) @@ -23,3 +24,5 @@ ACE_SSL_SOCK_Connector::dump (void) const ACE_TRACE ("ACE_SSL_SOCK_Connector::dump"); this->connector_.dump (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK_Stream.cpp b/ace/SSL/SSL_SOCK_Stream.cpp index 69fff5ebfa4..9ddbfdf75b5 100644 --- a/ace/SSL/SSL_SOCK_Stream.cpp +++ b/ace/SSL/SSL_SOCK_Stream.cpp @@ -18,6 +18,8 @@ ACE_RCSID (ACE_SSL, SSL_SOCK_Stream, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Stream) ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream (ACE_SSL_Context *context) @@ -586,3 +588,5 @@ ACE_SSL_SOCK_Stream::get_remote_addr (ACE_Addr &addr) const return -1; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SSL/SSL_SOCK_Stream.h b/ace/SSL/SSL_SOCK_Stream.h index abace05d58f..a58d91e7c4b 100644 --- a/ace/SSL/SSL_SOCK_Stream.h +++ b/ace/SSL/SSL_SOCK_Stream.h @@ -34,6 +34,7 @@ #include "ace/SOCK_Stream.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_SSL_SOCK_Stream @@ -309,6 +310,8 @@ protected: }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "SSL_SOCK_Stream.i" #endif /* __ACE_INLINE__ */ diff --git a/ace/SSL/SSL_SOCK_Stream.i b/ace/SSL/SSL_SOCK_Stream.i index b80cd3e2884..352aca04b3e 100644 --- a/ace/SSL/SSL_SOCK_Stream.i +++ b/ace/SSL/SSL_SOCK_Stream.i @@ -4,6 +4,8 @@ #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void ACE_SSL_SOCK_Stream::set_handle (ACE_HANDLE fd) { @@ -317,3 +319,5 @@ ACE_SSL_SOCK_Stream::ssl (void) const { return this->ssl_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SString.cpp b/ace/SString.cpp index 99aeb632943..022ae874982 100644 --- a/ace/SString.cpp +++ b/ace/SString.cpp @@ -24,6 +24,8 @@ ACE_RCSID (ace, // ************************************************************ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) ACE_OSTREAM_TYPE & operator<< (ACE_OSTREAM_TYPE &os, const ACE_CString &cs) @@ -565,3 +567,5 @@ template ACE_String_Base<ACE_WSTRING_TYPE> operator + (const ACE_WSTRING_TYPE *, template char ACE_String_Base<char>::NULL_String_; template ACE_WSTRING_TYPE ACE_String_Base<ACE_WSTRING_TYPE>::NULL_String_; #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SString.h b/ace/SString.h index f2f79014cc4..5a44cbe8d46 100644 --- a/ace/SString.h +++ b/ace/SString.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -28,10 +28,14 @@ #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) #include "ace/iosfwd.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Export ACE_OSTREAM_TYPE &operator << (ACE_OSTREAM_TYPE &, const ACE_CString &); ACE_Export ACE_OSTREAM_TYPE &operator << (ACE_OSTREAM_TYPE &, const ACE_WString &); +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT template class ACE_Export ACE_String_Base<char>; template class ACE_Export ACE_String_Base<ACE_WSTRING_TYPE>; @@ -479,6 +483,8 @@ private: char* p_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SString.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SString.inl b/ace/SString.inl index a985c5456af..837bd4d037a 100644 --- a/ace/SString.inl +++ b/ace/SString.inl @@ -9,6 +9,8 @@ # include "ace/ACE.h" #endif /* !ACE_ACE_H */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_NS_WString::ACE_NS_WString (ACE_Allocator *alloc) : ACE_WString (alloc) @@ -290,3 +292,5 @@ ACE_Auto_String_Free::release (void) this->p_ = 0; return p; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SStringfwd.h b/ace/SStringfwd.h index f7bef34b86b..315553751ce 100644 --- a/ace/SStringfwd.h +++ b/ace/SStringfwd.h @@ -25,6 +25,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class CHAR> class ACE_String_Base; // Forward declaration. @@ -41,6 +42,8 @@ typedef ACE_WString ACE_TString; typedef ACE_CString ACE_TString; #endif /* ACE_USES_WCHAR */ +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SSTRINGFWD_H */ diff --git a/ace/SUN_Proactor.cpp b/ace/SUN_Proactor.cpp index 2f6e69fcc3d..c522f18d64b 100644 --- a/ace/SUN_Proactor.cpp +++ b/ace/SUN_Proactor.cpp @@ -14,6 +14,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_SUN_Proactor::ACE_SUN_Proactor (size_t max_aio_operations) : ACE_POSIX_AIOCB_Proactor (max_aio_operations, ACE_POSIX_Proactor::PROACTOR_SUN), @@ -315,6 +317,8 @@ ACE_POSIX_Proactor::Proactor_Type ACE_SUN_Proactor::get_impl_type (void) { return PROACTOR_SUN; -} +} + +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_AIO_CALLS && sun */ diff --git a/ace/SUN_Proactor.h b/ace/SUN_Proactor.h index fce65b40541..9d104355578 100644 --- a/ace/SUN_Proactor.h +++ b/ace/SUN_Proactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #include "ace/POSIX_Proactor.h" #include /**/ <sys/asynch.h> // Sun native aio calls +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SUN_Proactor * @@ -47,16 +49,16 @@ * it has the following structure: * typedef struct aiocb * { - * int aio_fildes; File descriptor - * void *aio_buf; buffer location + * int aio_fildes; File descriptor + * void *aio_buf; buffer location * size_t aio_nbytes; length of transfer * off_t aio_offset; file offset - * int aio_reqprio; request priority offset + * int aio_reqprio; request priority offset * sigevent aio_sigevent; signal number and offset - * int aio_lio_opcode; listio operation - * aio_result_t aio_resultp; results - * int aio_state; state flag for List I/O - * int aio__pad[1]; extension padding + * int aio_lio_opcode; listio operation + * aio_result_t aio_resultp; results + * int aio_state; state flag for List I/O + * int aio__pad[1]; extension padding * }; */ class ACE_Export ACE_SUN_Proactor : public ACE_POSIX_AIOCB_Proactor @@ -118,5 +120,7 @@ protected: ACE_SYNCH_CONDITION condition_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_AIO_CALLS && sun */ #endif /* ACE_SUN_PROACTOR_H*/ diff --git a/ace/SV_Message.cpp b/ace/SV_Message.cpp index f8ace600ab3..15368235910 100644 --- a/ace/SV_Message.cpp +++ b/ace/SV_Message.cpp @@ -9,6 +9,8 @@ ACE_RCSID(ace, SV_Message, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SV_Message) void @@ -19,3 +21,4 @@ ACE_SV_Message::dump (void) const #endif /* ACE_HAS_DUMP */ } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Message.h b/ace/SV_Message.h index 2151329bd5c..04a9e20c12b 100644 --- a/ace/SV_Message.h +++ b/ace/SV_Message.h @@ -22,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SV_Message * @@ -53,6 +55,9 @@ protected: long type_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + + #if defined (__ACE_INLINE__) #include "ace/SV_Message.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SV_Message.inl b/ace/SV_Message.inl index 51c035370b8..3f698bd5071 100644 --- a/ace/SV_Message.inl +++ b/ace/SV_Message.inl @@ -1,11 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SV_Message.i - #include "ace/Global_Macros.h" #include "ace/config-all.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_SV_Message::ACE_SV_Message (long t) : type_ (t) @@ -32,3 +33,5 @@ ACE_SV_Message::type (long t) ACE_TRACE ("ACE_SV_Message::type"); this->type_ = t; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Message_Queue.cpp b/ace/SV_Message_Queue.cpp index 3e57373e18d..1be06f0f8cc 100644 --- a/ace/SV_Message_Queue.cpp +++ b/ace/SV_Message_Queue.cpp @@ -9,6 +9,8 @@ ACE_RCSID(ace, SV_Message_Queue, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SV_Message_Queue) void @@ -30,11 +32,13 @@ ACE_SV_Message_Queue::~ACE_SV_Message_Queue (void) } ACE_SV_Message_Queue::ACE_SV_Message_Queue (key_t external_id, - int create, - int perms) + int create, + int perms) { ACE_TRACE ("ACE_SV_Message_Queue::ACE_SV_Message_Queue"); if (this->open (external_id, create, perms) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_SV_Message_Queue::ACE_SV_Message_Queue"))); + ACE_LIB_TEXT ("ACE_SV_Message_Queue::ACE_SV_Message_Queue"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Message_Queue.h b/ace/SV_Message_Queue.h index ac36423a463..42fd8f08693 100644 --- a/ace/SV_Message_Queue.h +++ b/ace/SV_Message_Queue.h @@ -26,6 +26,8 @@ #include "ace/os_include/sys/os_ipc.h" #include "ace/Default_Constants.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SV_Message_Queue * @@ -92,6 +94,8 @@ protected: int internal_id_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SV_Message_Queue.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SV_Message_Queue.inl b/ace/SV_Message_Queue.inl index 63585329b87..b84f6379901 100644 --- a/ace/SV_Message_Queue.inl +++ b/ace/SV_Message_Queue.inl @@ -1,9 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Global_Macros.h" #include "ace/OS_NS_sys_msg.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Open a message queue using the <external_id>. ACE_INLINE int @@ -28,7 +31,7 @@ ACE_SV_Message_Queue::control (int option, void *arg) { ACE_TRACE ("ACE_SV_Message_Queue::control"); return ACE_OS::msgctl (this->internal_id_, option, - (struct msqid_ds *) arg); + (struct msqid_ds *) arg); } ACE_INLINE int @@ -56,22 +59,23 @@ ACE_SV_Message_Queue::set_id (int id) ACE_INLINE ssize_t ACE_SV_Message_Queue::recv (ACE_SV_Message &mb, - int length, - long type, - int mflags) + int length, + long type, + int mflags) { ACE_TRACE ("ACE_SV_Message_Queue::recv"); return ACE_OS::msgrcv (this->internal_id_, (void *) &mb, - length, type, mflags); + length, type, mflags); } ACE_INLINE int ACE_SV_Message_Queue::send (const ACE_SV_Message &mb, - int length, - int mflags) + int length, + int mflags) { ACE_TRACE ("ACE_SV_Message_Queue::send"); return ACE_OS::msgsnd (this->internal_id_, (void *) &mb, - length, mflags); + length, mflags); } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp index cb81d8838f3..0b0207bb77d 100644 --- a/ace/SV_Semaphore_Complex.cpp +++ b/ace/SV_Semaphore_Complex.cpp @@ -11,6 +11,8 @@ ACE_RCSID(ace, SV_Semaphore_Complex, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SV_Semaphore_Complex) void @@ -27,46 +29,46 @@ const int ACE_SV_Semaphore_Complex::BIGCOUNT_ = 10000; // Define the ACE_SV_Semaphore operation arrays for the semop() calls. sembuf ACE_SV_Semaphore_Complex::op_lock_[2] = { - {0, 0, 0}, // Wait for [0] (lock) to equal 0 - {0, 1, SEM_UNDO}, // then increment [0] to 1 - this locks it. + {0, 0, 0}, // Wait for [0] (lock) to equal 0 + {0, 1, SEM_UNDO}, // then increment [0] to 1 - this locks it. // UNDO to release the lock if processes exit - // before explicitly unlocking. + // before explicitly unlocking. }; sembuf ACE_SV_Semaphore_Complex::op_endcreate_[2] = { - {1, -1, SEM_UNDO}, // Decrement [1] (proc counter) with undo on + {1, -1, SEM_UNDO}, // Decrement [1] (proc counter) with undo on // exit, UNDO to adjust proc counter if - // process exits before explicitly calling close() - {0, -1, SEM_UNDO}, // the decrement [0] (lock) back to 0 + // process exits before explicitly calling close() + {0, -1, SEM_UNDO}, // the decrement [0] (lock) back to 0 }; sembuf ACE_SV_Semaphore_Complex::op_open_[1] = { - {1, -1, SEM_UNDO}, // Decrement [1] (proc counter) with undo on + {1, -1, SEM_UNDO}, // Decrement [1] (proc counter) with undo on // exit. }; sembuf ACE_SV_Semaphore_Complex::op_close_[3] = { - {0, 0, 0}, // Wait for [0] (lock) to equal 0 - {0, 1, SEM_UNDO}, // then increment [0] to 1 - this lock it - {1, 1, SEM_UNDO}, // then increment [1] (proc counter) + {0, 0, 0}, // Wait for [0] (lock) to equal 0 + {0, 1, SEM_UNDO}, // then increment [0] to 1 - this lock it + {1, 1, SEM_UNDO}, // then increment [1] (proc counter) }; sembuf ACE_SV_Semaphore_Complex::op_unlock_[1] = { - {0, -1, SEM_UNDO}, // Decrement [0] (lock) back to 0 + {0, -1, SEM_UNDO}, // Decrement [0] (lock) back to 0 }; // Open or create an array of SV_Semaphores. We return 0 if all is OK, else -1. int ACE_SV_Semaphore_Complex::open (key_t k, - int create, - int initial_value, - u_short nsems, - int perms) + int create, + int initial_value, + u_short nsems, + int perms) { ACE_TRACE ("ACE_SV_Semaphore_Complex::open"); if (k == IPC_PRIVATE) @@ -83,35 +85,35 @@ ACE_SV_Semaphore_Complex::open (key_t k, int result; do - { - this->internal_id_ = ACE_OS::semget + { + this->internal_id_ = ACE_OS::semget (this->key_, (u_short) 2 + nsems, perms | ACE_SV_Semaphore_Complex::ACE_CREATE); - if (this->internal_id_ == -1) - return -1; // permission problem or tables full - - // When the <ACE_SV_Semaphore_Complex> is created, we know - // that the value of all 3 members is 0. Get a lock on the - // <ACE_SV_Semaphore_Complex> by waiting for [0] to equal 0, - // then increment it. - - // There is a race condition here. There is the possibility - // that between the <semget> above and the <semop> below, - // another process can call out <close> function which can - // remove the <ACE_SV_Semaphore> if that process is the last - // one using it. Therefor we handle the error condition of - // an invalid <ACE_SV_Semaphore> ID specifically below, and - // if it does happen, we just go back and create it again. - result = ACE_OS::semop (this->internal_id_, - &ACE_SV_Semaphore_Complex::op_lock_[0], - 2); - } + if (this->internal_id_ == -1) + return -1; // permission problem or tables full + + // When the <ACE_SV_Semaphore_Complex> is created, we know + // that the value of all 3 members is 0. Get a lock on the + // <ACE_SV_Semaphore_Complex> by waiting for [0] to equal 0, + // then increment it. + + // There is a race condition here. There is the possibility + // that between the <semget> above and the <semop> below, + // another process can call out <close> function which can + // remove the <ACE_SV_Semaphore> if that process is the last + // one using it. Therefor we handle the error condition of + // an invalid <ACE_SV_Semaphore> ID specifically below, and + // if it does happen, we just go back and create it again. + result = ACE_OS::semop (this->internal_id_, + &ACE_SV_Semaphore_Complex::op_lock_[0], + 2); + } while (result == -1 && (errno == EINVAL || errno == EIDRM)); if (result == -1) - return -1; + return -1; // Get the value of the process counter. If it equals 0, then no // one has initialized the ACE_SV_Semaphore yet. @@ -119,53 +121,53 @@ ACE_SV_Semaphore_Complex::open (key_t k, int semval = ACE_SV_Semaphore_Simple::control (GETVAL, 0, 1); if (semval == -1) - return this->init (); + return this->init (); else if (semval == 0) - { - // We should initialize by doing a SETALL, but that would - // clear the adjust value that we set when we locked the - // ACE_SV_Semaphore above. Instead we do system calls to - // initialize [1], as well as all the nsems SV_Semaphores. - - if (ACE_SV_Semaphore_Simple::control (SETVAL, - ACE_SV_Semaphore_Complex::BIGCOUNT_, - 1) == -1) - return -1; - else - for (u_short i = 0; i < nsems; i++) - if (this->control (SETVAL, initial_value, i) == -1) - return -1; - } + { + // We should initialize by doing a SETALL, but that would + // clear the adjust value that we set when we locked the + // ACE_SV_Semaphore above. Instead we do system calls to + // initialize [1], as well as all the nsems SV_Semaphores. + + if (ACE_SV_Semaphore_Simple::control (SETVAL, + ACE_SV_Semaphore_Complex::BIGCOUNT_, + 1) == -1) + return -1; + else + for (u_short i = 0; i < nsems; i++) + if (this->control (SETVAL, initial_value, i) == -1) + return -1; + } // Decrement the process counter and then release the lock. return ACE_OS::semop (this->internal_id_, - &ACE_SV_Semaphore_Complex::op_endcreate_[0], - 2); + &ACE_SV_Semaphore_Complex::op_endcreate_[0], + 2); } else { this->internal_id_ = ACE_OS::semget (this->key_, 2 + nsems, 0); if (this->internal_id_ == -1) - return -1; // doesn't exist or tables full + return -1; // doesn't exist or tables full // Decrement the process counter. We don't need a lock to do this. if (ACE_OS::semop (this->internal_id_, - &ACE_SV_Semaphore_Complex::op_open_[0], 1) < 0) - return this->init (); + &ACE_SV_Semaphore_Complex::op_open_[0], 1) < 0) + return this->init (); return 0; } } int ACE_SV_Semaphore_Complex::open (const char *name, - int flags, - int initial_value, - u_short nsems, - int perms) + int flags, + int initial_value, + u_short nsems, + int perms) { ACE_TRACE ("ACE_SV_Semaphore_Complex::open"); return this->open (ACE_SV_Semaphore_Simple::name_2_key (name), - flags, initial_value, nsems, perms); + flags, initial_value, nsems, perms); } // Close a ACE_SV_Semaphore. Unlike the remove above, this function @@ -187,8 +189,8 @@ ACE_SV_Semaphore_Complex::close (void) // then increments [1] - the process number. if (ACE_OS::semop (this->internal_id_, - &ACE_SV_Semaphore_Complex::op_close_[0], - 3) == -1) + &ACE_SV_Semaphore_Complex::op_close_[0], + 3) == -1) return -1; // Now that we have a lock, read the value of the process counter to @@ -205,17 +207,17 @@ ACE_SV_Semaphore_Complex::close (void) else { int result = ACE_OS::semop (this->internal_id_, - &ACE_SV_Semaphore_Complex::op_unlock_[0], 1); + &ACE_SV_Semaphore_Complex::op_unlock_[0], 1); this->init (); return result; } } ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (key_t k, - int flags, - int initial_value, - u_short nsems, - int perms) + int flags, + int initial_value, + u_short nsems, + int perms) { ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex"); if (this->open (k, flags, initial_value, nsems, perms) == -1) @@ -223,10 +225,10 @@ ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (key_t k, } ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (const char *name, - int flags, - int initial_value, - u_short nsems, - int perms) + int flags, + int initial_value, + u_short nsems, + int perms) { ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex"); @@ -253,3 +255,5 @@ ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (void) ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex"); this->init (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Semaphore_Complex.h b/ace/SV_Semaphore_Complex.h index 6278fb694c9..7c1af2b226a 100644 --- a/ace/SV_Semaphore_Complex.h +++ b/ace/SV_Semaphore_Complex.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -20,6 +20,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SV_Semaphore_Complex * @@ -147,6 +149,8 @@ private: static sembuf op_unlock_[1]; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SV_Semaphore_Complex.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SV_Semaphore_Complex.inl b/ace/SV_Semaphore_Complex.inl index 00c3450c1bd..f9586f10229 100644 --- a/ace/SV_Semaphore_Complex.inl +++ b/ace/SV_Semaphore_Complex.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_SV_Semaphore_Complex::acquire (u_short n, int flags) const { @@ -77,3 +80,5 @@ ACE_SV_Semaphore_Complex::control (int cmd, int value, u_short n) const ACE_TRACE ("ACE_SV_Semaphore_Complex::control"); return ACE_SV_Semaphore_Simple::control (cmd, value, (u_short) n + 2); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Semaphore_Simple.cpp b/ace/SV_Semaphore_Simple.cpp index e28ba4a923c..6dcc847c3d7 100644 --- a/ace/SV_Semaphore_Simple.cpp +++ b/ace/SV_Semaphore_Simple.cpp @@ -11,8 +11,9 @@ ACE_RCSID (ace, SV_Semaphore_Simple, "$Id$") -ACE_ALLOC_HOOK_DEFINE (ACE_SV_Semaphore_Simple) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_ALLOC_HOOK_DEFINE (ACE_SV_Semaphore_Simple) void ACE_SV_Semaphore_Simple::dump (void) const @@ -232,3 +233,5 @@ ACE_SV_Semaphore_Simple::remove (void) const ((ACE_SV_Semaphore_Simple *) this)->init (); return result; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h index 85ba4c0daa0..54ea45e17e1 100644 --- a/ace/SV_Semaphore_Simple.h +++ b/ace/SV_Semaphore_Simple.h @@ -38,6 +38,8 @@ # endif /* ACE_DEFAULT_SEM_KEY */ #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SV_Semaphore_Simple * @@ -184,6 +186,8 @@ protected: key_t name_2_key (const char *name); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SV_Semaphore_Simple.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SV_Semaphore_Simple.inl b/ace/SV_Semaphore_Simple.inl index 85aad8d5b0c..0ac155d6c9d 100644 --- a/ace/SV_Semaphore_Simple.inl +++ b/ace/SV_Semaphore_Simple.inl @@ -1,11 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SV_Semaphore_Simple.i - #include "ace/Global_Macros.h" #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_HAS_WCHAR) // Semaphores don't offer wide-char names, so convert the name and forward // to the narrow-char open(). @@ -27,8 +28,8 @@ ACE_SV_Semaphore_Simple::open (const wchar_t *name, ACE_INLINE int ACE_SV_Semaphore_Simple::control (int cmd, - semun arg, - u_short n) const + semun arg, + u_short n) const { ACE_TRACE ("ACE_SV_Semaphore_Simple::control"); return this->internal_id_ == -1 ? @@ -124,3 +125,4 @@ ACE_SV_Semaphore_Simple::get_id (void) const return this->internal_id_; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Shared_Memory.cpp b/ace/SV_Shared_Memory.cpp index 5a9d33e934f..ab56249cbe6 100644 --- a/ace/SV_Shared_Memory.cpp +++ b/ace/SV_Shared_Memory.cpp @@ -1,4 +1,3 @@ -// SV_Shared_Memory.cpp // $Id$ #include "ace/SV_Shared_Memory.h" @@ -10,6 +9,8 @@ ACE_RCSID(ace, SV_Shared_Memory, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_SV_Shared_Memory) void @@ -25,11 +26,11 @@ ACE_SV_Shared_Memory::dump (void) const int ACE_SV_Shared_Memory::open_and_attach (key_t external_id, - size_t sz, - int create, - int perms, - void *virtual_addr, - int flags) + size_t sz, + int create, + int perms, + void *virtual_addr, + int flags) { ACE_TRACE ("ACE_SV_Shared_Memory::open_and_attach"); if (this->open (external_id, sz, create, perms) == -1) @@ -43,17 +44,17 @@ ACE_SV_Shared_Memory::open_and_attach (key_t external_id, // Constructor interface to this->open_and_attach () member function. ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (key_t external_id, - size_t sz, - int create, - int perms, - void *virtual_addr, - int flags) + size_t sz, + int create, + int perms, + void *virtual_addr, + int flags) { ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory"); if (this->open_and_attach (external_id, sz, create, - perms, virtual_addr, flags) == -1) + perms, virtual_addr, flags) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory"))); + ACE_LIB_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory"))); } // The "do nothing" constructor. @@ -74,12 +75,14 @@ ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (void) // (maw@fsg.com). ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (ACE_HANDLE int_id, - int flags) + int flags) : internal_id_ (int_id), size_ (0) { ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory"); if (this->attach (0, flags) == -1) ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory"))); + ACE_LIB_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory"))); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/SV_Shared_Memory.h b/ace/SV_Shared_Memory.h index 0cbb8febe7e..b65b5452a58 100644 --- a/ace/SV_Shared_Memory.h +++ b/ace/SV_Shared_Memory.h @@ -30,6 +30,8 @@ #include "ace/os_include/sys/os_ipc.h" #include "ace/Default_Constants.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_SV_Shared_Memory * @@ -114,6 +116,8 @@ protected: size_t round_up (size_t len); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/SV_Shared_Memory.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/SV_Shared_Memory.inl b/ace/SV_Shared_Memory.inl index f01f5b2c969..3aaa41414e0 100644 --- a/ace/SV_Shared_Memory.inl +++ b/ace/SV_Shared_Memory.inl @@ -1,12 +1,13 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// SV_Shared_Memory.i - #include "ace/OS_NS_sys_shm.h" #include "ace/Global_Macros.h" #include "ace/OS_NS_errno.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE size_t ACE_SV_Shared_Memory::round_up (size_t len) { @@ -17,15 +18,15 @@ ACE_SV_Shared_Memory::round_up (size_t len) // Creates a shared memory segment of SIZE bytes. Does *not* attach // this memory segment... -ACE_INLINE int +ACE_INLINE int ACE_SV_Shared_Memory::open (key_t external_id, size_t sz, int create, int perms) { ACE_TRACE ("ACE_SV_Shared_Memory::open"); #if defined (ACE_WIN32) - ACE_UNUSED_ARG(perms); - ACE_UNUSED_ARG(create); - ACE_UNUSED_ARG(sz); - ACE_UNUSED_ARG(external_id); + ACE_UNUSED_ARG(perms); + ACE_UNUSED_ARG(create); + ACE_UNUSED_ARG(sz); + ACE_UNUSED_ARG(external_id); ACE_NOTSUP_RETURN (-1); #else this->segment_ptr_ = 0; @@ -37,15 +38,15 @@ ACE_SV_Shared_Memory::open (key_t external_id, size_t sz, int create, int perms) #endif /* ACE_WIN32 */ } -// Attachs to the shared memory segment. +// Attachs to the shared memory segment. ACE_INLINE int ACE_SV_Shared_Memory::attach (void *virtual_addr, int flags) { ACE_TRACE ("ACE_SV_Shared_Memory::attach"); #if defined (ACE_WIN32) - ACE_UNUSED_ARG(flags); - ACE_UNUSED_ARG(virtual_addr); + ACE_UNUSED_ARG(flags); + ACE_UNUSED_ARG(virtual_addr); ACE_NOTSUP_RETURN (-1); #else this->segment_ptr_ = ACE_OS::shmat (this->internal_id_, virtual_addr, flags); @@ -53,23 +54,23 @@ ACE_SV_Shared_Memory::attach (void *virtual_addr, int flags) #endif /* ACE_WIN32 */ } -// Interface to the underlying shared memory control function. +// Interface to the underlying shared memory control function. ACE_INLINE int ACE_SV_Shared_Memory::control (int cmd, void *buf) { ACE_TRACE ("ACE_SV_Shared_Memory::control"); #if defined (ACE_WIN32) - ACE_UNUSED_ARG(cmd); - ACE_UNUSED_ARG(buf); - - ACE_NOTSUP_RETURN (-1); + ACE_UNUSED_ARG(cmd); + ACE_UNUSED_ARG(buf); + + ACE_NOTSUP_RETURN (-1); #else return ACE_OS::shmctl (this->internal_id_, cmd, (struct shmid_ds *) buf); #endif /* ACE_WIN32 */ } -// The overall size of the segment. +// The overall size of the segment. ACE_INLINE size_t ACE_SV_Shared_Memory::get_segment_size (void) const @@ -78,7 +79,7 @@ ACE_SV_Shared_Memory::get_segment_size (void) const return this->size_; } -// Removes the shared memory segment. +// Removes the shared memory segment. ACE_INLINE int ACE_SV_Shared_Memory::remove (void) @@ -114,3 +115,5 @@ ACE_SV_Shared_Memory::get_id (void) const ACE_TRACE ("ACE_SV_Shared_Memory::get_id"); return this->internal_id_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Sample_History.cpp b/ace/Sample_History.cpp index fac82d844e1..ffa138571d0 100644 --- a/ace/Sample_History.cpp +++ b/ace/Sample_History.cpp @@ -12,6 +12,9 @@ ACE_RCSID(ace, Sample_History, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Sample_History::ACE_Sample_History (size_t max_samples) : max_samples_ (max_samples) , sample_count_ (0) @@ -58,3 +61,5 @@ ACE_Sample_History::collect_basic_stats (ACE_Basic_Stats &stats) const stats.sample (this->samples_[i]); } } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Sample_History.h b/ace/Sample_History.h index 83febc46f39..0ab521dac66 100644 --- a/ace/Sample_History.h +++ b/ace/Sample_History.h @@ -1,3 +1,4 @@ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +22,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Basic_Stats; /// Save multiple samples in an array @@ -78,6 +81,8 @@ private: ACE_UINT64 *samples_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Sample_History.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Sample_History.inl b/ace/Sample_History.inl index e3882a28bc3..42eca62e69b 100644 --- a/ace/Sample_History.inl +++ b/ace/Sample_History.inl @@ -1,5 +1,9 @@ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Sample_History::sample (ACE_UINT64 value) { @@ -18,3 +22,5 @@ ACE_Sample_History::get_sample (size_t i) const return this->samples_[i]; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Sbrk_Memory_Pool.cpp b/ace/Sbrk_Memory_Pool.cpp index ae9157a09c9..eda87a42c63 100644 --- a/ace/Sbrk_Memory_Pool.cpp +++ b/ace/Sbrk_Memory_Pool.cpp @@ -7,6 +7,9 @@ ACE_RCSID(ace, Sbrk_Memory_Pool, "$Id$") #if !defined (ACE_LACKS_SBRK) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Sbrk_Memory_Pool) // Ask system for more local memory via sbrk(2). @@ -107,7 +110,6 @@ ACE_Sbrk_Memory_Pool::base_addr (void) const return 0; } - // Round up the request to a multiple of the page size. size_t @@ -116,4 +118,7 @@ ACE_Sbrk_Memory_Pool::round_up (size_t nbytes) ACE_TRACE ("ACE_Sbrk_Memory_Pool::round_up"); return ACE::round_to_pagesize (nbytes); } + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_SBRK */ diff --git a/ace/Sbrk_Memory_Pool.h b/ace/Sbrk_Memory_Pool.h index 55856be303b..ed291fe2f46 100644 --- a/ace/Sbrk_Memory_Pool.h +++ b/ace/Sbrk_Memory_Pool.h @@ -32,6 +32,9 @@ #include "ace/ACE.h" #include "ace/os_include/sys/os_mman.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Sbrk_Memory_Pool_Options * @@ -111,6 +114,9 @@ protected: /// appropriate chunksize. virtual size_t round_up (size_t nbytes); }; + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_SBRK */ #include /**/ "ace/post.h" diff --git a/ace/Sched_Params.cpp b/ace/Sched_Params.cpp index a86c0b55d0f..5a40f7de199 100644 --- a/ace/Sched_Params.cpp +++ b/ace/Sched_Params.cpp @@ -29,6 +29,8 @@ ACE_RCSID(ace, Sched_Params, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + int ACE_Sched_Params::priority_min (const Policy policy, const int scope) @@ -332,3 +334,5 @@ ACE_Sched_Params::previous_priority (const Policy policy, ACE_NOTSUP_RETURN (-1); #endif /* ACE_HAS_THREADS */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Sched_Params.h b/ace/Sched_Params.h index c68e701f9b4..1d4b671d2af 100644 --- a/ace/Sched_Params.h +++ b/ace/Sched_Params.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #include "ace/Time_Value.h" #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Sched_Params * @@ -220,6 +222,8 @@ private: int done_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Sched_Params.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Sched_Params.inl b/ace/Sched_Params.inl index 041f9cb1648..2917acc691d 100644 --- a/ace/Sched_Params.inl +++ b/ace/Sched_Params.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ // ============================================================================ @@ -17,6 +18,8 @@ // // ============================================================================ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Sched_Params::ACE_Sched_Params ( const Policy policy, @@ -134,3 +137,5 @@ ACE_Sched_Priority_Iterator::next (void) this->scope ()); this->done_ = old_priority == priority_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Select_Reactor.cpp b/ace/Select_Reactor.cpp index 3c7f5850f03..7f1e9505855 100644 --- a/ace/Select_Reactor.cpp +++ b/ace/Select_Reactor.cpp @@ -4,6 +4,7 @@ ACE_RCSID(ace, Select_Reactor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) @@ -28,3 +29,5 @@ template class ACE_Lock_Adapter< ACE_Reactor_Token_T<ACE_Noop_Token> >; # pragma instantiate ACE_Lock_Adapter< ACE_Reactor_Token_T<ACE_Noop_Token> > # endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */ #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Select_Reactor.h b/ace/Select_Reactor.h index a52203869cb..b19ef6596b6 100644 --- a/ace/Select_Reactor.h +++ b/ace/Select_Reactor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + //@@ TAO_REACTOR_SPL_COMMENT_HOOK_START typedef ACE_Reactor_Token_T<ACE_SELECT_TOKEN> ACE_Select_Reactor_Token; @@ -60,5 +62,7 @@ private: }; #endif /* ACE_MT_SAFE && ACE_MT_SAFE == 0 */ +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SELECT_REACTOR_H */ diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp index a00556b59c6..4f01f27bca3 100644 --- a/ace/Select_Reactor_Base.cpp +++ b/ace/Select_Reactor_Base.cpp @@ -19,6 +19,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #if defined (ACE_WIN32) #define ACE_SELECT_REACTOR_HANDLE(H) (this->event_handlers_[(H)].handle_) #define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)].event_handler_) @@ -1268,3 +1270,5 @@ template class ACE_Node <ACE_Notification_Buffer *>; #pragma instantiate ACE_Node <ACE_Notification_Buffer *> #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Select_Reactor_Base.h b/ace/Select_Reactor_Base.h index fb340cb4beb..d60edb46742 100644 --- a/ace/Select_Reactor_Base.h +++ b/ace/Select_Reactor_Base.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -27,9 +27,11 @@ #include "ace/Reactor_Impl.h" #if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) -#include "ace/Unbounded_Queue.h" +# include "ace/Unbounded_Queue.h" #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Add useful typedefs to simplify the following code. typedef void (ACE_Handle_Set::*ACE_FDS_PTMF) (ACE_HANDLE); typedef int (ACE_Event_Handler::*ACE_EH_PTMF) (ACE_HANDLE); @@ -39,7 +41,7 @@ class ACE_Select_Reactor_Impl; /* * Hook to specialize the Select_Reactor_Base implementation - * with the concrete reactor, e.g., select or tp reactor + * with the concrete reactor, e.g., select or tp reactor * specified at build/compilation time. */ //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK @@ -451,7 +453,7 @@ public: virtual int resumable_handler (void); /* - * Hook to add concrete methods required to specialize the + * Hook to add concrete methods required to specialize the * implementation with concrete methods required for the concrete * reactor implementation, for example, select, tp reactors. */ @@ -497,24 +499,27 @@ protected: /// Defined as a pointer to allow overriding by derived classes... ACE_Timer_Queue *timer_queue_; - /// Keeps track of whether we should delete the timer queue (if we - /// didn't create it, then we don't delete it). - int delete_timer_queue_; - /// Handle signals without requiring global/static variables. ACE_Sig_Handler *signal_handler_; - /// Keeps track of whether we should delete the signal handler (if we - /// didn't create it, then we don't delete it). - int delete_signal_handler_; - /// Callback object that unblocks the <ACE_Select_Reactor> if it's /// sleeping. ACE_Reactor_Notify *notify_handler_; + /// Keeps track of whether we should delete the timer queue (if we + /// didn't create it, then we don't delete it). + bool delete_timer_queue_; + + /// Keeps track of whether we should delete the signal handler (if we + /// didn't create it, then we don't delete it). + bool delete_signal_handler_; + /// Keeps track of whether we need to delete the notify handler (if /// we didn't create it, then we don't delete it). - int delete_notify_handler_; + bool delete_notify_handler_; + + /// True if we've been initialized yet... + bool initialized_; /// Restart the <handle_events> event-loop method automatically when /// <select> is interrupted via <EINTR>. @@ -529,9 +534,6 @@ protected: */ int requeue_position_; - /// True if we've been initialized yet... - int initialized_; - /// The original thread that created this Select_Reactor. ACE_thread_t owner_; @@ -558,6 +560,7 @@ protected: private: + /// Determine whether we should renew Select_Reactor's token after handling /// the notification message. int supress_renew_; @@ -567,6 +570,8 @@ private: ACE_Select_Reactor_Impl &operator = (const ACE_Select_Reactor_Impl &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Select_Reactor_Base.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Select_Reactor_Base.inl b/ace/Select_Reactor_Base.inl index 90b2dc7e54c..83c561b8e8d 100644 --- a/ace/Select_Reactor_Base.inl +++ b/ace/Select_Reactor_Base.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Reactor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Event_Tuple::~ACE_Event_Tuple (void) { @@ -55,11 +58,14 @@ ACE_INLINE ACE_Select_Reactor_Impl::ACE_Select_Reactor_Impl (bool ms) : handler_rep_ (*this) , timer_queue_ (0) - , delete_timer_queue_ (0) - , delete_signal_handler_ (0) - , delete_notify_handler_ (0) + , signal_handler_ (0) + , notify_handler_ (0) + , delete_timer_queue_ (false) + , delete_signal_handler_ (false) + , delete_notify_handler_ (false) + , initialized_ (false) + , restart_ (0) , requeue_position_ (-1) // Requeue at end of waiters by default. - , initialized_ (0) , state_changed_ (0) , mask_signals_ (ms) , supress_renew_ (0) @@ -77,3 +83,5 @@ ACE_Select_Reactor_Impl::supress_notify_renew (int sr) { this->supress_renew_ = sr; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp index d864f6728bb..c98763f6022 100644 --- a/ace/Select_Reactor_T.cpp +++ b/ace/Select_Reactor_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_SELECT_REACTOR_T_C -#define ACE_SELECT_REACTOR_T_C +#ifndef ACE_SELECT_REACTOR_T_CPP +#define ACE_SELECT_REACTOR_T_CPP #include "ace/Select_Reactor_T.h" @@ -22,6 +22,8 @@ // For timer_queue_ #include "ace/Recursive_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /* * ACE Reactor specialization hook. */ @@ -382,7 +384,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::open ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1)); // Can't initialize ourselves more than once. - if (this->initialized_ > 0) + if (this->initialized_) return -1; this->owner_ = ACE_Thread::self (); @@ -1565,4 +1567,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } -#endif /* ACE_SELECT_REACTOR_T_C */ + +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_SELECT_REACTOR_T_CPP */ diff --git a/ace/Select_Reactor_T.h b/ace/Select_Reactor_T.h index ecaf22957ed..de44920365e 100644 --- a/ace/Select_Reactor_T.h +++ b/ace/Select_Reactor_T.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -23,9 +23,11 @@ #include "ace/Lock_Adapter_T.h" #include "ace/Token.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /* - * Hook for specializing the reactor with the concrete - * type, for example, select, or thread pool. + * Hook for specializing the reactor with the concrete + * type, for example, select, or thread pool. */ //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK @@ -697,6 +699,8 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN> &operator= (const ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN> &) ) }; +ACE_END_VERSIONED_NAMESPACE_DECL + // @@ The latest version of SunCC can't grok the code if we put inline // function here. Therefore, we temporarily disable the code here. // We shall turn this back on once we know the problem gets fixed. diff --git a/ace/Select_Reactor_T.inl b/ace/Select_Reactor_T.inl index 136d445810a..15e59e8ddb0 100644 --- a/ace/Select_Reactor_T.inl +++ b/ace/Select_Reactor_T.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/Reactor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::resume_handler (ACE_Event_Handler *h) { @@ -223,3 +226,5 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::size (void) const { return this->handler_rep_.size (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Semaphore.cpp b/ace/Semaphore.cpp index 374e4cad282..3a48bd38168 100644 --- a/ace/Semaphore.cpp +++ b/ace/Semaphore.cpp @@ -13,6 +13,8 @@ ACE_RCSID (ace, Semaphore, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Semaphore) void @@ -56,3 +58,5 @@ ACE_Semaphore::~ACE_Semaphore (void) this->remove (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Semaphore.h b/ace/Semaphore.h index 01c116ef991..c802608d992 100644 --- a/ace/Semaphore.h +++ b/ace/Semaphore.h @@ -24,6 +24,8 @@ #include "ace/OS_NS_Thread.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -170,6 +172,8 @@ private: ACE_Semaphore (const ACE_Semaphore &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Semaphore.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Semaphore.inl b/ace/Semaphore.inl index a519c4e7920..8bfe49ce39c 100644 --- a/ace/Semaphore.inl +++ b/ace/Semaphore.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE const ACE_sema_t & ACE_Semaphore::lock (void) const { @@ -112,3 +115,5 @@ ACE_Semaphore::tryacquire_write_upgrade (void) { return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp index 434c7f3b03b..b68e8eb4de8 100644 --- a/ace/Service_Config.cpp +++ b/ace/Service_Config.cpp @@ -34,6 +34,8 @@ ACE_RCSID (ace, Service_Config, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_Service_Config) void @@ -914,3 +916,5 @@ ACE_Service_Config::start_daemon (void) ACE_TRACE ("ACE_Service_Config::start_daemon"); return ACE::daemonize (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Config.h b/ace/Service_Config.h index 805602c882f..d3335871b97 100644 --- a/ace/Service_Config.h +++ b/ace/Service_Config.h @@ -27,6 +27,8 @@ #include "ace/SString.h" #include "ace/OS_NS_signal.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl. class ACE_Service_Object; class ACE_Service_Type; @@ -38,6 +40,8 @@ class ACE_Reactor; class ACE_Thread_Manager; class ACE_DLL; +ACE_END_VERSIONED_NAMESPACE_DECL + #if (ACE_USES_CLASSIC_SVC_CONF == 1) #define ACE_DYNAMIC_SERVICE_DIRECTIVE(ident, libpathname, objectclass, parameters) \ ACE_LIB_TEXT ("dynamic ") \ @@ -77,6 +81,8 @@ extern "C" typedef ACE_Service_Object *(*ACE_SERVICE_ALLOCATOR) (ACE_Service_Object_Exterminator *); } +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Static_Svc_Descriptor * @@ -477,6 +483,8 @@ private: static int is_initialized_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Service_Config.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Service_Config.inl b/ace/Service_Config.inl index a4ed474e8b3..44df3f6742d 100644 --- a/ace/Service_Config.inl +++ b/ace/Service_Config.inl @@ -4,6 +4,8 @@ #include "ace/OS_NS_string.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // This is the primary entry point into the ACE_Service_Config (the // constructor just handles simple initializations). @@ -100,3 +102,5 @@ ACE_Service_Config::remove (const char svc_name[]) return ACE_Service_Config::remove (ACE_TEXT_CHAR_TO_TCHAR (svc_name)); } #endif /* ACE_HAS_WINCE && !ACE_USES_WCHAR */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Manager.cpp b/ace/Service_Manager.cpp index 6e185d1940c..fe74df4ec7b 100644 --- a/ace/Service_Manager.cpp +++ b/ace/Service_Manager.cpp @@ -1,8 +1,6 @@ -#include "ace/Service_Manager.h" +// $Id$ -#if !defined (__ACE_INLINE__) -#include "ace/Service_Manager.inl" -#endif /* __ACE_INLINE__ */ +#include "ace/Service_Manager.h" #include "ace/Get_Opt.h" #include "ace/Log_Msg.h" @@ -18,6 +16,7 @@ ACE_RCSID (ace, Service_Manager, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE (ACE_Service_Manager) @@ -40,6 +39,11 @@ ACE_Service_Manager::ACE_Service_Manager (void) ACE_TRACE ("ACE_Service_Manager::ACE_Service_Manager"); } +ACE_Service_Manager::~ACE_Service_Manager (void) +{ + ACE_TRACE ("ACE_Service_Manager::~ACE_Service_Manager"); +} + int ACE_Service_Manager::suspend (void) { @@ -376,3 +380,5 @@ ACE_Service_Manager::handle_input (ACE_HANDLE) ACE_LIB_TEXT ("close"))); return 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Manager.h b/ace/Service_Manager.h index 6c7d745e65e..bd56c68d58b 100644 --- a/ace/Service_Manager.h +++ b/ace/Service_Manager.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #include "ace/INET_Addr.h" #include "ace/Service_Object.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Service_Manager * @@ -112,9 +114,7 @@ protected: static u_short DEFAULT_PORT_; }; -#if defined (__ACE_INLINE__) -#include "ace/Service_Manager.inl" -#endif /* __ACE_INLINE__ */ +ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" #endif /* _SERVICE_MANAGER_H */ diff --git a/ace/Service_Manager.inl b/ace/Service_Manager.inl deleted file mode 100644 index f329d08adfb..00000000000 --- a/ace/Service_Manager.inl +++ /dev/null @@ -1,8 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -ACE_INLINE -ACE_Service_Manager::~ACE_Service_Manager (void) -{ - ACE_TRACE ("ACE_Service_Manager::~ACE_Service_Manager"); -} diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp index 42786291f87..00de5f6e056 100644 --- a/ace/Service_Object.cpp +++ b/ace/Service_Object.cpp @@ -12,8 +12,10 @@ #include "ace/config-all.h" ACE_RCSID (ace, - Service_Object, - "$Id$") + Service_Object, + "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Service_Object) ACE_ALLOC_HOOK_DEFINE(ACE_Service_Type) @@ -124,3 +126,5 @@ ACE_Service_Type::name (const ACE_TCHAR *n) delete [] const_cast <ACE_TCHAR *> (this->name_); this->name_ = ACE::strnew (n); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Object.h b/ace/Service_Object.h index d96e5c59255..2526d622f26 100644 --- a/ace/Service_Object.h +++ b/ace/Service_Object.h @@ -24,6 +24,8 @@ #include "ace/Event_Handler.h" #include "ace/DLL.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #define ACE_Component ACE_Service_Object /** * @class ACE_Service_Object @@ -167,6 +169,8 @@ private: ACE_Service_Object *service_object_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Service_Object.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Service_Object.inl b/ace/Service_Object.inl index 5e1b7ae475e..23eb323085f 100644 --- a/ace/Service_Object.inl +++ b/ace/Service_Object.inl @@ -1,7 +1,7 @@ -/* -*- C++ -*- */ +// -*- C++ -*- // $Id$ -// Service_Object.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Service_Object_Ptr::ACE_Service_Object_Ptr (ACE_Service_Object *so) : service_object_ (so) @@ -62,3 +62,6 @@ ACE_Service_Type::fini_called (void) const ACE_TRACE ("ACE_Service_Type::fini_called"); return this->fini_already_called_; } + +ACE_END_VERSIONED_NAMESPACE_DECL + diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp index c872df591ff..81feb3b233e 100644 --- a/ace/Service_Repository.cpp +++ b/ace/Service_Repository.cpp @@ -17,6 +17,8 @@ ACE_RCSID (ace, Service_Repository, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Service_Repository) // Process-wide Service Repository. @@ -442,3 +444,5 @@ ACE_Service_Repository_Iterator::advance (void) return this->next_ < this->svc_rep_.current_size_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Repository.h b/ace/Service_Repository.h index 5479f59238e..5feb133eb5b 100644 --- a/ace/Service_Repository.h +++ b/ace/Service_Repository.h @@ -24,6 +24,7 @@ #include "ace/Default_Constants.h" #include "ace/Recursive_Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Service_Type; @@ -206,6 +207,8 @@ private: int ignore_suspended_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Service_Repository.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Service_Repository.inl b/ace/Service_Repository.inl index f6e13326eab..2ecf2de05fa 100644 --- a/ace/Service_Repository.inl +++ b/ace/Service_Repository.inl @@ -1,8 +1,7 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Service_Repository.i - // Returns a count of the number of currently valid entries (counting // both resumed and suspended entries). @@ -11,6 +10,8 @@ #include "ace/Thread_Mutex.h" #endif /* ACE_MT_SAFE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Service_Repository::current_size (void) const { @@ -34,3 +35,5 @@ ACE_INLINE ACE_Service_Repository_Iterator::~ACE_Service_Repository_Iterator (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Templates.cpp b/ace/Service_Templates.cpp index d5f3f1b328b..c064bbdce45 100644 --- a/ace/Service_Templates.cpp +++ b/ace/Service_Templates.cpp @@ -4,6 +4,9 @@ #include "ace/SString.h" #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template class ACE_Node<ACE_Static_Svc_Descriptor *>; template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>; template class ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>; @@ -42,7 +45,13 @@ template class ACE_Thru_Task<ACE_SYNCH>; template class ACE_Task<ACE_NULL_SYNCH>; template class ACE_Thru_Task<ACE_NULL_SYNCH>; #endif /* ACE_HAS_THREADS */ + +ACE_END_VERSIONED_NAMESPACE_DECL + #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + #pragma instantiate ACE_Node<ACE_Static_Svc_Descriptor *> #pragma instantiate ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *> #pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *> @@ -80,4 +89,9 @@ template class ACE_Thru_Task<ACE_SYNCH>; #pragma instantiate ACE_Task<ACE_NULL_SYNCH> #pragma instantiate ACE_Thru_Task<ACE_NULL_SYNCH> #endif /* ACE_HAS_THREADS */ + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Types.cpp b/ace/Service_Types.cpp index f62a9c0ce98..78972ed64d8 100644 --- a/ace/Service_Types.cpp +++ b/ace/Service_Types.cpp @@ -16,6 +16,7 @@ ACE_RCSID (ace, Service_Types, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef ACE_Stream<ACE_SYNCH> MT_Stream; typedef ACE_Module<ACE_SYNCH> MT_Module; @@ -506,3 +507,5 @@ template class ACE_Thru_Task<ACE_SYNCH>; #endif *//* ACE_HAS_THREADS */ //#else //#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Service_Types.h b/ace/Service_Types.h index a87169c7dbb..e2f6500e8ae 100644 --- a/ace/Service_Types.h +++ b/ace/Service_Types.h @@ -21,6 +21,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Service_Type_Impl * @@ -189,6 +191,8 @@ private: ACE_Module_Type *head_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Service_Types.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Service_Types.inl b/ace/Service_Types.inl index 7412140a4d2..9ebfd705ced 100644 --- a/ace/Service_Types.inl +++ b/ace/Service_Types.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/ACE.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void * ACE_Service_Type_Impl::object (void) const { @@ -25,3 +28,5 @@ ACE_Service_Type_Impl::name (const ACE_TCHAR *n) ACE::strdelete (const_cast<ACE_TCHAR*> (this->name_)); this->name_ = ACE::strnew (n); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Memory.cpp b/ace/Shared_Memory.cpp index 5e4447075ee..90a9a7ed93e 100644 --- a/ace/Shared_Memory.cpp +++ b/ace/Shared_Memory.cpp @@ -4,6 +4,10 @@ ACE_RCSID(ace, Shared_Memory, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_Shared_Memory::~ACE_Shared_Memory (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Memory.h b/ace/Shared_Memory.h index 7d07b598610..1000cbd5412 100644 --- a/ace/Shared_Memory.h +++ b/ace/Shared_Memory.h @@ -29,6 +29,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Shared_Memory * @@ -54,6 +56,8 @@ public: virtual ACE_HANDLE get_id (void) const = 0; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SHARED_MEMORY_H */ diff --git a/ace/Shared_Memory_MM.cpp b/ace/Shared_Memory_MM.cpp index 9ad0bb021f3..16f857da46d 100644 --- a/ace/Shared_Memory_MM.cpp +++ b/ace/Shared_Memory_MM.cpp @@ -11,6 +11,7 @@ ACE_RCSID (ace, Shared_Memory_MM, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_MM) @@ -106,3 +107,5 @@ ACE_Shared_Memory_MM::free (void *p) ACE_TRACE ("ACE_Shared_Memory_MM::free"); return p != 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Memory_MM.h b/ace/Shared_Memory_MM.h index bbdf2ef43a7..70602aa6521 100644 --- a/ace/Shared_Memory_MM.h +++ b/ace/Shared_Memory_MM.h @@ -23,6 +23,8 @@ #include "ace/Mem_Map.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Shared_Memory_MM * @@ -108,6 +110,8 @@ private: ACE_Mem_Map shared_memory_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Shared_Memory_MM.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Shared_Memory_MM.inl b/ace/Shared_Memory_MM.inl index ff52dacd44b..96d865b667b 100644 --- a/ace/Shared_Memory_MM.inl +++ b/ace/Shared_Memory_MM.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Shared_Memory_MM.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Return the name of file that is mapped (if any). @@ -37,3 +38,5 @@ ACE_Shared_Memory_MM::open (const ACE_TCHAR *file_name, return shared_memory_.map (file_name, len, flags, mode, prot, share, addr, pos); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Memory_Pool.cpp b/ace/Shared_Memory_Pool.cpp index 8bed1289413..c61334485b7 100644 --- a/ace/Shared_Memory_Pool.cpp +++ b/ace/Shared_Memory_Pool.cpp @@ -8,6 +8,9 @@ ACE_RCSID(ace, Shared_Memory_Pool, "$Id$") #if !defined (ACE_LACKS_SYSV_SHMEM) + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_Pool) ACE_Shared_Memory_Pool_Options::ACE_Shared_Memory_Pool_Options (const char *base_addr, @@ -148,7 +151,7 @@ ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *) ACE_TRACE ("ACE_Shared_Memory_Pool::handle_signal"); // ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("signal %S occurred\n"), signum)); - // While FreeBSD 5.X has a siginfo_t struct with a si_addr field, + // While FreeBSD 5.X has a siginfo_t struct with a si_addr field, // it does not define SEGV_MAPERR. #if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR) && \ (defined (SEGV_MAPERR) || defined (SEGV_MEMERR)) @@ -450,4 +453,7 @@ ACE_Shared_Memory_Pool::round_up (size_t nbytes) return ACE::round_to_pagesize (nbytes); } + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_SYSV_SHMEM */ diff --git a/ace/Shared_Memory_Pool.h b/ace/Shared_Memory_Pool.h index 1fb46a5cc9c..66b35d3b1e4 100644 --- a/ace/Shared_Memory_Pool.h +++ b/ace/Shared_Memory_Pool.h @@ -27,14 +27,15 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#if !defined (ACE_LACKS_SYSV_SHMEM) + #include "ace/ACE.h" #include "ace/Event_Handler.h" #include "ace/Signal.h" - -#if !defined (ACE_LACKS_SYSV_SHMEM) - #include "ace/os_include/sys/os_mman.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Shared_Memory_Pool_Options * @@ -203,6 +204,9 @@ protected: /// properly. virtual int handle_signal (int signum, siginfo_t *, ucontext_t *); }; + +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_SYSV_SHMEM */ #include /**/ "ace/post.h" diff --git a/ace/Shared_Memory_SV.cpp b/ace/Shared_Memory_SV.cpp index 59d6ad2fedc..8378b75d7dc 100644 --- a/ace/Shared_Memory_SV.cpp +++ b/ace/Shared_Memory_SV.cpp @@ -12,6 +12,8 @@ ACE_RCSID (ace, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_SV) void @@ -23,11 +25,11 @@ ACE_Shared_Memory_SV::dump (void) const } ACE_Shared_Memory_SV::ACE_Shared_Memory_SV (key_t id, - int length, - int create, - int perms, - void *addr, - int flags) + int length, + int create, + int perms, + void *addr, + int flags) : shared_memory_ (id, length, create, perms, addr, flags) { ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV"); @@ -82,3 +84,5 @@ ACE_Shared_Memory_SV::free (void *p) ACE_TRACE ("ACE_Shared_Memory_SV::free"); return p != 0; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Memory_SV.h b/ace/Shared_Memory_SV.h index c4c59d5d4e6..48fe99a5606 100644 --- a/ace/Shared_Memory_SV.h +++ b/ace/Shared_Memory_SV.h @@ -23,6 +23,8 @@ #include "ace/SV_Shared_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Shared_Memory_SV * @@ -89,6 +91,8 @@ private: ACE_SV_Shared_Memory shared_memory_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Shared_Memory_SV.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Shared_Memory_SV.inl b/ace/Shared_Memory_SV.inl index 1830df3f630..f40fc55c28d 100644 --- a/ace/Shared_Memory_SV.inl +++ b/ace/Shared_Memory_SV.inl @@ -1,21 +1,22 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Shared_Memory_SV.i - #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE int ACE_Shared_Memory_SV::open (key_t id, - int length, - int create, - int perms, - void *addr, - int flags) + int length, + int create, + int perms, + void *addr, + int flags) { ACE_TRACE ("ACE_Shared_Memory_SV::open"); return shared_memory_.open_and_attach (id, length, create, - perms, addr, flags); + perms, addr, flags); } // The "do-nothing" constructor. @@ -25,3 +26,5 @@ ACE_Shared_Memory_SV::ACE_Shared_Memory_SV (void) { ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV"); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Object.cpp b/ace/Shared_Object.cpp index 86164c16759..2be49edf997 100644 --- a/ace/Shared_Object.cpp +++ b/ace/Shared_Object.cpp @@ -16,6 +16,8 @@ ACE_RCSID (ace, Shared_Object, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Initializes object when dynamic linking occurs. int @@ -49,3 +51,5 @@ ACE_Shared_Object::~ACE_Shared_Object (void) { ACE_TRACE ("ACE_Shared_Object::~ACE_Shared_Object"); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Shared_Object.h b/ace/Shared_Object.h index 006dbb99eaf..ee987b23122 100644 --- a/ace/Shared_Object.h +++ b/ace/Shared_Object.h @@ -23,6 +23,8 @@ #include "ace/os_include/sys/os_types.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Shared_Object * @@ -46,6 +48,8 @@ public: virtual ~ACE_Shared_Object (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Shared_Object.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Shared_Object.inl b/ace/Shared_Object.inl index 36a42157cb2..cd76cb6a267 100644 --- a/ace/Shared_Object.inl +++ b/ace/Shared_Object.inl @@ -1,7 +1,12 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Shared_Object::ACE_Shared_Object (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Signal.cpp b/ace/Signal.cpp index 624787c6ee4..1f24ebd7c26 100644 --- a/ace/Signal.cpp +++ b/ace/Signal.cpp @@ -45,6 +45,8 @@ ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context) #endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ #endif /* ACE_HAS_SIG_C_FUNC */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Array of Event_Handlers that will handle the signals. ACE_Event_Handler *ACE_Sig_Handler::signal_handlers_[ACE_NSIG]; @@ -878,3 +880,5 @@ template class ACE_Fixed_Set_Iterator_Base<ACE_Event_Handler *, ACE_MAX_SIGNAL_H #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Signal.h b/ace/Signal.h index 576f80f2a70..44f9fcb826b 100644 --- a/ace/Signal.h +++ b/ace/Signal.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -32,6 +32,8 @@ // Type of the extended signal handler. typedef void (*ACE_Sig_Handler_Ex) (int, siginfo_t *siginfo, ucontext_t *ucontext); +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Sig_Set * @@ -506,16 +508,7 @@ private: }; #endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ -#if defined (ACE_HAS_SIG_C_FUNC) -extern "C" void -ace_sig_handler_dispatch (int signum, siginfo_t *info, ucontext_t *context); - -#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES) -extern "C" void -ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context); -#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */ - -#endif /* ACE_HAS_SIG_C_FUNC */ +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) #include "ace/Signal.inl" diff --git a/ace/Signal.inl b/ace/Signal.inl index e7a12852d95..ef871441aca 100644 --- a/ace/Signal.inl +++ b/ace/Signal.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #include "ace/OS_NS_signal.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Sig_Set::ACE_Sig_Set (sigset_t *ss) // : sigset_ () @@ -301,3 +304,5 @@ ACE_Sig_Handler::in_range (int signum) ACE_TRACE ("ACE_Sig_Handler::in_range"); return signum > 0 && signum < ACE_NSIG; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Singleton.cpp b/ace/Singleton.cpp index 51cf255b4c9..fa3c00993b0 100644 --- a/ace/Singleton.cpp +++ b/ace/Singleton.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_SINGLETON_C -#define ACE_SINGLETON_C +#ifndef ACE_SINGLETON_CPP +#define ACE_SINGLETON_CPP #include "ace/Singleton.h" @@ -22,6 +22,9 @@ ACE_RCSID (ace, Singleton, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class TYPE, class ACE_LOCK> void ACE_Singleton<TYPE, ACE_LOCK>::dump (void) { @@ -526,4 +529,6 @@ ACE_DLL_Singleton_Adapter_T<TYPE>::dll_name (void) return ACE_TEXT("ACE"); } -#endif /* ACE_SINGLETON_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_SINGLETON_CPP */ diff --git a/ace/Singleton.h b/ace/Singleton.h index 57b0a8a9d75..5caa52c5762 100644 --- a/ace/Singleton.h +++ b/ace/Singleton.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -29,6 +29,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Singleton * @@ -308,6 +310,8 @@ public: const ACE_TCHAR *dll_name (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Singleton.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Singleton.inl b/ace/Singleton.inl index 12dfe1bdda3..4351a59a5f6 100644 --- a/ace/Singleton.inl +++ b/ace/Singleton.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Default constructors. // // Note: don't explicitly initialize "instance_", because TYPE may not @@ -35,3 +38,5 @@ template <class TYPE, class ACE_LOCK> ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::~ACE_DLL_Singleton_T (void) { } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Sock_Connect.cpp b/ace/Sock_Connect.cpp index e2ca8640fb9..fd24d041b03 100644 --- a/ace/Sock_Connect.cpp +++ b/ace/Sock_Connect.cpp @@ -275,6 +275,8 @@ get_windows_version() #endif //(ACE_WIN32) && !(ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 == 0) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Bind socket to an unused port. int @@ -1533,3 +1535,5 @@ template class ACE_Auto_Basic_Array_Ptr<struct ifreq>; #pragma instantiate ACE_Auto_Basic_Array_Ptr<struct ifreq> # endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* (__unix || __Lynx_ || AIX ) */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Sock_Connect.h b/ace/Sock_Connect.h index 532892d64fa..90e9ecf1c07 100644 --- a/ace/Sock_Connect.h +++ b/ace/Sock_Connect.h @@ -25,6 +25,8 @@ #include "ace/Basic_Types.h" #include "ace/os_include/netinet/os_in.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward Declarations class ACE_INET_Addr; @@ -82,6 +84,8 @@ namespace ACE extern ACE_Export int ipv6_enabled (void); } +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SOCK_CONNECT_H */ diff --git a/ace/Static_Object_Lock.h b/ace/Static_Object_Lock.h index 93006c34001..5a765a24fbd 100644 --- a/ace/Static_Object_Lock.h +++ b/ace/Static_Object_Lock.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #if defined (ACE_HAS_THREADS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Recursive_Thread_Mutex; /** @@ -47,11 +49,15 @@ public: static void cleanup_lock (void); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ // hack to get around errors while compiling using split-cpp #if defined (ACE_HAS_THREADS) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_IS_SPLITTING) typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> ACE_Static_Object_Lock_Type; @@ -64,6 +70,8 @@ static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock = 0; # endif /* ACE_IS_SPLITTING */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_THREADS */ #include /**/ "ace/post.h" diff --git a/ace/Stats.cpp b/ace/Stats.cpp index 47c4da1dae4..058830a8cc6 100644 --- a/ace/Stats.cpp +++ b/ace/Stats.cpp @@ -12,6 +12,8 @@ ACE_RCSID(ace, Stats, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_UINT32 ACE_Stats_Value::fractional_field (void) const { @@ -612,10 +614,4 @@ ACE_Throughput_Stats::dump_throughput (const ACE_TCHAR *msg, #endif /* ACE_NLOGGING */ } -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Stats.h b/ace/Stats.h index 3d043cecb82..cd4fe3e9448 100644 --- a/ace/Stats.h +++ b/ace/Stats.h @@ -26,6 +26,8 @@ #include "ace/Log_Msg.h" #include "ace/Basic_Stats.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Stats_Value * @@ -262,6 +264,7 @@ private: #endif /* 0 */ }; +ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) # include "ace/Stats.inl" diff --git a/ace/Stats.inl b/ace/Stats.inl index bafa86161e8..5fecfde1de8 100644 --- a/ace/Stats.inl +++ b/ace/Stats.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE ACE_Stats_Value::ACE_Stats_Value (const u_int precision) : whole_ (0), @@ -97,3 +100,5 @@ ACE_Stats::dump (void) const print_summary (3u); #endif /* ACE_HAS_DUMP */ } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp index 2bf2eaeb93f..9704224fdf5 100644 --- a/ace/Strategies_T.cpp +++ b/ace/Strategies_T.cpp @@ -1,3 +1,5 @@ +// $Id$ + #ifndef ACE_STRATEGIES_T_CPP #define ACE_STRATEGIES_T_CPP @@ -20,11 +22,7 @@ #include "ace/Strategies_T.inl" #endif /* __ACE_INLINE__ */ - -ACE_RCSID (ace, - Strategies_T, - "$Id$") - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template<class SVC_HANDLER> ACE_Recycling_Strategy<SVC_HANDLER>::~ACE_Recycling_Strategy (void) @@ -1487,4 +1485,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Process_Strategy) ACE_ALLOC_HOOK_DEFINE(ACE_Accept_Strategy) ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Strategy) +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_STRATEGIES_T_CPP */ diff --git a/ace/Strategies_T.h b/ace/Strategies_T.h index 9dfcfc1f134..8171bf8b07f 100644 --- a/ace/Strategies_T.h +++ b/ace/Strategies_T.h @@ -32,6 +32,7 @@ // Needed for broken linkers that can't grok long symbols. #define ACE_Refcounted_Hash_Recyclable ARHR +ACE_BEGIN_VERSIONED_NAMESPACE_DECL class ACE_Service_Repository; @@ -1056,6 +1057,8 @@ protected: int delete_recycling_strategy_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Strategies_T.inl" #endif /* __ACE_INLINE__ */ @@ -1070,5 +1073,4 @@ protected: #include /**/ "ace/post.h" - #endif /* ACE_STRATEGIES_T_H */ diff --git a/ace/Strategies_T.inl b/ace/Strategies_T.inl index 6f0c59304b1..a6a6d1dfd1a 100644 --- a/ace/Strategies_T.inl +++ b/ace/Strategies_T.inl @@ -2,6 +2,8 @@ // // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class SVC_HANDLER> ACE_INLINE ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy (SVC_HANDLER *sh, ACE_Thread_Manager *tm) @@ -224,3 +226,5 @@ ACE_Refcounted_Hash_Recyclable<T>::operator!= (const ACE_Refcounted_Hash_Recycla { return !this->operator== (rhs); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Stream.cpp b/ace/Stream.cpp index e76db19c6ce..b44b04ddacc 100644 --- a/ace/Stream.cpp +++ b/ace/Stream.cpp @@ -1,8 +1,8 @@ // Stream.cpp // $Id$ -#ifndef ACE_STREAM_C -#define ACE_STREAM_C +#ifndef ACE_STREAM_CPP +#define ACE_STREAM_CPP //#include "ace/Module.h" #include "ace/Stream.h" @@ -18,7 +18,7 @@ #include "ace/Stream.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Stream, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Stream) @@ -614,4 +614,6 @@ ACE_Stream_Iterator<ACE_SYNCH_USE>::ACE_Stream_Iterator (const ACE_Stream<ACE_SY ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::ACE_Stream_Iterator"); } -#endif /* ACE_STREAM_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_STREAM_CPP */ diff --git a/ace/Stream.h b/ace/Stream.h index fed079368e4..1ab1cacf3ea 100644 --- a/ace/Stream.h +++ b/ace/Stream.h @@ -25,6 +25,8 @@ #include "ace/Message_Block.h" #include "ace/Module.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decls. template<ACE_SYNCH_DECL> class ACE_Stream_Iterator; class ACE_Time_Value; @@ -220,6 +222,8 @@ private: ACE_Module<ACE_SYNCH_USE> *next_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Stream.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Stream.inl b/ace/Stream.inl index 42a4989eff0..24ff6840431 100644 --- a/ace/Stream.inl +++ b/ace/Stream.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// Stream.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <ACE_SYNCH_DECL> ACE_INLINE ACE_Module<ACE_SYNCH_USE> * ACE_Stream<ACE_SYNCH_USE>::head (void) @@ -47,3 +48,4 @@ ACE_Stream_Iterator<ACE_SYNCH_USE>::advance (void) return this->next_ != 0; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp index 3e4b4a6f1b7..69163951323 100644 --- a/ace/Stream_Modules.cpp +++ b/ace/Stream_Modules.cpp @@ -1,8 +1,7 @@ -// Stream_Modules.cpp // $Id$ -#ifndef ACE_STREAM_MODULES_C -#define ACE_STREAM_MODULES_C +#ifndef ACE_STREAM_MODULES_CPP +#define ACE_STREAM_MODULES_CPP #include "ace/Stream_Modules.h" #include "ace/OS_NS_string.h" @@ -11,7 +10,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, Stream_Modules, "$Id$") + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Head) @@ -375,4 +375,6 @@ ACE_Thru_Task<ACE_SYNCH_USE>::fini (void) return 0; } -#endif /* ACE_STREAM_MODULES_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_STREAM_MODULES_CPP */ diff --git a/ace/Stream_Modules.h b/ace/Stream_Modules.h index c108ff55603..10d396c95f5 100644 --- a/ace/Stream_Modules.h +++ b/ace/Stream_Modules.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -21,6 +21,8 @@ #define ACE_STREAM_MODULES #include /**/ "ace/pre.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Stream_Head * @@ -150,6 +152,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Stream_Modules.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/String_Base.cpp b/ace/String_Base.cpp index d5f065938d7..ec023cc6a6c 100644 --- a/ace/String_Base.cpp +++ b/ace/String_Base.cpp @@ -1,3 +1,5 @@ +// $Id$ + #ifndef ACE_STRING_BASE_CPP #define ACE_STRING_BASE_CPP @@ -11,11 +13,7 @@ #include "ace/String_Base.inl" #endif /* __ACE_INLINE__ */ - -ACE_RCSID (ace, - String_Base, - "$Id$") - +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_String_Base) @@ -353,10 +351,10 @@ template <class CHAR> int ACE_String_Base<CHAR>::compare (const ACE_String_Base<CHAR> &s) const { ACE_TRACE ("ACE_String_Base<CHAR>::compare"); - + if (this->rep_ == s.rep_) return 0; - + // Pick smaller of the two lengths and perform the comparison. size_t smaller_length = ace_min (this->len_, s.len_); @@ -495,5 +493,6 @@ ACE_String_Base<CHAR>::operator+= (const CHAR c) return this->append(&c, slen); } +ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_STRING_BASE_CPP */ diff --git a/ace/String_Base.h b/ace/String_Base.h index da9ab247d98..eab50fa43be 100644 --- a/ace/String_Base.h +++ b/ace/String_Base.h @@ -24,6 +24,8 @@ #include "ace/Global_Macros.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Allocator; /** @@ -514,6 +516,8 @@ template < class CHAR > ACE_String_Base < CHAR > operator + (const CHAR c, const ACE_String_Base < CHAR > &t); +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/String_Base.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/String_Base.inl b/ace/String_Base.inl index 2a27f4b158c..c518c076de0 100644 --- a/ace/String_Base.inl +++ b/ace/String_Base.inl @@ -8,6 +8,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL template <class CHAR> ACE_INLINE void ACE_String_Base<CHAR>::dump (void) const @@ -113,3 +114,4 @@ ACE_String_Base<CHAR>::strstr (const ACE_String_Base<CHAR> &s) const return this->find (s.rep_); } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/String_Base_Const.cpp b/ace/String_Base_Const.cpp index bf66b2cf873..5f193d6c77e 100644 --- a/ace/String_Base_Const.cpp +++ b/ace/String_Base_Const.cpp @@ -2,4 +2,8 @@ #include "ace/String_Base_Const.h" -ssize_t ACE_String_Base_Const::npos = -1; +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +ssize_t const ACE_String_Base_Const::npos = -1; + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/String_Base_Const.h b/ace/String_Base_Const.h index 50a9c086c2b..5a3f935308e 100644 --- a/ace/String_Base_Const.h +++ b/ace/String_Base_Const.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -23,6 +23,8 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_String_Base_Const * @@ -32,8 +34,10 @@ class ACE_Export ACE_String_Base_Const { public: - static ssize_t npos; + static ssize_t const npos; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_STRING_BASE_CONST_H */ diff --git a/ace/Svc_Conf.h b/ace/Svc_Conf.h index 32385a37df7..73dc88b1e3d 100644 --- a/ace/Svc_Conf.h +++ b/ace/Svc_Conf.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** diff --git a/ace/Svc_Conf_Lexer_Guard.cpp b/ace/Svc_Conf_Lexer_Guard.cpp index c5d79aa1f32..8429d1ea7f4 100644 --- a/ace/Svc_Conf_Lexer_Guard.cpp +++ b/ace/Svc_Conf_Lexer_Guard.cpp @@ -1,4 +1,4 @@ -// -*- C++ -*- +// $Id$ #include "ace/Svc_Conf_Lexer_Guard.h" @@ -36,4 +36,5 @@ ACE_Svc_Conf_Lexer_Guard::~ACE_Svc_Conf_Lexer_Guard (void) ::ace_yy_pop_buffer (this->buffer_); } + #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ diff --git a/ace/Svc_Conf_Lexer_Guard.h b/ace/Svc_Conf_Lexer_Guard.h index 46f0c9a450d..281ca2a6403 100644 --- a/ace/Svc_Conf_Lexer_Guard.h +++ b/ace/Svc_Conf_Lexer_Guard.h @@ -73,7 +73,6 @@ private: }; - #include /**/ "ace/post.h" #endif /* ACE_SVC_CONF_LEXER_GUARD_H */ diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp index 2fb990a9064..f57d5381688 100644 --- a/ace/Svc_Handler.cpp +++ b/ace/Svc_Handler.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_SVC_HANDLER_C -#define ACE_SVC_HANDLER_C +#ifndef ACE_SVC_HANDLER_CPP +#define ACE_SVC_HANDLER_CPP #include "ace/Svc_Handler.h" @@ -15,11 +15,11 @@ #include "ace/Dynamic.h" -ACE_RCSID(ace, Svc_Handler, "$Id$") - #define PR_ST_1 ACE_PEER_STREAM_1 #define PR_ST_2 ACE_PEER_STREAM_2 +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <PR_ST_1, ACE_SYNCH_DECL> void * ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new (size_t, void *p) @@ -509,6 +509,8 @@ ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_timeout (const ACE_Time return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #undef PR_ST_1 #undef PR_ST_2 -#endif /* ACE_SVC_HANDLER_C */ +#endif /* ACE_SVC_HANDLER_CPP */ diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h index 2fd4f15320e..29e5e3934d1 100644 --- a/ace/Svc_Handler.h +++ b/ace/Svc_Handler.h @@ -16,9 +16,6 @@ #include /**/ "ace/pre.h" -// Forward decls. -class ACE_Connection_Recycling_Strategy; - #include "ace/Synch_Options.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -29,6 +26,11 @@ class ACE_Connection_Recycling_Strategy; #include "ace/Recyclable.h" #include "ace/Reactor.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward decls. +class ACE_Connection_Recycling_Strategy; + /** * @class ACE_Svc_Handler * @@ -320,6 +322,8 @@ protected: ACE_Time_Value *timeoutp_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) #include "ace/Svc_Handler.cpp" #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ diff --git a/ace/Swap.cpp b/ace/Swap.cpp index 4f62e72ade6..eb14789c3de 100644 --- a/ace/Swap.cpp +++ b/ace/Swap.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ /** * @file Swap.cpp * @@ -7,8 +6,8 @@ * @author Carlos O'Ryan <coryan@uci.edu> */ -#ifndef ACE_SWAP_C -#define ACE_SWAP_C +#ifndef ACE_SWAP_CPP +#define ACE_SWAP_CPP #include "ace/Swap.h" @@ -20,6 +19,4 @@ #include "ace/Swap.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, Swap, "$Id$") - -#endif /* ACE_SWAP_C */ +#endif /* ACE_SWAP_CPP */ diff --git a/ace/Swap.h b/ace/Swap.h index 0d2ebcf0c05..81bdfeb8092 100644 --- a/ace/Swap.h +++ b/ace/Swap.h @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- + /** * @file Swap.h * @@ -17,6 +18,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Swap * @@ -30,6 +33,8 @@ public: static void swap (T &lhs, T &rhs); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/Swap.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/Swap.inl b/ace/Swap.inl index b1139ca3ffb..195f1559f69 100644 --- a/ace/Swap.inl +++ b/ace/Swap.inl @@ -1,3 +1,5 @@ +// -*- C++ -*- + /** * @file Swap.inl * @@ -6,6 +8,8 @@ * @author Carlos O'Ryan <coryan@uci.edu> */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template<class T> ACE_INLINE void ACE_Swap<T>::swap (T &lhs, T& rhs) { @@ -13,3 +17,5 @@ ACE_Swap<T>::swap (T &lhs, T& rhs) lhs = rhs; rhs = tmp; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Synch.cpp b/ace/Synch.cpp index 6a81cb386f7..d6972b74a5d 100644 --- a/ace/Synch.cpp +++ b/ace/Synch.cpp @@ -1,5 +1,5 @@ -#ifndef ACE_SYNCH_C -#define ACE_SYNCH_C +#ifndef ACE_SYNCH_CPP +#define ACE_SYNCH_CPP #include "ace/Thread.h" #include "ace/ACE.h" @@ -33,6 +33,8 @@ ACE_RCSID (ace, #include "ace/Thread_Mutex.cpp" #include "ace/Thread_Semaphore.cpp" - //ACE_ALLOC_HOOK_DEFINE(ACE_Null_Mutex) +// ACE_BEGIN_VERSIONED_NAMESPACE_DECL +// ACE_ALLOC_HOOK_DEFINE(ACE_Null_Mutex) +// ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_SYNCH_C */ +#endif /* ACE_SYNCH_CPP */ diff --git a/ace/Synch_Options.cpp b/ace/Synch_Options.cpp index d8f4e9bba9a..4f95720486c 100644 --- a/ace/Synch_Options.cpp +++ b/ace/Synch_Options.cpp @@ -1,9 +1,5 @@ #include "ace/Synch_Options.h" -#if !defined (__ACE_INLINE__) -#include "ace/Synch_Options.inl" -#endif /* __ACE_INLINE__ */ - #include "ace/Global_Macros.h" #include "ace/config-all.h" @@ -11,6 +7,7 @@ ACE_RCSID (ace, Synch_Options, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE (ACE_Synch_Options) @@ -109,3 +106,5 @@ ACE_Synch_Options::arg (const void *a) ACE_TRACE ("ACE_Synch_Options::arg"); this->arg_ = a; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/Synch_Options.h b/ace/Synch_Options.h index f9c97033759..288e4acb329 100644 --- a/ace/Synch_Options.h +++ b/ace/Synch_Options.h @@ -23,6 +23,7 @@ #include "ace/Time_Value.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** * @class ACE_Synch_Options @@ -81,9 +82,6 @@ public: const ACE_Time_Value &timeout = ACE_Time_Value::zero, const void *arg = 0); - /// Default dtor. - ~ACE_Synch_Options (void); - /// Initialize the Synch_Options based on parameters. void set (unsigned long options = 0, const ACE_Time_Value &timeout = ACE_Time_Value::zero, @@ -149,9 +147,7 @@ private: const void *arg_; }; -#if defined (__ACE_INLINE__) -#include "ace/Synch_Options.inl" -#endif /* __ACE_INLINE__ */ +ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" diff --git a/ace/Synch_Options.inl b/ace/Synch_Options.inl deleted file mode 100644 index 3cba94e0fef..00000000000 --- a/ace/Synch_Options.inl +++ /dev/null @@ -1,7 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -ACE_INLINE -ACE_Synch_Options::~ACE_Synch_Options (void) -{ -} diff --git a/ace/Synch_T.cpp b/ace/Synch_T.cpp index b41640ba1d2..22ee08d4e0b 100644 --- a/ace/Synch_T.cpp +++ b/ace/Synch_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_SYNCH_T_C -#define ACE_SYNCH_T_C +#ifndef ACE_SYNCH_T_CPP +#define ACE_SYNCH_T_CPP #include "ace/Thread.h" @@ -13,12 +13,10 @@ #include "ace/Synch_T.h" #include "ace/Log_Msg.h" -ACE_RCSID(ace, Synch_T, "$Id$") - #include "ace/Lock_Adapter_T.cpp" #include "ace/Reverse_Lock_T.cpp" #include "ace/Guard_T.cpp" #include "ace/TSS_T.cpp" #include "ace/Condition_T.cpp" -#endif /* ACE_SYNCH_T_C */ +#endif /* ACE_SYNCH_T_CPP */ diff --git a/ace/Synch_T.h b/ace/Synch_T.h index 9b9eba49734..c853a3f3325 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** diff --git a/ace/Synch_Traits.h b/ace/Synch_Traits.h index a9b9481433b..03e8b25362d 100644 --- a/ace/Synch_Traits.h +++ b/ace/Synch_Traits.h @@ -23,6 +23,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward decl class ACE_Null_Mutex; class ACE_Null_Condition; @@ -144,5 +146,7 @@ public: #define ACE_SYNCH ACE_NULL_SYNCH #endif /* ACE_HAS_THREADS */ +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SYNCH_TRAITS_H */ diff --git a/ace/System_Time.cpp b/ace/System_Time.cpp index dcb1480aa51..34c6e784905 100644 --- a/ace/System_Time.cpp +++ b/ace/System_Time.cpp @@ -1,4 +1,3 @@ -// System_Time.cpp // $Id$ #include "ace/System_Time.h" @@ -8,6 +7,8 @@ ACE_RCSID(ace, System_Time, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_System_Time::ACE_System_Time (const ACE_TCHAR *poolname) : delta_time_ (0) { @@ -141,3 +142,5 @@ template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_M #pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/System_Time.h b/ace/System_Time.h index 1688ae45755..6128f61ec3d 100644 --- a/ace/System_Time.h +++ b/ace/System_Time.h @@ -1,5 +1,4 @@ -/* -*- C++ -*- */ - +// -*- C++ -*- //============================================================================= /** @@ -22,10 +21,12 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Memory_Pool.h" +#include "ace/MMAP_Memory_Pool.h" #include "ace/Malloc_T.h" #include "ace/Null_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_System_Time * @@ -70,7 +71,7 @@ public: int sync_local_system_time (ACE_System_Time::Sync_Mode mode); private: - typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC; + typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC; typedef ACE_Allocator_Adapter<MALLOC> ALLOCATOR; /// Our allocator (used for obtaining system time from shared memory). @@ -83,5 +84,7 @@ private: long *delta_time_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #include /**/ "ace/post.h" #endif /* ACE_SYSTEM_TIME_H */ diff --git a/ace/TLI.cpp b/ace/TLI.cpp index 3efa611ef74..c53ed5a7e4e 100644 --- a/ace/TLI.cpp +++ b/ace/TLI.cpp @@ -19,6 +19,8 @@ ACE_RCSID(ace, TLI, "$Id$") #include "ace/TLI.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_TLI) void @@ -266,4 +268,6 @@ ACE_TLI::get_option (int level, int option, void *optval, int &optlen) #endif /* ACE_HAS_SVR4_TLI */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TLI */ diff --git a/ace/TLI.h b/ace/TLI.h index 6960af430cf..20fcec2841a 100644 --- a/ace/TLI.h +++ b/ace/TLI.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -44,6 +44,8 @@ #define ACE_XTI_ATM_DEVICE "/dev/xtisvc0" #endif +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_TLI * @@ -103,6 +105,8 @@ private: #endif /* ACE_HAS_SVR4_TLI */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/TLI.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/TLI.inl b/ace/TLI.inl index 8f32186deaf..2485cdc5557 100644 --- a/ace/TLI.inl +++ b/ace/TLI.inl @@ -1,12 +1,14 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// TLI.i - #include "ace/TLI.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE -int +int ACE_TLI::look (void) const { ACE_TRACE ("ACE_TLI::look"); @@ -14,7 +16,7 @@ ACE_TLI::look (void) const } ACE_INLINE -int +int ACE_TLI::rcvdis (struct t_discon *discon) const { ACE_TRACE ("ACE_TLI::rcvdis"); @@ -22,7 +24,7 @@ ACE_TLI::rcvdis (struct t_discon *discon) const } ACE_INLINE -int +int ACE_TLI::snddis (struct t_call *call) const { ACE_TRACE ("ACE_TLI::snddis"); @@ -30,7 +32,7 @@ ACE_TLI::snddis (struct t_call *call) const } ACE_INLINE -int +int ACE_TLI::rcvrel (void) const { ACE_TRACE ("ACE_TLI::rcvrel"); @@ -38,9 +40,11 @@ ACE_TLI::rcvrel (void) const } ACE_INLINE -int +int ACE_TLI::sndrel (void) const { ACE_TRACE ("ACE_TLI::sndrel"); return ACE_OS::t_sndrel (this->get_handle ()); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/TLI_Acceptor.cpp b/ace/TLI_Acceptor.cpp index 180bcc95717..427cca27f69 100644 --- a/ace/TLI_Acceptor.cpp +++ b/ace/TLI_Acceptor.cpp @@ -10,6 +10,8 @@ ACE_RCSID(ace, TLI_Acceptor, "$Id$") #if defined (ACE_HAS_TLI) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Put the actual definitions of the ACE_TLI_Request and // ACE_TLI_Request_Queue classes here to hide them from clients... @@ -552,4 +554,6 @@ ACE_TLI_Acceptor::accept (ACE_TLI_Stream &new_tli_sap, return new_tli_sap.get_handle () == ACE_INVALID_HANDLE ? -1 : 0; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TLI */ diff --git a/ace/TLI_Acceptor.h b/ace/TLI_Acceptor.h index 9d74cd69569..e7855b83c8f 100644 --- a/ace/TLI_Acceptor.h +++ b/ace/TLI_Acceptor.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -26,6 +26,8 @@ #if defined (ACE_HAS_TLI) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Forward reference... class ACE_TLI_Request_Queue; class ACE_Time_Value; @@ -114,6 +116,8 @@ private: struct t_discon *disp_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TLI */ #include /**/ "ace/post.h" #endif /* ACE_TLI_ACCEPTOR_H */ diff --git a/ace/TLI_Connector.cpp b/ace/TLI_Connector.cpp index d48d854f8e1..9a11d2c880b 100644 --- a/ace/TLI_Connector.cpp +++ b/ace/TLI_Connector.cpp @@ -1,4 +1,3 @@ -// TLI_Connector.cpp // $Id$ #include "ace/TLI_Connector.h" @@ -16,6 +15,8 @@ ACE_RCSID(ace, TLI_Connector, "$Id$") #include "ace/OS_NS_string.h" #include "ace/Time_Value.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_TLI_Connector) void @@ -250,4 +251,6 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, #endif /* ACE_WIN32 */ } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TLI */ diff --git a/ace/TLI_Connector.h b/ace/TLI_Connector.h index f625458f204..d8e8f381bfb 100644 --- a/ace/TLI_Connector.h +++ b/ace/TLI_Connector.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -24,6 +24,8 @@ #if defined (ACE_HAS_TLI) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_TLI_Connector * @@ -117,6 +119,8 @@ public: ACE_ALLOC_HOOK_DECLARE; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/TLI_Connector.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/TLI_Connector.inl b/ace/TLI_Connector.inl index 6539e19a6cd..f2a29f122c3 100644 --- a/ace/TLI_Connector.inl +++ b/ace/TLI_Connector.inl @@ -1,7 +1,8 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// TLI_Connector.i +ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_TLI_Connector::ACE_TLI_Connector (ACE_TLI_Stream &new_stream, @@ -45,3 +46,4 @@ ACE_TLI_Connector::reset_new_handle (ACE_HANDLE handle) return 0; } +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/TLI_Stream.cpp b/ace/TLI_Stream.cpp index cf42719db85..7b7e41fa42d 100644 --- a/ace/TLI_Stream.cpp +++ b/ace/TLI_Stream.cpp @@ -15,6 +15,8 @@ ACE_RCSID(ace, TLI_Stream, "$Id$") #include "ace/TLI_Stream.inl" #endif /* __ACE_INLINE__ */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_TLI_Stream) void @@ -222,4 +224,6 @@ ACE_TLI_Stream::recv_n (void *buf, bytes_transferred); } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_TLI */ diff --git a/ace/TLI_Stream.h b/ace/TLI_Stream.h index 468ab87f9ac..fc1c93107f4 100644 --- a/ace/TLI_Stream.h +++ b/ace/TLI_Stream.h @@ -1,4 +1,4 @@ -/* -*- C++ -*- */ +// -*- C++ -*- //============================================================================= /** @@ -27,6 +27,8 @@ #if defined (ACE_HAS_TLI) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + class ACE_Time_Value; /** @@ -128,6 +130,8 @@ private: void set_rwflag (int); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/TLI_Stream.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/TLI_Stream.inl b/ace/TLI_Stream.inl index 89583e7fb8b..a0d03db13c6 100644 --- a/ace/TLI_Stream.inl +++ b/ace/TLI_Stream.inl @@ -1,10 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ -// TLI_Stream.i - #include "ace/TLI_Stream.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_INLINE void ACE_TLI_Stream::set_rwflag (int value) @@ -20,3 +21,5 @@ ACE_TLI_Stream::get_rwflag (void) ACE_TRACE ("ACE_TLI_Stream::get_rwflag"); return this->rwflag_; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp index c4eb9c1726d..f9057caeb7d 100644 --- a/ace/TP_Reactor.cpp +++ b/ace/TP_Reactor.cpp @@ -15,6 +15,8 @@ ACE_RCSID (ace, TP_Reactor, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE (ACE_TP_Reactor) int @@ -736,3 +738,5 @@ ACE_TP_Reactor::get_notify_handle (void) // None found.. return ACE_INVALID_HANDLE; } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/TP_Reactor.h b/ace/TP_Reactor.h index 75a05e93fab..7aaf24f0942 100644 --- a/ace/TP_Reactor.h +++ b/ace/TP_Reactor.h @@ -39,6 +39,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_EH_Dispatch_Info * @@ -348,6 +350,8 @@ private: ACE_TP_Reactor &operator = (const ACE_TP_Reactor &); }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/TP_Reactor.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/TP_Reactor.inl b/ace/TP_Reactor.inl index 08c17a7e65e..8cf4a8edb29 100644 --- a/ace/TP_Reactor.inl +++ b/ace/TP_Reactor.inl @@ -1,6 +1,9 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /************************************************************************/ // Methods for ACE_EH_Dispatch_Info /************************************************************************/ @@ -109,3 +112,5 @@ ACE_TP_Reactor::clear_dispatch_mask (ACE_HANDLE , this->ready_set_.wr_mask_.reset (); this->ready_set_.ex_mask_.reset (); } + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/TSS_Adapter.cpp b/ace/TSS_Adapter.cpp index cbddcd752a6..ddca0236d4f 100644 --- a/ace/TSS_Adapter.cpp +++ b/ace/TSS_Adapter.cpp @@ -1,4 +1,3 @@ -/* -*- C++ -*- */ /** * @file TSS_Adapter.cpp * @@ -11,12 +10,10 @@ #include "ace/TSS_Adapter.h" -#if !defined (__ACE_INLINE__) -#include "ace/TSS_Adapter.inl" -#endif /* __ACE_INLINE__ */ - ACE_RCSID(ace, TSS_Adapter, "$Id$") +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_TSS_Adapter::ACE_TSS_Adapter (void *object, ACE_THR_DEST f) : ts_obj_ (object), func_ (f) @@ -31,17 +28,18 @@ ACE_TSS_Adapter::cleanup (void) (*this->func_)(this->ts_obj_); // call cleanup routine for ts_obj_ } +ACE_END_VERSIONED_NAMESPACE_DECL + extern "C" void ACE_TSS_C_cleanup (void *object) { // ACE_TRACE ("ACE_TSS_C_cleanup"); if (object != 0) { - ACE_TSS_Adapter *tss_adapter = (ACE_TSS_Adapter *) object; + ACE_TSS_Adapter * const tss_adapter = (ACE_TSS_Adapter *) object; // Perform cleanup on the real TS object. tss_adapter->cleanup (); // Delete the adapter object. delete tss_adapter; } } - diff --git a/ace/TSS_Adapter.h b/ace/TSS_Adapter.h index 8fd09f2dd26..b281cddf6ad 100644 --- a/ace/TSS_Adapter.h +++ b/ace/TSS_Adapter.h @@ -41,24 +41,17 @@ public: /// Initialize the adapter. ACE_TSS_Adapter (void *object, ACE_THR_DEST f); - /// Default dtor. - ~ACE_TSS_Adapter (void); - /// Perform the cleanup operation. void cleanup (void); //private: /// The real TS object. - void *ts_obj_; + void * const ts_obj_; /// The real cleanup routine for ts_obj; ACE_THR_DEST func_; }; -#if defined (__ACE_INLINE__) -#include "ace/TSS_Adapter.inl" -#endif /* __ACE_INLINE__ */ - #include /**/ "ace/post.h" #endif /* ACE_TSS_ADAPTER_H */ diff --git a/ace/TSS_Adapter.inl b/ace/TSS_Adapter.inl deleted file mode 100644 index 59651ec36f8..00000000000 --- a/ace/TSS_Adapter.inl +++ /dev/null @@ -1,7 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -ACE_INLINE -ACE_TSS_Adapter::~ACE_TSS_Adapter (void) -{ -} diff --git a/ace/TSS_T.cpp b/ace/TSS_T.cpp index b2fe5a89ea2..93897437e64 100644 --- a/ace/TSS_T.cpp +++ b/ace/TSS_T.cpp @@ -1,7 +1,7 @@ // $Id$ -#ifndef ACE_TSS_T_C -#define ACE_TSS_T_C +#ifndef ACE_TSS_T_CPP +#define ACE_TSS_T_CPP #include "ace/TSS_T.h" @@ -9,8 +9,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -ACE_RCSID(ace, TSS_T, "$Id$") - #if !defined (__ACE_INLINE__) #include "ace/TSS_T.inl" #endif /* __ACE_INLINE__ */ @@ -24,6 +22,8 @@ ACE_RCSID(ace, TSS_T, "$Id$") # include "ace/TSS_Adapter.h" #endif /* ACE_HAS_THR_C_DEST */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_ALLOC_HOOK_DEFINE(ACE_TSS) template <class TYPE> @@ -697,4 +697,6 @@ ACE_TSS_Read_Guard<ACE_LOCK>::dump (void) const #endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */ -#endif /* ACE_TSS_T_C */ +ACE_END_VERSIONED_NAMESPACE_DECL + +#endif /* ACE_TSS_T_CPP */ diff --git a/ace/TSS_T.h b/ace/TSS_T.h index 537a89cc15a..e790a625181 100644 --- a/ace/TSS_T.h +++ b/ace/TSS_T.h @@ -37,6 +37,8 @@ #include "ace/Thread_Mutex.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_TSS * @@ -171,6 +173,8 @@ private: TYPE value_; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #if defined (__ACE_INLINE__) #include "ace/TSS_T.inl" #endif /* __ACE_INLINE__ */ diff --git a/ace/TSS_T.inl b/ace/TSS_T.inl index a0bdccba905..d4378089137 100644 --- a/ace/TSS_T.inl +++ b/ace/TSS_T.inl @@ -1,8 +1,11 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ #if !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + template <class TYPE> ACE_INLINE ACE_TSS<TYPE>::ACE_TSS (TYPE *type) : type_ (type) @@ -34,4 +37,6 @@ ACE_TSS<TYPE>::ts_get (void) const return this->type_; } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ! (defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) */ diff --git a/ace/TTY_IO.cpp b/ace/TTY_IO.cpp index 128a07d6ac2..4a58bec4930 100644 --- a/ace/TTY_IO.cpp +++ b/ace/TTY_IO.cpp @@ -1,27 +1,32 @@ // $Id$ -#include "ace/config-lite.h" -#if defined (ACE_HAS_TERMIOS) -# include "ace/os_include/os_termios.h" -#elif defined (ACE_HAS_TERMIO) -# include <termio.h> -#endif #include "ace/TTY_IO.h" #include "ace/OS_NS_errno.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_strings.h" -static const char* const ACE_TTY_IO_ODD = "odd"; -static const char* const ACE_TTY_IO_EVEN = "even"; -#if defined (ACE_WIN32) -static const char* const ACE_TTY_IO_MARK = "mark"; -static const char* const ACE_TTY_IO_SPACE = "space"; -#endif /* ACE_WIN32 */ +#if defined (ACE_HAS_TERMIOS) +# include "ace/os_include/os_termios.h" +#elif defined (ACE_HAS_TERMIO) +# include <termio.h> +#endif ACE_RCSID (ace, TTY_IO, "$Id$") +namespace +{ + const char ACE_TTY_IO_ODD[] = "odd"; + const char ACE_TTY_IO_EVEN[] = "even"; +#if defined (ACE_WIN32) + const char ACE_TTY_IO_MARK[] = "mark"; + const char ACE_TTY_IO_SPACE[] = "space"; +#endif /* ACE_WIN32 */ +} + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + ACE_TTY_IO::Serial_Params::Serial_Params (void) { ACE_OS::memset (this, 0, sizeof *this); @@ -526,3 +531,5 @@ ACE_TTY_IO::operator ACE_DEV_IO &() return static_cast<ACE_DEV_IO &>(*this); } #endif /* ACE_NEEDS_DEV_IO_CONVERSION */ + +ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ace/TTY_IO.h b/ace/TTY_IO.h index 60f6dc6ba1e..043e3cd4697 100644 --- a/ace/TTY_IO.h +++ b/ace/TTY_IO.h @@ -19,6 +19,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_TTY_IO * @@ -107,4 +109,6 @@ public: #endif /* ACE_NEEDS_DEV_IO_CONVERSION */ }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_TTY_IO_H */ diff --git a/ace/Thread_Adapter.h b/ace/Thread_Adapter.h index 78dfa4b96e4..ecc0d713f4c 100644 --- a/ace/Thread_Adapter.h +++ b/ace/Thread_Adapter.h @@ -1,3 +1,4 @@ +// -*- C++ -*- //============================================================================= /** @@ -46,7 +47,7 @@ public: /// Constructor. ACE_Thread_Adapter (ACE_THR_FUNC user_func, void *arg, - ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ace_thread_adapter, + ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME, ACE_Thread_Manager *thr_mgr = 0, ACE_Thread_Descriptor *td = 0 # if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) @@ -65,21 +66,22 @@ public: /// Accessor for the optional <Thread_Manager>. ACE_Thread_Manager *thr_mgr (void); -private: +protected: + /// Ensure that this object must be allocated on the heap. ~ACE_Thread_Adapter (void); +private: + /// Called by invoke, mainly here to separate the SEH stuff because /// SEH on Win32 doesn't compile with local vars with destructors. virtual ACE_THR_FUNC_RETURN invoke_i (void); private: + /// Optional thread manager. ACE_Thread_Manager *thr_mgr_; - /// Friend declaration to avoid compiler warning: only defines a private - /// destructor and has no friends. - friend class ACE_Thread_Adapter_Has_Private_Destructor; }; # if defined (ACE_HAS_INLINED_OSCALLS) diff --git a/ace/ace.mpc b/ace/ace.mpc index 5665acdc93a..17b4f74d104 100644 --- a/ace/ace.mpc +++ b/ace/ace.mpc @@ -58,7 +58,6 @@ project(ACE) : acedefaults, core, other, codecs, token, svcconf, uuid, filecache Container_Instantiations.cpp Containers.cpp Countdown_Time.cpp - Copy_Disabled.cpp Date_Time.cpp DEV.cpp DEV_Addr.cpp @@ -89,7 +88,6 @@ project(ACE) : acedefaults, core, other, codecs, token, svcconf, uuid, filecache gethrtime.cpp Handle_Ops.cpp Handle_Set.cpp - Hash_Map_Manager.cpp Hashable.cpp High_Res_Timer.cpp ICMP_Socket.cpp diff --git a/ace/ace_wchar.h b/ace/ace_wchar.h index 7e56d2114bd..6311da41d2a 100644 --- a/ace/ace_wchar.h +++ b/ace/ace_wchar.h @@ -157,6 +157,9 @@ typedef wchar_t ACE_ANTI_TCHAR; #endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */ #if defined ACE_HAS_WCHAR + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class ACE_Wide_To_Ascii * @@ -230,6 +233,8 @@ typedef ACE_Ascii_To_Wide ACE_OS_CString; typedef ACE_Wide_To_Ascii ACE_OS_WString; #endif /* ACE_LEGACY_MODE */ +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_WCHAR */ #if defined (ACE_WIN32) diff --git a/ace/ace_wchar.inl b/ace/ace_wchar.inl index 21bb4068cac..1abc6616a90 100644 --- a/ace/ace_wchar.inl +++ b/ace/ace_wchar.inl @@ -1,4 +1,5 @@ -/* -*- C++ -*- */ +// -*- C++ -*- +// // $Id$ // These are always inlined @@ -10,6 +11,8 @@ # include /**/ <string.h> // Need to see strlen() #endif /* ACE_WIN32 */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + inline ACE_Wide_To_Ascii::~ACE_Wide_To_Ascii (void) { @@ -115,8 +118,10 @@ ACE_Ascii_To_Wide::convert (const char *str) inline ACE_Ascii_To_Wide::ACE_Ascii_To_Wide (const char *s) -: s_ (ACE_Ascii_To_Wide::convert (s)) + : s_ (ACE_Ascii_To_Wide::convert (s)) { } +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* ACE_HAS_WCHAR */ diff --git a/ace/config-lite.h b/ace/config-lite.h index 74475e0225a..9ff609a88e6 100644 --- a/ace/config-lite.h +++ b/ace/config-lite.h @@ -492,9 +492,13 @@ // at_exit declarations // ============================================================================ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + // Marker for cleanup, used by ACE_Exit_Info. extern int ace_exit_hook_marker; +ACE_END_VERSIONED_NAMESPACE_DECL + // For use by <ACE_OS::exit>. extern "C" { @@ -515,6 +519,8 @@ typedef void (*ACE_CLEANUP_FUNC)(void *object, void *param) /* throw () */; // log_msg declarations // ============================================================================ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + # if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) typedef int (*ACE_SEH_EXCEPT_HANDLER)(void *); // Prototype of win32 structured exception handler functions. @@ -539,6 +545,8 @@ typedef void (*ACE_SYNC_LOG_MSG_HOOK) (const ACE_TCHAR *prog_name); typedef ACE_OS_Thread_Descriptor *(*ACE_THR_DESC_LOG_MSG_HOOK) (void); +ACE_END_VERSIONED_NAMESPACE_DECL + // ============================================================================ // Fundamental types // ============================================================================ diff --git a/ace/gethrtime.cpp b/ace/gethrtime.cpp index b242ef2db27..2b530898843 100644 --- a/ace/gethrtime.cpp +++ b/ace/gethrtime.cpp @@ -10,9 +10,12 @@ ACE_RCSID(ace, gethrtime, "$Id$") #if defined (ghs) && (defined (i386) || defined(__i386__)) + +#include "ace/OS_NS_time.h" + extern "C" ACE_hrtime_t -ACE_gethrtime (void) +ACE_GETHRTIME_NAME (void) { #if defined (ACE_HAS_PENTIUM) // ACE_TRACE ("ACE_gethrtime"); |