summaryrefslogtreecommitdiff
path: root/ACE/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace')
-rw-r--r--ACE/ace/Connector.h4
-rw-r--r--ACE/ace/ETCL/ETCL_Constraint.inl3
-rw-r--r--ACE/ace/Malloc_Allocator.h10
-rw-r--r--ACE/ace/Shared_Memory_Pool.cpp43
-rw-r--r--ACE/ace/Shared_Memory_Pool.h4
-rw-r--r--ACE/ace/config-sunos5.7.h4
6 files changed, 32 insertions, 36 deletions
diff --git a/ACE/ace/Connector.h b/ACE/ace/Connector.h
index efb64786ec1..a5e77d8c875 100644
--- a/ACE/ace/Connector.h
+++ b/ACE/ace/Connector.h
@@ -216,7 +216,7 @@ public:
const typename PEER_CONNECTOR::PEER_ADDR &remote_addr,
const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults,
const typename PEER_CONNECTOR::PEER_ADDR &local_addr
- = reinterpret_cast<const peer_addr_type &>(peer_addr_type::sap_any),
+ = (peer_addr_type &) peer_addr_type::sap_any,
int reuse_addr = 0,
int flags = O_RDWR,
int perms = 0);
@@ -236,7 +236,7 @@ public:
const typename PEER_CONNECTOR::PEER_ADDR &remote_addr,
const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults,
const typename PEER_CONNECTOR::PEER_ADDR &local_addr
- = reinterpret_cast<const peer_addr_type &>(peer_addr_type::sap_any),
+ = (peer_addr_type &) peer_addr_type::sap_any,
int reuse_addr = 0,
int flags = O_RDWR,
int perms = 0);
diff --git a/ACE/ace/ETCL/ETCL_Constraint.inl b/ACE/ace/ETCL/ETCL_Constraint.inl
index 9e8f4cdc5c1..99878b78f2f 100644
--- a/ACE/ace/ETCL/ETCL_Constraint.inl
+++ b/ACE/ace/ETCL/ETCL_Constraint.inl
@@ -309,8 +309,7 @@ ETCL_Binary_Expr::lhs (void) const
ACE_INLINE
ETCL_Preference::ETCL_Preference (void)
- : type_ (0),
- subexpr_ (0)
+ : subexpr_ (0)
{}
ACE_INLINE
diff --git a/ACE/ace/Malloc_Allocator.h b/ACE/ace/Malloc_Allocator.h
index f721d80c60f..1ac2f9d55ee 100644
--- a/ACE/ace/Malloc_Allocator.h
+++ b/ACE/ace/Malloc_Allocator.h
@@ -44,8 +44,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
*
* This class uses the new/delete operators to allocate and free up
* memory. Please note that the only methods that are supported are
- * malloc(), calloc(), and free(). All other methods are no-ops that
- * return -1 and set @c errno to @c ENOTSUP. If you require this
+ * <malloc>, <calloc>, and <free>. All other methods are no-ops that
+ * return -1 and set @c errno to <ENOTSUP>. If you require this
* functionality, please use: ACE_Allocator_Adapter <ACE_Malloc
* <ACE_LOCAL_MEMORY_POOL, MUTEX> >, which will allow you to use the
* added functionality of bind/find/etc. while using the new/delete
@@ -88,11 +88,11 @@ private:
* @brief Defines a class that provided a highly optimized memory
* management scheme for allocating memory statically.
*
- * This class manages a fixed-size @c POOL_SIZE of memory. Every
- * time malloc()/calloc() is called, it simply moves an internal
+ * This class manages a fixed-size <POOL_SIZE> of memory. Every
+ * time <malloc>/<calloc> is called, it simply moves an internal
* index forward and returns a pointer to the requested chunk.
* All memory is allocated statically (typically via the
- * ACE_Static_Allocator template) and free() is a no-op. This
+ * ACE_Static_Allocator template) and <free> is a no-op. This
* behavior is useful for use-cases where all the memory
* allocation needs are known in advance and no deletions ever
* occur.
diff --git a/ACE/ace/Shared_Memory_Pool.cpp b/ACE/ace/Shared_Memory_Pool.cpp
index 4c6a4e10af8..cb55c6dd202 100644
--- a/ACE/ace/Shared_Memory_Pool.cpp
+++ b/ACE/ace/Shared_Memory_Pool.cpp
@@ -144,39 +144,37 @@ ACE_Shared_Memory_Pool::commit_backing_store_name (size_t rounded_bytes,
return 0;
}
-/// Handle SIGSEGV and SIGBUS signals to remap shared memory properly.
+// Handle SIGSEGV and SIGBUS signals to remap shared memory properly.
+
int
-ACE_Shared_Memory_Pool::handle_signal (int, siginfo_t *siginfo, ucontext_t *)
+ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
{
ACE_TRACE ("ACE_Shared_Memory_Pool::handle_signal");
+ // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("signal %S occurred\n"), signum));
// While FreeBSD 5.X has a siginfo_t struct with a si_addr field,
// it does not define SEGV_MAPERR.
#if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR) && \
(defined (SEGV_MAPERR) || defined (SEGV_MEMERR))
- if (siginfo == 0)
- return -1;
-
ACE_OFF_T offset;
-
// Make sure that the pointer causing the problem is within the
// range of the backing store.
- // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
- size_t counter = 0;
- if (this->in_use (offset, counter) == -1)
- {
- ACELIB_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("in_use")));
- }
- else if (!(siginfo->si_code == SEGV_MAPERR
- && siginfo->si_addr < (((char *) this->base_addr_) + offset)
- && siginfo->si_addr >= ((char *) this->base_addr_)))
+
+ if (siginfo != 0)
{
- ACELIB_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) address %u out of range\n",
- siginfo->si_addr),
- -1);
+ // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
+ size_t counter;
+ if (this->in_use (offset, counter) == -1)
+ ACELIB_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) %p\n"),
+ ACE_TEXT ("in_use")));
+ else if (!(siginfo->si_code == SEGV_MAPERR
+ && siginfo->si_addr < (((char *) this->base_addr_) + offset)
+ && siginfo->si_addr >= ((char *) this->base_addr_)))
+ ACELIB_ERROR_RETURN ((LM_ERROR,
+ "(%P|%t) address %u out of range\n",
+ siginfo->si_addr),
+ -1);
}
// The above if case will check to see that the address is in the
@@ -184,7 +182,8 @@ ACE_Shared_Memory_Pool::handle_signal (int, siginfo_t *siginfo, ucontext_t *)
// pointer wants to point into. Find the segment that someone else
// has used and attach to it (flabar@vais.net)
- counter = 0; // ret value to get shmid from the st table.
+ size_t counter; // ret value to get shmid from the st table.
+
if (this->find_seg (siginfo->si_addr, offset, counter) == -1)
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
diff --git a/ACE/ace/Shared_Memory_Pool.h b/ACE/ace/Shared_Memory_Pool.h
index 344d2ce92b0..27c113b1c0f 100644
--- a/ACE/ace/Shared_Memory_Pool.h
+++ b/ACE/ace/Shared_Memory_Pool.h
@@ -142,7 +142,7 @@ protected:
/**
* Commits a new shared memory segment if necessary after an
- * acquire() or a signal. @a offset is set to the new offset into
+ * <acquire> or a signal. @a offset is set to the new offset into
* the backing store.
*/
virtual int commit_backing_store_name (size_t rounded_bytes,
@@ -198,7 +198,7 @@ protected:
/// Handle SIGSEGV and SIGBUS signals to remap shared memory
/// properly.
- virtual int handle_signal (int, siginfo_t *siginfo, ucontext_t *);
+ virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
};
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/config-sunos5.7.h b/ACE/ace/config-sunos5.7.h
index c2001b07093..38476485251 100644
--- a/ACE/ace/config-sunos5.7.h
+++ b/ACE/ace/config-sunos5.7.h
@@ -51,9 +51,7 @@
#define ACE_HAS_SOCKLEN_T
#if defined (__sparcv9)
-#if !defined (_LP64)
-# define _LP64
-#endif /* _LP64 */
+#define _LP64
#define ACE_SIZEOF_LONG 8 /* Needed to circumvent compiler bug #4294969 */
#endif /* __sparcv9 */