Skip to content

Commit

Permalink
Merge branch 'master' into rawSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillemsen authored Sep 7, 2023
2 parents a88a1a8 + c625a26 commit 9afd6bf
Show file tree
Hide file tree
Showing 287 changed files with 588 additions and 848 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
CXX: ${{ matrix.CXX }}
steps:
- name: checkout ACE/TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: checkout MPC
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: ${{ env.MPC_ROOT }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/face.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
CXX: ${{ matrix.CXX }}
steps:
- name: checkout ACE/TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: checkout MPC
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: ${{ env.MPC_ROOT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: checkout ACE/TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run fuzz
run: |
perl ${env:ACE_ROOT}/bin/fuzz.pl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ jobs:
CXX: ${{ matrix.CXX }}
steps:
- name: Checkout ACE_TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout MPC
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: ${{ env.MPC_ROOT }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
MPC_ROOT: ${{ github.workspace }}/MPC
steps:
- name: checkout ACE/TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: checkout MPC
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: ${{ env.MPC_ROOT }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ jobs:
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
steps:
- name: checkout ACE/TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: checkout MPC
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: ${{ env.MPC_ROOT }}
Expand Down Expand Up @@ -187,9 +187,9 @@ jobs:
MPC_ROOT: ${{ github.workspace }}/MPC
steps:
- name: checkout ACE/TAO
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: checkout MPC
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: ${{ env.MPC_ROOT }}
Expand Down
5 changes: 2 additions & 3 deletions ACE/ACEXML/common/HttpCharStream.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "ace/ACE.h"
#include "ace/ace_wchar.h"
#include "ace/Auto_Ptr.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
#include "ace/Truncate.h"
Expand Down Expand Up @@ -272,7 +271,7 @@ int
ACEXML_HttpCharStream::send_request ()
{
char* path = ACE::strnew (ACE_TEXT_ALWAYS_CHAR (this->url_addr_->get_path_name()));
ACE_Auto_Basic_Array_Ptr<char> path_ptr (path);
std::unique_ptr<char[]> path_ptr (path);
size_t commandsize = ACE_OS::strlen (path)
+ ACE_OS::strlen (this->url_addr_->get_host_name ())
+ 20 // Extra
Expand All @@ -283,7 +282,7 @@ ACEXML_HttpCharStream::send_request ()
ACE_NEW_RETURN (command, char[commandsize], -1);

// Ensure that the <command> memory is deallocated.
ACE_Auto_Basic_Array_Ptr<char> cmd_ptr (command);
std::unique_ptr<char[]> cmd_ptr (command);

int bytes = ACE_OS::sprintf (command, "GET %s HTTP/1.0\r\n", path);
bytes += ACE_OS::sprintf (&command[bytes], "Host: %s\r\n",
Expand Down
4 changes: 2 additions & 2 deletions ACE/ACEXML/common/URL_Addr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#endif /* __ACEXML_INLINE__ */

#include "ace/Log_Msg.h"
#include "ace/Auto_Ptr.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_stdlib.h"
#include "ace/OS_NS_string.h"
#include <memory>

ACEXML_URL_Addr::ACEXML_URL_Addr ()
: path_name_ (0),
Expand Down Expand Up @@ -94,7 +94,7 @@ ACEXML_URL_Addr::string_to_addr (const ACEXML_Char* s,
ACE_NEW_RETURN (host_name, ACEXML_Char[host_len + 1], -1);
ACE_OS::strncpy (host_name, s + http_len, host_len);
host_name[host_len] = '\0';
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_host_name (host_name);
std::unique_ptr<ACEXML_Char[]> cleanup_host_name (host_name);

// Get the port number (if any)
unsigned short port = ACE_DEFAULT_HTTP_PORT;
Expand Down
6 changes: 3 additions & 3 deletions ACE/ACEXML/common/XML_Codecs.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -*- C++ -*-

#include "ace/Auto_Ptr.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_string.h"
#include "ACEXML/common/XML_Codecs.h"
#include <memory>

ACEXML_Char*
ACEXML_Base64::encode (const ACEXML_Char* input,
Expand All @@ -17,7 +17,7 @@ ACEXML_Base64::encode (const ACEXML_Char* input,
ACE_NEW_RETURN (buf,
ACE_Byte[len],
0);
ACE_Auto_Basic_Array_Ptr<ACE_Byte> cleanup_buf (buf);
std::unique_ptr<ACE_Byte[]> cleanup_buf (buf);

for (size_t i = 0; i < len; ++i)
buf[i] = (ACE_Byte)input[i];
Expand Down Expand Up @@ -59,7 +59,7 @@ ACEXML_Base64::decode (const ACEXML_Char* input,
ACE_Byte[len],
0);

ACE_Auto_Basic_Array_Ptr<ACE_Byte> cleanup (buf);
std::unique_ptr<ACE_Byte[]> cleanup (buf);

for (size_t i = 0; i < len; ++i)
buf[i] = (ACE_Byte)input[i];
Expand Down
1 change: 0 additions & 1 deletion ACE/ACEXML/examples/SAXPrint/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Print_Handler.h"
#include "SAXPrint_Handler.h"
#include "ace/Get_Opt.h"
#include "ace/Auto_Ptr.h"
#include "ace/Log_Msg.h"
#include "ace/OS_main.h"

Expand Down
7 changes: 4 additions & 3 deletions ACE/ACEXML/parser/parser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "ACEXML/parser/parser/ParserInternals.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_strings.h"
#include <memory>

static const ACEXML_Char default_attribute_type[] = ACE_TEXT ("CDATA");
static const ACEXML_Char empty_string[] = { 0 };
Expand Down Expand Up @@ -318,7 +319,7 @@ ACEXML_Parser::parse_external_dtd ()
if (this->validate_)
{
ACEXML_Char* uri = this->normalize_systemid (systemId);
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_uri (uri);
std::unique_ptr<ACEXML_Char[]> cleanup_uri (uri);
ACEXML_InputSource* ip = 0;
if (this->entity_resolver_)
{
Expand Down Expand Up @@ -2091,7 +2092,7 @@ ACEXML_Parser::parse_entity_reference ()
else
{
ACEXML_Char* uri = this->normalize_systemid (systemId);
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_uri (uri);
std::unique_ptr<ACEXML_Char[]> cleanup_uri (uri);
ACEXML_InputSource* ip = 0;
if (this->entity_resolver_)
{
Expand Down Expand Up @@ -2184,7 +2185,7 @@ ACEXML_Parser::parse_PE_reference ()
else if (this->external_entity_ && this->validate_)
{
ACEXML_Char* uri = this->normalize_systemid (systemId);
ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_uri (uri);
std::unique_ptr<ACEXML_Char[]> cleanup_uri (uri);
ACEXML_InputSource* ip = 0;
if (this->entity_resolver_)
{
Expand Down
1 change: 0 additions & 1 deletion ACE/ACEXML/parser/parser/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "ace/Hash_Map_Manager.h"
#include "ace/Unbounded_Set.h"
#include "ace/Containers_T.h"
#include "ace/Auto_Ptr.h"
#include "ACEXML/parser/parser/Entity_Manager.h"
#include "ACEXML/parser/parser/ParserInternals.h"
#include "ACEXML/parser/parser/ParserContext.h"
Expand Down
6 changes: 3 additions & 3 deletions ACE/Kokyu/Default_Dispatcher_Impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Default_Dispatcher_Impl::init_i (const Dispatcher_Attributes& attrs)
//ACE_DEBUG ((LM_DEBUG, "after new on task array\n" ));
tasks_.reset(tasks_array);

//ACE_DEBUG ((LM_DEBUG, "task array auto_ptr set\n" ));
//ACE_DEBUG ((LM_DEBUG, "task array unique_ptr set\n" ));

ConfigInfoSet& config_set =
const_cast<ConfigInfoSet&> (attrs.config_info_set_);
Expand All @@ -52,8 +52,8 @@ Default_Dispatcher_Impl::init_i (const Dispatcher_Attributes& attrs)
Dispatcher_Task (*config,
ACE_Thread_Manager::instance()),
-1);
std::unique_ptr<Dispatcher_Task> tmp_task_auto_ptr (task);
tasks_[i++] = std::move(tmp_task_auto_ptr);
std::unique_ptr<Dispatcher_Task> tmp_task_unique_ptr (task);
tasks_[i++] = std::move(tmp_task_unique_ptr);
}

this->thr_creation_flags_ = attrs.thread_creation_flags ();
Expand Down
2 changes: 1 addition & 1 deletion ACE/Kokyu/Default_Dispatcher_Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace Kokyu

private:
typedef std::unique_ptr<Dispatcher_Task> Dispatcher_Task_Auto_Ptr;
ACE_Auto_Array_Ptr<Dispatcher_Task_Auto_Ptr> tasks_;
std::unique_ptr<Dispatcher_Task_Auto_Ptr[]> tasks_;
int ntasks_;
ConfigInfoSet curr_config_info_;
int activated_;
Expand Down
1 change: 0 additions & 1 deletion ACE/Kokyu/Kokyu_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include /**/ "ace/pre.h"
#include "ace/Containers_T.h"
#include "ace/Time_Value.h"
#include "ace/Auto_Ptr.h"
#include "ace/Message_Block.h"
#include "ace/Sched_Params.h"
#include "ace/Malloc_Allocator.h"
Expand Down
1 change: 0 additions & 1 deletion ACE/Kokyu/tests/DSRT_MIF/MIF.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "ace/ACE.h"
#include "ace/Auto_Ptr.h"
#include "ace/Task.h"
#include "ace/Sched_Params.h"
#include "ace/Atomic_Op.h"
Expand Down
6 changes: 6 additions & 0 deletions ACE/NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
USER VISIBLE CHANGES BETWEEN ACE-7.1.1 and ACE-7.1.2
====================================================

. C++17 removed std::auto_ptr, updated ACE/TAO to not
use std::auto_ptr anymore and also not provide our
own auto_ptr. With C++17 ACE doesn't provide ACE_Auto_Ptr,
ACE_Auto_Basic_Ptr, ACE_Auto_Basic_Array_Ptr, ACE_Auto_Array_Ptr,
and ACE_auto_ptr_reset anymore, just use std::unique_ptr

USER VISIBLE CHANGES BETWEEN ACE-7.1.0 and ACE-7.1.1
====================================================

Expand Down
1 change: 0 additions & 1 deletion ACE/ace/ACE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "ace/Basic_Types.h"
#include "ace/Handle_Set.h"
#include "ace/Auto_Ptr.h"
#include "ace/SString.h"
#include "ace/Version.h"
#include "ace/Message_Block.h"
Expand Down
5 changes: 2 additions & 3 deletions ACE/ace/Auto_Functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Auto_Functor
typedef Functor functor_type;

/// Constructor
explicit Auto_Functor (X * p = 0,
explicit Auto_Functor (X * p = nullptr,
Functor functor = Functor()); // noexcept

Auto_Functor (Auto_Functor & rhs); // noexcept
Expand All @@ -82,7 +82,7 @@ class Auto_Functor

X * release(); // noexcept

void reset (X * p = 0); // noexcept
void reset (X * p = nullptr); // noexcept

void reset (X * p, Functor f); // noexcept

Expand All @@ -98,7 +98,6 @@ class Auto_Functor

private:
X * p_;

Functor f_;
};
} // namespace ACE_Utils
Expand Down
4 changes: 4 additions & 0 deletions ACE/ace/Auto_Ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "ace/Auto_Ptr.h"

#if !defined (ACE_HAS_CPP17)

#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
Expand All @@ -18,4 +20,6 @@ ACE_ALLOC_HOOK_DEFINE_Tt(ACE_Auto_Basic_Array_Ptr)

ACE_END_VERSIONED_NAMESPACE_DECL

#endif /* ACE_HAS_CPP17 */

#endif /* ACE_AUTO_PTR_CPP */
13 changes: 9 additions & 4 deletions ACE/ace/Auto_Ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

// C++17 removed std::auto_ptr<>, so also disable the ACE versions when
// using C++17.
#if !defined (ACE_HAS_CPP17)

#if defined (_MSC_VER)
// Suppress warning e.g. "return type for
// 'ACE_Auto_Array_Pointer<type>::operator ->' is 'type *' (i.e., not a UDT
Expand All @@ -44,7 +48,7 @@ class ACE_Auto_Basic_Ptr
public:
typedef X element_type;

explicit ACE_Auto_Basic_Ptr (X * p = 0) : p_ (p) {}
explicit ACE_Auto_Basic_Ptr (X * p = nullptr) : p_ (p) {}

ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> & ap);
ACE_Auto_Basic_Ptr<X> &operator= (ACE_Auto_Basic_Ptr<X> & rhs);
Expand All @@ -54,7 +58,7 @@ class ACE_Auto_Basic_Ptr
X &operator *() const;
X *get () const;
X *release ();
void reset (X * p = 0);
void reset (X * p = nullptr);

/// Dump the state of an object.
void dump () const;
Expand Down Expand Up @@ -180,8 +184,7 @@ class ACE_Auto_Array_Ptr : public ACE_Auto_Basic_Array_Ptr<X>
*/
template<typename AUTO_PTR_TYPE, typename PTR_TYPE>
inline void
ACE_auto_ptr_reset (AUTO_PTR_TYPE & ap,
PTR_TYPE * p)
ACE_auto_ptr_reset (AUTO_PTR_TYPE & ap, PTR_TYPE * p)
{
ap.reset (p);
}
Expand All @@ -199,5 +202,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# pragma warning(pop)
#endif /* _MSC_VER */

#endif /* ACE_HAS_CPP17 */

#include /**/ "ace/post.h"
#endif /* ACE_AUTO_PTR_H */
6 changes: 5 additions & 1 deletion ACE/ace/Auto_Ptr.inl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// -*- C++ -*-
#include "ace/Global_Macros.h"

#if !defined (ACE_HAS_CPP17)

#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
Expand Down Expand Up @@ -42,7 +44,7 @@ ACE_Auto_Basic_Ptr<X>::release ()
{
ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release");
X *old = this->p_;
this->p_ = 0;
this->p_ = nullptr;
return old;
}

Expand Down Expand Up @@ -175,3 +177,5 @@ ACE_Auto_Array_Ptr<X>::operator->() const
}

ACE_END_VERSIONED_NAMESPACE_DECL

#endif /* ACE_HAS_CPP17 */
Loading

0 comments on commit 9afd6bf

Please sign in to comment.