diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-03-08 16:53:16 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-03-08 16:53:16 +0100 |
commit | 791509c62741a0a1cd7ea2155c3a5f51517594d0 (patch) | |
tree | 1a29e3d0cd24060f79e9b76af02976767f2d200e /TAO/tao | |
parent | 74d46d603c2f34cbd675287f40ceaff6a21007fa (diff) | |
download | ATCD-791509c62741a0a1cd7ea2155c3a5f51517594d0.tar.gz |
Use std string operations instead of ACE_OS
* TAO/tao/Acceptor_Registry.cpp:
* TAO/tao/Adapter_Registry.cpp:
* TAO/tao/AnyTypeCode/Any.cpp:
* TAO/tao/AnyTypeCode/Enum_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp:
* TAO/tao/AnyTypeCode/Struct_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp:
* TAO/tao/AnyTypeCode/TypeCode.cpp:
* TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp:
* TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp:
* TAO/tao/AnyTypeCode/Value_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp:
* TAO/tao/CDR.inl:
* TAO/tao/CORBALOC_Parser.cpp:
* TAO/tao/CORBA_String.inl:
* TAO/tao/DynamicAny/DynCommon.cpp:
* TAO/tao/DynamicInterface/Request.cpp:
* TAO/tao/GIOP_Message_Generator_Parser_10.cpp:
* TAO/tao/HTTP_Handler.cpp:
* TAO/tao/IIOP_Acceptor.cpp:
* TAO/tao/IIOP_Connector.cpp:
* TAO/tao/IIOP_Endpoint.cpp:
* TAO/tao/IIOP_Profile.cpp:
* TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp:
* TAO/tao/ImR_Client/ImR_Client.cpp:
* TAO/tao/MCAST_Parser.cpp:
* TAO/tao/ORB.cpp:
* TAO/tao/ORB_Core.cpp:
* TAO/tao/Object_KeyC.cpp:
* TAO/tao/Object_Ref_Table.cpp:
* TAO/tao/PI/Interceptor_List_T.cpp:
* TAO/tao/PI/ORBInitInfo.cpp:
* TAO/tao/PortableServer/BD_String_SArgument_T.cpp:
* TAO/tao/PortableServer/PortableServer_Functions.cpp:
* TAO/tao/Strategies/COIOP_Connector.cpp:
* TAO/tao/Strategies/COIOP_Profile.cpp:
* TAO/tao/Strategies/DIOP_Acceptor.cpp:
* TAO/tao/Strategies/DIOP_Connector.cpp:
* TAO/tao/Strategies/DIOP_Endpoint.cpp:
* TAO/tao/Strategies/DIOP_Profile.cpp:
* TAO/tao/Strategies/SCIOP_Acceptor.cpp:
* TAO/tao/Strategies/SCIOP_Connector.cpp:
* TAO/tao/Strategies/SCIOP_Endpoint.cpp:
* TAO/tao/Strategies/SCIOP_Profile.cpp:
* TAO/tao/Strategies/SHMIOP_Connector.cpp:
* TAO/tao/Strategies/SHMIOP_Endpoint.cpp:
* TAO/tao/Strategies/SHMIOP_Profile.cpp:
* TAO/tao/Strategies/UIOP_Connector.cpp:
* TAO/tao/Strategies/UIOP_Profile.cpp:
* TAO/tao/String_Alloc.cpp:
* TAO/tao/TAO_Server_Request.cpp:
* TAO/tao/TAO_Server_Request.inl:
* TAO/tao/Transport_Connector.cpp:
Diffstat (limited to 'TAO/tao')
53 files changed, 145 insertions, 121 deletions
diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp index f502fe89c0d..fb0438ea8cc 100644 --- a/TAO/tao/Acceptor_Registry.cpp +++ b/TAO/tao/Acceptor_Registry.cpp @@ -17,6 +17,7 @@ #include "ace/Auto_Ptr.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_ctype.h" +#include <cstring> #if !defined(__ACE_INLINE__) #include "tao/Acceptor_Registry.inl" @@ -196,11 +197,11 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core, // remaining number of endpoints in the current endpoint // specification. const char *ep_end = - ep->c_str () + ACE_OS::strlen (ep->c_str ()); + ep->c_str () + std::strlen (ep->c_str ()); - for (const char *e = ACE_OS::strchr (ep->c_str (), ','); + for (const char *e = std::strchr (ep->c_str (), ','); e != nullptr && e != ep_end; - e = ACE_OS::strchr (e, ',')) + e = std::strchr (e, ',')) { ++acceptor_count; ++e; diff --git a/TAO/tao/Adapter_Registry.cpp b/TAO/tao/Adapter_Registry.cpp index df2ab410265..49372c7bc62 100644 --- a/TAO/tao/Adapter_Registry.cpp +++ b/TAO/tao/Adapter_Registry.cpp @@ -171,7 +171,7 @@ TAO_Adapter_Registry::find_adapter (const char *name) const for (TAO_Adapter **i = this->adapters_; i != this->adapters_ + this->adapters_count_; ++i) - if (ACE_OS::strcmp ((*i)->name (), name) == 0) + if (std::strcmp ((*i)->name (), name) == 0) return *i; return nullptr; diff --git a/TAO/tao/AnyTypeCode/Any.cpp b/TAO/tao/AnyTypeCode/Any.cpp index da0c5d2c443..49d5bb77d6f 100644 --- a/TAO/tao/AnyTypeCode/Any.cpp +++ b/TAO/tao/AnyTypeCode/Any.cpp @@ -14,6 +14,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_wchar.h" #include "ace/OS_Memory.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "tao/AnyTypeCode/Any.inl" @@ -325,7 +326,7 @@ CORBA::Any::operator<<= (CORBA::Any::from_wchar wc) void CORBA::Any::operator<<= (CORBA::Any::from_string s) { - if (s.bound_ > 0 && s.val_ != 0 && ACE_OS::strlen (s.val_) > s.bound_) + if (s.bound_ > 0 && s.val_ != 0 && std::strlen (s.val_) > s.bound_) { return; } diff --git a/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp b/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp index 842d244a2b2..9748e6b7c46 100644 --- a/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Enum_TypeCode.cpp @@ -98,7 +98,7 @@ TAO::TypeCode::Enum<StringType, Traits<StringType>::get_string (lhs_enumerator); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; } diff --git a/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp index 81af701debf..60d7e465f3b 100644 --- a/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Enum_TypeCode_Static.cpp @@ -94,7 +94,7 @@ TAO::TypeCode::Enum<char const *, Traits<char const *>::get_string (lhs_enumerator); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; } diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp b/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp index a258a8c5229..882ddd9bfef 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode.cpp @@ -147,7 +147,7 @@ TAO::TypeCode::Struct<StringType, Traits<StringType>::get_string (lhs_field.name); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = diff --git a/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp index fb6853c958e..99455427d9e 100644 --- a/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp @@ -123,7 +123,7 @@ TAO::TypeCode::Struct<char const *, Traits<char const *>::get_string (lhs_field.name); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = diff --git a/TAO/tao/AnyTypeCode/TypeCode.cpp b/TAO/tao/AnyTypeCode/TypeCode.cpp index 53108bd3b91..15de05e890b 100644 --- a/TAO/tao/AnyTypeCode/TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode.cpp @@ -10,6 +10,7 @@ #include "tao/SystemException.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -46,14 +47,14 @@ CORBA::TypeCode::equal (TypeCode_ptr tc) const char const * const this_id = this->id (); - if (ACE_OS::strcmp (this_id, tc_id) != 0) + if (std::strcmp (this_id, tc_id) != 0) return false; char const * const tc_name = tc->name (); char const * const this_name = this->name (); - if (ACE_OS::strcmp (this_name, tc_name) != 0) + if (std::strcmp (this_name, tc_name) != 0) return false; } catch (const ::CORBA::TypeCode::BadKind&) @@ -96,10 +97,10 @@ CORBA::TypeCode::equivalent (TypeCode_ptr tc) const char const * const this_id = unaliased_this->id (); char const * const tc_id = unaliased_tc->id (); - if (ACE_OS::strlen (this_id) != 0 - && ACE_OS::strlen (tc_id) != 0) + if (std::strlen (this_id) != 0 + && std::strlen (tc_id) != 0) { - return ACE_OS::strcmp (this_id, tc_id) == 0; + return std::strcmp (this_id, tc_id) == 0; } } catch (const ::CORBA::TypeCode::BadKind&) diff --git a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp index e80e1c653a4..1926cbafca8 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp @@ -160,7 +160,7 @@ namespace { TAO::TypeCodeFactory::TC_Info & info = infos[i]; - if (ACE_OS::strcmp (info.id, id) == 0) + if (std::strcmp (info.id, id) == 0) { // We have a matching id, so store the TypeCode in the out // array and then compare the others. @@ -396,7 +396,7 @@ TAO::TypeCodeFactory::tc_objref_factory (CORBA::TCKind kind, break; } - if (ACE_OS::strcmp (id.in (), // len >= 0!!! + if (std::strcmp (id.in (), // len >= 0!!! tc_constant_id) == 0) { if (!cdr.skip_string ()) // No need to demarshal the name. diff --git a/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp b/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp index f383c79659d..9e5215d71fd 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.cpp @@ -24,7 +24,7 @@ TAO::TypeCode::Case<StringType, TypeCodeType>::equal (CORBA::ULong index, char const * const lhs_name = this->name (); char const * const rhs_name = tc->member_name (index); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; // Check case TypeCodes. diff --git a/TAO/tao/AnyTypeCode/Value_TypeCode.cpp b/TAO/tao/AnyTypeCode/Value_TypeCode.cpp index 79e5fb02c9d..47cb3168c52 100644 --- a/TAO/tao/AnyTypeCode/Value_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Value_TypeCode.cpp @@ -188,7 +188,7 @@ TAO::TypeCode::Value<StringType, Traits<StringType>::get_string (lhs_field.name); char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = diff --git a/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp b/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp index 293192bb0b5..6a73ea9519f 100644 --- a/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp +++ b/TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp @@ -146,7 +146,7 @@ TAO::TypeCode::Value<char const *, Traits<char const *>::get_string (lhs_field.name);; char const * const rhs_name = tc->member_name (i); - if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) + if (std::strcmp (lhs_name, rhs_name) != 0) return false; CORBA::TypeCode_ptr const lhs_tc = diff --git a/TAO/tao/CDR.inl b/TAO/tao/CDR.inl index 08d0efeae3e..b0accef153f 100644 --- a/TAO/tao/CDR.inl +++ b/TAO/tao/CDR.inl @@ -1,5 +1,6 @@ // -*- C++ -*- #include "tao/SystemException.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -433,7 +434,7 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os, ACE_OutputCDR::from_string x) { if (x.bound_ != 0 && x.val_ != 0 && - ACE_OS::strlen (x.val_) > x.bound_) + std::strlen (x.val_) > x.bound_) { throw CORBA::BAD_PARAM (); } @@ -569,7 +570,7 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &is, CORBA::Boolean const marshal_flag = is >> const_cast<ACE_CDR::Char *&> (x.val_); if (marshal_flag && x.bound_ != 0 && x.val_ != 0 && - ACE_OS::strlen (x.val_) > x.bound_) + std::strlen (x.val_) > x.bound_) { throw CORBA::BAD_PARAM (); } diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp index 810ef41d818..2ab88c2c38a 100644 --- a/TAO/tao/CORBALOC_Parser.cpp +++ b/TAO/tao/CORBALOC_Parser.cpp @@ -22,6 +22,8 @@ #include "tao/CORBALOC_Parser.inl" #endif /* __ACE_INLINE__ */ +#include <cstring> + static const char prefix[] = "corbaloc:"; static const size_t prefix_len = sizeof prefix - 1; static const char rir_token[] = "rir:"; @@ -106,7 +108,7 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) // Skip the prefix. We know it is there because this method is only // called if match_prefix() returns 1. - ior += ACE_OS::strlen(prefix); + ior += std::strlen(prefix); // First check for rir if (ACE_OS::strncmp (ior,rir_token,rir_token_len) == 0) @@ -116,9 +118,9 @@ TAO_CORBALOC_Parser::parse_string (const char * ior, CORBA::ORB_ptr orb) // most likely commas will separate endpoints, although they could be // part of an endpoint address for some protocols. size_t max_endpoint_count = 1; - for (const char *comma = ACE_OS::strchr (ior,','); + for (const char *comma = std::strchr (ior,','); comma; - comma = ACE_OS::strchr (comma+1,',')) + comma = std::strchr (comma+1,',')) ++max_endpoint_count; ACE_Array<parsed_endpoint> endpoints(max_endpoint_count); @@ -234,7 +236,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, size_t prot_addr_len, ACE_CString &canonical_endpoint) { - const char *separator = ACE_OS::strchr (ior, ':'); + const char *separator = std::strchr (ior, ':'); // A special case for handling iiop if (ior[0] != ':' && ACE_OS::strncmp (ior,iiop_token,iiop_token_len) != 0) @@ -247,7 +249,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, const char *addr_base = separator+1; const char *addr_tail = ior + prot_addr_len; // skip past version, if any - separator = ACE_OS::strchr (addr_base,'@'); + separator = std::strchr (addr_base,'@'); if (separator != nullptr && separator < addr_tail) { canonical_endpoint.set (addr_base,(separator - addr_base)+1,1); @@ -258,7 +260,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, ACE_CString raw_host; ACE_CString raw_port; - separator = ACE_OS::strchr (addr_base,':'); + separator = std::strchr (addr_base,':'); #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? @@ -267,7 +269,7 @@ TAO_CORBALOC_Parser::make_canonical (const char *ior, { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - const char *cp_pos = ACE_OS::strchr(addr_base, ']'); + const char *cp_pos = std::strchr(addr_base, ']'); if (cp_pos == 0 || cp_pos >= addr_tail) { // No valid IPv6 address specified but that will come out later. diff --git a/TAO/tao/CORBA_String.inl b/TAO/tao/CORBA_String.inl index c1e125fc657..0b220be52bd 100644 --- a/TAO/tao/CORBA_String.inl +++ b/TAO/tao/CORBA_String.inl @@ -1,5 +1,6 @@ // -*- C++ -*- #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -7,7 +8,7 @@ ACE_INLINE bool TAO::String_Var_Equal_To::operator() (CORBA::String_var const & lhs, CORBA::String_var const & rhs) const { - return (ACE_OS::strcmp (lhs.in (), rhs.in ()) == 0); + return (std::strcmp (lhs.in (), rhs.in ()) == 0); } ACE_INLINE bool diff --git a/TAO/tao/DynamicAny/DynCommon.cpp b/TAO/tao/DynamicAny/DynCommon.cpp index d101bd51339..5ce12d65364 100644 --- a/TAO/tao/DynamicAny/DynCommon.cpp +++ b/TAO/tao/DynamicAny/DynCommon.cpp @@ -158,7 +158,7 @@ TAO_DynCommon::insert_string (const char * value) CORBA::ULong const bound = unaliased_tc->length (); - if (bound > 0 && bound < ACE_OS::strlen (value)) + if (bound > 0 && bound < std::strlen (value)) { throw DynamicAny::DynAny::InvalidValue (); } diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp index 1dcca1819aa..359589118cf 100644 --- a/TAO/tao/DynamicInterface/Request.cpp +++ b/TAO/tao/DynamicInterface/Request.cpp @@ -20,6 +20,7 @@ # include "tao/DynamicInterface/Request.inl" #endif /* ! __ACE_INLINE__ */ +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -139,7 +140,7 @@ CORBA::Request::invoke (void) _tao_arg_list, sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), this->opname_, - static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), + static_cast<CORBA::ULong> (std::strlen (this->opname_)), this->exceptions_.in (), this); @@ -177,7 +178,7 @@ CORBA::Request::send_oneway (void) _tao_arg_list, sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), this->opname_, - static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), + static_cast<CORBA::ULong> (std::strlen (this->opname_)), TAO::TAO_SYNCHRONOUS_INVOCATION); // forward requested byte order @@ -220,7 +221,7 @@ CORBA::Request::send_deferred (void) _tao_arg_list, static_cast<int> (number_args), this->opname_, - ACE_OS::strlen (this->opname_), + std::strlen (this->opname_), 0, this->orb_->orb_core (), this); @@ -250,7 +251,7 @@ CORBA::Request::sendc (CORBA::Object_ptr handler) _tao_arg_list, sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), const_cast<char *> (this->opname_), - static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), + static_cast<CORBA::ULong> (std::strlen (this->opname_)), 0); // collocation proxy broker // forward requested byte order diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index 3775c7789be..d5bb7996fa8 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -11,6 +11,7 @@ #include "tao/SystemException.h" #include "ace/Log_Msg.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -81,7 +82,7 @@ TAO_GIOP_Message_Generator_Parser_10::write_request_header ( if (result != 0) { const CORBA::ULong username_size = - static_cast<CORBA::ULong> (ACE_OS::strlen (username)); + static_cast<CORBA::ULong> (std::strlen (username)); CORBA::Octet *buffer = CORBA::OctetSeq::allocbuf (username_size + 1); diff --git a/TAO/tao/HTTP_Handler.cpp b/TAO/tao/HTTP_Handler.cpp index 5c70d7425b9..87d6184c7a2 100644 --- a/TAO/tao/HTTP_Handler.cpp +++ b/TAO/tao/HTTP_Handler.cpp @@ -6,6 +6,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_strings.h" #include "tao/debug.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -87,9 +88,9 @@ TAO_HTTP_Reader::send_request () char mesg [MAX_HEADER_SIZE]; // Check to see if the request is too big - if (MAX_HEADER_SIZE < (ACE_OS::strlen (request_prefix_) + if (MAX_HEADER_SIZE < (std::strlen (request_prefix_) + ACE_OS::strlen (filename_) - + ACE_OS::strlen (request_suffix_) + 4)) + + std::strlen (request_suffix_) + 4)) TAOLIB_ERROR_RETURN((LM_ERROR,"TAO (%P|%t) - HTTP_Reader::send_request, request too large!"), -1); // Create a message to send to the server requesting retrieval of the file diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 659eff78a96..1954e3e9f61 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -654,7 +654,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, specified_hostname.clear(); } - const char *port_separator_loc = ACE_OS::strchr (address, ':'); + const char *port_separator_loc = std::strchr (address, ':'); char tmp_host[MAXHOSTNAMELEN + 1]; tmp_host[0] = '\0'; bool host_defaulted = port_separator_loc == address; @@ -671,7 +671,7 @@ TAO_IIOP_Acceptor::parse_address (const char *address, { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - char const * const cp_pos = ACE_OS::strchr (address, ']'); + char const * const cp_pos = std::strchr (address, ']'); if (cp_pos == 0) { // No valid IPv6 address specified. diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 166cdb505a9..aab4244dcd2 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -19,6 +19,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_time.h" #include "ace/CORBA_macros.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -730,12 +731,12 @@ TAO_IIOP_Connector::check_prefix (const char *endpoint) static const char *protocol[] = { "iiop", "iioploc" }; - size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; if (slot == 0) // an empty string is valid for corbaloc. return 0; - size_t const len0 = ACE_OS::strlen (protocol[0]); - size_t const len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp index 8ec0fde8237..3f4dbfc101c 100644 --- a/TAO/tao/IIOP_Endpoint.cpp +++ b/TAO/tao/IIOP_Endpoint.cpp @@ -24,6 +24,7 @@ #include "ace/ACE.h" #include "ace/INET_Addr.h" #include "ace/Sock_Connect.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -190,7 +191,7 @@ TAO_IIOP_Endpoint::addr_to_string (char *buffer, size_t length) size_t actual_len = ACE_OS::strlen (this->host_.in ()) // chars in host name + sizeof (':') // delimiter - + ACE_OS::strlen ("65536") // max port + + std::strlen ("65536") // max port + sizeof ('\0'); #if defined (ACE_HAS_IPV6) @@ -218,7 +219,7 @@ TAO_IIOP_Endpoint::host (const char *h) { this->host_ = h; #if defined (ACE_HAS_IPV6) - if (ACE_OS::strchr (h, ':') != 0) + if (std::strchr (h, ':') != 0) this->is_ipv6_decimal_ = true; #endif /* ACE_HAS_IPV6 */ @@ -347,7 +348,7 @@ TAO_IIOP_Endpoint::object_addr_i () const if (!this->is_ipv6_decimal_) is_ipv4_decimal_ = ACE_OS::strspn (this->host_.in (), ".0123456789") == - ACE_OS::strlen (this->host_.in ()); + std::strlen (this->host_.in ()); // If this is *not* an IPv4 decimal address at first try to // resolve the address as an IPv6 address; if that fails diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index a33b42085e7..64358da1313 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -12,6 +12,7 @@ #include "ace/OS_NS_stdio.h" #include "ace/Truncate.h" #include "ace/os_include/os_netdb.h" +#include <cstring> static const char the_prefix[] = "iiop"; @@ -128,7 +129,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... - const char *okd = ACE_OS::strchr (ior, this->object_key_delimiter_); + const char *okd = std::strchr (ior, this->object_key_delimiter_); if (okd == nullptr || okd == ior) { @@ -143,7 +144,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) // Length of host string. CORBA::ULong length_host = 0; - const char *cp_pos_overrun = ACE_OS::strchr (ior, ':'); // Look for a port + const char *cp_pos_overrun = std::strchr (ior, ':'); // Look for a port const char *cp_pos = (cp_pos_overrun < okd) ? cp_pos_overrun : nullptr; // but before object key #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? @@ -157,7 +158,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior) { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - const char *cp_pos_a_overrun = ACE_OS::strchr(ior, ']'); + const char *cp_pos_a_overrun = std::strchr(ior, ']'); const char *cp_pos_a = (cp_pos_a_overrun < okd) ? cp_pos_a_overrun : 0; // before object key if (cp_pos_a == 0) { @@ -482,9 +483,9 @@ TAO_IIOP_Profile::to_string () const 8 /* "corbaloc" */ + 1 /* colon separator */ + 1 /* object key separator */ + - ACE_OS::strlen (key.in ())); + std::strlen (key.in ())); size_t const pfx_len = ( - ACE_OS::strlen (::the_prefix) /* "iiop" */ + + std::strlen (::the_prefix) /* "iiop" */ + 1 /* colon separator */); const TAO_IIOP_Endpoint *endp = nullptr; @@ -496,7 +497,7 @@ TAO_IIOP_Profile::to_string () const 1 /* decimal point */ + 1 /* minor version */ + 1 /* `@' character */ + - ACE_OS::strlen (endp->host ()) + + std::strlen (endp->host ()) + 1 /* colon separator */ + 5 /* port number */ + 1 /* comma */); @@ -528,7 +529,7 @@ TAO_IIOP_Profile::to_string () const tmp = tmp.substr(0, pos + 1); tmp[pos] = '\0'; } - ACE_OS::sprintf (buf + ACE_OS::strlen(buf), + ACE_OS::sprintf (buf + std::strlen(buf), "%s:%c.%c@[%s]:%d", ::the_prefix, digits [this->version_.major], @@ -538,7 +539,7 @@ TAO_IIOP_Profile::to_string () const } else #endif - ACE_OS::sprintf (buf + ACE_OS::strlen(buf), + ACE_OS::sprintf (buf + std::strlen(buf), "%s:%c.%c@%s:%d", ::the_prefix, digits [this->version_.major], @@ -547,7 +548,7 @@ TAO_IIOP_Profile::to_string () const endp->port () ); } - ACE_OS::sprintf (buf + ACE_OS::strlen(buf), + ACE_OS::sprintf (buf + std::strlen(buf), "%c%s", this->object_key_delimiter_, key.in ()); @@ -577,7 +578,7 @@ TAO_IIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const const char* host = 0; const char* pos = 0; if (this->endpoint_.is_ipv6_decimal_ && - (pos = ACE_OS::strchr (host = this->endpoint_.host (), '%')) != 0) + (pos = std::strchr (host = this->endpoint_.host (), '%')) != 0) { ACE_CString tmp; size_t len = pos - host; @@ -634,7 +635,7 @@ TAO_IIOP_Profile::encode_alternate_endpoints () const char* host = 0; const char* pos = 0; if (endpoint->is_ipv6_decimal_ && - (pos = ACE_OS::strchr (host = endpoint->host (), '%')) != 0) + (pos = std::strchr (host = endpoint->host (), '%')) != 0) { ACE_CString tmp; size_t len = pos - host; diff --git a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp index 5f15990b92d..30bab855615 100644 --- a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp +++ b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp @@ -165,7 +165,7 @@ TAO_IORManip_IIOP_Filter::fill_profile_info ( char host[host_length] = ""; if (profile->endpoint ()->addr_to_string (host, host_length) != -1) { - char* delim = ACE_OS::strchr (host, ':'); + char* delim = std::strchr (host, ':'); if (delim != 0) { *delim = '\0'; diff --git a/TAO/tao/ImR_Client/ImR_Client.cpp b/TAO/tao/ImR_Client/ImR_Client.cpp index b98d874ccae..11c8f071360 100644 --- a/TAO/tao/ImR_Client/ImR_Client.cpp +++ b/TAO/tao/ImR_Client/ImR_Client.cpp @@ -21,9 +21,8 @@ namespace // should be protocol neutral. const char corbaloc[] = "corbaloc:"; char *pos = ACE_OS::strstr (ior, corbaloc); - pos = ACE_OS::strchr (pos + sizeof (corbaloc), ':'); - - pos = ACE_OS::strchr (pos + 1, delimiter); + pos = std::strchr (pos + sizeof (corbaloc), ':'); + pos = std::strchr (pos + 1, delimiter); return pos; } diff --git a/TAO/tao/MCAST_Parser.cpp b/TAO/tao/MCAST_Parser.cpp index 101a9c54238..a9b44d460df 100644 --- a/TAO/tao/MCAST_Parser.cpp +++ b/TAO/tao/MCAST_Parser.cpp @@ -12,6 +12,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" #include "ace/Truncate.h" +#include <cstring> #if !defined(__ACE_INLINE__) #include "tao/MCAST_Parser.inl" @@ -203,7 +204,7 @@ TAO_MCAST_Parser::multicast_query (char* & buf, CORBA::Short data_len = (CORBA::Short) ACE_HTONS ( ACE_Utils::truncate_cast<ACE_UINT16> ( - ACE_OS::strlen (service_name) + 1)); + std::strlen (service_name) + 1)); // Vector we will send. It contains: 1) length of service // name string, 2)port on which we are listening for @@ -222,7 +223,7 @@ TAO_MCAST_Parser::multicast_query (char* & buf, // The service name string. iovp[2].iov_base = (char *) service_name; iovp[2].iov_len = - static_cast<u_long> (ACE_OS::strlen (service_name) + 1); + static_cast<u_long> (std::strlen (service_name) + 1); // Send the multicast. result = dgram.send (iovp, diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 70f9681685e..f5dde223670 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -38,6 +38,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_ctype.h" #include "ace/CORBA_macros.h" +#include <cstring> static const char ior_prefix[] = "IOR:"; @@ -950,7 +951,7 @@ CORBA::ORB::resolve_initial_references (const char *name, CORBA::String_var ior_env_var_name = CORBA::string_alloc ( - static_cast<CORBA::ULong> (ACE_OS::strlen (name) + sizeof (ior_string))); + static_cast<CORBA::ULong> (std::strlen (name) + sizeof (ior_string))); ACE_OS::strcpy (ior_env_var_name.inout (), name); @@ -1005,7 +1006,7 @@ CORBA::ORB::resolve_initial_references (const char *name, void CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj) { - if (id == nullptr || ACE_OS::strlen (id) == 0) + if (id == nullptr || std::strlen (id) == 0) throw ::CORBA::ORB::InvalidName (); if (CORBA::is_nil (obj)) @@ -1020,7 +1021,7 @@ CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj) CORBA::Object_ptr CORBA::ORB::unregister_initial_reference (const char * id) { - if (id == nullptr || ACE_OS::strlen (id) == 0) + if (id == nullptr || std::strlen (id) == 0) throw ::CORBA::ORB::InvalidName (); TAO_Object_Ref_Table &table = this->orb_core_->object_ref_table (); @@ -1616,7 +1617,7 @@ CORBA::ORB::ior_string_to_object (const char *str) { // Unhex the bytes, and make a CDR deencapsulation stream from the // resulting data. - ACE_Message_Block mb (ACE_OS::strlen (str) / 2 + 1 + ACE_Message_Block mb (std::strlen (str) / 2 + 1 + ACE_CDR::MAX_ALIGNMENT + 1); ACE_CDR::mb_align (&mb); diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index cb2d45bff86..4073819bfd0 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -65,6 +65,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" #include "ace/Message_Block.h" +#include <cstring> #if TAO_HAS_INTERCEPTORS == 1 # include "tao/ClientRequestInterceptor_Adapter.h" @@ -73,7 +74,6 @@ # include "tao/ServerRequestInterceptor_Adapter_Factory.h" #endif /* TAO_HAS_INTERCEPTORS == 1 */ - #if !defined (__ACE_INLINE__) # include "tao/ORB_Core.inl" #endif /* ! __ACE_INLINE__ */ @@ -2870,7 +2870,7 @@ TAO_ORB_Core::resolve_rir (const char *name) this->orb_params ()->default_init_ref (); // Check if a DefaultInitRef was specified. - if (ACE_OS::strlen (default_init_ref.in ()) != 0) + if (std::strlen (default_init_ref.in ()) != 0) { static const char corbaloc_prefix[] = "corbaloc:"; static const char mcast_prefix[] = "mcast:"; diff --git a/TAO/tao/Object_KeyC.cpp b/TAO/tao/Object_KeyC.cpp index dc0c4745f8d..dc5d0c9cd05 100644 --- a/TAO/tao/Object_KeyC.cpp +++ b/TAO/tao/Object_KeyC.cpp @@ -149,7 +149,7 @@ TAO::ObjectKey::decode_string_to_sequence ( return; } - size_t const str_len = ACE_OS::strlen (str); + size_t const str_len = std::strlen (str); // Ensure sequence length value does not exceed maximum value for // sequence index type (CORBA::ULong). This is mostly an issue for diff --git a/TAO/tao/Object_Ref_Table.cpp b/TAO/tao/Object_Ref_Table.cpp index e5268b7612e..304a47a9dec 100644 --- a/TAO/tao/Object_Ref_Table.cpp +++ b/TAO/tao/Object_Ref_Table.cpp @@ -5,6 +5,7 @@ #include "tao/SystemException.h" #include "ace/OS_NS_string.h" #include "ace/Log_Msg.h" +#include <cstring> #ifndef __ACE_INLINE__ # include "tao/Object_Ref_Table.inl" @@ -65,7 +66,7 @@ TAO_Object_Ref_Table::bind_i (const char *id, CORBA::Object_ptr obj) // Make sure that the supplied Object reference is valid, // i.e. not nil. if (id == nullptr - || ACE_OS::strlen (id) == 0 + || std::strlen (id) == 0 || ::CORBA::is_nil (obj)) { errno = EINVAL; diff --git a/TAO/tao/PI/Interceptor_List_T.cpp b/TAO/tao/PI/Interceptor_List_T.cpp index 249b6bc2a84..d40ecfdb54d 100644 --- a/TAO/tao/PI/Interceptor_List_T.cpp +++ b/TAO/tao/PI/Interceptor_List_T.cpp @@ -3,8 +3,8 @@ #include "tao/debug.h" #include "ace/os_include/os_stddef.h" -#include "ace/OS_NS_string.h" #include "ace/Log_Msg.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -55,7 +55,7 @@ namespace TAO /// Interceptor with the same isn't already registered. CORBA::String_var name = interceptor->name (); - if (ACE_OS::strlen (name.in ()) != 0) + if (std::strlen (name.in ()) != 0) { // @@ This simple search algorithm isn't the greatest // thing in the world, but since we only register @@ -123,10 +123,9 @@ namespace TAO { /// If the Interceptor is not anonymous, make sure an /// Interceptor with the same isn't already registered. - CORBA::String_var name = - interceptor->name (); + CORBA::String_var name = interceptor->name (); - if (ACE_OS::strlen (name.in ()) != 0) + if (std::strlen (name.in ()) != 0) { // @@ This simple search algorithm isn't the greatest // thing in the world, but since we only register diff --git a/TAO/tao/PI/ORBInitInfo.cpp b/TAO/tao/PI/ORBInitInfo.cpp index c33199df6ee..523c389a11f 100644 --- a/TAO/tao/PI/ORBInitInfo.cpp +++ b/TAO/tao/PI/ORBInitInfo.cpp @@ -16,7 +16,7 @@ #include "tao/PI/ORBInitInfo.inl" #endif /* defined INLINE */ -#include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -142,7 +142,7 @@ TAO_ORBInitInfo::register_initial_reference ( { this->check_validity (); - if (id == 0 || ACE_OS::strlen (id) == 0) + if (id == 0 || std::strlen (id) == 0) throw PortableInterceptor::ORBInitInfo::InvalidName (); if (CORBA::is_nil (obj)) @@ -159,7 +159,7 @@ TAO_ORBInitInfo::resolve_initial_references (const char * id) { this->check_validity (); - if (id == 0 || ACE_OS::strlen (id) == 0) + if (id == 0 || std::strlen (id) == 0) throw PortableInterceptor::ORBInitInfo::InvalidName (); // The ORB is practically fully initialized by the time this point diff --git a/TAO/tao/PortableServer/BD_String_SArgument_T.cpp b/TAO/tao/PortableServer/BD_String_SArgument_T.cpp index ea69a7d7c71..df6ea5d437c 100644 --- a/TAO/tao/PortableServer/BD_String_SArgument_T.cpp +++ b/TAO/tao/PortableServer/BD_String_SArgument_T.cpp @@ -133,8 +133,7 @@ template<typename S_var, template <typename> class Insert_Policy> CORBA::Boolean TAO::Ret_BD_String_SArgument_T<S_var,BOUND,Insert_Policy>::marshal ( - TAO_OutputCDR & cdr - ) + TAO_OutputCDR & cdr) { if (this->x_.in () != 0 && ACE_OS::strlen (this->x_.in ()) > BOUND) { diff --git a/TAO/tao/PortableServer/PortableServer_Functions.cpp b/TAO/tao/PortableServer/PortableServer_Functions.cpp index fe9c1f5f45a..3bf950df354 100644 --- a/TAO/tao/PortableServer/PortableServer_Functions.cpp +++ b/TAO/tao/PortableServer/PortableServer_Functions.cpp @@ -1,6 +1,7 @@ // -*- C++ -*- #include "tao/PortableServer/PortableServer_Functions.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -22,7 +23,7 @@ namespace PortableServer // artifact of the way strings are stored in C. // CORBA::ULong buffer_size = static_cast <CORBA::ULong> - (ACE_OS::strlen (string)); + (std::strlen (string)); // Create the buffer for the Id CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size); diff --git a/TAO/tao/Strategies/COIOP_Connector.cpp b/TAO/tao/Strategies/COIOP_Connector.cpp index 5846b47c44e..ce03957681a 100644 --- a/TAO/tao/Strategies/COIOP_Connector.cpp +++ b/TAO/tao/Strategies/COIOP_Connector.cpp @@ -10,6 +10,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" #include "tao/Strategies/COIOP_Profile.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -108,10 +109,10 @@ TAO_COIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "COIOP", "COIOPloc" }; - size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - size_t const len0 = ACE_OS::strlen (protocol[0]); - size_t const len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/COIOP_Profile.cpp b/TAO/tao/Strategies/COIOP_Profile.cpp index 0e1db4b6eea..9802c361d07 100644 --- a/TAO/tao/Strategies/COIOP_Profile.cpp +++ b/TAO/tao/Strategies/COIOP_Profile.cpp @@ -98,7 +98,7 @@ TAO_COIOP_Profile::parse_string_i (const char *ior) // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... const char *okd = - ACE_OS::strchr (ior, this->object_key_delimiter_); + std::strchr (ior, this->object_key_delimiter_); if (okd == 0 || okd == ior) { diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index 2a25ad79c67..476094e5cb9 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -546,7 +546,7 @@ TAO_DIOP_Acceptor::parse_address (const char *address, specified_hostname.clear(); } - const char *port_separator_loc = ACE_OS::strchr (address, ':'); + const char *port_separator_loc = std::strchr (address, ':'); char tmp_host[MAXHOSTNAMELEN + 1]; tmp_host[0] = '\0'; bool host_defaulted = port_separator_loc == address; @@ -563,7 +563,7 @@ TAO_DIOP_Acceptor::parse_address (const char *address, { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - char const * const cp_pos = ACE_OS::strchr (address, ']'); + char const * const cp_pos = std::strchr (address, ']'); if (cp_pos == 0) { // No valid IPv6 address specified. diff --git a/TAO/tao/Strategies/DIOP_Connector.cpp b/TAO/tao/Strategies/DIOP_Connector.cpp index 361ba6ed9b7..236bb65d1d2 100644 --- a/TAO/tao/Strategies/DIOP_Connector.cpp +++ b/TAO/tao/Strategies/DIOP_Connector.cpp @@ -16,6 +16,7 @@ #include "ace/os_include/os_netdb.h" #include "tao/Strategies/DIOP_Profile.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -254,10 +255,10 @@ TAO_DIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "diop", "dioploc" }; - size_t const slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - size_t const len0 = ACE_OS::strlen (protocol[0]); - size_t const len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/DIOP_Endpoint.cpp b/TAO/tao/Strategies/DIOP_Endpoint.cpp index e616cb66c9e..3b93aa35467 100644 --- a/TAO/tao/Strategies/DIOP_Endpoint.cpp +++ b/TAO/tao/Strategies/DIOP_Endpoint.cpp @@ -168,7 +168,7 @@ TAO_DIOP_Endpoint::host (const char *h) { this->host_ = h; #if defined (ACE_HAS_IPV6) - if (ACE_OS::strchr (h, ':') != 0) + if (std::strchr (h, ':') != 0) this->is_ipv6_decimal_ = true; #endif /* ACE_HAS_IPV6 */ diff --git a/TAO/tao/Strategies/DIOP_Profile.cpp b/TAO/tao/Strategies/DIOP_Profile.cpp index 463806b64b3..bc02b630d20 100644 --- a/TAO/tao/Strategies/DIOP_Profile.cpp +++ b/TAO/tao/Strategies/DIOP_Profile.cpp @@ -117,7 +117,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior) { // Pull off the "hostname:port/" part of the objref // Copy the string because we are going to modify it... - const char *okd = ACE_OS::strchr (ior, this->object_key_delimiter_); + const char *okd = std::strchr (ior, this->object_key_delimiter_); if (okd == 0 || okd == ior) { @@ -132,7 +132,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior) // Length of host string. CORBA::ULong length_host = 0; - const char *cp_pos = ACE_OS::strchr (ior, ':'); // Look for a port + const char *cp_pos = std::strchr (ior, ':'); // Look for a port #if defined (ACE_HAS_IPV6) // IPv6 numeric address in host string? bool ipv6_in_host = false; @@ -145,7 +145,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior) { // In this case we have to find the end of the numeric address and // start looking for the port separator from there. - const char *cp_pos_a = ACE_OS::strchr (ior, ']'); + const char *cp_pos_a = std::strchr (ior, ']'); if (cp_pos_a == 0) { // No valid IPv6 address specified. diff --git a/TAO/tao/Strategies/SCIOP_Acceptor.cpp b/TAO/tao/Strategies/SCIOP_Acceptor.cpp index ad4ae5e451a..b33826598fb 100644 --- a/TAO/tao/Strategies/SCIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/SCIOP_Acceptor.cpp @@ -10,6 +10,7 @@ #include "tao/Transport.h" #include "tao/CDR.h" #include "ace/os_include/os_netdb.h" +#include <cstring> #if !defined(__ACE_INLINE__) #include "tao/Strategies/SCIOP_Acceptor.inl" @@ -237,7 +238,7 @@ TAO_SCIOP_Acceptor::open (TAO_ORB_Core *orb_core, ACE_Multihomed_INET_Addr addr; - const char *port_separator_loc = ACE_OS::strchr (address, ':'); + const char *port_separator_loc = std::strchr (address, ':'); ACE_Auto_Basic_Array_Ptr<char> tmp_host_auto; if (port_separator_loc == address) @@ -304,7 +305,7 @@ TAO_SCIOP_Acceptor::open (TAO_ORB_Core *orb_core, // in open_i. // Set the length of the hostname - hostname_length = ACE_OS::strlen(address); + hostname_length = std::strlen(address); } ACE_NEW_RETURN(tmp_host, char[hostname_length + 1], -1); @@ -803,7 +804,7 @@ TAO_SCIOP_Acceptor::parse_multiple_hostnames (const char *hostnames, { // Make a copy of hostnames string - int const hostnames_string_length = ACE_OS::strlen(hostnames) + 1; + int const hostnames_string_length = std::strlen(hostnames) + 1; char* hostnames_copy = 0; ACE_NEW_RETURN (hostnames_copy, char[hostnames_string_length], diff --git a/TAO/tao/Strategies/SCIOP_Connector.cpp b/TAO/tao/Strategies/SCIOP_Connector.cpp index c7b9e328fde..b11b0340d5a 100644 --- a/TAO/tao/Strategies/SCIOP_Connector.cpp +++ b/TAO/tao/Strategies/SCIOP_Connector.cpp @@ -18,6 +18,7 @@ #include "ace/OS_NS_strings.h" #include "ace/Strategies_T.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -360,10 +361,9 @@ TAO_SCIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "sciop", "scioploc" }; - size_t slot = ACE_OS::strchr (endpoint, ':') - endpoint; - - size_t len0 = ACE_OS::strlen (protocol[0]); - size_t len1 = ACE_OS::strlen (protocol[1]); + size_t const slot = std::strchr (endpoint, ':') - endpoint; + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/SCIOP_Endpoint.cpp b/TAO/tao/Strategies/SCIOP_Endpoint.cpp index c2c0d330ff7..213d7e52f01 100644 --- a/TAO/tao/Strategies/SCIOP_Endpoint.cpp +++ b/TAO/tao/Strategies/SCIOP_Endpoint.cpp @@ -13,6 +13,7 @@ #include "ace/Synch.h" #include "ace/OS_NS_stdio.h" #include "tao/ORB_Core.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "tao/Strategies/SCIOP_Endpoint.inl" @@ -131,7 +132,7 @@ TAO_SCIOP_Endpoint::addr_to_string (char *buffer, size_t length) size_t actual_len = ACE_OS::strlen (this->host_.in ()) // chars in host name + sizeof (':') // delimiter - + ACE_OS::strlen ("65536") // max port + + std::strlen ("65536") // max port + sizeof ('\0'); if (length < actual_len) diff --git a/TAO/tao/Strategies/SCIOP_Profile.cpp b/TAO/tao/Strategies/SCIOP_Profile.cpp index a5088c77aa5..261f81c3a60 100644 --- a/TAO/tao/Strategies/SCIOP_Profile.cpp +++ b/TAO/tao/Strategies/SCIOP_Profile.cpp @@ -152,7 +152,7 @@ TAO_SCIOP_Profile::parse_string_i (const char *ior) // Length of host string. CORBA::ULong length_host = 0; - const char *cp_pos = ACE_OS::strchr (ior, ':'); // Look for a port + const char *cp_pos = std::strchr (ior, ':'); // Look for a port if (cp_pos == ior) { diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp index 3f0532eb050..37197284327 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp @@ -13,6 +13,7 @@ #include "tao/Thread_Lane_Resources.h" #include "tao/Blocked_Connect_Strategy.h" #include "ace/OS_NS_strings.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -303,10 +304,10 @@ TAO_SHMIOP_Connector::check_prefix (const char *endpoint) const char *protocol[] = { "shmiop", "shmioploc" }; - size_t slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - size_t len0 = ACE_OS::strlen (protocol[0]); - size_t len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/SHMIOP_Endpoint.cpp b/TAO/tao/Strategies/SHMIOP_Endpoint.cpp index 911c1b14ad4..354172a95ca 100644 --- a/TAO/tao/Strategies/SHMIOP_Endpoint.cpp +++ b/TAO/tao/Strategies/SHMIOP_Endpoint.cpp @@ -13,6 +13,7 @@ #endif /* __ACE_INLINE__ */ #include "ace/os_include/os_netdb.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -129,7 +130,7 @@ TAO_SHMIOP_Endpoint::addr_to_string (char *buffer, size_t length) size_t actual_len = ACE_OS::strlen (this->host_.in ()) // chars in host name + sizeof (':') // delimiter - + ACE_OS::strlen ("65536") // max port + + std::strlen ("65536") // max port + sizeof ('\0'); if (length < actual_len) diff --git a/TAO/tao/Strategies/SHMIOP_Profile.cpp b/TAO/tao/Strategies/SHMIOP_Profile.cpp index 7b43eb77f60..f823527eb35 100644 --- a/TAO/tao/Strategies/SHMIOP_Profile.cpp +++ b/TAO/tao/Strategies/SHMIOP_Profile.cpp @@ -130,7 +130,7 @@ TAO_SHMIOP_Profile::parse_string_i (const char *string) CORBA::String_var copy (string); char *start = copy.inout (); - char *cp = ACE_OS::strchr (start, ':'); // Look for a port + char *cp = std::strchr (start, ':'); // Look for a port if (cp == 0) { @@ -142,7 +142,7 @@ TAO_SHMIOP_Profile::parse_string_i (const char *string) CORBA::COMPLETED_NO); } - char *okd = ACE_OS::strchr (start, this->object_key_delimiter_); + char *okd = std::strchr (start, this->object_key_delimiter_); if (okd == 0) { diff --git a/TAO/tao/Strategies/UIOP_Connector.cpp b/TAO/tao/Strategies/UIOP_Connector.cpp index c4abd8dd420..2bbc354a4ff 100644 --- a/TAO/tao/Strategies/UIOP_Connector.cpp +++ b/TAO/tao/Strategies/UIOP_Connector.cpp @@ -15,6 +15,7 @@ #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" +#include <cstring> TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -76,7 +77,7 @@ TAO_UIOP_Connector::corbaloc_scan (const char *str, size_t &len) if (this->check_prefix (str) != 0) return 0; - const char *separator = ACE_OS::strchr (str,'|'); + const char *separator = std::strchr (str,'|'); if (separator == 0) { if (TAO_debug_level) @@ -329,10 +330,10 @@ TAO_UIOP_Connector::check_prefix (const char *endpoint) static const char *protocol[] = { "uiop", "uioploc" }; - const size_t slot = ACE_OS::strchr (endpoint, ':') - endpoint; + size_t const slot = std::strchr (endpoint, ':') - endpoint; - const size_t len0 = ACE_OS::strlen (protocol[0]); - const size_t len1 = ACE_OS::strlen (protocol[1]); + size_t const len0 = std::strlen (protocol[0]); + size_t const len1 = std::strlen (protocol[1]); // Check for the proper prefix in the IOR. If the proper prefix // isn't in the IOR then it is not an IOR we can use. diff --git a/TAO/tao/Strategies/UIOP_Profile.cpp b/TAO/tao/Strategies/UIOP_Profile.cpp index f4fa10f2067..aff67a65bf8 100644 --- a/TAO/tao/Strategies/UIOP_Profile.cpp +++ b/TAO/tao/Strategies/UIOP_Profile.cpp @@ -135,7 +135,7 @@ TAO_UIOP_Profile::parse_string_i (const char *string) CORBA::String_var copy (string); char *start = copy.inout (); - char *cp = ACE_OS::strchr (start, this->object_key_delimiter_); + char *cp = std::strchr (start, this->object_key_delimiter_); if (cp == 0) { diff --git a/TAO/tao/String_Alloc.cpp b/TAO/tao/String_Alloc.cpp index 91935ce80a1..5e03a6710ed 100644 --- a/TAO/tao/String_Alloc.cpp +++ b/TAO/tao/String_Alloc.cpp @@ -3,6 +3,7 @@ #include "ace/OS_NS_string.h" #include "ace/OS_NS_wchar.h" #include "ace/OS_Memory.h" +#include <cstring> #ifndef TAO_NO_SHARED_NULL_CORBA_STRING static char null_char[]= ""; @@ -30,7 +31,7 @@ CORBA::string_dup (const char *str) return null_char; #endif /* TAO_NO_SHARED_NULL_CORBA_STRING */ - size_t const len = ACE_OS::strlen (str); + size_t const len = std::strlen (str); // This allocates an extra byte for the '\0'; char * copy = CORBA::string_alloc (static_cast<CORBA::ULong> (len)); diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 1d7b01a5c1c..6a3853353e3 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -10,6 +10,7 @@ #include "tao/Transport.h" #include "tao/CDR.h" #include "tao/SystemException.h" +#include <cstring> #if TAO_HAS_INTERCEPTORS == 1 #include "tao/PortableInterceptorC.h" @@ -94,7 +95,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, int &parse_error) : mesg_base_ (mesg_base), operation_ (CORBA::string_dup (operation)), - operation_len_ (operation == nullptr ? 0 : ACE_OS::strlen (operation)), + operation_len_ (operation == nullptr ? 0 : std::strlen (operation)), release_operation_ (true), is_forwarded_ (false), incoming_ (nullptr), diff --git a/TAO/tao/TAO_Server_Request.inl b/TAO/tao/TAO_Server_Request.inl index e380e82a01a..337e172490a 100644 --- a/TAO/tao/TAO_Server_Request.inl +++ b/TAO/tao/TAO_Server_Request.inl @@ -68,7 +68,7 @@ TAO_ServerRequest::operation (const char *operation, if (this->release_operation_) CORBA::string_free (const_cast <char*> (this->operation_)); - this->operation_len_ = (length == 0 ? ACE_OS::strlen (operation) : length); + this->operation_len_ = (length == 0 ? std::strlen (operation) : length); this->release_operation_ = release; this->operation_ = operation; } diff --git a/TAO/tao/Transport_Connector.cpp b/TAO/tao/Transport_Connector.cpp index 4e4961b1f90..9d920a75c55 100644 --- a/TAO/tao/Transport_Connector.cpp +++ b/TAO/tao/Transport_Connector.cpp @@ -17,6 +17,7 @@ #include "tao/Base_Transport_Property.h" #include "ace/OS_NS_string.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "tao/Transport_Connector.inl" @@ -81,11 +82,11 @@ TAO_Connector::corbaloc_scan (const char *str, size_t &len) { if (this->check_prefix (str) != 0) return nullptr; - const char *comma_pos = ACE_OS::strchr (str,','); - const char *slash_pos = ACE_OS::strchr (str,'/'); + const char *comma_pos = std::strchr (str,','); + const char *slash_pos = std::strchr (str,'/'); if (comma_pos == nullptr && slash_pos == nullptr) { - len = ACE_OS::strlen (str); + len = std::strlen (str); } else if (comma_pos == nullptr || comma_pos > slash_pos) len = (slash_pos - str); @@ -135,7 +136,7 @@ TAO_Connector::make_mprofile (const char *string, TAO_MProfile &mprofile) ACE_CString ior; - ior.set (string, ACE_OS::strlen (string), 1); + ior.set (string, std::strlen (string), 1); // Find out where the protocol ends ACE_CString::size_type ior_index = ior.find ("://"); |