summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcbeaulac <cbeaulac@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-13 21:23:38 +0000
committercbeaulac <cbeaulac@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-13 21:23:38 +0000
commitb1ffba9464ea7ca0c555562519a0921df5656aec (patch)
tree1d2707159df733a3c2a20ee743e4a7fbdae12016
parent22402717ec480f0ca4cf1bded51d94310020c9b6 (diff)
downloadATCD-b1ffba9464ea7ca0c555562519a0921df5656aec.tar.gz
Fri Nov 13 21:21:34 UTC 2009 Chad Beaulac <chad@objectivesolutions.com>
* ace/Service_Types.h * ace/Service_Types.cpp Added ACE_Module_Container with pure virtual method virtual int remove(ACE_Module_Type*) = 0 ACE_Stream_Type is an ACE_Module_Type. ACE_Module_Type has an ACE_Module_Container pointer that's set when an ACE_Module_Type is pushed onto an ACE_Stream_Type. ACE_Module_Type::fini calls module_container_->remove(this) ACE_Module_Type has a private fini_called_ member so it only executes fini once since module_container_->remove(this) will call fini again. This fixes the ACE_Service_Repository shutdown SEGV issue Bugzilla #3334. The approach taken makes ACE_Module_Type::fini go through the ACE_Stream_Type::remove method. This approach was suggested by Iliyan Jeliazkov in a Bugzilla comment. There are multiple issues involved with this bug. This fix addresses them while not modifying the core ACE_Service_Repository logic. There was strong caution to refrain from making too many changes in the ACE_Service_Repository code from Steve Huston, Johnny Willemsen, and Iliyan Jeliazkov given the complicated business logic involved therein. * ... All other files modified in the commit are a merge from SVN HEAD
-rw-r--r--ChangeLog247
-rw-r--r--ace/ACE.cpp7
-rw-r--r--ace/ACE.h2
-rw-r--r--ace/ACE.inl18
-rw-r--r--ace/Addr.inl12
-rw-r--r--ace/Basic_Types.h2
-rw-r--r--ace/Default_Constants.h12
-rw-r--r--ace/Dev_Poll_Reactor.cpp11
-rw-r--r--ace/Logging_Strategy.cpp7
-rw-r--r--ace/Logging_Strategy.h2
-rw-r--r--ace/MMAP_Memory_Pool.cpp5
-rw-r--r--ace/Message_Queue_T.cpp42
-rw-r--r--ace/OS_NS_fcntl.h4
-rw-r--r--ace/OS_NS_signal.inl4
-rw-r--r--ace/OS_NS_stdlib.h31
-rw-r--r--ace/OS_NS_stdlib.inl4
-rw-r--r--ace/OS_NS_string.h19
-rw-r--r--ace/RW_Process_Mutex.h13
-rw-r--r--ace/Service_Object.cpp3
-rw-r--r--ace/Service_Types.cpp47
-rw-r--r--ace/Service_Types.h30
-rw-r--r--ace/Tokenizer_T.cpp10
-rw-r--r--ace/config-freebsd.h3
-rw-r--r--ace/config-lynxos.h4
-rw-r--r--ace/os_include/os_signal.h6
-rw-r--r--bin/MakeProjectCreator/config/global.features1
-rwxr-xr-xbin/fuzz.pl31
-rwxr-xr-xbin/sets-manager.py9
-rw-r--r--configure.ac2
-rw-r--r--docs/run_test.txt25
-rw-r--r--html/index.html2
-rw-r--r--include/makeinclude/platform_macosx_common.GNU2
-rw-r--r--include/makeinclude/platform_macosx_snowleopard.GNU13
-rw-r--r--m4/config_h.m42
-rw-r--r--m4/platform.m42
-rw-r--r--tests/Bug_3758_Regression_Test.cpp112
-rw-r--r--tests/Message_Queue_Test.cpp10
-rw-r--r--tests/OS_Test.cpp73
-rw-r--r--tests/run_test.lst5
-rw-r--r--tests/tests.mpc7
40 files changed, 647 insertions, 194 deletions
diff --git a/ChangeLog b/ChangeLog
index dc3d5d805e0..7bcf2d45193 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,250 @@
+Fri Nov 13 19:38:00 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ Sys::Hostname shouldn't be used in a test script, use HostName on
+ the test target instead
+
+Fri Nov 13 01:54:01 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * include/makeinclude/platform_macosx_common.GNU:
+ * include/makeinclude/platform_macosx_snowleopard.GNU:
+
+ Added support for buildbits=universal for building 32/64 bit
+ universal binaries with GCC.
+
+Fri Nov 13 01:12:33 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * include/makeinclude/platform_macosx_common.GNU:
+
+ Fixed 32 bit support.
+
+Fri Nov 13 00:33:49 UTC 2009 Yan Dai <dai_y@ociweb.com>
+
+ * ace/Logging_Strategy.h:
+ * ace/Logging_Strategy.cpp:
+
+ Added static service declaration and definition to fix loading
+ issue in TAO Service (e.g Notify) in static builds.
+
+Thu Nov 12 15:53:15 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ Exteded perl fuzz checks
+
+Thu Nov 12 08:31:00 UTC 2009 Denis Budko <denis.budko@remedy.nl>
+
+ * docs/run_test.txt
+ Added description of TestTarget::HostName() function usage
+
+Thu Nov 12 06:54:15 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/Default_Constants.h:
+ * ace/OS_NS_fcntl.h:
+ * ace/RW_Process_Mutex.h:
+ Moved all constants to Default_Constants.h
+
+Wed Nov 11 14:57:15 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * tests/run_test.lst:
+ Run Network_Adapters_Test and SOCK_Dgram_Bcast_Test on LynxOS.
+
+Wed Nov 11 13:49:11 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/config-freebsd.h:
+ Added ACE_HAS_SIGISMEMBER_BUG.
+
+Wed Nov 11 12:07:36 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * bin/fuzz.pl:
+ Added strsignal to functions that is checked
+ for the lack of ACE_OS.
+
+Wed Nov 11 11:45:23 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/OS_NS_string.h:
+ Doxygen updates.
+
+Wed Nov 11 11:36:26 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/OS_NS_signal.inl:
+ * ace/config-lynxos.h:
+ * ace/os_include/os_signal.h:
+ * configure.ac:
+ * m4/config_h.m4:
+ * m4/platform.m4:
+ Renamed ACE_HAS_LYNXOS_SIGNALS to ACE_HAS_LYNXOS4_SIGNALS.
+
+Wed Nov 11 09:36:32 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ Extended Id check to detect Id:
+
+Wed Nov 11 03:07:32 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * include/makeinclude/platform_macosx_snowleopard.GNU:
+
+ Add support for building 32 bits.
+
+Tue Nov 10 21:03:25 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * bin/sets-manager.py:
+
+ bugfix for windows. note that cleaning up the temp directory doesn't
+ work on windows, that will need to be done by hand.
+
+Tue Nov 10 12:17:33 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ Check for hardcoded timeouts, thanks to Chad for assisting with this
+
+Tue Nov 10 12:10:33 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ ACE_RUN_VX_TGTHOST shouldn't be used in a test script
+
+Tue Nov 10 06:31:33 2009 Steve Huston <shuston@riverace.com>
+
+ * ace/Message_Queue_T.cpp (enqueue_*): When enqueuing blocks, grab the
+ notifier pointer before releasing the guard; check it and do any
+ needed notify() outside the lock scope. Avoids dereferencing 'this'
+ when the message queue is deleted between the time the guard is
+ released and the notify is checked. User is still responsible for
+ ensuring the lifetime of a notifier the user supplies.
+ Also, moved the monitor updates out of notify() and into the
+ enqueue_* methods, inside the guard scope since they refer to
+ object state; rely on the Monitor docs that say the updates are
+ well-behaved.
+
+Tue Nov 10 00:35:52 UTC 2009 Steve Huston <shuston@riverace.com>
+
+ * ace/Dev_Poll_Reactor.cpp: Some changes extraneous to those in
+ Wed Nov 4 00:07:49 UTC 2009 Steve Huston <shuston@riverace.com>
+ got checked in by accident; these screwed up the handle resuming
+ and are now reverted. The changes/fix mentioned in
+ Wed Nov 4 00:07:49 UTC 2009 Steve Huston <shuston@riverace.com>
+ are now the only ones included.
+
+Mon Nov 9 12:20:05 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * tests/Message_Queue_Test.cpp:
+
+ Modified to use rand_r, which is actually thread safe.
+
+Mon Nov 9 03:41:21 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * tests/Message_Queue_Test.cpp:
+
+ Another attempt at fixing this problem on Snow Leopard, hopefully
+ less disruptive than the last attempt.
+
+Sat Nov 7 08:32:47 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/Basic_Types.h:
+ Fix long double for ppc64
+
+Fri Nov 6 11:41:47 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ Reverted the change to check all perl scripts
+
+Fri Nov 6 10:13:00 UTC 2009 Simon Massey <sma at prismtech dot com>
+
+ * ace/Tokenizer_T.cpp:
+
+ Allow tokens to have embedded quotes so that
+ tao_idl, which generates parameters such as
+ -I"directory with spaces", actually works.
+
+ I.E. Only remove surrounding quotes. With
+ embedded quotes; the original code simply
+ returned the token when the quote character
+ was detected, without inserting a token splitting
+ null at the quote character (which if it had,
+ would then mess up the next quoted token
+ processing). This ment that the parameters got
+ repeated many times over as they are inserted
+ and interpreted again and again.
+
+Fri Nov 6 08:30:47 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * bin/fuzz.pl:
+ Also check cdp files for tabs
+
+Thu Nov 5 20:13:47 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/ACE.h:
+ * ace/ACE.inl:
+ * ace/ACE.cpp:
+ Moved nibble2hex from .inl to .cpp file to avoid static
+ data in inline function.
+
+Thu Nov 5 13:58:25 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/OS_NS_stdlib.h:
+ Another fix for platforms that define ACE_STRTOLL_EQUIVALENT or
+ ACE_STRTOULL_EQUIVALENT.
+
+Thu Nov 5 13:46:34 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/OS_NS_stdlib.h:
+ Fix for platforms that lack strtoll or strtoull.
+
+Thu Nov 5 11:56:13 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/OS_NS_stdlib.h:
+ * ace/OS_NS_stdlib.inl:
+ Added ace_strtoll_helper and ace_strtoull_helper to fix compile
+ errors if strtoll or strtoull is macro.
+
+Thu Nov 5 11:32:07 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * ace/config-lynxos.h:
+ * ace/os_include/os_signal.h:
+ Use ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES instead of
+ ACE_HAS_LYNXOS50_SIGNALS.
+
+Wed Nov 4 20:57:08 UTC 2009 Yan Dai <dai_y@ociweb.com>
+
+ * bin/MakeProjectCreator/config/global.features:
+
+ Set notify_monitor_control default value be 0.
+
+Wed Nov 4 17:50:05 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Message_Queue_Test.cpp:
+ Improved portability
+
+Wed Nov 4 14:51:00 UTC 2009 Olli Savia <ops@iki.fi>
+
+ * tests/Bug_3758_Regression_Test.cpp:
+ * tests/OS_Test.cpp:
+ * tests/run_test.lst:
+ * tests/tests.mpc:
+ Moved regression test for 3758 to its own file.
+
+Wed Nov 4 11:39:05 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * html/index.html:
+ Updated description for DDS4CCM documentation
+
+Wed Nov 4 00:07:49 UTC 2009 Steve Huston <shuston@riverace.com>
+
+ * ace/Dev_Poll_Reactor.cpp (resume_handler_i): If asked to resume a
+ handler without any bits currently set, just note the handler has
+ been resumed, don't fail it. Prevents orphaned handle if a
+ auto-suspended handler's callback clears the lone bit set.
+
+Mon Nov 2 13:45:05 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/RW_Process_Mutex.h:
+ * ace/Default_Constants.h:
+ Added ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS with which the end user
+ can override the default permissions
+
+ * ace/Addr.inl:
+ * ace/MMAP_Memory_Pool.cpp:
+ Doxygen changes
+
Mon Nov 2 08:52:05 UTC 2009 Olli Savia <ops@iki.fi>
* tests/OS_Test.cpp:
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 12a55194c3d..b94c65983c5 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -163,6 +163,13 @@ ACE::compiler_beta_version (void)
#endif
}
+ACE_TCHAR
+ACE::nibble2hex (u_int n)
+{
+ // Yes, this works for UNICODE
+ return ACE_TEXT ("0123456789abcdef")[n & 0x0f];
+}
+
bool
ACE::debug (void)
{
diff --git a/ace/ACE.h b/ace/ACE.h
index 38f4233c8eb..d7f0068e3fb 100644
--- a/ace/ACE.h
+++ b/ace/ACE.h
@@ -627,7 +627,7 @@ namespace ACE
ACE_NAMESPACE_INLINE_FUNCTION u_long log2 (u_long num);
/// Hex conversion utility.
- ACE_NAMESPACE_INLINE_FUNCTION ACE_TCHAR nibble2hex (u_int n);
+ extern ACE_Export ACE_TCHAR nibble2hex (u_int n);
/// Convert a hex character to its byte representation.
ACE_NAMESPACE_INLINE_FUNCTION u_char hex2byte (ACE_TCHAR c);
diff --git a/ace/ACE.inl b/ace/ACE.inl
index ff48803b2a9..67fd981bf38 100644
--- a/ace/ACE.inl
+++ b/ace/ACE.inl
@@ -319,24 +319,6 @@ ACE::log2 (u_long num)
return log;
}
-ACE_INLINE ACE_TCHAR
-ACE::nibble2hex (u_int n)
-{
- // Hexadecimal characters.
-#if defined (ACE_VXWORKS) && !defined (__DCPLUSPLUS__)
- // temporary solution to prevent Windriver GNU toolchains from spewing
- // loads of warnings when inlining.
- // problem (incorrect warning leftover from older GNU) has been reported as
- // TSR to Windriver.
- const ACE_TCHAR hex_chars[] = ACE_TEXT ("0123456789abcdef");
-#else
- static const ACE_TCHAR hex_chars[] = ACE_TEXT ("0123456789abcdef");
-#endif
-
- // Yes, this works for UNICODE
- return hex_chars[n & 0x0f];
-}
-
ACE_INLINE int
ACE::map_errno (int error)
{
diff --git a/ace/Addr.inl b/ace/Addr.inl
index 3780e04b6aa..dc8e9286dc1 100644
--- a/ace/Addr.inl
+++ b/ace/Addr.inl
@@ -20,32 +20,28 @@ ACE_Addr::operator != (const ACE_Addr &sap) const
sap.addr_size_ != this->addr_size_ );
}
-// Return the size of the address.
-
+/// Return the size of the address.
ACE_INLINE int
ACE_Addr::get_size (void) const
{
return this->addr_size_;
}
-// Sets the size of the address.
-
+/// Sets the size of the address.
ACE_INLINE void
ACE_Addr::set_size (int size)
{
this->addr_size_ = size;
}
-// Return the type of the address.
-
+/// Return the type of the address.
ACE_INLINE int
ACE_Addr::get_type (void) const
{
return this->addr_type_;
}
-// Set the type of the address.
-
+/// Set the type of the address.
ACE_INLINE void
ACE_Addr::set_type (int type)
{
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
index e495096ca03..8650e4d59c9 100644
--- a/ace/Basic_Types.h
+++ b/ace/Basic_Types.h
@@ -901,7 +901,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# if LDBL_MAX_EXP == 128
# define ACE_SIZEOF_LONG_DOUBLE 4
# elif LDBL_MAX_EXP == 1024
-# if defined (__ppc64)
+# if defined (__powerpc64__)
# define ACE_SIZEOF_LONG_DOUBLE 16
# else
# define ACE_SIZEOF_LONG_DOUBLE 8
diff --git a/ace/Default_Constants.h b/ace/Default_Constants.h
index f5f061661c7..afa365a41f2 100644
--- a/ace/Default_Constants.h
+++ b/ace/Default_Constants.h
@@ -579,6 +579,18 @@
#define ACE_DEFAULT_LOCALNAME ACE_TEXT (ACE_DEFAULT_LOCALNAME_A)
#define ACE_DEFAULT_GLOBALNAME ACE_TEXT (ACE_DEFAULT_GLOBALNAME_A)
+#if !defined (ACE_DEFAULT_OPEN_PERMS)
+# define ACE_DEFAULT_OPEN_PERMS ACE_DEFAULT_FILE_PERMS
+#endif /* ACE_DEFAULT_OPEN_PERMS */
+
+#if !defined (ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS)
+# if defined (ACE_WIN32)
+# define ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS ACE_DEFAULT_OPEN_PERMS
+# else
+# define ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS (S_IRUSR | S_IWUSR)
+# endif /* ACE_WIN32 */
+#endif /* ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS */
+
# if defined (ACE_WIN32)
// The "null" device on Win32.
# define ACE_DEV_NULL "nul"
diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp
index a49e9c40f4d..75b88255e23 100644
--- a/ace/Dev_Poll_Reactor.cpp
+++ b/ace/Dev_Poll_Reactor.cpp
@@ -1850,13 +1850,18 @@ ACE_Dev_Poll_Reactor::resume_handler_i (ACE_HANDLE handle)
ACE_TRACE ("ACE_Dev_Poll_Reactor::resume_handler_i");
Event_Tuple *info = this->handler_rep_.find (handle);
- if (info == 0 || !info->suspended)
+ if (info == 0)
return -1;
- ACE_Reactor_Mask mask = info->mask;
+ if (!info->suspended)
+ return 0;
+ ACE_Reactor_Mask mask = info->mask;
if (mask == ACE_Event_Handler::NULL_MASK)
- return -1;
+ {
+ info->suspended = false;
+ return 0;
+ }
// Place the handle back in to the "interest set."
//
diff --git a/ace/Logging_Strategy.cpp b/ace/Logging_Strategy.cpp
index f4270527e02..a8cae7afb59 100644
--- a/ace/Logging_Strategy.cpp
+++ b/ace/Logging_Strategy.cpp
@@ -563,4 +563,11 @@ ACE_END_VERSIONED_NAMESPACE_DECL
// svc.conf file to dynamically initialize the state of the
// Logging_Strategy.
+ACE_STATIC_SVC_DEFINE (ACE_Logging_Strategy,
+ ACE_TEXT ("Logging_Strategy"),
+ ACE_Service_Type::SERVICE_OBJECT,
+ &ACE_SVC_NAME (ACE_Logging_Strategy),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0)
+
ACE_FACTORY_DEFINE (ACE, ACE_Logging_Strategy)
diff --git a/ace/Logging_Strategy.h b/ace/Logging_Strategy.h
index d1436a6380c..1f283c7aa7b 100644
--- a/ace/Logging_Strategy.h
+++ b/ace/Logging_Strategy.h
@@ -190,6 +190,8 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
+ACE_STATIC_SVC_DECLARE_EXPORT(ACE, ACE_Logging_Strategy)
+
ACE_FACTORY_DECLARE (ACE, ACE_Logging_Strategy)
#endif /* ACE_LOGGING_STRATEGY_H */
diff --git a/ace/MMAP_Memory_Pool.cpp b/ace/MMAP_Memory_Pool.cpp
index a4109687b04..c5acb9e9c53 100644
--- a/ace/MMAP_Memory_Pool.cpp
+++ b/ace/MMAP_Memory_Pool.cpp
@@ -69,9 +69,8 @@ ACE_MMAP_Memory_Pool::sync (int flags)
return this->mmap_.sync (len, flags);
}
-// Sync <len> bytes of the memory region to the backing store starting
-// at <addr_>.
-
+/// Sync @a len bytes of the memory region to the backing store starting
+/// at <addr_>.
int
ACE_MMAP_Memory_Pool::sync (void *addr, size_t len, int flags)
{
diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp
index f099632f8ac..71ff07b8ec5 100644
--- a/ace/Message_Queue_T.cpp
+++ b/ace/Message_Queue_T.cpp
@@ -1765,6 +1765,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head (ACE_Message_Block *new_item,
{
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head");
int queue_count = 0;
+ ACE_Notification_Strategy *notifier = 0;
{
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
@@ -1778,11 +1779,17 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head (ACE_Message_Block *new_item,
return -1;
queue_count = this->enqueue_head_i (new_item);
-
if (queue_count == -1)
return -1;
+
+#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)
+ this->monitor_->receive (this->cur_length_);
+#endif
+ notifier = this->notification_strategy_;
}
- this->notify ();
+
+ if (0 != notifier)
+ notifier->notify();
return queue_count;
}
@@ -1796,6 +1803,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_prio (ACE_Message_Block *new_item,
{
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_prio");
int queue_count = 0;
+ ACE_Notification_Strategy *notifier = 0;
{
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
@@ -1812,8 +1820,14 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_prio (ACE_Message_Block *new_item,
if (queue_count == -1)
return -1;
+
+#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)
+ this->monitor_->receive (this->cur_length_);
+#endif
+ notifier = this->notification_strategy_;
}
- this->notify ();
+ if (0 != notifier)
+ notifier->notify ();
return queue_count;
}
@@ -1827,6 +1841,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_deadline (ACE_Message_Block *new_item,
{
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_deadline");
int queue_count = 0;
+ ACE_Notification_Strategy *notifier = 0;
{
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
@@ -1843,8 +1858,14 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_deadline (ACE_Message_Block *new_item,
if (queue_count == -1)
return -1;
+
+#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)
+ this->monitor_->receive (this->cur_length_);
+#endif
+ notifier = this->notification_strategy_;
}
- this->notify ();
+ if (0 != notifier)
+ notifier->notify ();
return queue_count;
}
@@ -1865,6 +1886,7 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail (ACE_Message_Block *new_item,
{
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail");
int queue_count = 0;
+ ACE_Notification_Strategy *notifier = 0;
{
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
@@ -1881,8 +1903,14 @@ ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail (ACE_Message_Block *new_item,
if (queue_count == -1)
return -1;
+
+#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)
+ this->monitor_->receive (this->cur_length_);
+#endif
+ notifier = this->notification_strategy_;
}
- this->notify ();
+ if (0 != notifier)
+ notifier->notify ();
return queue_count;
}
@@ -1983,10 +2011,6 @@ ACE_Message_Queue<ACE_SYNCH_USE>::notify (void)
{
ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::notify");
-#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)
- this->monitor_->receive (this->cur_length_);
-#endif
-
// By default, don't do anything.
if (this->notification_strategy_ == 0)
return 0;
diff --git a/ace/OS_NS_fcntl.h b/ace/OS_NS_fcntl.h
index dcfa1eec934..1be2a4495da 100644
--- a/ace/OS_NS_fcntl.h
+++ b/ace/OS_NS_fcntl.h
@@ -44,10 +44,6 @@ namespace ACE_OS {
int cmd,
long arg = 0);
-#if !defined (ACE_DEFAULT_OPEN_PERMS)
-# define ACE_DEFAULT_OPEN_PERMS ACE_DEFAULT_FILE_PERMS
-#endif /* ACE_DEFAULT_OPEN_PERMS */
-
/// The O_APPEND flag is only partly supported on Win32. If you specify
/// O_APPEND, then the file pointer will be positioned at the end of
/// the file initially during open, but it is not re-positioned at
diff --git a/ace/OS_NS_signal.inl b/ace/OS_NS_signal.inl
index f43d8de9610..e0a03a4965d 100644
--- a/ace/OS_NS_signal.inl
+++ b/ace/OS_NS_signal.inl
@@ -183,11 +183,11 @@ signal (int signum, ACE_SignalHandler func)
return 0;
else
# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) || !defined (ACE_LACKS_UNIX_SIGNALS)
-# if !defined (ACE_HAS_TANDEM_SIGNALS) && !defined (ACE_HAS_LYNXOS_SIGNALS)
+# if !defined (ACE_HAS_TANDEM_SIGNALS) && !defined (ACE_HAS_LYNXOS4_SIGNALS)
return ::signal (signum, func);
# else
return (ACE_SignalHandler) ::signal (signum, (void (*)(int)) func);
-# endif /* !ACE_HAS_TANDEM_SIGNALS */
+# endif /* !ACE_HAS_TANDEM_SIGNALS && !ACE_HAS_LYNXOS4_SIGNALS */
#else
// @@ WINCE: Don't know how to implement signal on WinCE (yet.)
ACE_UNUSED_ARG (signum);
diff --git a/ace/OS_NS_stdlib.h b/ace/OS_NS_stdlib.h
index 5b278151bdc..8385df4da44 100644
--- a/ace/OS_NS_stdlib.h
+++ b/ace/OS_NS_stdlib.h
@@ -53,6 +53,37 @@ extern "C" {
# undef atop
#endif
+/*
+ * We inline and undef some functions that may be implemented
+ * as macros on some platforms. This way macro definitions will
+ * be usable later as there is no way to save the macro definition
+ * using the pre-processor.
+ */
+
+#if !defined (ACE_LACKS_STRTOLL) && !defined (ACE_STRTOLL_EQUIVALENT)
+inline ACE_INT64 ace_strtoll_helper (const char *s, char **ptr, int base)
+{
+# if defined (strtoll)
+ return strtoll (s, ptr, base);
+# undef strtoll
+# else
+ return ACE_STD_NAMESPACE::strtoll (s, ptr, base);
+# endif /* strtoll */
+}
+#endif /* !ACE_LACKS_STRTOLL && !ACE_STRTOLL_EQUIVALENT */
+
+#if !defined (ACE_LACKS_STRTOULL) && !defined (ACE_STRTOULL_EQUIVALENT)
+inline ACE_INT64 ace_strtoull_helper (const char *s, char **ptr, int base)
+{
+# if defined (strtoull)
+ return strtoull (s, ptr, base);
+# undef strtoull
+# else
+ return ACE_STD_NAMESPACE::strtoull (s, ptr, base);
+# endif /* strtoull */
+}
+#endif /* !ACE_LACKS_STRTOULL && !ACE_STRTOULL_EQUIVALENT */
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS {
diff --git a/ace/OS_NS_stdlib.inl b/ace/OS_NS_stdlib.inl
index a70fff97db6..ad0ddebe9b2 100644
--- a/ace/OS_NS_stdlib.inl
+++ b/ace/OS_NS_stdlib.inl
@@ -561,7 +561,7 @@ ACE_OS::strtoll (const char *s, char **ptr, int base)
#elif defined (ACE_STRTOLL_EQUIVALENT)
return ACE_STRTOLL_EQUIVALENT (s, ptr, base);
#else
- return ::strtoll (s, ptr, base);
+ return ace_strtoll_helper (s, ptr, base);
#endif /* ACE_LACKS_STRTOLL */
}
@@ -587,7 +587,7 @@ ACE_OS::strtoull (const char *s, char **ptr, int base)
#elif defined (ACE_STRTOULL_EQUIVALENT)
return ACE_STRTOULL_EQUIVALENT (s, ptr, base);
#else
- return ::strtoull (s, ptr, base);
+ return ace_strtoull_helper (s, ptr, base);
#endif /* ACE_LACKS_STRTOULL */
}
diff --git a/ace/OS_NS_string.h b/ace/OS_NS_string.h
index 77d48d8dc72..b126075e70e 100644
--- a/ace/OS_NS_string.h
+++ b/ace/OS_NS_string.h
@@ -183,11 +183,9 @@ namespace ACE_OS {
wchar_t *strecpy (wchar_t *s, const wchar_t *t);
#endif /* ACE_HAS_WCHAR */
- /*
- ** Returns a system error message. If the supplied errnum is out of range,
- ** a string of the form "Unknown error %d" is used to format the string
- ** whose pointer is returned and errno is set to EINVAL.
- */
+ /// Returns a system error message. If the supplied errnum is out of range,
+ /// a string of the form "Unknown error %d" is used to format the string
+ /// whose pointer is returned and errno is set to EINVAL.
extern ACE_Export
char *strerror (int errnum);
@@ -197,12 +195,11 @@ namespace ACE_OS {
char *strerror_emulation (int errnum);
#endif /* ACE_LACKS_STRERROR */
- /*
- ** Returns a string describing the signal number passed in the
- ** argument signum. If the supplied signal number is out of range,
- ** a string of the form "Unknown signal %d" is used to format the string
- ** whose pointer is returned and errno is set to EINVAL.
- */
+
+ /// Returns a string describing the signal number passed in the
+ /// argument signum. If the supplied signal number is out of range,
+ /// a string of the form "Unknown signal %d" is used to format the string
+ /// whose pointer is returned.
extern ACE_Export
char *strsignal (int signum);
diff --git a/ace/RW_Process_Mutex.h b/ace/RW_Process_Mutex.h
index 318d9752fe0..27fc88de750 100644
--- a/ace/RW_Process_Mutex.h
+++ b/ace/RW_Process_Mutex.h
@@ -22,7 +22,6 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Default_Constants.h"
-#include "ace/OS_NS_fcntl.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -44,17 +43,11 @@ class ACE_Export ACE_RW_Process_Mutex
public:
/// Create a cross-process readers/writer mutex, passing in the optional
/// @a name, @a flags and @a mode \sa ACE_File_Lock.
- /// If not specified, a name is generated and flags and mode are set
- /// to default platform values.
-#if defined (ACE_WIN32)
+ /// If not specified, a name is generated and flags and mode are set
+ /// to default platform values.
ACE_RW_Process_Mutex (const ACE_TCHAR *name = 0,
int flags = O_CREAT|O_RDWR,
- mode_t mode = ACE_DEFAULT_OPEN_PERMS);
-#else
- ACE_RW_Process_Mutex (const ACE_TCHAR *name = 0,
- int flags = O_CREAT|O_RDWR,
- mode_t mode = S_IRUSR | S_IWUSR );
-#endif /* ACE_WIN32 */
+ mode_t mode = ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS);
~ACE_RW_Process_Mutex (void);
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
index 16d650271d3..dfc84b28cd7 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -109,7 +109,8 @@ ACE_Service_Type::fini (void)
return 1; // No implementation was found.
}
- int ret = this->type_->fini ();
+ // Cast constness away when calling fini
+ int ret = const_cast<ACE_Service_Type_Impl *>(this->type_)->fini ();
// Ensure that closing the DLL is done after type_->fini() as it may
// require access to the code for the service object destructor,
diff --git a/ace/Service_Types.cpp b/ace/Service_Types.cpp
index 4552607640e..38ab04d6f63 100644
--- a/ace/Service_Types.cpp
+++ b/ace/Service_Types.cpp
@@ -55,7 +55,7 @@ ACE_Service_Type_Impl::~ACE_Service_Type_Impl (void)
}
int
-ACE_Service_Type_Impl::fini (void) const
+ACE_Service_Type_Impl::fini (void)
{
ACE_TRACE ("ACE_Service_Type_Impl::fini");
@@ -74,7 +74,9 @@ ACE_Service_Type_Impl::fini (void) const
if (ACE_BIT_ENABLED (this->flags_,
ACE_Service_Type::DELETE_THIS))
+ {
delete const_cast <ACE_Service_Type_Impl *> (this);
+ }
return 0;
}
@@ -108,7 +110,7 @@ ACE_Service_Object_Type::init (int argc, ACE_TCHAR *argv[]) const
}
int
-ACE_Service_Object_Type::fini (void) const
+ACE_Service_Object_Type::fini (void)
{
ACE_TRACE ("ACE_Service_Object_Type::fini");
@@ -152,6 +154,11 @@ ACE_Service_Object_Type::info (ACE_TCHAR **str, size_t len) const
return static_cast<ACE_Service_Object *> (this->object ())->info (str, len);
}
+ACE_Module_Container::~ACE_Module_Container (void)
+{
+ ACE_TRACE ("ACE_Module_Container::~ACE_Module_Container");
+}
+
ACE_ALLOC_HOOK_DEFINE(ACE_Module_Type)
void
@@ -165,7 +172,9 @@ ACE_Module_Type::dump (void) const
ACE_Module_Type::ACE_Module_Type (void *m,
const ACE_TCHAR *m_name,
u_int f)
- : ACE_Service_Type_Impl (m, m_name, f)
+ : ACE_Service_Type_Impl (m, m_name, f),
+ module_container_ (0),
+ fini_called_ (false)
{
ACE_TRACE ("ACE_Module_Type::ACE_Module_Type");
}
@@ -227,9 +236,15 @@ ACE_Module_Type::resume (void) const
// implementation of ACE_Module and ACE_Module::close...
int
-ACE_Module_Type::fini (void) const
+ACE_Module_Type::fini (void)
{
ACE_TRACE ("ACE_Module_Type::fini");
+ if (this->fini_called_)
+ {
+ return 0;
+ }
+
+ this->fini_called_ = true;
void *obj = this->object ();
MT_Module *mod = (MT_Module *) obj;
@@ -244,6 +259,12 @@ ACE_Module_Type::fini (void) const
// Close the module and delete the memory.
mod->close (MT_Module::M_DELETE);
+ if (module_container_ != 0)
+ {
+ module_container_->remove (const_cast<ACE_Module_Type*>(this));
+ module_container_ = 0;
+ }
+
return ACE_Service_Type_Impl::fini ();
}
@@ -279,6 +300,20 @@ ACE_Module_Type::link (void) const
return this->link_;
}
+void
+ACE_Module_Type::module_container (ACE_Module_Container *n)
+{
+ ACE_TRACE ("ACE_Module_Type::module_container");
+ this->module_container_ = n;
+}
+
+ACE_Module_Container *
+ACE_Module_Type::module_container (void) const
+{
+ ACE_TRACE ("ACE_Module_Type::module_container");
+ return this->module_container_;
+}
+
ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Type)
void
@@ -355,7 +390,7 @@ ACE_Stream_Type::info (ACE_TCHAR **str, size_t len) const
}
int
-ACE_Stream_Type::fini (void) const
+ACE_Stream_Type::fini (void)
{
ACE_TRACE ("ACE_Stream_Type::fini");
void *obj = this->object ();
@@ -385,7 +420,6 @@ int
ACE_Stream_Type::remove (ACE_Module_Type *mod)
{
ACE_TRACE ("ACE_Stream_Type::remove");
-
ACE_Module_Type *prev = 0;
void *obj = this->object ();
MT_Stream *str = (MT_Stream *) obj;
@@ -431,6 +465,7 @@ ACE_Stream_Type::push (ACE_Module_Type *new_module)
new_module->link (this->head_);
this->head_ = new_module;
obj = new_module->object ();
+ new_module->module_container (this);
return str->push ((MT_Module *) obj);
}
diff --git a/ace/Service_Types.h b/ace/Service_Types.h
index e741561d965..34e6c91ef54 100644
--- a/ace/Service_Types.h
+++ b/ace/Service_Types.h
@@ -50,7 +50,7 @@ public:
virtual int suspend (void) const = 0;
virtual int resume (void) const = 0;
virtual int init (int argc, ACE_TCHAR *argv[]) const = 0;
- virtual int fini (void) const;
+ virtual int fini (void);
virtual int info (ACE_TCHAR **str, size_t len) const = 0;
/// The pointer to the service.
@@ -104,7 +104,7 @@ public:
virtual int suspend (void) const;
virtual int resume (void) const;
virtual int init (int argc, ACE_TCHAR *argv[]) const;
- virtual int fini (void) const;
+ virtual int fini (void);
virtual int info (ACE_TCHAR **str, size_t len) const;
private:
@@ -112,6 +112,15 @@ private:
mutable int initialized_;
};
+class ACE_Module_Type;
+
+class ACE_Export ACE_Module_Container
+{
+public:
+ virtual ~ACE_Module_Container ();
+ virtual int remove (ACE_Module_Type *module) = 0;
+};
+
/**
* @class ACE_Module_Type
*
@@ -132,7 +141,7 @@ public:
virtual int suspend (void) const;
virtual int resume (void) const;
virtual int init (int argc, ACE_TCHAR *argv[]) const;
- virtual int fini (void) const;
+ virtual int fini (void);
virtual int info (ACE_TCHAR **str, size_t len) const;
/// Get the link pointer.
@@ -141,6 +150,12 @@ public:
/// Set the link pointer.
void link (ACE_Module_Type *);
+ /// Get the link pointer.
+ ACE_Module_Container *module_container (void) const;
+
+ /// Set the module_container pointer
+ void module_container (ACE_Module_Container *);
+
/// Dump the state of an object.
void dump (void) const;
@@ -150,6 +165,11 @@ public:
private:
/// Pointer to the next ACE_Module_Type in an ACE_Stream_Type.
ACE_Module_Type *link_;
+
+ /// Pointer to the ACE_Module_Container
+ ACE_Module_Container *module_container_;
+
+ bool fini_called_;
};
/**
@@ -158,7 +178,7 @@ private:
* @brief Define the methods for handling the configuration of
* ACE_Streams.
*/
-class ACE_Export ACE_Stream_Type : public ACE_Service_Type_Impl
+class ACE_Export ACE_Stream_Type : public ACE_Service_Type_Impl, ACE_Module_Container
{
public:
// = Initialization method.
@@ -172,7 +192,7 @@ public:
virtual int suspend (void) const;
virtual int resume (void) const;
virtual int init (int argc, ACE_TCHAR *argv[]) const;
- virtual int fini (void) const;
+ virtual int fini (void);
virtual int info (ACE_TCHAR **str, size_t len) const;
/// Add a new ACE_Module to the top of the ACE_Stream.
diff --git a/ace/Tokenizer_T.cpp b/ace/Tokenizer_T.cpp
index f9ce33a7fc9..ddc3d70a91c 100644
--- a/ace/Tokenizer_T.cpp
+++ b/ace/Tokenizer_T.cpp
@@ -204,11 +204,17 @@ ACE_Tokenizer_T<CHAR>::next (void)
goto EXIT_LABEL;
}
- // A preserve designator signifies the end of this token.
+ // A preserve designator is NESTED inside this token
+ // We can't strip such preserve designators, just skip
+ // over them so that delimiters nested within arn't seen.
if (this->is_preserve_designator (buffer_[index_],
stop,
strip))
- goto EXIT_LABEL;
+ {
+ ++index_; // Skip starting preserve_designator
+ while (('\0' != buffer_[index_]) && (stop != buffer_[index_]))
+ ++index_; // Skip enclosed character
+ }
// Check for end of string.
if (buffer_[index_] == '\0')
diff --git a/ace/config-freebsd.h b/ace/config-freebsd.h
index 536c757f9a0..3f626600952 100644
--- a/ace/config-freebsd.h
+++ b/ace/config-freebsd.h
@@ -71,18 +71,19 @@
#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
#define ACE_HAS_RTLD_LAZY_V
#define ACE_HAS_SEMUN
+#define ACE_HAS_SIGISMEMBER_BUG
#define ACE_HAS_SIGSUSPEND
#define ACE_HAS_SIGWAIT
#define ACE_HAS_SIG_ATOMIC_T
#define ACE_HAS_SOCKADDR_IN6_SIN6_LEN
#define ACE_HAS_SOCKADDR_IN_SIN_LEN
#define ACE_HAS_SSIZE_T
+#define ACE_HAS_STRSIGNAL
#define ACE_HAS_SVR4_DYNAMIC_LINKING
#define ACE_HAS_SVR4_SIGNAL_T
#define ACE_HAS_SYSCTL
#define ACE_HAS_SYSV_IPC
#define ACE_HAS_SYS_FILIO_H
-#define ACE_HAS_STRSIGNAL
#define ACE_HAS_SYS_SOCKIO_H
#define ACE_HAS_SYS_SYSCALL_H
#define ACE_HAS_TERMIOS
diff --git a/ace/config-lynxos.h b/ace/config-lynxos.h
index 4d345677418..5ae03fe1df6 100644
--- a/ace/config-lynxos.h
+++ b/ace/config-lynxos.h
@@ -170,7 +170,7 @@
#if (ACE_LYNXOS_MAJOR >=5)
// LynxOS 5.0 Additons
-# define ACE_HAS_LYNXOS50_SIGNALS
+# define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
# define ACE_HAS_NONCONST_INET_ADDR
# define ACE_LACKS_INET_ATON_PROTOTYPE
# define ACE_LACKS_SEMBUF_T
@@ -180,7 +180,7 @@
# define ACE_SYS_SIGLIST __sys_siglist
#else
// LynxOS 5.0 Removals
-# define ACE_HAS_LYNXOS_SIGNALS
+# define ACE_HAS_LYNXOS4_SIGNALS
# define ACE_HAS_SEMUN
# define ACE_HAS_STRBUF_T
# define ACE_HAS_SYSV_IPC
diff --git a/ace/os_include/os_signal.h b/ace/os_include/os_signal.h
index a9f3bee4458..5e0206abefa 100644
--- a/ace/os_include/os_signal.h
+++ b/ace/os_include/os_signal.h
@@ -161,11 +161,11 @@ extern "C"
typedef void (__cdecl * __sighandler_t)(int);
#endif
-#if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES) || defined (ACE_HAS_LYNXOS50_SIGNALS)
- // Prototypes for both signal() and struct sigaction are consistent..
+#if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES)
+ // Prototypes for both signal() and struct sigaction are consistent..
typedef void (*ACE_SignalHandler)(int);
typedef void (*ACE_SignalHandlerV)(int);
-#elif defined (ACE_HAS_LYNXOS_SIGNALS) || defined (ACE_HAS_TANDEM_SIGNALS)
+#elif defined (ACE_HAS_LYNXOS4_SIGNALS) || defined (ACE_HAS_TANDEM_SIGNALS)
typedef void (*ACE_SignalHandler)(...);
typedef void (*ACE_SignalHandlerV)(...);
#elif defined (ACE_HAS_SVR4_SIGNAL_T)
diff --git a/bin/MakeProjectCreator/config/global.features b/bin/MakeProjectCreator/config/global.features
index 1a345e08736..aefca279800 100644
--- a/bin/MakeProjectCreator/config/global.features
+++ b/bin/MakeProjectCreator/config/global.features
@@ -47,6 +47,7 @@ uses_wchar = 0 // i.e. unicode
gen_ostream = 0
ziparchive = 0
negotiate_codesets = 0
+notify_monitor_control = 0
versioned_namespace = 0
vcl = 0
stl = 0
diff --git a/bin/fuzz.pl b/bin/fuzz.pl
index 697fcf3642c..b467beb2da9 100755
--- a/bin/fuzz.pl
+++ b/bin/fuzz.pl
@@ -33,6 +33,7 @@ use PerlACE::Run_Test;
###### END TODO
# Lists of all the files
+@files_cdp = ();
@files_cpp = ();
@files_inl = ();
@files_h = ();
@@ -140,6 +141,9 @@ sub store_file ($)
elsif ($name =~ /\.(icc|ncb|zip)$/i) {
push @files_noncvs, ($name);
}
+ elsif ($name =~ /\.(cdp)$/i) {
+ push @files_cdp, ($name);
+ }
}
##############################################################################
@@ -207,6 +211,9 @@ sub check_for_id_string ()
if (/\$id\$/) {
print_error ("$file:$.: Incorrect \$id\$ found (correct casing)");
}
+ if (/\$Id:\$/) {
+ print_error ("$file:$.: Incorrect \$Id:\$ found (remove colon)");
+ }
}
close (FILE);
if ($found == 0) {
@@ -398,7 +405,7 @@ sub check_for_ACE_Thread_Mutex ()
sub check_for_tab ()
{
print "Running tabs check\n";
- ITERATION: foreach $file (@files_cpp, @files_inl, @files_h, @files_idl) {
+ ITERATION: foreach $file (@files_cpp, @files_inl, @files_h, @files_idl, @files_cdp) {
if (open (FILE, $file)) {
my $disable = 0;
print "Looking at file $file\n" if $opt_d;
@@ -452,7 +459,7 @@ sub check_for_lack_ACE_OS ()
$OS_NS_stdlib_symbols = "_exit|abort|atexit|atof|atol|atoi|atop|bsearch|calloc|exit|free|getenv|getenvstrings|itoa|itoa_emulation|itow_emulation|malloc|mkstemp|mkstemp_emulation|mktemp|setenv|unsetenv|putenv|qsort|rand|rand_r|realloc|realpath|set_exit_hook|srand|strenvdup|strtod|strtol|strtol_emulation|strtoul|strtoul_emulation|strtoll|strtoll_emulation|strtoull|strtoull_emulation|system|getprogname|setprogname";
- $OS_NS_string_symbols = "memchr|memchr_emulation|memcmp|memcpy|fast_memcpy|memmove|memset|strcat|strchr|strcmp|strcpy|strcspn|strdup|strdup_emulation|strecpy|strerror|strerror_emulation|strlen|strncat|strnchr|strncmp|strncpy|strnlen|strnstr|strpbrk|strrchr|strrchr_emulation|strsncpy|strspn|strstr|strtok|strtok_r|strtok_r_emulation";
+ $OS_NS_string_symbols = "memchr|memchr_emulation|memcmp|memcpy|fast_memcpy|memmove|memset|strcat|strchr|strcmp|strcpy|strcspn|strdup|strdup_emulation|strecpy|strerror|strerror_emulation|strsignal|strlen|strncat|strnchr|strncmp|strncpy|strnlen|strnstr|strpbrk|strrchr|strrchr_emulation|strsncpy|strspn|strstr|strtok|strtok_r|strtok_r_emulation";
$OS_NS_strings_symbols = "strcasecmp|strncasecmp|strcasecmp_emulation";
@@ -1403,6 +1410,10 @@ sub check_for_bad_run_test ()
print_error ("$file:$.: using \$EXE_EXT");
}
+ if (m/Sys::Hostname/) {
+ print_error ("$file:$.: using Sys::Hostname");
+ }
+
if (m/\$PerlACE::wait_interval_for_process_creation/) {
print_error ("$file:$.: using \$PerlACE::wait_interval_for_process_creation");
}
@@ -1435,6 +1446,22 @@ sub check_for_bad_run_test ()
print_error ("$file:$.: using PerlACE::TestConfig");
}
+ if (m/ACE_RUN_VX_TGTHOST/) {
+ print_error ("$file:$.: using ACE_RUN_VX_TGTHOST, use TestTarget::HostName");
+ }
+
+ if (m/Spawn(Wait(Kill)?)?\s*\(.+\->ProcessStop\)/) {
+ print_error ("$file:$.: uses Stop together with Spawn");
+ }
+
+ if (m/Spawn(Wait(Kill)?)?\s*\(\d+\)/) {
+ print_error ("$file:$.: uses hardcoded timeout for Spawn");
+ }
+
+ if (m/Kill\s*\(\d+\)/) {
+ print_error ("$file:$.: uses hardcoded timeout for Kill");
+ }
+
if (m/unlink/) {
print_error ("$file:$.: using unlink");
}
diff --git a/bin/sets-manager.py b/bin/sets-manager.py
index 27e47906abe..c3dc10d842e 100755
--- a/bin/sets-manager.py
+++ b/bin/sets-manager.py
@@ -63,12 +63,19 @@ def svn_copy (source, dest):
execute (command)
def svn_propset (path, prop, value):
+ temp = open ("sets_manager_props.tmp", 'w')
+ temp.write (value)
+ temp.close ()
+
command = " ".join ([opts.svn,
"propset",
prop,
- "'" + value + "'",
+ "-F sets_manager_props.tmp",
path])
execute (command)
+
+ os.unlink ("sets_manager_props.tmp")
+
def svn_mkdir (path):
command = " ".join ([opts.svn,
diff --git a/configure.ac b/configure.ac
index a97b2bd3c8e..e40853a79da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6986,7 +6986,7 @@ elif test "$ace_cv_lib_signal_vi1_2" != yes &&
test "$ace_cv_lib_struct_sigaction_vv1_handler" != yes &&
test "$ace_cv_lib_struct_sigaction_vi1a2_handler" != yes &&
test "$ace_cv_lib_struct_sigaction_va1_handler" = yes; then
- AC_DEFINE([ACE_HAS_LYNXOS_SIGNALS])
+ AC_DEFINE([ACE_HAS_LYNXOS4_SIGNALS])
AC_DEFINE([ACE_HAS_TANDEM_SIGNALS])
elif test "$ace_cv_lib_signal_vi1_2" = yes &&
test "$ace_cv_lib_signal_vi1_ret" = yes &&
diff --git a/docs/run_test.txt b/docs/run_test.txt
index c02da95ab27..8d5d30ffce5 100644
--- a/docs/run_test.txt
+++ b/docs/run_test.txt
@@ -11,7 +11,7 @@ sure the run_test.pl works on all platforms
- The run_test should return a non-zero value if the test failed
- When an executable can't be spawned the test should directly exit and
not wait for a fail to be created by that executable
-- The processes should suppor that files names are passed through
+- The processes should support that files names are passed through
the commandline
Following is an example
@@ -243,23 +243,16 @@ $client->DeleteFile($client_iorfile);
exit $status;
@endverbatim
-When you need the hostname the test is running on be aware of the
-fact that with VxWorks we do cross host testing, part of the test
-runs on the target, the other part on the host system. In your test
-program add functionality to handle a commandline argument to pass
-in the hostname of the target. In the run_test.pl script you can
-then use the following code as example.
+This example illustrates how to get the host name within the cross
+platform test. In your test program add functionality to handle a
+command line argument to pass the host name of the target. In the
+run_test.pl script you can use the following code as example.
@verbatim
-$TARGETHOSTNAME = "localhost";
-if (PerlACE::is_vxworks_test()) {
- $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'};
- $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint iiop://$TARGETHOSTNAME:43210");
- }
- else {
- $SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://$TARGETHOSTNAME:43210");
- }
-$CL = new PerlACE::Process ("client", " -p 43210 -h $TARGETHOSTNAME");
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $hostname = $server->HostName();
+$SV = $server->CreateProcess ("server", "-ORBEndpoint iiop://$hostname:43210");
+$CL = $server->CreateProcess ("client", " -p 43210 -h $hostname");
@endverbatim
And finally, we unlink any files that were created and then just
diff --git a/html/index.html b/html/index.html
index 9a3a5073014..ab3adb9321e 100644
--- a/html/index.html
+++ b/html/index.html
@@ -220,7 +220,7 @@
<li>
<p><a href="tao/ciao/dds4ccm/index.html">DDS4CCM:</a> CIAO's
- Config Handlers.</p>
+ DDS4CCM.</p>
</li>
</ul>
</body>
diff --git a/include/makeinclude/platform_macosx_common.GNU b/include/makeinclude/platform_macosx_common.GNU
index 7437a4ab1c5..5ee78669b6a 100644
--- a/include/makeinclude/platform_macosx_common.GNU
+++ b/include/makeinclude/platform_macosx_common.GNU
@@ -27,6 +27,8 @@ with_ld = macosx
pipes ?= 1
+CFLAGS += $(FLAGS_C_CC)
+
CC = gcc
CXX = g++
CFLAGS += -Wall -Wpointer-arith
diff --git a/include/makeinclude/platform_macosx_snowleopard.GNU b/include/makeinclude/platform_macosx_snowleopard.GNU
index 27423a2357b..63aa60240ca 100644
--- a/include/makeinclude/platform_macosx_snowleopard.GNU
+++ b/include/makeinclude/platform_macosx_snowleopard.GNU
@@ -1,4 +1,17 @@
# $Id$
+ifeq ($(buildbits),32)
+ FLAGS_C_CC += -m32
+ LDFLAGS += -m32
+endif
+ifeq ($(buildbits),64)
+ FLAGS_C_CC += -m64
+ LDFLAGS += -m64
+endif
+ifeq ($(buildbits),universal)
+ FLAGS_C_CC += -arch i386 -arch x86_64
+ LDFLAGS += -arch i386 -arch x86_64
+endif
+
include $(ACE_ROOT)/include/makeinclude/platform_macosx_common.GNU
diff --git a/m4/config_h.m4 b/m4/config_h.m4
index bf904f977a0..17cf4306de4 100644
--- a/m4/config_h.m4
+++ b/m4/config_h.m4
@@ -74,7 +74,7 @@ AH_TEMPLATE([ACE_HAS_STDEXCEPT_NO_H],[Platform provides C++ <stdexcept> header])
dnl Deprecated! (or soon to be?)
AH_TEMPLATE([ACE_HAS_OSF1_GETTIMEOFDAY],
[timezone* 2nd parameter & no prototype])
-AH_TEMPLATE([ACE_HAS_LYNXOS_SIGNALS],[])
+AH_TEMPLATE([ACE_HAS_LYNXOS4_SIGNALS],[])
AH_TEMPLATE([ACE_HAS_TANDEM_SIGNALS],[])
AH_TEMPLATE([PTHREAD_STACK_MIN],[])
diff --git a/m4/platform.m4 b/m4/platform.m4
index 367493e931c..f03fefd3dba 100644
--- a/m4/platform.m4
+++ b/m4/platform.m4
@@ -160,7 +160,7 @@ dnl */
AC_DEFINE([__NO_INCLUDE_WARN__])
AC_DEFINE([ACE_MALLOC_ALIGN], [8])
AC_DEFINE([ACE_MAP_PRIVATE], [ACE_MAP_SHARED])
- AC_DEFINE([ACE_HAS_LYNXOS_SIGNALS])
+ AC_DEFINE([ACE_HAS_LYNXOS4_SIGNALS])
AC_DEFINE([ACE_TIMER_SKEW], [(1000 * 10)])
;;
*mvs*)
diff --git a/tests/Bug_3758_Regression_Test.cpp b/tests/Bug_3758_Regression_Test.cpp
new file mode 100644
index 00000000000..fb90033e386
--- /dev/null
+++ b/tests/Bug_3758_Regression_Test.cpp
@@ -0,0 +1,112 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// tests
+//
+// = DESCRIPTION
+// This simple test exercises ACE_OS::fileno.
+//
+// = AUTHOR
+// Olli Savia <ops@iki.fi>
+//
+// ============================================================================
+
+#include "test_config.h"
+#include "ace/OS_NS_stdio.h"
+#include "ace/OS_NS_unistd.h"
+
+ACE_RCSID(tests, OS_Test, "$Id$")
+
+#undef THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL
+#define THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL(X) \
+ ((X) \
+ ? static_cast<void>(0) \
+ : ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X)))
+
+// Test ACE_OS::fileno()
+int
+fileno_test (void)
+{
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Testing fileno method\n")));
+
+ int test_status = 0;
+
+ ACE_HANDLE fn;
+
+ fn = ACE_OS::fileno (stdin);
+ if (fn == ACE_INVALID_HANDLE)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("fileno(stdin) returned ACE_INVALID_HANDLE.\n")));
+ test_status = -1;
+ }
+ else if (fn != ACE_STDIN)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("stdin test failed.\n")));
+ test_status = -1;
+ }
+
+ fn = ACE_OS::fileno (stdout);
+ if (fn == ACE_INVALID_HANDLE)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("fileno(stdout) returned ACE_INVALID_HANDLE.\n")));
+ test_status = -1;
+ }
+ else
+#if defined (ACE_WIN32)
+ // Check if stdout is not associated with an output stream.
+ // This is not an error.
+ if (fn == reinterpret_cast<ACE_HANDLE>(-2))
+ {
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("fileno(stdout) returned -2.\n")));
+ }
+ else
+#endif
+ if (fn != ACE_STDOUT)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("stdout test failed.\n")));
+ test_status = -1;
+ }
+
+ fn = ACE_OS::fileno (stderr);
+ if (fn == ACE_INVALID_HANDLE)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("fileno(stderr) returned ACE_INVALID_HANDLE.\n")));
+ test_status = -1;
+ }
+ else
+#if defined (ACE_WIN32)
+ // Check if stderr is not associated with an output stream.
+ // This is not an error.
+ if (fn == reinterpret_cast<ACE_HANDLE>(-2))
+ {
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("fileno(stderr) returned -2.\n")));
+ }
+ else
+#endif
+ if (fn != ACE_STDERR)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("stderr test failed.\n")));
+ test_status = -1;
+ }
+
+ return test_status;
+}
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT ("Bug_3758_Regression_Test"));
+
+ int status = 0;
+ int result;
+
+ if ((result = fileno_test ()) != 0)
+ status = -1;
+
+ ACE_END_TEST;
+ return status;
+}
+#undef THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL
diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp
index a0192186797..ac8a7135a8b 100644
--- a/tests/Message_Queue_Test.cpp
+++ b/tests/Message_Queue_Test.cpp
@@ -123,7 +123,7 @@ Counting_Test_Producer::svc (void)
// correct.
// Also, to be sure there's not just 1 producer and 1 consumer pinging
// back and forth, make the producers randomly delay between blocks.
- ACE_OS::srand ((u_int)ACE_Thread::self ());
+ ACE_OS::srand ((u_int) ACE_OS::time ());
int multiple = ACE_OS::rand () % 10;
int delay_ms = (ACE_OS::rand () % 10) / 2;
// The delay usually causes the test to time out in the automated
@@ -213,9 +213,11 @@ Counting_Test_Consumer::svc (void)
// a calculated number of blocks then stop; the test checker will determine
// if the number consumed plus the number remaining is correct for the
// number produced.
- ACE_OS::srand ((u_int)ACE_Thread::self ());
- int multiple = ACE_OS::rand () % 10;
- int delay_ms = ACE_OS::rand () % 10;
+
+ ACE_RANDR_TYPE seed = ACE_OS::time ();
+
+ int multiple = ACE_OS::rand_r (seed) % 10;
+ int delay_ms = ACE_OS::rand_r (seed) % 10;
// The delay usually causes the test to time out in the automated
// regression testing. I just left it here in case it's needed someday.
delay_ms = 0;
diff --git a/tests/OS_Test.cpp b/tests/OS_Test.cpp
index 7d74d5baf5d..cca9e59048a 100644
--- a/tests/OS_Test.cpp
+++ b/tests/OS_Test.cpp
@@ -67,76 +67,6 @@ access_test (void)
return test_status;
}
-// Test ACE_OS::fileno()
-int
-fileno_test (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Testing fileno method\n")));
-
- int test_status = 0;
-
- ACE_HANDLE fn;
-
- fn = ACE_OS::fileno (stdin);
- if (fn == ACE_INVALID_HANDLE)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("fileno(stdin) returned ACE_INVALID_HANDLE.\n")));
- test_status = -1;
- }
- else if (fn != ACE_STDIN)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("stdin test failed.\n")));
- test_status = -1;
- }
-
- fn = ACE_OS::fileno (stdout);
- if (fn == ACE_INVALID_HANDLE)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("fileno(stdout) returned ACE_INVALID_HANDLE.\n")));
- test_status = -1;
- }
- else
-#if defined (ACE_WIN32)
- // Check if stdout is not associated with an output stream.
- // This is not an error.
- if (fn == reinterpret_cast<ACE_HANDLE>(-2))
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("fileno(stdout) returned -2.\n")));
- }
- else
-#endif
- if (fn != ACE_STDOUT)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("stdout test failed.\n")));
- test_status = -1;
- }
-
- fn = ACE_OS::fileno (stderr);
- if (fn == ACE_INVALID_HANDLE)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("fileno(stderr) returned ACE_INVALID_HANDLE.\n")));
- test_status = -1;
- }
- else
-#if defined (ACE_WIN32)
- // Check if stderr is not associated with an output stream.
- // This is not an error.
- if (fn == reinterpret_cast<ACE_HANDLE>(-2))
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("fileno(stderr) returned -2.\n")));
- }
- else
-#endif
- if (fn != ACE_STDERR)
- {
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("stderr test failed.\n")));
- test_status = -1;
- }
-
- return test_status;
-}
-
// Test ACE_OS::rename to be sure the files come and go as expected.
int
rename_test (void)
@@ -1290,9 +1220,6 @@ run_main (int, ACE_TCHAR *[])
if ((result = access_test ()) != 0)
status = result;
- if ((result = fileno_test ()) != 0)
- status = result;
-
if ((result = rename_test ()) != 0)
status = result;
diff --git a/tests/run_test.lst b/tests/run_test.lst
index b50e9641cb9..e0f46cdcbe8 100644
--- a/tests/run_test.lst
+++ b/tests/run_test.lst
@@ -57,6 +57,7 @@ Bug_3709_Regression_Test: !LabVIEW_RT
Bug_3710_Regression_Test
Bug_3729_Regression_Test: !FIXED_BUGS_ONLY
Bug_3744_Regression_Test: !FIXED_BUGS_ONLY
+Bug_3758_Regression_Test: !FIXED_BUGS_ONLY
CDR_Array_Test: !ACE_FOR_TAO
CDR_File_Test: !ACE_FOR_TAO
CDR_Test
@@ -130,7 +131,7 @@ Message_Queue_Test_Ex: !ACE_FOR_TAO
Multicast_Test: !ST !NO_MCAST !nsk !LynxOS !LabVIEW_RT
Multihomed_INET_Addr_Test: !ACE_FOR_TAO
Naming_Test: !NO_OTHER !LynxOS !Unicos !VxWorks !nsk !ACE_FOR_TAO !PHARLAP
-Network_Adapters_Test: !LynxOS !ACE_FOR_TAO
+Network_Adapters_Test: !ACE_FOR_TAO
New_Fail_Test: ALL !DISABLED
NonBlocking_Conn_Test
Notification_Queue_Unit_Test
@@ -224,7 +225,7 @@ Multihomed_INET_Addr_Test_IPV6: !nsk !ACE_FOR_TAO
Proactor_Test_IPV6: !nsk !ACE_FOR_TAO !BAD_AIO
SOCK_Send_Recv_Test_IPV6
SOCK_Dgram_Test: !NO_NETWORK
-SOCK_Dgram_Bcast_Test: !LynxOS !ACE_FOR_TAO
+SOCK_Dgram_Bcast_Test: !ACE_FOR_TAO
SOCK_SEQPACK_SCTP_Test: !MSVC !nsk !ACE_FOR_TAO
SOCK_Test_IPv6: !nsk
Process_Strategy_Test: !VxWorks !LynxOS !ACE_FOR_TAO !PHARLAP
diff --git a/tests/tests.mpc b/tests/tests.mpc
index fce9730d22b..48032006dc6 100644
--- a/tests/tests.mpc
+++ b/tests/tests.mpc
@@ -398,6 +398,13 @@ project(Bug_3744_Regression_Test) : acetest {
}
}
+project(Bug_3758_Regression_Test) : acetest {
+ exename = Bug_3758_Regression_Test
+ Source_Files {
+ Bug_3758_Regression_Test.cpp
+ }
+}
+
project(Cache Map Manager Test) : acetest {
exename = Cache_Map_Manager_Test
Source_Files {