summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2022-03-16 16:47:41 -0400
committerSteve Huston <shuston@riverace.com>2022-03-16 16:47:41 -0400
commit26f1f548344a84cddff4e8f8a967a8704cfd2c10 (patch)
tree3de199b50aa32def9cdf1ea4a2baf0108f06ac3f
parentb1cffed37e446151bbf631502437f1ae5e13e317 (diff)
downloadATCD-26f1f548344a84cddff4e8f8a967a8704cfd2c10.tar.gz
Apply diffs from Howard
-rw-r--r--ACE/ace/ACE.cpp1
-rw-r--r--ACE/ace/CDR_Base.cpp4
-rw-r--r--ACE/ace/Handle_Set.cpp22
-rw-r--r--ACE/ace/Handle_Set.h5
-rw-r--r--ACE/ace/INET_Addr.cpp13
-rw-r--r--ACE/ace/INET_Addr.h3
-rw-r--r--ACE/ace/Name_Proxy.cpp4
-rw-r--r--ACE/ace/OS_NS_unistd.cpp1
-rw-r--r--ACE/ace/SPIPE_Addr.cpp8
-rw-r--r--ACE/ace/SPIPE_Addr.h3
-rw-r--r--ACE/ace/SString.h3
-rw-r--r--ACE/ace/SString.inl8
-rw-r--r--ACE/ace/Signal.h3
-rw-r--r--ACE/ace/Signal.inl8
-rw-r--r--ACE/ace/Time_Policy.h3
-rw-r--r--ACE/ace/Time_Policy.inl6
-rw-r--r--ACE/ace/Time_Value.h3
-rw-r--r--ACE/ace/Time_Value.inl7
-rw-r--r--ACE/ace/UNIX_Addr.cpp7
-rw-r--r--ACE/ace/UNIX_Addr.h3
20 files changed, 112 insertions, 3 deletions
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp
index 8d635d8f399..fc820891251 100644
--- a/ACE/ace/ACE.cpp
+++ b/ACE/ace/ACE.cpp
@@ -2767,6 +2767,7 @@ ACE::fork (const ACE_TCHAR *program_name,
return 0;
case -1: // assumes all errnos are < 256
ACE_OS::_exit (errno);
+ [[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..0dda825809e 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;
+ [[fallthrough]];
case 2:
ACE_CDR::swap_2 (orig, target);
orig += 2;
target += 2;
+ [[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;
+ [[fallthrough]];
case 2:
ACE_CDR::swap_4 (orig, target);
orig += 4;
target += 4;
+ [[fallthrough]];
case 1:
ACE_CDR::swap_4 (orig, target);
}
diff --git a/ACE/ace/Handle_Set.cpp b/ACE/ace/Handle_Set.cpp
index 0be33d35c59..7e8e9862e07 100644
--- a/ACE/ace/Handle_Set.cpp
+++ b/ACE/ace/Handle_Set.cpp
@@ -109,6 +109,28 @@ ACE_Handle_Set::ACE_Handle_Set (const fd_set &fd_mask)
#endif /* !ACE_WIN32 */
}
+#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 ();
+}
+#endif /* ACE_HAS_BIG_FD_SET */
+
// Counts the number of bits enabled in N. Uses a table lookup to
// speed up the count.
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/INET_Addr.cpp b/ACE/ace/INET_Addr.cpp
index d5ca0cec2e4..16e218191ee 100644
--- a/ACE/ace/INET_Addr.cpp
+++ b/ACE/ace/INET_Addr.cpp
@@ -292,6 +292,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..94cd1c9b584 100644
--- a/ACE/ace/Name_Proxy.cpp
+++ b/ACE/ace/Name_Proxy.cpp
@@ -149,16 +149,16 @@ ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
switch (n)
{
case -1:
- // FALLTHROUGH
ACELIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("****************** recv_reply returned -1\n")));
+ [[fallthrough]];
default:
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p got %d bytes, expected %d bytes\n"),
ACE_TEXT ("recv failed"),
n,
sizeof (ACE_UINT32)));
- // FALLTHROUGH
+ [[fallthrough]];
case 0:
// We've shutdown unexpectedly
return -1;
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index 8d7de400a8a..4dc8ea1663d 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);
}
+ [[ 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;