diff options
author | Steve Huston <shuston@riverace.com> | 2022-03-23 14:16:45 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2022-03-23 14:16:45 +0000 |
commit | 127601149f87bd0d6263137e10438bce0bf2c102 (patch) | |
tree | d8a213b0a69a18ccea8c710ef0e362355f128ab1 | |
parent | 6d11e3bddbaf2dd3591aa2a2bf4bb694ff00fe06 (diff) | |
parent | 29e75ee76c7ac596446333aae29426ad8f91537c (diff) | |
download | ATCD-127601149f87bd0d6263137e10438bce0bf2c102.tar.gz |
Merge g++ 10 enablers from Riverace-6.2a branch
-rw-r--r-- | ACE/ChangeLog | 7 | ||||
-rw-r--r-- | ACE/NEWS | 119 | ||||
-rw-r--r-- | ACE/ace/ACE.cpp | 5 | ||||
-rw-r--r-- | ACE/ace/CDR_Base.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Handle_Set.h | 5 | ||||
-rw-r--r-- | ACE/ace/Handle_Set.inl | 20 | ||||
-rw-r--r-- | ACE/ace/INET_Addr.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/INET_Addr.h | 3 | ||||
-rw-r--r-- | ACE/ace/Name_Proxy.cpp | 90 | ||||
-rw-r--r-- | ACE/ace/OS_NS_unistd.cpp | 1 | ||||
-rw-r--r-- | ACE/ace/SPIPE_Addr.cpp | 8 | ||||
-rw-r--r-- | ACE/ace/SPIPE_Addr.h | 3 | ||||
-rw-r--r-- | ACE/ace/SString.h | 3 | ||||
-rw-r--r-- | ACE/ace/SString.inl | 8 | ||||
-rw-r--r-- | ACE/ace/Signal.h | 3 | ||||
-rw-r--r-- | ACE/ace/Signal.inl | 8 | ||||
-rw-r--r-- | ACE/ace/Time_Policy.h | 3 | ||||
-rw-r--r-- | ACE/ace/Time_Policy.inl | 6 | ||||
-rw-r--r-- | ACE/ace/Time_Value.h | 3 | ||||
-rw-r--r-- | ACE/ace/Time_Value.inl | 7 | ||||
-rw-r--r-- | ACE/ace/UNIX_Addr.cpp | 7 | ||||
-rw-r--r-- | ACE/ace/UNIX_Addr.h | 3 | ||||
-rw-r--r-- | ACE/ace/config-g++-common.h | 12 | ||||
-rw-r--r-- | ACE/ace/config-macros.h | 11 | ||||
-rw-r--r-- | ACE/ace/os_include/os_sched.h | 15 |
25 files changed, 313 insertions, 54 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 760122ebd10..878b92e2fd8 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -8,6 +8,10 @@ Sat Oct 11 20:45:03 UTC 2014 Steve Huston <shuston@riverace.com> Thu Oct 9 16:21:38 UTC 2014 Steve Huston <shuston@riverace.com> +Thu Oct 9 16:21:38 UTC 2014 Steve Huston <shuston@riverace.com> + + * NEWS: Add description of the below changes. + * ace/OS_NS_stdlib.{h inl cpp}: * ace/OS_NS_stdio.{h inl}: * ace/README: @@ -44,6 +48,7 @@ Thu Oct 9 16:21:38 UTC 2014 Steve Huston <shuston@riverace.com> * examples/Service_Configurator/IPC-tests/client/local_dgram_client.cpp: Won't work if ACE_DISABLE_TEMPNAM is set. +<<<<<<< HEAD Tue Aug 5 21:49:12 UTC 2014 Steve Huston <shuston@riverace.com> * ace/Process.cpp (setenv): Use the correct format string for @@ -114,6 +119,8 @@ Thu Aug 29 22:06:55 UTC 2013 Steve Huston <shuston@riverace.com> * ace/README: Added ACE_HAS_INT_SWAB description. +======= +>>>>>>> Riverace-6.2a Mon May 27 10:09:24 CEST 2013 Johnny Willemsen <jwillemsen@remedy.nl> * ACE version 6.2.0 released. @@ -1,9 +1,128 @@ USER VISIBLE CHANGES BETWEEN ACE-6.2.0 and ACE-6.2.0a ===================================================== +USER VISIBLE CHANGES BETWEEN ACE-6.2.8 and ACE-6.2.9 +==================================================== + +. New config macros were added: + ACE_DISABLE_MKTEMP: Disables the availability of ACE_OS::mktemp(). + ACE_DISABLE_TEMPNAM: Disables the availability of ACE_OS::tempnam(). + These can be added to your $ACE_ROOT/ace/config.h to disable these + wrappers which are considered to be a potential security risk. Disabling + one or both will also disable the following: + - ACE_FILE_Addr::set () with the 'any' address specified. + - ACE_MMAP_Memory_Pool use of the 'unique' option. + +USER VISIBLE CHANGES BETWEEN ACE-6.2.7 and ACE-6.2.8 +==================================================== + +. Add new ACE::make_event_handler<T>() which is similar + to std::make_shared but than for allocation of ACE + event handlers. This template method is only enabled + when ACE_HAS_CPP11 has been defined, which is set + automatically when a C++ compiler with adequate + C++11 support is used. Also ACE_Event_Handler_var is + extended with some C++11 specific operations + +. For all reactor types calling cancel_timer with a + nullptr is now allowed, will result in a return of 0 + +. ACE_DLL and ACE_DLL_Manager have been extended with + the support to retrieve any dynamic loader errors + +USER VISIBLE CHANGES BETWEEN ACE-6.2.6 and ACE-6.2.7 +==================================================== + +. Added configuration files for Microsoft Visual Studio 2014 + +. Added configuration files for MacOSX Yosemite + +. Added configuration files for IBM AIX XL C++ 12.1 + +USER VISIBLE CHANGES BETWEEN ACE-6.2.5 and ACE-6.2.6 +==================================================== + +. Resolved several data races reported by Intel Inspector XE + +. Added optional socket connection optimization for Windows + +. Improve functionality and stability of running tests on + Android Virtual Device (AVD). + +USER VISIBLE CHANGES BETWEEN ACE-6.2.4 and ACE-6.2.5 +==================================================== + . Added the ability to build RPMs for just ACE, using an ACE-src tarball. To do this add "--without tao" to the rpmbuild command line. +. Added support for Embarcadero C++Builder XE5 using + bcc32 in debug and release mode + +. Added support for Embarcadero C++Builder XE6 using + bcc32 in debug and release mode + +. When Intel C++ 2013 SP1 Update 2 is used with C++11 enabled + as compiler feature now also ACE_HAS_CPP11 will be defined, + this compiler is now able to compile all our C++11 feature + tests + +. Fixed several boundary bugs in the ACE RLE Compressor + +USER VISIBLE CHANGES BETWEEN ACE-6.2.3 and ACE-6.2.4 +==================================================== + +. Added support for FC20 and ended support for FC19 + +. Extended C++11 feature test suite + +. Improved support for MingW64 + +. Improvements to IPv6 support on Windows + +USER VISIBLE CHANGES BETWEEN ACE-6.2.2 and ACE-6.2.3 +==================================================== + +. The ACE_OS::thr_join() method will detect if the thread to be waited on is + the calling thread and avert that deadlock. The support needed for this + method is available at Vista/Windows Server 2003 and higher; to enable + the deadlock prevention, compile ACE with _WIN32_WINNT=0x0502 or higher. + +. Ended maintenance and support for FC12 CEEL + +. Further improvements of the Android port: Added new define + ACE_HAS_EXPLICIT_TEMPLATE_CLASS_INSTANTIATION and related macros + ACE_SINGLETON_TEMPLATE_INSTANTIATION and ACE_SINGLETON_TEMPLATE_INSTANTIATE + providing a cleaner way to support explicit template (static member or class) + instantiation. + +' Improvements of the test framework for running tests in a mixed environment + where different targets run on different physiscal devices (possibly having + different OS). + +USER VISIBLE CHANGES BETWEEN ACE-6.2.1 and ACE-6.2.2 +==================================================== + +. The max_len argument to ACE_Process::command_line_buf changed from int* + to size_t*. This corrects a mismatch between the argument type and the + data member in ACE_Process from which the value comes. + +. Removed some include files from ACE.h. These were not required for ACE. + The removed includes are OS_NS_math, Flag_Manip, Handle_Ops, Lib_Find, + Init_ACE, Sock_Connect.h. You may have to explicitly add one of these + in your own code to restore compiling. + +. Further improvements of the Android port, still work in progress. + +USER VISIBLE CHANGES BETWEEN ACE-6.2.0 and ACE-6.2.1 +==================================================== + +. Added support for Fedora 19, ended daily maintenance + for Fedora 17 and 18 + +. Added support for Embarcadero C++BuilderXE4 using + bcc32 in debug and release mode + +. Improved support for Android USER VISIBLE CHANGES BETWEEN ACE-6.1.9 and ACE-6.2.0 ==================================================== diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp index 8418fdf5b92..34d409762bd 100644 --- a/ACE/ace/ACE.cpp +++ b/ACE/ace/ACE.cpp @@ -2203,11 +2203,11 @@ ACE::handle_ready (ACE_HANDLE handle, { case 0: // Timer expired. errno = ETIME; - /* FALLTHRU */ + ACE_FALLTHROUGH; case -1: // we got here directly - select() returned -1. return -1; case 1: // Handle has data. - /* FALLTHRU */ + ACE_FALLTHROUGH; default: // default is case result > 0; return a // ACE_ASSERT (result == 1); return result; @@ -2773,6 +2773,7 @@ ACE::fork (const ACE_TCHAR *program_name, return 0; case -1: // assumes all errnos are < 256 ACE_OS::_exit (errno); + ACE_FALLTHROUGH; // gcc sees this as a fallthrough default: // child terminates, orphaning grandchild ACE_OS::_exit (0); } diff --git a/ACE/ace/CDR_Base.cpp b/ACE/ace/CDR_Base.cpp index ca32c9fc503..204bcc7ea30 100644 --- a/ACE/ace/CDR_Base.cpp +++ b/ACE/ace/CDR_Base.cpp @@ -239,10 +239,12 @@ ACE_CDR::swap_2_array (char const * orig, char* target, size_t n) ACE_CDR::swap_2 (orig, target); orig += 2; target += 2; + ACE_FALLTHROUGH; case 2: ACE_CDR::swap_2 (orig, target); orig += 2; target += 2; + ACE_FALLTHROUGH; case 1: ACE_CDR::swap_2 (orig, target); } @@ -443,10 +445,12 @@ ACE_CDR::swap_4_array (char const * orig, char* target, size_t n) ACE_CDR::swap_4 (orig, target); orig += 4; target += 4; + ACE_FALLTHROUGH; case 2: ACE_CDR::swap_4 (orig, target); orig += 4; target += 4; + ACE_FALLTHROUGH; case 1: ACE_CDR::swap_4 (orig, target); } diff --git a/ACE/ace/Handle_Set.h b/ACE/ace/Handle_Set.h index 9e65f51320e..7d40f9a035d 100644 --- a/ACE/ace/Handle_Set.h +++ b/ACE/ace/Handle_Set.h @@ -66,6 +66,11 @@ public: */ ACE_Handle_Set (const fd_set &mask); +#if defined (ACE_HAS_BIG_FD_SET) + /// Constructor optimizes for cases where <size_> == 0. + ACE_Handle_Set (const ACE_Handle_Set &); +#endif /* ACE_HAS_BIG_FD_SET */ + // = Methods for manipulating bitsets. /// Initialize the bitmask to all 0s and reset the associated fields. void reset (void); diff --git a/ACE/ace/Handle_Set.inl b/ACE/ace/Handle_Set.inl index 2ab6e34b9e2..ed073108091 100644 --- a/ACE/ace/Handle_Set.inl +++ b/ACE/ace/Handle_Set.inl @@ -30,6 +30,26 @@ ACE_Handle_Set::reset (void) } #if defined (ACE_HAS_BIG_FD_SET) +ACE_INLINE +ACE_Handle_Set::ACE_Handle_Set (const ACE_Handle_Set &rhs) +{ + ACE_TRACE ("ACE_Handle_Set::ACE_Handle_Set"); + + if (rhs.size_ > 0) + { + this->size_ = + rhs.size_; + this->max_handle_ = + rhs.max_handle_; + this->min_handle_ = + rhs.min_handle_; + this->mask_ = + rhs.mask_; + } + else + this->reset (); +} + ACE_INLINE ACE_Handle_Set & ACE_Handle_Set::operator = (const ACE_Handle_Set &rhs) { diff --git a/ACE/ace/INET_Addr.cpp b/ACE/ace/INET_Addr.cpp index bb42bdfefbc..e0b35518707 100644 --- a/ACE/ace/INET_Addr.cpp +++ b/ACE/ace/INET_Addr.cpp @@ -293,6 +293,19 @@ ACE_INET_Addr::ACE_INET_Addr (const ACE_INET_Addr &sa) this->set (sa); } +// Assignment operator. + +ACE_INET_Addr & +ACE_INET_Addr::operator = (const ACE_INET_Addr &sa) +{ + ACE_TRACE ("ACE_INET_Addr::operator="); + base_set (sa.get_type (), sa.get_size()); + this->reset (); + this->set (sa); + + return *this; +} + // Initializes a ACE_INET_Addr from a PORT_NUMBER and a 32 bit Internet // address. diff --git a/ACE/ace/INET_Addr.h b/ACE/ace/INET_Addr.h index ef2b5ca1aa0..d24581fd290 100644 --- a/ACE/ace/INET_Addr.h +++ b/ACE/ace/INET_Addr.h @@ -41,6 +41,9 @@ public: /// Copy constructor. ACE_INET_Addr (const ACE_INET_Addr &); + /// Assignment operator. + ACE_INET_Addr& operator = (const ACE_INET_Addr &); + /// Creates an ACE_INET_Addr from a sockaddr_in structure. ACE_INET_Addr (const sockaddr_in *addr, int len); diff --git a/ACE/ace/Name_Proxy.cpp b/ACE/ace/Name_Proxy.cpp index 6666c60d670..95a905102a8 100644 --- a/ACE/ace/Name_Proxy.cpp +++ b/ACE/ace/Name_Proxy.cpp @@ -145,55 +145,55 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply) // implementation assumes that the first 4 bytes are the length of // the message. ssize_t n = this->peer_.recv ((void *) &reply, sizeof (ACE_UINT32)); + if (n != sizeof (ACE_UINT32)) + { + // Not the correct number of bytes. Sort out just what kind of fail, + // but this is wrong and will end up failing the call. + if (n == -1) + { + ACELIB_DEBUG ((LM_DEBUG, + ACE_TEXT ("****************** recv_reply returned -1\n"))); + } + else if (n != 0) + { + ACELIB_ERROR ((LM_ERROR, + ACE_TEXT ("%p got %d bytes, expected %d bytes\n"), + ACE_TEXT ("recv failed"), + n, + sizeof (ACE_UINT32))); + } + // If 0, no diagnostic - the peer shut it down. + // We've shutdown unexpectedly + return -1; + } + + // Transform the length into host byte order. + ssize_t length = ACE_NTOHL (reply.length ()); + + // Receive the rest of the request message. + // @@ beware of blocking read!!!. + n = this->peer_.recv ((void *) (((char *) &reply) + + sizeof (ACE_UINT32)), + length - sizeof (ACE_UINT32)); - switch (n) + // Subtract off the size of the part we skipped over... + if (n != ssize_t (length - sizeof (ACE_UINT32))) { - case -1: - // FALLTHROUGH - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("****************** recv_reply returned -1\n"))); - default: ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p got %d bytes, expected %d bytes\n"), - ACE_TEXT ("recv failed"), - n, - sizeof (ACE_UINT32))); - // FALLTHROUGH - case 0: - // We've shutdown unexpectedly + ACE_TEXT ("%p expected %d, got %d\n"), + ACE_TEXT ("invalid length"), + length, + n)); + return -1; + } + + // Decode the request into host byte order. + if (reply.decode () == -1) + { + ACELIB_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("decode failed"))); return -1; - // NOTREACHED - case sizeof (ACE_UINT32): - { - // Transform the length into host byte order. - ssize_t length = ACE_NTOHL (reply.length ()); - - // Receive the rest of the request message. - // @@ beware of blocking read!!!. - n = this->peer_.recv ((void *) (((char *) &reply) - + 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))) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p expected %d, got %d\n"), - ACE_TEXT ("invalid length"), - length, - n)); - return -1; - } - - // Decode the request into host byte order. - if (reply.decode () == -1) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("decode failed"))); - return -1; - } - } } return 0; } diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index 8d7de400a8a..b2ff267171a 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -350,6 +350,7 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) // If the execv fails, this child needs to exit. ACE_OS::exit (errno); } + ACE_FALLTHROUGH; # endif /* ACE_HAS_WCHAR */ default: diff --git a/ACE/ace/SPIPE_Addr.cpp b/ACE/ace/SPIPE_Addr.cpp index ebc0e761d86..b6e6d6c8a09 100644 --- a/ACE/ace/SPIPE_Addr.cpp +++ b/ACE/ace/SPIPE_Addr.cpp @@ -94,6 +94,14 @@ ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa) this->set (sa); } +// Assignment operator. +ACE_SPIPE_Addr& +ACE_SPIPE_Addr::operator = (const ACE_SPIPE_Addr &sa) +{ + this->set(sa); + return *this; +} + int ACE_SPIPE_Addr::set (const ACE_TCHAR *addr, gid_t gid, diff --git a/ACE/ace/SPIPE_Addr.h b/ACE/ace/SPIPE_Addr.h index 7344a1b5a5b..e9dd9dff04b 100644 --- a/ACE/ace/SPIPE_Addr.h +++ b/ACE/ace/SPIPE_Addr.h @@ -46,6 +46,9 @@ public: /// system. ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0); + /// Assignment operator. + ACE_SPIPE_Addr& operator = (const ACE_SPIPE_Addr &sa); + /// Acts like a copy constructor... int set (const ACE_SPIPE_Addr &sa); diff --git a/ACE/ace/SString.h b/ACE/ace/SString.h index 273882e9093..e1751582457 100644 --- a/ACE/ace/SString.h +++ b/ACE/ace/SString.h @@ -93,6 +93,9 @@ public: /// Copy constructor. ACE_NS_WString (const ACE_NS_WString &s); + /// Assignment operator. + ACE_NS_WString &operator = (const ACE_NS_WString &s); + /// Constructor that copies @a c into dynamically allocated memory. ACE_NS_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc = 0); diff --git a/ACE/ace/SString.inl b/ACE/ace/SString.inl index 8aae9df08a8..0bfe448e88a 100644 --- a/ACE/ace/SString.inl +++ b/ACE/ace/SString.inl @@ -47,6 +47,13 @@ ACE_NS_WString::ACE_NS_WString (const ACE_NS_WString &s) } ACE_INLINE +ACE_NS_WString &ACE_NS_WString::operator = (const ACE_NS_WString &s) +{ + set(s.c_str()); + return *this; +} + +ACE_INLINE ACE_NS_WString::ACE_NS_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc) : ACE_WString (c, alloc) { @@ -130,7 +137,6 @@ ACE_SString::operator== (const ACE_SString &s) const } // Less than comparison operator. - ACE_INLINE bool ACE_SString::operator < (const ACE_SString &s) const { diff --git a/ACE/ace/Signal.h b/ACE/ace/Signal.h index 15ab3d34519..fbefba32322 100644 --- a/ACE/ace/Signal.h +++ b/ACE/ace/Signal.h @@ -158,6 +158,9 @@ public: /// Copy constructor. ACE_Sig_Action (const ACE_Sig_Action &s); + /// Assignment operator. + ACE_Sig_Action& operator = (const ACE_Sig_Action &s); + /// Default dtor. ~ACE_Sig_Action (void); diff --git a/ACE/ace/Signal.inl b/ACE/ace/Signal.inl index 5740a6e2b60..f8290ce273f 100644 --- a/ACE/ace/Signal.inl +++ b/ACE/ace/Signal.inl @@ -179,6 +179,14 @@ ACE_Sig_Action::ACE_Sig_Action (const ACE_Sig_Action &s) *this = s; // structure copy. } +ACE_INLINE ACE_Sig_Action& +ACE_Sig_Action::operator = (const ACE_Sig_Action &s) +{ + ACE_TRACE ("ACE_Sig_Action::operator="); + *this = s; // structure copy. + return *this; +} + ACE_INLINE int ACE_Sig_Action::register_action (int signum, ACE_Sig_Action *oaction) { diff --git a/ACE/ace/Time_Policy.h b/ACE/ace/Time_Policy.h index 9f258efc57d..634f6697513 100644 --- a/ACE/ace/Time_Policy.h +++ b/ACE/ace/Time_Policy.h @@ -113,6 +113,9 @@ class ACE_Export ACE_Delegating_Time_Policy public: ACE_Delegating_Time_Policy (ACE_Dynamic_Time_Policy_Base const * delegate = 0); + /// Copy constructor + ACE_Delegating_Time_Policy (ACE_Delegating_Time_Policy const & pol); + /// Return the current time according to this policy ACE_Time_Value_T<ACE_Delegating_Time_Policy> operator()() const; diff --git a/ACE/ace/Time_Policy.inl b/ACE/ace/Time_Policy.inl index 1ff177dc005..89fa18f7b0f 100644 --- a/ACE/ace/Time_Policy.inl +++ b/ACE/ace/Time_Policy.inl @@ -85,6 +85,12 @@ ACE_Delegating_Time_Policy::set_delegate (ACE_Dynamic_Time_Policy_Base const * d } } +ACE_INLINE +ACE_Delegating_Time_Policy::ACE_Delegating_Time_Policy(ACE_Delegating_Time_Policy const & pol) + : delegate_(pol.delegate_) +{ +} + ACE_INLINE ACE_Delegating_Time_Policy& ACE_Delegating_Time_Policy::operator =(ACE_Delegating_Time_Policy const & pol) { diff --git a/ACE/ace/Time_Value.h b/ACE/ace/Time_Value.h index ef02611ce0a..0e1a72bff37 100644 --- a/ACE/ace/Time_Value.h +++ b/ACE/ace/Time_Value.h @@ -72,6 +72,9 @@ public: /// Constructor. explicit ACE_Time_Value (time_t sec, suseconds_t usec = 0); + /// Assign @ tv to this + ACE_Time_Value (const ACE_Time_Value &tv); + // = Methods for converting to/from various time formats. /// Construct the ACE_Time_Value from a timeval. diff --git a/ACE/ace/Time_Value.inl b/ACE/ace/Time_Value.inl index e9db8764fa3..57834a472fe 100644 --- a/ACE/ace/Time_Value.inl +++ b/ACE/ace/Time_Value.inl @@ -100,6 +100,13 @@ ACE_Time_Value::ACE_Time_Value (void) } ACE_INLINE +ACE_Time_Value::ACE_Time_Value (const ACE_Time_Value &tv) +{ + // ACE_OS_TRACE ("ACE_Time_Value::ACE_Time_Value"); + this->set (tv.sec (), tv.usec ()); +} + +ACE_INLINE ACE_Time_Value::ACE_Time_Value (time_t sec, suseconds_t usec) { // ACE_OS_TRACE ("ACE_Time_Value::ACE_Time_Value"); diff --git a/ACE/ace/UNIX_Addr.cpp b/ACE/ace/UNIX_Addr.cpp index 2a4d1525839..7aa89e75ad5 100644 --- a/ACE/ace/UNIX_Addr.cpp +++ b/ACE/ace/UNIX_Addr.cpp @@ -105,6 +105,13 @@ ACE_UNIX_Addr::ACE_UNIX_Addr (const ACE_UNIX_Addr &sa) this->set (sa); } +ACE_UNIX_Addr& +ACE_UNIX_Addr::operator = (const ACE_UNIX_Addr &sa) +{ + this->set (sa); + return *this; +} + int ACE_UNIX_Addr::set (const sockaddr_un *un, int len) { diff --git a/ACE/ace/UNIX_Addr.h b/ACE/ace/UNIX_Addr.h index 859691ca258..f53eabe130d 100644 --- a/ACE/ace/UNIX_Addr.h +++ b/ACE/ace/UNIX_Addr.h @@ -81,6 +81,9 @@ public: int set (const wchar_t rendezvous_point[]); #endif /* ACE_HAS_WCHAR */ + /// Assignment operator. + ACE_UNIX_Addr &operator = (const ACE_UNIX_Addr &sa); + /// Compare two addresses for equality. bool operator == (const ACE_UNIX_Addr &SAP) const; diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index c01b73f70c6..67a2e4e6c1f 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -34,9 +34,21 @@ # define ACE_HAS_NEW_NOTHROW #endif /* __GNUC__ >= 3.3 */ +// g++ has private attributes to do fallthrough until the standard one comes into play at c++17 #if (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) # if __cplusplus > 199711L # define ACE_HAS_CPP11 +# define ACE_FALLTHROUGH [[gnu::fallthrough]] +# endif +# if __cplusplus >= 201402L +# define ACE_HAS_CPP14 +# define ACE_FALLTHROUGH [[gnu::fallthrough]] +# endif +# if __cplusplus >= 201703L +# define ACE_HAS_CPP17 +# endif +# if __cplusplus >= 202002L +# define ACE_HAS_CPP20 # endif #endif diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index 22b544286ca..5f948b679ed 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -246,6 +246,17 @@ # define ACE_NOTREACHED(a) a #endif /* ghs || ..... */ + +// Compiler-specific configs can define ACE_FALLTHROUGH but if not, +// and it's a C++17 or hgher compiler, use the defined mechanism. +#if !defined ACE_FALLTHROUGH +# if defined ACE_HAS_CPP17 +# define ACE_FALLTHROUGH [[fallthrough]] +# else +# define ACE_FALLTHROUGH +# endif /* ACE_HAS_CPP17 */ +#endif /* ACE_FALLTHROUGH */ + // ============================================================================ // ACE_ALLOC_HOOK* macros // diff --git a/ACE/ace/os_include/os_sched.h b/ACE/ace/os_include/os_sched.h index c28f8cf947d..10cc63d4325 100644 --- a/ACE/ace/os_include/os_sched.h +++ b/ACE/ace/os_include/os_sched.h @@ -36,17 +36,20 @@ extern "C" { #endif /* __cplusplus */ -#if !defined (__cpu_set_t_defined) || !defined (ACE_HAS_CPU_SET_T) -#if defined (ACE_HAS_CPUSET_T) +// We need a cpu_set_t - most platforms have it natively (ACE_HAS_CPU_SET_T). +// At least one has a similar cpuset_t (ACE_HAS_CPUSET_T) +// All others get it defined here. +#if !defined (ACE_HAS_CPU_SET_T) +# if defined (ACE_HAS_CPUSET_T) typedef cpuset_t cpu_set_t; -#else -# define ACE_CPU_SETSIZE 1024 +# else +# define ACE_CPU_SETSIZE 1024 typedef struct { ACE_UINT32 bit_array_[ACE_CPU_SETSIZE / (8 * sizeof (ACE_UINT32))]; } cpu_set_t; -#endif -#endif /* !ACE_HAS_CPU_SET_T || !__cpu_set_t_defined */ +#endif /* ACE_HAS_CPUSET_T */ +#endif /* ACE_HAS_CPU_SET_T */ #ifdef __cplusplus } |