summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore13
-rw-r--r--.travis.yml44
-rw-r--r--ACE/NEWS8
-rw-r--r--ACE/THANKS2
-rw-r--r--ACE/ace/Log_Record.cpp2
-rw-r--r--ACE/ace/OS_NS_time.inl2
-rw-r--r--ACE/ace/Process.cpp99
-rw-r--r--ACE/ace/Time_Value.h127
-rw-r--r--ACE/ace/Time_Value.inl158
-rw-r--r--ACE/ace/config-win32-msvc-14.h7
-rw-r--r--ACE/bin/MakeProjectCreator/templates/gnu.mpd4
-rwxr-xr-xACE/bin/depgen.pl2
-rw-r--r--ACE/examples/Reactor/TP_Reactor/client.cpp4
-rw-r--r--ACE/netsvcs/servers/main.cpp32
-rw-r--r--ACE/tests/Bug_3709_Regression_Test.cpp5
-rw-r--r--ACE/tests/Chrono_Test.cpp592
-rw-r--r--ACE/tests/Compiler_Features_12_Test.cpp15
-rw-r--r--ACE/tests/run_test.lst1
-rw-r--r--ACE/tests/tests.mpc7
-rw-r--r--README.md399
-rw-r--r--TAO/TAO_IDL/driver/drv_args.cpp6
-rw-r--r--TAO/TAO_IDL/driver/drv_preproc.cpp8
-rw-r--r--TAO/TAO_IDL/tao_idl.cpp4
-rw-r--r--TAO/TAO_IDL/tao_idl.mpc9
-rw-r--r--TAO/TAO_IDL/tao_idl_be.mpc281
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp2
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp33
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h6
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp5
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp8
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/Log_i.cpp53
-rw-r--r--TAO/tao/PortableServer/PortableServer_Functions.cpp7
-rw-r--r--TAO/tao/Unbounded_Reference_Allocation_Traits_T.h8
-rw-r--r--TAO/tests/DynAny_Test/test_dynany.cpp12
35 files changed, 1783 insertions, 189 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..d883e988d6a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+# Ignore Windows, Visual Studio solution/project files and build artifacts.
+*.sln
+*.vcxproj*
+*.tlog
+*.log
+*.obj
+*.ilk
+*.exe
+*.dll
+*.lib
+*.exp
+*.[ip]db
+
diff --git a/.travis.yml b/.travis.yml
index d7803fd7cfe..a590f9abae0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,30 +1,56 @@
language: cpp
compiler:
- gcc
- - clang
env:
+ matrix:
+ - CORBAEMICRO=1 ACEFORTAO=0
+ - CORBAECOMPACT=1 ACEFORTAO=0
+ - ACEFORTAO=1
+ - CCMLW=0 ACEFORTAO=0
+ - CCMLW=1 ACEFORTAO=0
+ - CCMNOEVENT=1 ACEFORTAO=0
+ - ACETESTS=1 ACEFORTAO=0
global:
- - ACE_ROOT=$TRAVIS_BUILD_DIR/ACE
- - TAO_ROOT=$TRAVIS_BUILD_DIR/TAO
- - CIAO_ROOT=$TRAVIS_BUILD_DIR/CIAO
- - DANCE_ROOT=$TRAVIS_BUILD_DIR/DAnCE
- - MPC_ROOT=$TRAVIS_BUILD_DIR/MPC
- - LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
+ - ACE_ROOT=$TRAVIS_BUILD_DIR/ACE
+ - TAO_ROOT=$TRAVIS_BUILD_DIR/TAO
+ - CIAO_ROOT=$TRAVIS_BUILD_DIR/CIAO
+ - DANCE_ROOT=$TRAVIS_BUILD_DIR/DAnCE
+ - MPC_ROOT=$TRAVIS_BUILD_DIR/MPC
+ - LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libssl-dev libxerces-c-dev
- git clone git://github.com/DOCGroup/MPC.git
-
+branches:
+ only:
+ - master
before_script:
- export
- echo -e "#include \"ace/config-linux.h\"" >> $ACE_ROOT/ace/config.h
- - echo -e "workspace {\n\$(TAO_ROOT)/TAO_ACE.mwc\n\$(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc\n}\n" >> $TRAVIS_BUILD_DIR/travis.mwc
+ - echo -e "workspace {\n\$(TAO_ROOT)/TAO_ACE.mwc\n\$(TAO_ROOT)/tests/Hello\n" >> $TRAVIS_BUILD_DIR/travis.mwc
+ - if [ "$ACEFORTAO" == "0" ]; then echo -e "\$(CIAO_ROOT)/CIAO_TAO_DAnCE.mwc\n" >> $TRAVIS_BUILD_DIR/travis.mwc; fi
+ - if [ "$ACETESTS" == "1" ]; then echo -e "\$(ACE_ROOT)/tests\n" >> $TRAVIS_BUILD_DIR/travis.mwc; fi
+ - echo -e "}\n" >> $TRAVIS_BUILD_DIR/travis.mwc
+ - if [ "$CORBAEMICRO" == "1" ]; then echo -e "corba_e_micro=1" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU; fi
+ - if [ "$CORBAEMICRO" == "1" ]; then echo -e "corba_e_micro=1" >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features; fi
+ - if [ "$CORBAECOMPACT" == "1" ]; then echo -e "corba_e_compact=1" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU; fi
+ - if [ "$CORBAECOMPACT" == "1" ]; then echo -e "corba_e_compact=1" >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features; fi
+ - if [ "$ACEFORTAO" == "1" ]; then echo -e "ace_for_tao=1" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU; fi
+ - if [ "$ACEFORTAO" == "1" ]; then echo -e "ace_for_tao=1" >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features; fi
+ - if [ "$CCMLW" == "1" ]; then echo -e "ccm_lw=1" >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features; fi
+ - if [ "$CCMNOEVENT" == "1" ]; then echo -e "ccm_noevent=1" >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features; fi
- echo -e "xerces3=1\nssl=1\n" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
- echo -e "xerces3=1\nssl=1\n" >> $ACE_ROOT/bin/MakeProjectCreator/config/default.features
+ - echo -e "TAO/tests/Hello/run_test.pl" >> $TAO_ROOT/bin/travis-ci.lst
- if [ "$CXX" == "g++" ]; then echo -e "include \$(ACE_ROOT)/include/makeinclude/platform_linux.GNU" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU; fi
- if [ "$CXX" == "clang++" ]; then echo -e "include \$(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU; fi
+ - cat $TRAVIS_BUILD_DIR/travis.mwc
+ - cat $ACE_ROOT/bin/MakeProjectCreator/config/default.features
+ - cat $ACE_ROOT/ace/config.h
+ - cat $ACE_ROOT/include/makeinclude/platform_macros.GNU
script:
- perl $ACE_ROOT/bin/mwc.pl -type gnuace -workers 2 travis.mwc
- make -j 2
+ - perl $ACE_ROOT/bin/auto_run_tests.pl -l $TAO_ROOT/bin/travis-ci.lst
diff --git a/ACE/NEWS b/ACE/NEWS
index ca95cd212f7..ead8d8db44f 100644
--- a/ACE/NEWS
+++ b/ACE/NEWS
@@ -1,6 +1,14 @@
USER VISIBLE CHANGES BETWEEN ACE-6.3.1 and ACE-6.3.2
====================================================
+. Added support for std::chrono to ACE_Time_Value. It's
+ now possible to construct an ACE_Time_Value with a
+ std::duration. Also streaming, adding and substracting
+ an ACE_Time_Value to and from a std::duration is
+ supported. Please see tests/Chrono_Test.cpp for more
+ details.
+
+
USER VISIBLE CHANGES BETWEEN ACE-6.3.0 and ACE-6.3.1
====================================================
diff --git a/ACE/THANKS b/ACE/THANKS
index 360df16d7d2..bbbb98c2347 100644
--- a/ACE/THANKS
+++ b/ACE/THANKS
@@ -2392,6 +2392,8 @@ Michael Dille <mdille3 at andrew dot cmu dot edu>
Sebastian Perk <Sebastian dot Perk at hydrometer dot de>
David Lifshitz <dlifshitz at macadamian dot com>
Milo H. Fields <mfields at paladin-sys dot com>
+Thomas Schmidt <TC dot Schmidt at gmx dot net>
+Joe Zendle <jzendle at gmail dot com>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson in the early 1990's. Paul devised the recursive Makefile
diff --git a/ACE/ace/Log_Record.cpp b/ACE/ace/Log_Record.cpp
index bbf28618d5d..1c6a67294db 100644
--- a/ACE/ace/Log_Record.cpp
+++ b/ACE/ace/Log_Record.cpp
@@ -360,7 +360,7 @@ operator>> (ACE_InputCDR &cdr,
&& (cdr >> buffer_len)) {
ACE_TCHAR *log_msg;
ACE_NEW_RETURN (log_msg, ACE_TCHAR[buffer_len + 1], -1);
- auto_ptr<ACE_TCHAR> log_msg_p (log_msg);
+ ACE_Auto_Array_Ptr<ACE_TCHAR> log_msg_p (log_msg);
log_record.type (type);
log_record.pid (pid);
log_record.time_stamp (ACE_Time_Value (ACE_Utils::truncate_cast<time_t> (sec),
diff --git a/ACE/ace/OS_NS_time.inl b/ACE/ace/OS_NS_time.inl
index be68f3babad..ab3fd7ec7bb 100644
--- a/ACE/ace/OS_NS_time.inl
+++ b/ACE/ace/OS_NS_time.inl
@@ -371,7 +371,7 @@ ACE_OS::gmtime_r (const time_t *t, struct tm *res)
ACE_OS_TRACE ("ACE_OS::gmtime_r");
#if defined (ACE_HAS_REENTRANT_FUNCTIONS)
ACE_OSCALL_RETURN (::gmtime_r (t, res), struct tm *, 0);
-#elif defined (ACE_HAS_TR24731_2005_CRT) && !defined (ACE_WIN32_VC14)
+#elif defined (ACE_HAS_TR24731_2005_CRT)
struct tm *tm_p = res;
ACE_SECURECRTCALL (gmtime_s (res, t), struct tm *, 0, tm_p);
return tm_p;
diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp
index f10c11c358c..761064b174d 100644
--- a/ACE/ace/Process.cpp
+++ b/ACE/ace/Process.cpp
@@ -1141,32 +1141,47 @@ ACE_Process_Options::set_handles (ACE_HANDLE std_in,
if (std_err == ACE_INVALID_HANDLE)
std_err = ACE_STDERR;
- if (!::DuplicateHandle (::GetCurrentProcess (),
- std_in,
- ::GetCurrentProcess (),
- &this->startup_info_.hStdInput,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return -1;
+ // STD handles may have value 0 (not ACE_INVALID_HANDLE) if there is no such
+ // handle in the process. This was observed to occur for stdin in console
+ // processes that were launched from services. In this case we need to make
+ // sure not to return -1 from setting std_in so that we can process std_out
+ // and std_err.
- if (!::DuplicateHandle (::GetCurrentProcess (),
- std_out,
- ::GetCurrentProcess (),
- &this->startup_info_.hStdOutput,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return -1;
+ if (std_in)
+ {
+ if (!::DuplicateHandle (::GetCurrentProcess (),
+ std_in,
+ ::GetCurrentProcess (),
+ &this->startup_info_.hStdInput,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS))
+ return -1;
+ }
- if (!::DuplicateHandle (::GetCurrentProcess (),
- std_err,
- ::GetCurrentProcess (),
- &this->startup_info_.hStdError,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return -1;
+ if (std_out)
+ {
+ if (!::DuplicateHandle (::GetCurrentProcess (),
+ std_out,
+ ::GetCurrentProcess (),
+ &this->startup_info_.hStdOutput,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS))
+ return -1;
+ }
+
+ if (std_err)
+ {
+ if (!::DuplicateHandle (::GetCurrentProcess (),
+ std_err,
+ ::GetCurrentProcess (),
+ &this->startup_info_.hStdError,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS))
+ return -1;
+ }
#else /* ACE_WIN32 */
this->stdin_ = ACE_OS::dup (std_in);
this->stdout_ = ACE_OS::dup (std_out);
@@ -1365,42 +1380,12 @@ ACE_Process_Options::command_line_argv (void)
int
ACE_Process_Options::pass_handle (ACE_HANDLE h)
{
-# if defined (ACE_WIN32)
-# if defined (ACE_HAS_WINCE)
+#if defined (ACE_HAS_WINCE)
ACE_NOTSUP_RETURN (-1);
-# else
-
- // This is oriented towards socket handles... may need some adjustment
- // for non-sockets.
- // This is all based on an MSDN article:
- // http://support.microsoft.com/support/kb/articles/Q150/5/23.asp
- // If on Win95/98, the handle needs to be duplicated for the to-be-spawned
- // process. On WinNT, they get inherited by the child process automatically.
- // If the handle is duplicated, remember the duplicate so it can be
- // closed later. Can't be closed now, or the child won't get it.
- ACE_TEXT_OSVERSIONINFO osvi;
- ZeroMemory (&osvi, sizeof (osvi));
- osvi.dwOSVersionInfoSize = sizeof (ACE_TEXT_OSVERSIONINFO);
- // If this is Win95/98 or we can't tell, duplicate the handle.
- if (!ACE_TEXT_GetVersionEx (&osvi) || osvi.dwPlatformId != VER_PLATFORM_WIN32_NT)
- {
- HANDLE dup_handle;
- if (!DuplicateHandle (GetCurrentProcess (),
- static_cast<HANDLE> (h),
- GetCurrentProcess (),
- &dup_handle,
- 0,
- TRUE, // Inheritable
- DUPLICATE_SAME_ACCESS))
- return -1;
- dup_handles_.set_bit (static_cast<ACE_HANDLE> (dup_handle));
- }
-# endif /* ACE_HAS_WINCE */
-#endif /* ACE_WIN32 */
-
+#else
this->handles_passed_.set_bit (h);
-
return 0;
+#endif /* ACE_HAS_WINCE */
}
// Get a copy of the handles the ACE_Process_Options duplicated
diff --git a/ACE/ace/Time_Value.h b/ACE/ace/Time_Value.h
index bb0351c97be..4f7b011a3b0 100644
--- a/ACE/ace/Time_Value.h
+++ b/ACE/ace/Time_Value.h
@@ -21,6 +21,10 @@
# include "ace/os_include/os_time.h"
+#if defined (ACE_HAS_CPP11)
+#include <chrono>
+#endif /* ACE_HAS_CPP11 */
+
// Define some helpful constants.
// Not type-safe, and signed. For backward compatibility.
#define ACE_ONE_SECOND_IN_MSECS 1000L
@@ -78,6 +82,15 @@ public:
/// Construct the ACE_Time_Value object from a timespec_t.
explicit ACE_Time_Value (const timespec_t &t);
+#if defined (ACE_HAS_CPP11)
+ /// Construct the ACE_Time_Value object from a chrono duration.
+ template< class Rep, class Period >
+ explicit ACE_Time_Value (const std::chrono::duration<Rep, Period>& duration)
+ {
+ this->set (duration);
+ }
+#endif /* ACE_HAS_CPP11 */
+
/// Destructor
virtual ~ACE_Time_Value ();
@@ -100,10 +113,25 @@ public:
void set (const timespec_t &t);
# if defined (ACE_WIN32)
- /// Initializes the ACE_Time_Value object from a Win32 FILETIME.
+ /// Initializes the ACE_Time_Value object from a Win32 FILETIME.
void set (const FILETIME &ft);
# endif /* ACE_WIN32 */
+#if defined (ACE_HAS_CPP11)
+ /// Initializes the ACE_Time_Value object from a std::duration.
+ template< class Rep, class Period >
+ void set (const std::chrono::duration<Rep, Period>& duration)
+ {
+ std::chrono::seconds const s {
+ std::chrono::duration_cast<std::chrono::seconds> (duration)};
+
+ std::chrono::microseconds const usec {
+ std::chrono::duration_cast<std::chrono::microseconds>(
+ duration % std::chrono::seconds (1))};
+ this->set (s.count (), usec.count ());
+ }
+#endif /* ACE_HAS_CPP11 */
+
/// Converts from ACE_Time_Value format into milliseconds format.
/**
* @return Sum of second field (in milliseconds) and microsecond field
@@ -232,10 +260,10 @@ public:
/// Add @a tv to this.
ACE_Time_Value &operator += (time_t tv);
- /// Assign @ tv to this
+ /// Assign @a tv to this
ACE_Time_Value &operator = (const ACE_Time_Value &tv);
- /// Assign @ tv to this
+ /// Assign @a tv to this
ACE_Time_Value &operator = (time_t tv);
/// Subtract @a tv to this.
@@ -244,6 +272,39 @@ public:
/// Subtract @a tv to this.
ACE_Time_Value &operator -= (time_t tv);
+#if defined (ACE_HAS_CPP11)
+ /// Add @a std::duration to this.
+ template< class Rep, class Period >
+ ACE_Time_Value &operator += (const std::chrono::duration<Rep, Period>& duration)
+ {
+ const ACE_Time_Value tv (duration);
+ this->sec (this->sec () + tv.sec ());
+ this->usec (this->usec () + tv.usec ());
+ this->normalize ();
+ return *this;
+ }
+
+ /// Assign @a std::duration to this
+ template< class Rep, class Period >
+ ACE_Time_Value &operator = (const std::chrono::duration<Rep, Period>& duration)
+ {
+ this->set (duration);
+ return *this;
+ }
+
+ /// Subtract @a std::duration to this.
+ template< class Rep, class Period >
+ ACE_Time_Value &operator -= (const std::chrono::duration<Rep, Period>& duration)
+ {
+ const ACE_Time_Value tv (duration);
+ this->sec (this->sec () - tv.sec ());
+ this->usec (this->usec () - tv.usec ());
+ this->normalize ();
+ return *this;
+ }
+#endif /* ACE_HAS_CPP11 */
+
+
/**
\brief Multiply the time value by the @a d factor.
\note The result of the operator is valid for results from range
@@ -410,6 +471,66 @@ extern ACE_Export ostream &operator<<( ostream &o, const ACE_Time_Value &v );
ACE_END_VERSIONED_NAMESPACE_DECL
+#if defined (ACE_HAS_CPP11)
+
+// Additional chrono operators.
+
+namespace std
+{
+ namespace chrono
+ {
+ /**
+ * @name Streaming ACE_Time_Value to chrono
+ *
+ * Streaming an ACE_Time_Value into one of the chrono types (nanoseconds,
+ * microseconds, milliseconds, seconds, minutes, or hours).
+ *
+ */
+ //@{
+ nanoseconds& operator <<(nanoseconds &ns, ACE_Time_Value const &tv);
+ microseconds& operator <<(microseconds &us, ACE_Time_Value const &tv);
+ milliseconds& operator <<(milliseconds &ms, ACE_Time_Value const &tv);
+ seconds& operator <<(seconds &s, ACE_Time_Value const &tv);
+ minutes& operator <<(minutes &m, ACE_Time_Value const &tv);
+ hours& operator <<(hours &h, ACE_Time_Value const &tv);
+ //@}
+
+ /**
+ * @name Adding ACE_Time_Value to chrono
+ *
+ * Adding an ACE_Time_Value to one of the chrono types (nanoseconds,
+ * microseconds, milliseconds, seconds, minutes, or hours).
+ *
+ */
+ //@{
+ nanoseconds& operator +=(nanoseconds &ns, ACE_Time_Value const &tv);
+ microseconds& operator +=(microseconds &us, ACE_Time_Value const &tv);
+ milliseconds& operator +=(milliseconds &ms, ACE_Time_Value const &tv);
+ seconds& operator +=(seconds &s, ACE_Time_Value const &tv);
+ minutes& operator +=(minutes &m, ACE_Time_Value const &tv);
+ hours& operator +=(hours &h, ACE_Time_Value const &tv);
+ //@}
+
+ /**
+ * @name Substracting ACE_Time_Value from chrono
+ *
+ * Substracting an ACE_Time_Value from one of the chrono types (nanoseconds,
+ * microseconds, milliseconds, seconds, minutes, or hours).
+ *
+ */
+ //@{
+ nanoseconds& operator -=(nanoseconds &ns, ACE_Time_Value const &tv);
+ microseconds& operator -=(microseconds &us, ACE_Time_Value const &tv);
+ milliseconds& operator -=(milliseconds &ms, ACE_Time_Value const &tv);
+ seconds& operator -=(seconds &s, ACE_Time_Value const &tv);
+ minutes& operator -=(minutes &m, ACE_Time_Value const &tv);
+ hours& operator -=(hours &h, ACE_Time_Value const &tv);
+ //@}
+ }
+}
+
+#endif /* ACE_HAS_CPP11 */
+
#if defined (__ACE_INLINE__)
#include "ace/Time_Value.inl"
#endif /* __ACE_INLINE__ */
diff --git a/ACE/ace/Time_Value.inl b/ACE/ace/Time_Value.inl
index eaed073f45d..a4b095033e7 100644
--- a/ACE/ace/Time_Value.inl
+++ b/ACE/ace/Time_Value.inl
@@ -393,3 +393,161 @@ operator - (const ACE_Time_Value &tv1,
}
ACE_END_VERSIONED_NAMESPACE_DECL
+
+#if defined (ACE_HAS_CPP11)
+
+// Additional chrono streaming operators.
+
+namespace std
+{
+ namespace chrono
+ {
+ ACE_INLINE nanoseconds&
+ operator <<(nanoseconds &ns, ACE_Time_Value const &tv)
+ {
+ ns = duration_cast<nanoseconds>(seconds{tv.sec ()}) +
+ duration_cast<nanoseconds>(microseconds{tv.usec()});
+ return ns;
+ }
+
+ ACE_INLINE microseconds&
+ operator <<(microseconds &us, ACE_Time_Value const &tv)
+ {
+ us= duration_cast<microseconds>(seconds{tv.sec ()}) +
+ microseconds{tv.usec()};
+ return us;
+ }
+
+ ACE_INLINE milliseconds&
+ operator <<(milliseconds &ms, ACE_Time_Value const &tv)
+ {
+ ms = duration_cast<milliseconds>(seconds{tv.sec ()}) +
+ duration_cast<milliseconds>(microseconds{tv.usec()});
+ return ms;
+ }
+
+ ACE_INLINE seconds&
+ operator <<(seconds &s, ACE_Time_Value const &tv)
+ {
+ s = seconds{tv.sec ()} +
+ duration_cast<seconds>(microseconds{tv.usec()});
+ return s;
+ }
+
+ ACE_INLINE minutes&
+ operator <<(minutes &m, ACE_Time_Value const &tv)
+ {
+ m = duration_cast<minutes>(seconds{tv.sec ()}) +
+ duration_cast<minutes>(microseconds{tv.usec()});
+ return m;
+ }
+
+ ACE_INLINE hours&
+ operator <<(hours &h, ACE_Time_Value const &tv)
+ {
+ h = duration_cast<hours>(seconds{tv.sec ()}) +
+ duration_cast<hours>(microseconds{tv.usec()});
+ return h;
+ }
+
+
+ ACE_INLINE nanoseconds&
+ operator +=(nanoseconds &ns, ACE_Time_Value const &tv)
+ {
+ ns += duration_cast<nanoseconds>(seconds{tv.sec ()}) +
+ duration_cast<nanoseconds>(microseconds{tv.usec()});
+ return ns;
+ }
+
+ ACE_INLINE microseconds&
+ operator +=(microseconds &us, ACE_Time_Value const &tv)
+ {
+ us += duration_cast<microseconds>(seconds{tv.sec ()}) +
+ microseconds{tv.usec()};
+ return us;
+ }
+
+ ACE_INLINE milliseconds&
+ operator +=(milliseconds &ms, ACE_Time_Value const &tv)
+ {
+ ms += duration_cast<milliseconds>(seconds{tv.sec ()}) +
+ duration_cast<milliseconds>(microseconds{tv.usec()});
+ return ms;
+ }
+
+ ACE_INLINE seconds&
+ operator +=(seconds &s, ACE_Time_Value const &tv)
+ {
+ s += seconds{tv.sec ()} +
+ duration_cast<seconds>(microseconds{tv.usec()});
+ return s;
+ }
+
+ ACE_INLINE minutes&
+ operator +=(minutes &m, ACE_Time_Value const &tv)
+ {
+ m += duration_cast<minutes>(seconds{tv.sec ()}) +
+ duration_cast<minutes>(microseconds{tv.usec()});
+ return m;
+ }
+
+ ACE_INLINE hours&
+ operator +=(hours &h, ACE_Time_Value const &tv)
+ {
+ h += duration_cast<hours>(seconds{tv.sec ()}) +
+ duration_cast<hours>(microseconds{tv.usec()});
+ return h;
+ }
+
+
+ ACE_INLINE nanoseconds&
+ operator -=(nanoseconds &ns, ACE_Time_Value const &tv)
+ {
+ ns -= duration_cast<nanoseconds>(seconds{tv.sec ()}) +
+ duration_cast<nanoseconds>(microseconds{tv.usec()});
+ return ns;
+ }
+
+ ACE_INLINE microseconds&
+ operator -=(microseconds &us, ACE_Time_Value const &tv)
+ {
+ us -= duration_cast<microseconds>(seconds{tv.sec ()}) +
+ microseconds{tv.usec()};
+ return us;
+ }
+
+ ACE_INLINE milliseconds&
+ operator -=(milliseconds &ms, ACE_Time_Value const &tv)
+ {
+ ms -= duration_cast<milliseconds>(seconds{tv.sec ()}) +
+ duration_cast<milliseconds>(microseconds{tv.usec()});
+ return ms;
+ }
+
+ ACE_INLINE seconds&
+ operator -=(seconds &s, ACE_Time_Value const &tv)
+ {
+ s -= seconds{tv.sec ()} +
+ duration_cast<seconds>(microseconds{tv.usec()});
+ return s;
+ }
+
+ ACE_INLINE minutes&
+ operator -=(minutes &m, ACE_Time_Value const &tv)
+ {
+ m -= duration_cast<minutes>(seconds{tv.sec ()}) +
+ duration_cast<minutes>(microseconds{tv.usec()});
+ return m;
+ }
+
+ ACE_INLINE hours&
+ operator -=(hours &h, ACE_Time_Value const &tv)
+ {
+ h -= duration_cast<hours>(seconds{tv.sec ()}) +
+ duration_cast<hours>(microseconds{tv.usec()});
+ return h;
+ }
+ }
+}
+
+#endif /* ACE_HAS_CPP11 */
diff --git a/ACE/ace/config-win32-msvc-14.h b/ACE/ace/config-win32-msvc-14.h
index bac3aac0642..7aeaf75d5bf 100644
--- a/ACE/ace/config-win32-msvc-14.h
+++ b/ACE/ace/config-win32-msvc-14.h
@@ -5,7 +5,7 @@
*
* @brief Microsoft Visual C++ 14.0 configuration file.
*
- * This file is the ACE configuration file for Microsoft Visual C++ version 14.
+ * This file is the ACE configuration file for Microsoft Visual C++ version 2015.
*
* @note Do not include this file directly, include config-win32.h instead.
*/
@@ -29,11 +29,14 @@
#define ACE_HAS_POSIX_TIME 1
#define ACE_LACKS_TIMESPEC_T 1
-// According to MS the Visual Studio 2014 C-runtime has a
+// According to MS the Visual Studio 2015 C-runtime has a
// C99 compliant vsnprintf/vsnwprintf, this is a change compared to
// previous versions
#define ACE_HAS_C99_VSNPRINTF
#define ACE_HAS_C99_VSNWPRINTF
+// Visual Studio 2015 has 3 parameter wcstok
+#define ACE_HAS_3_PARAM_WCSTOK
+
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_WIN32_MSVC_14_H */
diff --git a/ACE/bin/MakeProjectCreator/templates/gnu.mpd b/ACE/bin/MakeProjectCreator/templates/gnu.mpd
index b00f280ac0c..bf5278c0d14 100644
--- a/ACE/bin/MakeProjectCreator/templates/gnu.mpd
+++ b/ACE/bin/MakeProjectCreator/templates/gnu.mpd
@@ -794,10 +794,14 @@ UNAME := $(shell uname)
ifeq ($(UNAME), HP-UX)
LDFLAGS += -Wl,+s,+b,$(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS)
else
+ifeq ($(UNAME), Darwin)
+LDFLAGS += -Wl,-rpath $(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS)
+else
LDFLAGS += -Wl,-R$(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS)
endif
endif
endif
+endif
<%if(install_this_target)%>
PRJINST_OPTIONS ?=
diff --git a/ACE/bin/depgen.pl b/ACE/bin/depgen.pl
index e3deb7e92ca..2ebecf942a0 100755
--- a/ACE/bin/depgen.pl
+++ b/ACE/bin/depgen.pl
@@ -7,7 +7,7 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
# Description : Generate dependencies for GNU Make and NMake.
# Author : Chad Elliott
# Create Date : 5/06/2002
-#
+#
# ************************************************************
# ************************************************************
diff --git a/ACE/examples/Reactor/TP_Reactor/client.cpp b/ACE/examples/Reactor/TP_Reactor/client.cpp
index a946d6bef07..eb6deecf8ee 100644
--- a/ACE/examples/Reactor/TP_Reactor/client.cpp
+++ b/ACE/examples/Reactor/TP_Reactor/client.cpp
@@ -51,8 +51,8 @@ int ACE_TMAIN(int argc, ACE_TCHAR **argv) {
ACE_TEXT ("%N:%l: Failed to allocate ")
ACE_TEXT ("data buffer.\n")), -1);
- // put someData in an auto_ptr so it gets deleted automatically
- auto_ptr<char> pSomeData(someData);
+ // put someData in a kind of auto_ptr so it gets deleted automatically
+ ACE_Auto_Array_Ptr<char> pSomeData(someData);
// parse the <count> argument if available
if ((argc == 3) && (((count = ACE_OS::strtol(argv[2], 0, 10)) < 1) ||
diff --git a/ACE/netsvcs/servers/main.cpp b/ACE/netsvcs/servers/main.cpp
index 032b8c0f6a4..d102eeba99d 100644
--- a/ACE/netsvcs/servers/main.cpp
+++ b/ACE/netsvcs/servers/main.cpp
@@ -137,11 +137,19 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
sig_set.sig_add (SIGQUIT);
if (ACE_Reactor::instance ()->register_handler (sig_set,
&sa) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("register signals")));
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("register signals")),
+ 1);
+ }
else
- ACE_Reactor::instance ()->run_reactor_event_loop ();
+ {
+ ACE_Reactor::instance ()->run_reactor_event_loop ();
+
+ // Back from running the reactor we have to remove our signal handler
+ ACE_Reactor::instance ()->remove_handler (sig_set);
+ }
// Destructors of ACE_Service_Object_Ptr's automagically
// call fini().
@@ -161,11 +169,19 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
// Register ourselves to receive signals so we can shut down
// gracefully.
if (ACE_Reactor::instance ()->register_handler (sig_set, &sa) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("register signals2")));
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("register signals2")),
+ 1);
+ }
else
- ACE_Reactor::instance ()->run_reactor_event_loop ();
+ {
+ ACE_Reactor::instance ()->run_reactor_event_loop ();
+
+ // Back from running the reactor we have to remove our signal handler
+ ACE_Reactor::instance ()->remove_handler (sig_set);
+ }
}
return 0;
diff --git a/ACE/tests/Bug_3709_Regression_Test.cpp b/ACE/tests/Bug_3709_Regression_Test.cpp
index 51702af3cb2..9448a77d889 100644
--- a/ACE/tests/Bug_3709_Regression_Test.cpp
+++ b/ACE/tests/Bug_3709_Regression_Test.cpp
@@ -27,6 +27,11 @@ using namespace std;
#define BROKEN_TEMPLATE_TEMPLATE
#endif
+// HP aC++ 03.x fails this
+#if defined(__HP_aCC) && (__HP_aCC < 40000)
+#define BROKEN_TEMPLATE_TEMPLATE
+#endif
+
#ifndef BROKEN_TEMPLATE_TEMPLATE
template<template<typename U, typename = std::allocator<U> > class container, typename DT>
container<DT> initializer(const DT &d)
diff --git a/ACE/tests/Chrono_Test.cpp b/ACE/tests/Chrono_Test.cpp
new file mode 100644
index 00000000000..1963fce7824
--- /dev/null
+++ b/ACE/tests/Chrono_Test.cpp
@@ -0,0 +1,592 @@
+
+//=============================================================================
+/**
+ * @file Chrono_Test.cpp
+ *
+ * This is a test of the usage of 'std::chrono' throughout ACE
+ * The following items are tested:
+ * - ACE_OS::sleep
+ * - ACE_Time_Value
+ *
+ *
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+//=============================================================================
+
+
+#include "test_config.h"
+#include "ace/OS_NS_unistd.h"
+#include "ace/Time_Value.h"
+
+#if defined (ACE_HAS_CPP11)
+
+int
+test_assignments ()
+{
+ int errors {};
+ ACE_Time_Value tv { std::chrono::nanoseconds {100} };
+ if (tv.sec () != 0 || tv.usec () != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::nanoseconds (100) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=0,usec=0> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::nanoseconds {10005} };
+ if (tv.sec () != 0 || tv.usec () != 10)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::nanoseconds (10005) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=0,usec=10> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::microseconds {1} };
+ if (tv.sec () != 0 || tv.usec () != 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::microseconds (1) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=0,usec=1> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::microseconds {10005} };
+ if (tv.sec () != 0 || tv.usec () != 10005)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::microseconds (10005) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=0,usec=10005> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ std::chrono::milliseconds ms_test { tv.msec () };
+ if (ms_test.count () != 10)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after get_chrono_msec. ")
+ ACE_TEXT ("Expected <10> - got <%q>\n"),
+ ms_test.count ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::milliseconds {1} };
+ if (tv.sec () != 0 || tv.usec () != 1000)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::milliseconds (1) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=0,usec=1000> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::milliseconds {10005} };
+ if (tv.sec () != 10 || tv.usec () != 5000)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::milliseconds (10005) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=10,usec=5000> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::seconds {1} };
+ if (tv.sec () != 1 || tv.usec () != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::seconds (1) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=1,usec=0> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::seconds {10005} };
+ if (tv.sec () != 10005 || tv.usec () != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::seconds (10005) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=10005,usec=0> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::hours {1} };
+ if (tv.sec () != 3600 || tv.usec () != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::hours (1) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=3600,usec=0> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv = ACE_Time_Value { std::chrono::hours {10005} };
+ if (tv.sec () != 3600*10005 || tv.usec () != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("std::chrono::hours (10005) to an ACE_Time_Value. ")
+ ACE_TEXT ("<sec=%d,usec=0> - got <sec=%d,usec=%d>\n"),
+ 3600*10005, tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ // Two times half a day, 3 hours, 24 minutes, 54 seconds, 238 milliseconds,
+ // 754 microseconds and 342 nanoseconds.
+ std::chrono::duration<double, std::ratio<(24*3600)>> half_day {0.5};
+ std::chrono::microseconds const usec {
+ 2 * (
+ std::chrono::duration_cast<std::chrono::microseconds> (
+ half_day +
+ std::chrono::hours {3} + std::chrono::minutes {24} +
+ std::chrono::seconds {54} + std::chrono::milliseconds {238} +
+ std::chrono::microseconds {754} + std::chrono::nanoseconds {342}))
+ };
+
+
+ tv = ACE_Time_Value {usec};
+
+ // half a day 3 hours 24 minutes 54 seconds
+ time_t expected_sec = { ((12*3600) + (3*3600) + (24*60) + 54 ) * 2 };
+ // 238 milli usec 342 nano
+ suseconds_t expected_usec = { ((238*1000) + 754 + 0) * 2 };
+
+ if (tv.sec () != expected_sec || tv.usec () != expected_usec)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("two times half a day, 3 hours, 24 minutes, 54 seconds, ")
+ ACE_TEXT ("238 milliseconds, 754 microseconds and 342 nanoseconds ")
+ ACE_TEXT ("to an ACE_Time_Value. Expected <sec=%d,usec=%d> - ")
+ ACE_TEXT ("got <sec=%d,usec=%d>\n"),
+ expected_sec, expected_usec, tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ tv.set (std::chrono::milliseconds {1120});
+ if (tv.sec () != 1 || tv.usec () != 120 * std::kilo::num)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after converting ")
+ ACE_TEXT ("a std::chrono::milliseconds of 1120 to an ACE_Time_Value ")
+ ACE_TEXT ("Expected <sec=1,usec=120000> - got <sec=%d,usec=%d>\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+
+ return errors;
+}
+
+int
+test_streamers ()
+{
+ int errors {};
+
+ // Three days, 13 hours, 54 seconds, 25 milliseconds and 132 microseconds
+ constexpr int nr_hours { (3*24) + 13 };
+
+ std::chrono::hours day_test_h {nr_hours};
+ std::chrono::seconds day_test_s {54};
+ std::chrono::milliseconds day_test_ms {25};
+ std::chrono::microseconds day_test_us {132};
+
+ std::chrono::seconds day_test_ts { day_test_h+day_test_s };
+ std::chrono::microseconds day_test_tus { day_test_ms+day_test_us };
+ ACE_Time_Value const test_day {
+ ACE_Time_Value { day_test_ts.count (), day_test_tus.count () }};
+
+ constexpr int expected_min {nr_hours * 60};
+ constexpr int64_t expected_sec { expected_min * 60 + 54 };
+ constexpr int64_t expected_msec { (expected_sec * std::kilo::num) + 25 };
+ constexpr int64_t expected_usec { (expected_msec * std::kilo::num) + 132 };
+ constexpr int64_t expected_nsec { (expected_usec * std::kilo::num) };
+
+ std::chrono::hours h;
+ h << test_day;
+ if (h.count () != nr_hours)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::hours. Expected <%d> - got <%q>.\n"),
+ test_day.sec (), test_day.usec (), nr_hours, h.count ()));
+ ++errors;
+ }
+
+ std::chrono::minutes m;
+ m << test_day;
+ if (m.count () != expected_min)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::minutes. Expected <%d> - got <%q>.\n"),
+ test_day.sec (), test_day.usec (), expected_min, m.count ()));
+ ++errors;
+ }
+
+ std::chrono::seconds s;
+ s << test_day;
+ if (s.count () != expected_sec)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::seconds. Expected <%q> - got <%q>.\n"),
+ test_day.sec (), test_day.usec (), expected_sec, s.count ()));
+ ++errors;
+ }
+
+ std::chrono::milliseconds ms;
+ ms << test_day;
+ if (ms.count () != expected_msec)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::milliseconds. Expected <%q> - got <%q>.\n"),
+ test_day.sec (), test_day.usec (), expected_msec, ms.count ()));
+ ++errors;
+ }
+
+ std::chrono::microseconds us;
+ us << test_day;
+ if (us.count () != expected_usec)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::microseconds. Expected <%q> - got <%q>.\n"),
+ test_day.sec (), test_day.usec (), expected_usec, us.count ()));
+ ++errors;
+ }
+
+ std::chrono::nanoseconds ns;
+ ns << test_day;
+ if (ns.count () != expected_nsec)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::nanoseconds. Expected <%q> - got <%q>.\n"),
+ test_day.sec (), test_day.usec (), expected_nsec, ns.count ()));
+ ++errors;
+ }
+
+
+
+ ACE_Time_Value const test_sec {12, 132};
+ // Seconds
+ s << test_sec;
+ if (s.count () != 12)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::seconds. Expected <%d> - got <%q>.\n"),
+ test_sec.sec (), test_sec.usec (), test_sec.sec (), s.count ()));
+ ++errors;
+ }
+
+ ACE_Time_Value const test_sec2 { ACE_Time_Value {12, 6 * std::mega::num} };
+ std::chrono::seconds s2;
+ s2 << test_sec2;
+ if (s2.count () != 18)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::seconds. Expected <%d> - got <%q>.\n"),
+ test_sec2.sec (), test_sec2.usec (), test_sec2.sec (), s2.count ()));
+ ++errors;
+ }
+
+ // Milliseconds
+ ms << test_sec;
+ if (ms.count () != 12 * std::kilo::num)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::milliseconds. Expected <%d> - got <%q>.\n"),
+ test_sec.sec (), test_sec.usec (), 12000, ms.count ()));
+ ++errors;
+ }
+
+ std::chrono::milliseconds ms2;
+ ms2 << test_sec2;
+ if (ms2.count () != 18 * std::kilo::num)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::milliseconds. Expected <%d> - got <%q>.\n"),
+ test_sec2.sec (), test_sec2.usec (), 18000, ms2.count ()));
+ ++errors;
+ }
+
+ // Microseconds
+ us << test_sec;
+ if (us.count () != (12 * std::mega::num) + 132)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::microseconds. Expected <%d> - got <%q>.\n"),
+ test_sec.sec (), test_sec.usec (), test_sec.sec (), us.count ()));
+ ++errors;
+ }
+
+ std::chrono::microseconds us2;
+ us2 << test_sec2;
+ if (us2.count () != 18 * std::mega::num)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after streaming an ")
+ ACE_TEXT ("ACE_Time_Value <sec=%d,usec=%d> into ")
+ ACE_TEXT ("std::chrono::microseconds. Expected <%d> - got <%q>.\n"),
+ test_sec2.sec (), test_sec2.usec (), test_sec2.sec (), us2.count ()));
+ ++errors;
+ }
+
+ return errors;
+}
+
+int
+test_ace_time_value_operators ()
+{
+ int errors {};
+
+ std::chrono::seconds const sec {2};
+ std::chrono::microseconds const usec {3000};
+
+ std::chrono::milliseconds const msec {
+ std::chrono::duration_cast<std::chrono::milliseconds>(sec) +
+ std::chrono::duration_cast<std::chrono::milliseconds>(usec) };
+
+
+ ACE_Time_Value tv;
+ tv = msec;
+ tv += std::chrono::milliseconds {300};
+ if (tv.sec () != 2 || tv.usec () != 303 * std::kilo::num)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding a duration ")
+ ACE_TEXT ("of 300 ms. Expected <sec=2,usec=3300> - got <sec=%d,")
+ ACE_TEXT ("usec=%d>.\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+ tv -= std::chrono::microseconds {400};
+ if (tv.sec () != 2 || tv.usec () != 302600)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting a duration ")
+ ACE_TEXT ("of 400 us. Expected <sec=2,usec=3300> - got <sec=%d,")
+ ACE_TEXT ("usec=%d>.\n"),
+ tv.sec (), tv.usec ()));
+ ++errors;
+ }
+ return errors;
+}
+
+int
+test_chrono_operators ()
+{
+ int errors {};
+
+ std::chrono::hours hr {1};
+ ACE_Time_Value const tv_hr {3645, 0};
+ hr += tv_hr;
+ if (hr.count () != 2)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::hours of 1. ")
+ ACE_TEXT ("Expected <2> - got <%d>.\n"),
+ tv_hr.sec (), tv_hr.usec (), hr.count ()));
+ ++errors;
+ }
+
+ hr -= tv_hr;
+ if (hr.count () != 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::hours of 2. ")
+ ACE_TEXT ("Expected <1> - got <%d>.\n"),
+ tv_hr.sec (), tv_hr.usec (), hr.count ()));
+ ++errors;
+ }
+
+
+ std::chrono::minutes mn {1};
+ ACE_Time_Value const tv_min {75, 0};
+ mn += tv_min;
+ if (mn.count () != 2)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::minutes of 1. ")
+ ACE_TEXT ("Expected <2> - got <%d>.\n"),
+ tv_min.sec (), tv_min.usec (), mn.count ()));
+ ++errors;
+ }
+
+ mn -= tv_min;
+ if (mn.count () != 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::minutes of 2. ")
+ ACE_TEXT ("Expected <1> - got <%d>.\n"),
+ tv_min.sec (), tv_min.usec (), mn.count ()));
+ ++errors;
+ }
+
+ std::chrono::seconds sec {1};
+ ACE_Time_Value const tv_sec {1, std::mega::num};
+ sec += tv_sec;
+ if (sec.count () != 3)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::seconds of 1. ")
+ ACE_TEXT ("Expected <3> - got <%d>.\n"),
+ tv_sec.sec (), tv_sec.usec (), sec.count ()));
+ ++errors;
+ }
+
+ sec -= tv_sec;
+ if (sec.count () != 1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::seconds of 3. ")
+ ACE_TEXT ("Expected <1> - got <%d>.\n"),
+ tv_sec.sec (), tv_sec.usec (), sec.count ()));
+ ++errors;
+ }
+
+ std::chrono::milliseconds msec {400};
+ ACE_Time_Value const tv_msec {1, 3000};
+ msec += tv_msec;
+ if (msec.count () != 1403)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::milliseconds of 400. ")
+ ACE_TEXT ("Expected <1403> - got <%d>.\n"),
+ tv_msec.sec (), tv_msec.usec (), msec.count ()));
+ ++errors;
+ }
+
+ msec -= tv_msec;
+ if (msec.count () != 400)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::milliseconds of 1403. ")
+ ACE_TEXT ("Expected <400> - got <%d>.\n"),
+ tv_msec.sec (), tv_msec.usec (), msec.count ()));
+ ++errors;
+ }
+
+ std::chrono::microseconds usec {400};
+ ACE_Time_Value const tv_usec {0, 3000};
+ usec += tv_usec;
+ if (usec.count () != 3400)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::microseconds of 400. ")
+ ACE_TEXT ("Expected <3400> - got <%d>.\n"),
+ tv_usec.sec (), tv_usec.usec (), usec.count ()));
+ ++errors;
+ }
+
+ usec -= tv_usec;
+ if (usec.count () != 400)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::microseconds of 3400. ")
+ ACE_TEXT ("Expected <400> - got <%d>.\n"),
+ tv_usec.sec (), tv_usec.usec (), usec.count ()));
+ ++errors;
+ }
+
+ std::chrono::nanoseconds nsec {4000};
+ nsec += tv_usec;
+ if (nsec.count () != 3004 * std::kilo::num)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after adding an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::nanoseconds of 4000. ")
+ ACE_TEXT ("Expected <3004000> - got <%d>.\n"),
+ tv_usec.sec (), tv_usec.usec (), nsec.count ()));
+ ++errors;
+ }
+
+ nsec -= tv_usec;
+ if (nsec.count () != 4000)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) unexpected value after substracting an ACE_Time_Value ")
+ ACE_TEXT ("of <sec=%d,usec=%d> to a std::chrono::nanoseconds of 3004000. ")
+ ACE_TEXT ("Expected <4000> - got <%d>.\n"),
+ tv_usec.sec (), tv_usec.usec (), nsec.count ()));
+ ++errors;
+ }
+
+ return errors;
+}
+
+int
+test_chrono ()
+{
+ int errors = test_assignments ();
+ errors += test_streamers ();
+ errors += test_ace_time_value_operators ();
+ errors += test_chrono_operators ();
+ return errors;
+}
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT ("Chrono_Test"));
+
+ int errors = test_chrono ();
+
+ ACE_END_TEST;
+ return errors;
+}
+
+#else
+
+int
+run_main (int, ACE_TCHAR *[])
+{
+ ACE_START_TEST (ACE_TEXT ("Chrono_Test"));
+
+ ACE_ERROR ((LM_INFO, ACE_TEXT ("std::chrono is not supported on this platform\n")));
+
+ ACE_END_TEST;
+ return 0;
+}
+
+#endif /* ACE_HAS_CPP11 */
diff --git a/ACE/tests/Compiler_Features_12_Test.cpp b/ACE/tests/Compiler_Features_12_Test.cpp
index 6d71e2243f1..eef58bdd24a 100644
--- a/ACE/tests/Compiler_Features_12_Test.cpp
+++ b/ACE/tests/Compiler_Features_12_Test.cpp
@@ -11,6 +11,15 @@
#include "test_config.h"
+// Similar to Bug_3709_Regression_Test.cpp...
+
+// HP aC++ 03.x fails this
+#if defined(__HP_aCC) && (__HP_aCC < 40000)
+#define BROKEN_TEMPLATE_TEMPLATE
+#endif
+
+#ifndef BROKEN_TEMPLATE_TEMPLATE
+
template<typename T>
struct Pair
{
@@ -32,6 +41,8 @@ struct Array
Tuple<T> array[5];
};
+#endif /* BROKEN_TEMPLATE_TEMPLATE */
+
int
run_main (int, ACE_TCHAR *[])
{
@@ -41,6 +52,8 @@ run_main (int, ACE_TCHAR *[])
// failure
int status = 0;
+#ifndef BROKEN_TEMPLATE_TEMPLATE
+
Array<int, Pair> pairs;
pairs.array[0].x1 = 0;
ACE_UNUSED_ARG (pairs);
@@ -49,6 +62,8 @@ run_main (int, ACE_TCHAR *[])
triples.array[1].t3 = 0;
ACE_UNUSED_ARG (triples);
+#endif /* BROKEN_TEMPLATE_TEMPLATE */
+
ACE_END_TEST;
return status;
}
diff --git a/ACE/tests/run_test.lst b/ACE/tests/run_test.lst
index 3a376fe34c5..8e4bb4a230d 100644
--- a/ACE/tests/run_test.lst
+++ b/ACE/tests/run_test.lst
@@ -70,6 +70,7 @@ Bug_4189_Regression_Test: !ST
CDR_Array_Test: !ACE_FOR_TAO
CDR_File_Test: !ACE_FOR_TAO
CDR_Test
+Chrono_Test
Cache_Map_Manager_Test
Cached_Accept_Conn_Test: !ACE_FOR_TAO !LabVIEW_RT
Cached_Allocator_Test: !ACE_FOR_TAO
diff --git a/ACE/tests/tests.mpc b/ACE/tests/tests.mpc
index e45e143ccc4..adb95592aa6 100644
--- a/ACE/tests/tests.mpc
+++ b/ACE/tests/tests.mpc
@@ -544,6 +544,13 @@ project(CDR Test) : acetest {
}
}
+project(Chrono Test) : acetest {
+ exename = Chrono_Test
+ Source_Files {
+ Chrono_Test.cpp
+ }
+}
+
project(Collection Test) : acetest {
exename = Collection_Test
Source_Files {
diff --git a/README.md b/README.md
index 700630efe8b..d9eebdb9bea 100644
--- a/README.md
+++ b/README.md
@@ -11,4 +11,403 @@ Travis-CI status
master: [![Build Status](https://travis-ci.org/DOCGroup/ATCD.svg?branch=master)](https://travis-ci.org/DOCGroup/ATCD)
+Snap-CI status
+================
+
+master: [![Build Status](https://snap-ci.com/DOCGroup/ATCD/branch/master/build_image)](https://snap-ci.com/DOCGroup/ATCD/branch/master)
+
+Coverity Scan status
+====================
+
+master: [![Coverity Scan Build Status](https://scan.coverity.com/projects/1/badge.svg)](https://scan.coverity.com/projects/1)
+
+<!---
+GitHub does not support styles on HTML: https://github.com/github/markup/issues/57 so just
+use icons from...
+http://p.yusukekamiyamane.com/
+http://www.iconarchive.com/show/fugue-icons-by-yusuke-kamiyamane.html
+--->
+
+[tip]: http://icons.iconarchive.com/icons/yusuke-kamiyamane/fugue/16/tick-circle-frame-icon.png "Tip"
+[warn]: http://icons.iconarchive.com/icons/yusuke-kamiyamane/fugue/16/exclamation-icon.png "Warning"
+[err]: http://icons.iconarchive.com/icons/yusuke-kamiyamane/fugue/16/minus-circle-icon.png "Error"
+
+# ATCD #
+
+ATCD is a [freely licensed](https://raw.githubusercontent.com/DOCGroup/ATCD/master/ACE/COPYING) C++ suite. [ACE](http://www.dre.vanderbilt.edu/~schmidt/ACE.html) is a C++ framework for implementing distributed and networked applications, [TAO](http://www.dre.vanderbilt.edu/~schmidt/TAO.html) is a C++ implementation of the OMG's [CORBA](http://www.omg.org/spec/CORBA/) standard, [CIAO](http://www.dre.vanderbilt.edu/~schmidt/CIAO.html) is a C++ implementation of the OMG's [LwCCM](http://www.omg.org/spec/CORBA/) standard, and DAnCE is a C++ implementation of the OMG's [Deployment and Configuration](http://www.omg.org/spec/DEPL/) standard. The main home page is [here](http://www.dre.vanderbilt.edu/~schmidt/). Mailing lists are available [here](http://www.dre.vanderbilt.edu/~schmidt/ACE-mail.html) and the Bugzilla for issues is [here](http://bugzilla.dre.vanderbilt.edu/).
+
+## Contributing Via GitHub ##
+
+These guidelines are for all developers, whether occasional or regular. They have been sourced from various 'best practice' documents but primarily [here](https://github.com/JacORB/JacORB).
+
+![Warning][warn] As a convention, <i>upstream</i> is used as the name of the <a href="http://github.com/DOCGroup/ATCD">http://github.com/DOCGroup/ATCD</a> repository. This repository is the canonical repository for ATCD. We usually name <i>origin</i> the fork on github of each contributor. So the exact meaning of <i>origin</i> is relative to the developer: you could think of <i>origin</i> as your own fork.
+
+## Pre-requisites
+
+This document assumes some working knowledge of git. We recommend Scott Chacon's excellent [Pro Git](http://progit.org) a a valuable piece of background reading. The book is released under the Creative Commons license and can be downloaded in electronic form for free. At very least, we recommend that [Chapter 2](http://progit.org/book/ch2-0.html), [Chapter 3](http://progit.org/book/ch3-0.html) and [Chapter 5](http://progit.org/book/ch5-0.html) of Pro Git are read before proceeding.
+
+## Repositories
+
+ATCD uses [http://github.com/DOCGroup/ATCD](http://github.com/DOCGroup/ATCD) as its canonical repository, and this repository contains the stable code on master.
+
+Typically, only _Project Admins_ would be able to push to this repo while all else may clone or fork this repo.
+
+## Roles
+
+The project assumes one of 3 _roles_ an individual may assume when interacting with the ATCD codebase. The three roles here are:
+
+* _Project Admin_
+* _Frequent Contributor_
+* _Occasional Contributor_
+
+![Warning][warn] Typically, someone may be in more than one role at any given time, and puts on a different "hats" based on the task at hand
+
+
+### Occasional Contributor
+
+This role defines a user who browses through the source code of the project and occasionally submits patches. Patches may be submitted in one of two ways:
+
+* Attach a patch file to the Bugzila issue (ATCD Bug tracking system may be found [here](http://bugzilla.dre.vanderbilt.edu/)).
+* Creating a pull request on GitHub
+
+The approach a contributor chooses to use depends entirely his/her personal preference, but usually is tied to how the contributor accesses ATCD's source code. If the contributor directly clones the upstream repository, they should submit patch files. If the contributor instead uses their personal GitHub account to fork the upstream repository, then they are should issue a pull request.
+
+![Tip][tip] A GitHub pull request is the preferred method to submit a patch!
+
+
+#### Attach a patch file to the Bugzilla issue
+
+![Git Workflow 1](https://docs.jboss.org/author/download/attachments/4784485/git_wf_1.png)
+
+In this workflow, the contributor directly clones the upstream repository, makes changes to his local clone, adequately tests and commits his work with proper comments (more on commit comments later), and generates a patch. The patch should then be attached to the Bugzilla issue.
+
+More information on generating patches suitable for attaching to a Bugzilla can be found in [Chapter 5, Section 2](http://progit.org/book/ch5-2.html) of Pro Git, under the section titled *Public Large Project*.
+
+![Warning][warn] Rather than emailing the patches to a developer mail list, please attach your patch to the Bugzilla issue.
+
+
+#### Creating a pull request on GitHub
+
+![Git Workflow 2](https://docs.jboss.org/author/download/attachments/4784485/git_wf_2.png)
+
+In this workflow, the contributor forks the ATCD upstream repository on GitHub, clones their fork, and makes changes to this private fork. When changes have been tested and are ready to be contributed back to the project, a *pull request* is issued via GitHub so that one of the Project Administrators can pull in the change.
+
+![Warning][warn] It is desirable to work off a <i>topic branch</i>, even when using your own, forked repository. A topic branch is created for every feature or bug fix you do. Typically you would create one topic branch per issue, but if several patches are related it's acceptable to have several commits in the same branch; however different changes should always be identified by different commits.
+
+
+Before you push your work onto your fork of the repository, it is often a good idea to review your commits. Consolidating them (squashing) or breaking them up as necessary and cleaning up commit messages should all be done while still working off your local clone. Also, prior to issuing a pull request, you should make sure you rebase your branch against the upstream branch you expect it to be merged into. Also, only submit pull requests for your branch - not for your master!
+
+The section on *Public Small Project* in [Chapter 5, Section 2](http://progit.org/book/ch5-2.html) of Pro Git has more information on this style of workflow.
+
+##### A worked example
+
+1. Make sure your master is synced up with upstream. See [this section](#if-you-have-forked-upstream) for how to do this
+2. Create new branch for your topic and switch to it. For the example issue, BZ-1234:
+
+```
+git checkout -b BZ-12345 master
+```
+
+3. Do your work. Test. Repeat
+4. Commit your work on your topic branch
+5. Push your topic branch to GitHub. For example:
+
+```
+git push origin BZ-12345
+```
+
+6. Issue a pull request using the [GitHub pull request system](http://help.github.com/send-pull-requests)
+7. Once your pull request has been applied upstream, delete the topic branch both locally and on your fork. For example:
+
+```
+git branch -d BZ-12345 && git push origin :BZ-12345
+```
+
+8. Sync with upstream again so that your changes now appear in your master branch
+
+If your topic branch has been open for a while and you are afraid changes upstream may clash with your changes, it makes sense to rebase your topic branch before you issue a pull request. To do this:
+
+1. Sync your master branch with upstream
+
+```
+git checkout master
+git pull upstream master
+```
+
+2. Switch to your topic branch. For example:
+
+```
+git checkout BZ-12345
+```
+
+3. Rebase your topic branch against master:
+
+```
+git rebase master
+```
+
+4. During the rebase process you might need to fix conflicts;
+5. when you're done test your code again.
+6. Push your rebased topic branch to your repo on GitHub (you will likely need to force this with the _-f_ option).
+
+```
+git push -f origin BZ-12345
+```
+
+7. Continue your work on your topic branch.
+
+![Warning][warn] If you are sharing your forked ATCD repo with others, then do not rebase! Use a merge instead.
+
+
+#### Multi-step coordination between developers using forked repositories
+
+Sometimes a feature/task is rather complex to implement and requires competence from multiple areas of the projects. In such occasions it is not uncommon for developers to coordinate feature implementation using personal forks of ATCD prior to finally issuing request to integrate into ATCD main repository on GitHub.
+
+For example, developer A using his personal ATCD fork creates a topic branch T and completes as much work as he/she can before requesting for assistance from developer B. Developer A pushes topic T to his personal ATCD fork where developer B picks it up and brings it down to his local repo. Developer B then in turn completes necessary work, commits his/her changes on branch T, and finally pushes back T to his own personal fork. After issuing request for pull to developer A, developer B waits for notification that developer A integrated his changes. This exchange can be repeated as much as it is necessary and can involve multiple developers.
+
+##### A worked example
+
+This example assumes that developer A and B have added each others ATCD forked repositories with the *git add remote* command. For example, developer B would add developer A's personal ATCD fork repository with the command
+
+```
+ git remote add devA https://github.com/developerA/ATCD.git
+```
+
+1. Developer A starts implementing feature BZ-244 and works on a local topic branch `bz244`
+Developer A pushes `bz244` to personal ATCD fork. For example:
+
+```
+ git push origin bz244
+```
+
+2. Developer B fetches branch `bz244` to local repository. For example:
+
+```
+ git fetch devA bz244:my_bz244
+```
+
+3. Developer B works on local branch `my_bz244`
+4. Developer B commits changes, pushes `my_bz244` to own fork.
+
+```
+ git push origin my_bz244
+```
+
+5. Developer B sends pull request to developer A to integrate changes from `my_bz244` to `bz244`
+
+### Frequent Contributor
+
+A frequent contributor will only ever submit patches via a pull requests. The pull request will be submitted via GitHub.
+
+Frequent contributors should *always* fork the upstream project on GitHub and work off a clone of this fork. This is very similar to [Creating a pull request on GitHub](#creating-a-pull-request-on-github) workflow used by a [#Occasional Contributor](#occasional-contributor).
+
+![Warning][warn] All ATCD core developers are considered frequent contributors and work off personal forks of the upstream repository. This allows for complex features to be developed in parallel without tripping up over one another. This process is certainly not restricted to just ATCD core developers; any contributor is welcome to also participate in this manner.
+
+
+
+### Project Admin
+
+Project Admins have a very limited role. Only Project Admins are allowed to push to upstream, and Project Admins _never_ write any code directly on the upstream repository. All Project Admins do is pull in and merge changes from contributors (even if the "contributor" happens to be themselves) into upstream, perform code reviews and either commit or reject such changes.
+
+![Warning][warn] All Contributors who are also Project Admins are encouraged to not merge their own changes, to ensure that all changes are reviewed.
+
+
+This approach ensures ATCD maintains quality on the main code source tree, and allows for important code reviews to take place again ensuring quality. Further, it ensures clean and easily traceable code history and makes sure that more than one person knows about the changes being performed.
+
+#### Merging in patches
+
+![Git Workflow 3](https://docs.jboss.org/author/download/attachments/4784485/git_wf_3.png)
+
+Patches submitted via Bugzilla are audited and promoted to the upstream repository as detailed above. A Project Admin would typically create a working branch to which the patch is applied and tested. The patch can be further modified, cleaned up, and commit messages made clearer if necessary. The branch should then be merged to the master or one of the maintenance branches before being pushed.
+
+More information on applying patches can be found in [Chapter 5, Section 3](http://progit.org/book/ch5-3.html) of Pro Git, under *Applying Patches From Email.*
+
+#### Handling pull requests
+
+![Git Workflow 4](https://docs.jboss.org/author/download/attachments/4784485/git_wf_4.png)
+
+Project Admins are also responsible for responding to pull requests. The process is similar to applying a patch directly, except that when pulling in changes from a forked repository, more than a single commit may be pulled in. Again, this should be done on a newly created working branch, code reviewed, tested and cleaned up as necessary.
+
+If commits need to be altered - e.g., rebasing to squash or split commits, or to alter commit messages - it is often better to contact the Contributor and ask the Contributor to do so and re-issue the pull request, since doing so on the upstream repo could cause update issues for contributors later on. If commits were altered or three-way merge was performed during a merge instead of fast-forward, it's also a good idea to check the log to make sure that the resulting repository history looks OK:
+
+```
+$ git log --pretty=oneline --graph --abbrev-commit # History messed up due to a bad merge
+* 3005020 Merge branch 'BZ-786' of git://github.com/rnc/ATCD
+|\
+| * e757265 BZ-786 Make dependency to foobar optional <-- Same with cb4e5d6 - unnecessary
+* | cb4e5d6 BZ-786 Make dependency to foobar optional <-- Cherry-picked commit by other admin
+|/
+* ...
+
+$ git reset cb4e5d6 # revert the bad merge
+```
+
+It is therefore __strongly recommended__ that you use the [handle_pull_request](https://github.com/maniksurtani/githelpers/blob/master/project_admins/handle_pull_request) script that ensures a clean merge. If you _still_ wish to do this manually, please consider reading through the script first to get an idea of what needs to happen.
+
+More information on pulling changes from remote, forked repos can be found in [Chapter 5, Section 3](http://progit.org/book/ch5-3.html) of Pro Git, under *Checking Out Remote Branches* .
+
+##### Possible trouble handling pull requests
+
+* If you have warnings about "Merge made by recursive" you have to fix it rebasing.
+* If you have warnings about "non-fast-forward" you have to rebase.
+* If you see "non-fast-forward updates were rejected" you shall never use "force" on upstream! It means that another patch was merged before you and you have to update your master again, and rebase again.
+* "force" is allowed only in special maintenance circumstances. If you find you're needing it to handle a pull request, then you're doing it wrong, and the mistake might be a dangerous one! It's like the good rule of never commit when you're drunk (coding is allowed).
+
+![Error][err] __Never use force on git push__ Using _-f_ while pushing on a shared repository such as _upstream_ you could effectively erase other committed patches. No-one shall ever use this option unless unanimously approved on the public mailing list: the most dangerous aspect of it is that nobody gets any notification if this happens, and we might think issues are solved but you silently removed the fix and it's history from the repository.
+
+
+#### Cutting releases
+
+Releases can only be cut by Project Admins, and must be done off a recently updated (git fetch and git pull origin) clone of the upstream repo.
+
+## Committing your work
+
+### Release branches
+
+ATCD currently has a primary release branch of master and a maintenance branch used by Red Hat JBoss. In future further release branches may be created. (e.g. for maintenance purposes). Work should never be committed directly to a release branch; topic branches should always be used for work, and these topic branches should be merged in.
+
+### Topic branches
+
+Some of the biggest features of git are speed and efficiency of branching, and accuracy of merging. As a result, best practices involve making frequent use of branches. Creating several topic branches a day, even, should not be considered excessive, and working on several topic branches simultaneously again should be commonplace.
+
+[Chapter 3, Section 4](http://progit.org/book/ch3-4.html) of Pro Git has a detailed discussion of topic branches. For ATCD, it makes sense to create a topic branch and name it after the Bugzilla it corresponds to. (if it doesn't correspond to a Bugzilla, a simple but descriptive name should be used).
+
+#### Topic Branches Affecting More Than One Release Branch
+
+Most topic branches will only affect the a single release branch, so a topic branch should be created based off master. It may be that fixes apply to multiple branches. In this case, the following workflow should apply:
+
+* Create topic branch off maintenance branch e.g. 6.3.1. For example:
+```git checkout -b <topic>_ACE+TAO+CIAO-6_3_1 ACE+TAO+CIAO-6_3_1```
+* Create topic branch off master. For example:
+```git checkout -b <topic>_master master```
+* Do your work on `<topic>_master`, test and commit your fixes
+* Switch to `<topic>_ACE+TAO+CIAO-6_3_1`. For example:
+```git checkout <topic>_ACE+TAO+CIAO-6_3_1```
+* Cherry-pick your commit on `<topic>_master` onto `<topic>_ACE+TAO+CIAO-6_3_1`. For example:
+```git cherry-pick <commit_id>```
+* Test `<topic>_ACE+TAO+CIAO-6_3_1` for correctness, modify as necessary
+* Issue pull requests for both topic branches
+
+### Comments
+
+It is __extremely important__ that comments for each commit are clear and follow certain conventions. This allows for proper parsing of logs by git tools. Read [this article](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) on how to format comments for git and adhere to them. Further to the recommendations in the article, the short summary of the commit message should be in the following format:
+
+ BZ-XXX Subject line of the Bugzilla in question
+
+This can optionally be followed by a detailed explanation of the commit. Why it was done, how much of it was completed, etc. You may wish to express this as a list, for example:
+
+```
+* Add a unit test
+* Add more unit tests
+* Fix regressions
+* Solve major NP-Complete problems
+```
+
+Make sure however to split separate concerns - especially if they are unrelated - in separate commits.
+
+### Commits
+
+Sometimes work on your topic branch may include several commits. For example, committing a test. Then committing another test. Then perhaps committing a fix. And perhaps fixing your own fix in the next commit... Before issuing a pull request for this topic branch, consider cleaning up these commits. Interactive rebasing helps you squash several commits into a single commit, which is often more coherent to deal with for others merging in your work. [Chapter 6, Section 4](http://progit.org/book/ch6-4.html) of Pro Git has details on how to squash commits and generally, clean up a series of commits before sharing this work with others. Note that you can also easily reorder them, just change the order of lines during the interactive rebase process.
+
+Also, it is important to make sure you don't accidentally commit files for which no real changes have happened, but rather, whitespace has been modified. This often happens with some IDEs. `git diff --check` should be run before you issue such a pull request, which will check for such "noise" commits and warn you accordingly. Such files should be reverted and not be committed to the branch.
+
+Adhering to [ATCD's code style](https://github.com/DOCGroup/ATCD/blob/master/doc/Coding.txt) guidelines will help minimise "noise" commits. Project Admins are going to ask contributors to reformat their code if necessary.
+
+## Keeping your repo in sync with upstream
+
+### If you have cloned upstream
+
+If you have a clone of the upstream, you may want to update it from time to time. Running:
+
+```
+$ git fetch origin
+$ git fetch origin --tags
+```
+
+will often do the trick. You could then pull the specific branches you would need to update:
+
+```
+$ git checkout master
+$ git pull origin master
+$ git checkout ACE+TAO+CIAO-6_3_1
+$ git pull origin ACE+TAO+CIAO-6_3_1
+```
+
+
+#### Updating topic branches
+
+You should rebase your topic branches at this point so that they are up-to-date and when pulled by upstream, upstream can fast-forward the release branches:
+```
+$ git checkout <topic>_master
+$ git rebase master
+```
+
+and/or
+
+```
+$ git checkout topic_ACE+TAO+CIAO-6_3_1
+$ git rebase ACE+TAO+CIAO-6_3_1
+```
+
+### If you have forked upstream
+
+If you have a fork of upstream, you should probably define upstream as one of your remotes:
+
+```
+$ git remote add upstream git://github.com/DOCGroup/ATCD.git
+```
+
+You should now be able to fetch and pull changes from upstream into your local repository, though you should make sure you have no uncommitted changes. (You *do* use topic branches, right?)
+
+```
+$ git fetch upstream
+$ git fetch upstream --tags
+$ git checkout master
+$ git pull upstream master
+$ git push origin master
+$ git checkout ACE+TAO+CIAO-6_3_1
+$ git pull upstream ACE+TAO+CIAO-6_3_1
+$ git push origin ACE+TAO+CIAO-6_3_1
+```
+
+A script can do this for you - have a look at [sync_with_upstream](https://github.com/maniksurtani/githelpers/blob/master/contributors/sync_with_upstream).
+
+#### Updating topic branches
+
+Again, you should rebase your topic branches at this point so that they are up-to-date and when pulled by upstream, upstream can fast-forward the release branches:
+
+```
+$ git checkout topic_master
+$ git rebase master
+```
+
+and/or
+
+```
+$ git checkout topic_ACE+TAO+CIAO-6_3_1
+$ git rebase ACE+TAO+CIAO-6_3_1
+```
+
+The sync_with_upstream script can do this for you if your topic branch naming conventions match the script.
+
+## GIT Enhancements
+
+There are many ways git usage may be enhanced:
+* Autocompletion on the command line via Bash or ZSH
+* Custom shell prompts to display GIT repository information (again, available in Bash & ZSH)
+* Coloring GIT Terminal output
+* Visual tools such as gitk, qgit, Eclipse integration, etc.
+* etc.
+
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<br/>
+<footer>
+<p><i>Some icons by <a href="http://p.yusukekamiyamane.com">Yusuke Kamiyamane</a></i></p>
+</footer>
diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp
index d0ff1c5aa58..31e4984c9b2 100644
--- a/TAO/TAO_IDL/driver/drv_args.cpp
+++ b/TAO/TAO_IDL/driver/drv_args.cpp
@@ -118,9 +118,9 @@ void
DRV_usage (void)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s: usage: %s [flag | file]*\n"),
- ACE_TEXT_CHAR_TO_TCHAR (idl_global->prog_name ()),
- ACE_TEXT_CHAR_TO_TCHAR (idl_global->prog_name ())));
+ ACE_TEXT ("%C: usage: %C [flag | file]*\n"),
+ idl_global->prog_name (),
+ idl_global->prog_name ()));
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Legal flags:\n")));
diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp
index 14f3fa50900..1e0168f788e 100644
--- a/TAO/TAO_IDL/driver/drv_preproc.cpp
+++ b/TAO/TAO_IDL/driver/drv_preproc.cpp
@@ -1354,7 +1354,13 @@ DRV_pre_proc (const char *myfile)
throw Bailout ();
}
- cpp_options.set_handles (ACE_INVALID_HANDLE, fd);
+ if (cpp_options.set_handles (ACE_INVALID_HANDLE, fd) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "%C: cannot set stdout for child process: %p\n",
+ idl_global->prog_name ()));
+
+ throw Bailout ();
+ }
}
if (idl_global->compile_flags () & IDL_CF_INFORMATIVE)
diff --git a/TAO/TAO_IDL/tao_idl.cpp b/TAO/TAO_IDL/tao_idl.cpp
index d228c009f5e..a293021d859 100644
--- a/TAO/TAO_IDL/tao_idl.cpp
+++ b/TAO/TAO_IDL/tao_idl.cpp
@@ -99,9 +99,9 @@ void
DRV_version (void)
{
ACE_DEBUG ((LM_DEBUG,
- "%s\n"
+ "%C\n"
"TAO_IDL_FE, version %s (Based on Sun IDL FE, version %s)\n",
- ACE_TEXT_CHAR_TO_TCHAR (idl_global->prog_name ()),
+ idl_global->prog_name (),
ACE_TEXT (TAO_VERSION),
ACE_TEXT (SUN_IDL_FE_VERSION)));
diff --git a/TAO/TAO_IDL/tao_idl.mpc b/TAO/TAO_IDL/tao_idl.mpc
index b3c6bbedc1a..1fe1093ca19 100644
--- a/TAO/TAO_IDL/tao_idl.mpc
+++ b/TAO/TAO_IDL/tao_idl.mpc
@@ -1,7 +1,6 @@
// -*- MPC -*-cr
project(TAO_IDL_EXE) : aceexe, install, tao_output, tao_idl_fe {
exename = tao_idl
- libs += TAO_IDL_BE
exeout = $(ACE_ROOT)/bin
after += TAO_IDL_BE gperf
includes += $(TAO_ROOT)
@@ -15,6 +14,13 @@ project(TAO_IDL_EXE) : aceexe, install, tao_output, tao_idl_fe {
optimize =
}
+ specific(prop:static) {
+ after += TAO_IDL_BE_VIS_V
+ libs += TAO_IDL_BE TAO_IDL_BE_VIS_V TAO_IDL_BE_VIS_A TAO_IDL_BE_VIS_O TAO_IDL_BE_VIS_C TAO_IDL_BE_VIS_E TAO_IDL_BE_VIS_I TAO_IDL_BE_VIS_S TAO_IDL_BE_VIS_U TAO_IDL_BE_VIS_C TAO_IDL_BE_VIS_A TAO_IDL_BE_VIS_E TAO_IDL_BE_VIS_V TAO_IDL_BE_VIS_S TAO_IDL_BE_VIS_O TAO_IDL_BE
+ } else {
+ libs += TAO_IDL_BE
+ }
+
verbatim(gnuace, local) {
ifeq ($(TAO_IDL_PREPROCESSOR),)
ifeq ($(ACE_CC_PREPROCESSOR),)
@@ -47,4 +53,3 @@ project(TAO_IDL_EXE) : aceexe, install, tao_output, tao_idl_fe {
include/drv_extern.h
}
}
-
diff --git a/TAO/TAO_IDL/tao_idl_be.mpc b/TAO/TAO_IDL/tao_idl_be.mpc
index c8b82e8130f..1a8aa62aaf7 100644
--- a/TAO/TAO_IDL/tao_idl_be.mpc
+++ b/TAO/TAO_IDL/tao_idl_be.mpc
@@ -15,38 +15,267 @@ project(TAO_IDL_BE) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe
Source_Files {
be
- be/be_visitor_argument
- be/be_visitor_array
- be/be_visitor_attribute
- be/be_visitor_component
- be/be_visitor_component_fwd
- be/be_visitor_connector
- be/be_visitor_constant
- be/be_visitor_enum
- be/be_visitor_exception
- be/be_visitor_field
- be/be_visitor_home
- be/be_visitor_interface
- be/be_visitor_interface_fwd
- be/be_visitor_module
- be/be_visitor_native
- be/be_visitor_operation
- be/be_visitor_root
- be/be_visitor_sequence
- be/be_visitor_structure
- be/be_visitor_structure_fwd
- be/be_visitor_typecode
- be/be_visitor_typedef
- be/be_visitor_union
- be/be_visitor_union_branch
- be/be_visitor_union_fwd
+ conditional(!prop:static) {
+ be/be_visitor_argument
+ be/be_visitor_array
+ be/be_visitor_attribute
+ be/be_visitor_component
+ be/be_visitor_component_fwd
+ be/be_visitor_connector
+ be/be_visitor_constant
+ be/be_visitor_enum
+ be/be_visitor_exception
+ be/be_visitor_field
+ be/be_visitor_home
+ be/be_visitor_interface
+ be/be_visitor_interface_fwd
+ be/be_visitor_module
+ be/be_visitor_native
+ be/be_visitor_operation
+ be/be_visitor_root
+ be/be_visitor_sequence
+ be/be_visitor_structure
+ be/be_visitor_structure_fwd
+ be/be_visitor_typecode
+ be/be_visitor_typedef
+ be/be_visitor_union
+ be/be_visitor_union_branch
+ be/be_visitor_union_fwd
+ be/be_visitor_valuebox
+ be/be_visitor_valuetype
+ be/be_visitor_valuetype_fwd
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_A) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_A
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_argument
+ be/be_visitor_array
+ be/be_visitor_attribute
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_C) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_C
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_A
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_component
+ be/be_visitor_component_fwd
+ be/be_visitor_connector
+ be/be_visitor_constant
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_E) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_E
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_C
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_enum
+ be/be_visitor_exception
+ be/be_visitor_field
+ be/be_visitor_home
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_I) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_I
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_E
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_interface
+ be/be_visitor_interface_fwd
+ be/be_visitor_module
+ be/be_visitor_native
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_O) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_O
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_I
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_operation
+ be/be_visitor_root
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_S) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_S
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_O
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_sequence
+ be/be_visitor_structure
+ be/be_visitor_structure_fwd
+ be/be_visitor_typecode
+ be/be_visitor_typedef
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_U) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_U
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_S
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
+ be/be_visitor_union
+ be/be_visitor_union_branch
+ be/be_visitor_union_fwd
+ }
+ }
+
+ Header_Files {
+ be_include
+ }
+}
+
+project(TAO_IDL_BE_VIS_V) : acelib, conv_lib, tao_output, tao_vc8warnings, tao_idl_fe {
+ sharedname = TAO_IDL_BE_VIS_V
+ dynamicflags += TAO_IDL_BE_BUILD_DLL
+ after += TAO_IDL_BE_VIS_U
+ includes += $(TAO_ROOT)
+ includes += include be_include fe
+
+ specific {
+ // Override the template value for optimize. Building the backend
+ // with optimization turned on doesn't seem to work (at least not with
+ // vc6 or vc71). This is due to the use of addresses of static objects
+ // within the code.
+ optimize =
+ }
+
+ Source_Files {
+ conditional(prop:static) {
be/be_visitor_valuebox
be/be_visitor_valuetype
be/be_visitor_valuetype_fwd
}
+ }
Header_Files {
be_include
}
}
-
diff --git a/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp b/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp
index 99a11e1fdb9..a2daa136fa6 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp
@@ -20,7 +20,6 @@ ImR_Adapter::ImR_Adapter (void)
void
ImR_Adapter::init (TAO_ServantBase * servant)
{
- ORBSVCS_DEBUG ((LM_DEBUG, "ImR_Adapter::init with default servant\n"));
default_servant_ = servant;
}
@@ -83,4 +82,3 @@ ImR_Adapter::unknown_adapter (PortableServer::POA_ptr parent,
// Finally, now everything is fine
return 1;
}
-
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp
index 65c3ce35d4b..ee3641e1fec 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp
@@ -67,11 +67,6 @@ ImR_Locator_i::ImR_Locator_i (void)
ImR_Locator_i::~ImR_Locator_i (void)
{
- // For some reason g++ 4.0 needs this out-of-line destructor instead
- // of the default one generated by the compiler. Without this
- // destructor, we get a number of "undefined reference" link errors
- // related to the virtual tables of the INS_Locator, ImR_Adapter and
- // ImR_Forwarder members in this class.
}
int
@@ -153,7 +148,6 @@ ImR_Locator_i::init_with_orb (CORBA::ORB_ptr orb)
ACE_ASSERT (! CORBA::is_nil (ior_table.in ()));
ior_table->set_locator (this->ins_locator_.in ());
-
// initialize the repository. This will load any values that
// may have been persisted before.
int result = this->repository_->init(this->root_poa_.in (),
@@ -169,7 +163,7 @@ ImR_Locator_i::init_with_orb (CORBA::ORB_ptr orb)
for (;it.next (entry) != 0; it.advance ())
{
- UpdateableServerInfo info (this->repository_.get(), entry->int_id_);
+ UpdateableServerInfo info (this->repository_, entry->int_id_);
bool is_alive = this->server_is_alive (info);
Server_Info *active = info.edit()->active_info ();
if (this->debug_ > 0)
@@ -443,7 +437,7 @@ ImR_Locator_i::remote_access_update (const char *name,
AsyncAccessManager_ptr aam (this->find_aam (name));
if (aam.is_nil())
{
- UpdateableServerInfo info (this->repository_.get(), name);
+ UpdateableServerInfo info (this->repository_, name);
if (info.null ())
{
if (debug_ > 0)
@@ -475,7 +469,7 @@ ImR_Locator_i::notify_child_death
this->pinger_.remove_server (name);
- UpdateableServerInfo info (this->repository_.get(), name);
+ UpdateableServerInfo info (this->repository_, name);
if (! info.null ())
{
info.edit ()->reset_runtime ();
@@ -497,7 +491,7 @@ ImR_Locator_i::child_death_pid
if (debug_ > 1)
ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("ImR: Server[%d] has died <%C>.\n"), pid, name));
- UpdateableServerInfo info(this->repository_.get(), name, pid);
+ UpdateableServerInfo info(this->repository_, name, pid);
if (! info.null ())
{
info.edit ()->reset_runtime ();
@@ -527,7 +521,7 @@ ImR_Locator_i::spawn_pid
ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("ImR: Server[%d] spawned <%C>.\n"),
pid, name));
- UpdateableServerInfo info(this->repository_.get(), name);
+ UpdateableServerInfo info(this->repository_, name);
if (! info.null ())
{
info.edit ()->active_info ()->pid = pid;
@@ -623,7 +617,7 @@ ImR_Locator_i::activate_server_by_name (const char* name, bool manual_start,
{
// Activate the server, starting it if necessary. Don't start MANUAL
// servers unless manual_start=true
- UpdateableServerInfo info (this->repository_.get(), name);
+ UpdateableServerInfo info (this->repository_, name);
if (info.null ())
{
rh->send_exception ( new ImplementationRepository::NotFound );
@@ -638,7 +632,7 @@ void
ImR_Locator_i::activate_server_by_info (const Server_Info_Ptr &si,
ImR_ResponseHandler *rh)
{
- UpdateableServerInfo info (this->repository_.get(), si, true);
+ UpdateableServerInfo info (this->repository_, si, true);
this->activate_server_i (info, false, rh);
}
@@ -733,7 +727,7 @@ ImR_Locator_i::add_or_update_server
if (debug_ > 0)
ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("ImR: Add/Update server <%C>.\n"), server));
- UpdateableServerInfo info(this->repository_.get(), server);
+ UpdateableServerInfo info(this->repository_, server);
if (info.null ())
{
if (debug_ > 1)
@@ -820,7 +814,6 @@ ImR_Locator_i::link_servers
}
}
- // UpdateableServerInfo info (this->repository_.get(), root_si, true);
this->repository_->link_peers (root_si, peers);
_tao_rh->link_servers ();
@@ -848,7 +841,7 @@ ImR_Locator_i::kill_server
si = si->alt_info_;
}
- UpdateableServerInfo info (this->repository_.get(), si, true);
+ UpdateableServerInfo info (this->repository_, si, true);
if (info->is_mode(ImplementationRepository::PER_CLIENT))
{
CORBA::Exception *ex =
@@ -975,7 +968,7 @@ ImR_Locator_i::shutdown_server
ACE_TEXT ("ImR: Shutting down server <%C>.\n"),
id));
- UpdateableServerInfo info (this->repository_.get(), id);
+ UpdateableServerInfo info (this->repository_, id);
if (info.null ())
{
ORBSVCS_ERROR ((LM_ERROR,
@@ -1118,7 +1111,7 @@ ImR_Locator_i::server_is_running
ImplementationRepository::ServerObject_var srvobj =
ImplementationRepository::ServerObject::_narrow (obj.in());
- UpdateableServerInfo info (this->repository_.get(), id);
+ UpdateableServerInfo info (this->repository_, id);
if (info.null ())
{
if (debug_ > 0)
@@ -1201,7 +1194,7 @@ ImR_Locator_i::server_is_shutting_down
(ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh,
const char* fqname)
{
- UpdateableServerInfo info (this->repository_.get(), fqname);
+ UpdateableServerInfo info (this->repository_, fqname);
if (info.null ())
{
if (debug_ > 1)
@@ -1365,7 +1358,7 @@ ImR_Locator_i::auto_start_servers (void)
// running.
for (;server_iter.next (server_entry) != 0; server_iter.advance ())
{
- UpdateableServerInfo info(this->repository_.get(), server_entry->int_id_);
+ UpdateableServerInfo info(this->repository_, server_entry->int_id_);
ACE_ASSERT (! info.null ());
try
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h
index 2e122a50d70..fce75f0647a 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h
+++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h
@@ -11,7 +11,7 @@
#include "LiveCheck.h"
#include "ImR_ResponseHandler.h"
#include "Locator_Options.h"
-#include "Server_Info.h"
+#include "UpdateableServerInfo.h"
#include "ace/Auto_Ptr.h"
#include "AsyncAccessManager.h"
#include "tao/IORTable/IORTable.h"
@@ -27,8 +27,6 @@ class ACE_Reactor;
ACE_END_VERSIONED_NAMESPACE_DECL
class INS_Locator;
-class Locator_Repository;
-class UpdateableServerInfo;
/// Gets a request from a client and depending on the POA name,
/// requests an activator to take care of activating the
@@ -218,7 +216,7 @@ private:
PortableServer::POA_var root_poa_;
PortableServer::POA_var imr_poa_;
- auto_ptr<Locator_Repository> repository_;
+ Repository_Ptr repository_;
Options *opts_;
};
diff --git a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
index f5a0f183880..b576760c663 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
@@ -1043,6 +1043,7 @@ Shared_Backing_Store::load_server (Server_Info *info,
bool was_started = si->is_running ();
*si.get () = *info;
+ delete info;
if (!server_started)
{
@@ -1057,7 +1058,7 @@ Shared_Backing_Store::load_server (Server_Info *info,
this->create_server (server_started, si);
if (was_started && !is_started)
{
- this->opts_.pinger ()->remove_server (info->key_name_.c_str ());
+ this->opts_.pinger ()->remove_server (si->key_name_.c_str ());
}
if (!was_started && is_started)
{
@@ -1065,7 +1066,7 @@ Shared_Backing_Store::load_server (Server_Info *info,
this->loc_impl_->set_timeout_policy (si->server.in (),
ACE_Time_Value (1,0));
si->server = ImplementationRepository::ServerObject::_narrow (obj.in ());
- this->opts_.pinger ()->add_server (info->key_name_.c_str (),
+ this->opts_.pinger ()->add_server (si->key_name_.c_str (),
this->opts_.ping_external (),
si->server.in ());
}
diff --git a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp
index d59ca87d08e..c1aa5070191 100644
--- a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.cpp
@@ -2,7 +2,7 @@
#include "Locator_Repository.h"
#include "UpdateableServerInfo.h"
-UpdateableServerInfo::UpdateableServerInfo (Locator_Repository* repo,
+UpdateableServerInfo::UpdateableServerInfo (const Repository_Ptr& repo,
const ACE_CString& name,
int pid)
: repo_(repo),
@@ -11,7 +11,7 @@ UpdateableServerInfo::UpdateableServerInfo (Locator_Repository* repo,
{
}
-UpdateableServerInfo::UpdateableServerInfo (Locator_Repository* repo,
+UpdateableServerInfo::UpdateableServerInfo (const Repository_Ptr& repo,
const Server_Info_Ptr& si,
bool reset_start_count)
: repo_(repo),
@@ -20,7 +20,7 @@ UpdateableServerInfo::UpdateableServerInfo (Locator_Repository* repo,
{
if (reset_start_count)
{
- needs_update_ = repo_ != 0;
+ needs_update_ = repo_.get() != 0;
si_->active_info ()->start_count_ = 0;
}
}
@@ -82,7 +82,7 @@ UpdateableServerInfo::operator* () const
const Server_Info_Ptr&
UpdateableServerInfo::edit ()
{
- needs_update_ = repo_ != 0;
+ needs_update_ = repo_.get() != 0;
return si_;
}
diff --git a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h
index 124a29b4139..c6ccb4502c6 100644
--- a/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h
+++ b/TAO/orbsvcs/ImplRepo_Service/UpdateableServerInfo.h
@@ -14,6 +14,7 @@
#include "ImR_LocatorC.h"
class Locator_Repository;
+typedef ACE_Strong_Bound_Ptr<Locator_Repository, ACE_Null_Mutex> Repository_Ptr;
/**
* @class UpdateableServerInfo
@@ -29,7 +30,7 @@ public:
/// @param repo the repo to report updates to
/// @param name the name of the server to retrieve
/// @param pid an optional process id to further discriminate the server
- UpdateableServerInfo(Locator_Repository* repo,
+ UpdateableServerInfo(const Repository_Ptr& repo,
const ACE_CString& name,
int pid = 0);
@@ -37,7 +38,7 @@ public:
/// @param repo the repo to report updates to
/// @param si an already retrieved Server_Info_Ptr
/// @param reset_start_count controls the reset of the start count value
- UpdateableServerInfo(Locator_Repository* repo,
+ UpdateableServerInfo(const Repository_Ptr& repo,
const Server_Info_Ptr& si,
bool reset_start_count = false);
@@ -75,7 +76,7 @@ private:
const UpdateableServerInfo& operator=(const UpdateableServerInfo& );
/// the repo
- Locator_Repository* repo_;
+ Repository_Ptr repo_;
/// the retrieved, passed, or non-stored server info
Server_Info_Ptr si_;
diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
index 0ea1c37ee15..d3c65eac212 100644
--- a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp
@@ -958,46 +958,39 @@ TAO_Log_i::scheduled (void)
ACE_Time_Value tv = ACE_OS::gettimeofday ();
ORBSVCS_Time::Time_Value_to_TimeT (current_time, tv);
- if (current_time >= interval.start
- && (current_time <= interval.stop || interval.stop == 0))
+ if (current_time >= interval.start &&
+ (current_time <= interval.stop || interval.stop == 0))
{
- if (weekly_intervals_.length () > 0)
+ if (weekly_intervals_.length () == 0)
{
- // Work out when sunday is in nanoseconds.
- time_t clock = tv.sec ();
- struct tm *sunday = ACE_OS::localtime (&clock);
+ return true;
+ }
- sunday->tm_sec = 0;
- sunday->tm_min = 0;
- sunday->tm_hour = 0;
- sunday->tm_mday -= sunday->tm_wday;
+ // Work out when sunday is in nanoseconds.
+ time_t clock = tv.sec ();
+ struct tm *sunday = ACE_OS::localtime (&clock);
- tv.sec (ACE_OS::mktime (sunday));
- tv.usec (0);
+ sunday->tm_sec = 0;
+ sunday->tm_min = 0;
+ sunday->tm_hour = 0;
+ sunday->tm_mday -= sunday->tm_wday;
- TimeBase::TimeT nano_sunday =
- (CORBA::ULongLong) tv.sec () * 10000000;
+ tv.sec (ACE_OS::mktime (sunday));
+ tv.usec (0);
- for (CORBA::ULong i = 0; i < weekly_intervals_.length (); ++i)
- {
- if (current_time >= (weekly_intervals_[i].start + nano_sunday)
- && current_time <= (weekly_intervals_[i].stop + nano_sunday))
- {
- return true;
- }
- }
+ TimeBase::TimeT nano_sunday =
+ (CORBA::ULongLong) tv.sec () * 10000000;
- return false;
- }
- else
+ for (CORBA::ULong i = 0; i < weekly_intervals_.length (); ++i)
{
- return true;
+ if (current_time >= (weekly_intervals_[i].start + nano_sunday)
+ && current_time <= (weekly_intervals_[i].stop + nano_sunday))
+ {
+ return true;
+ }
}
}
- else
- {
- return false;
- }
+ return false;
}
void
diff --git a/TAO/tao/PortableServer/PortableServer_Functions.cpp b/TAO/tao/PortableServer/PortableServer_Functions.cpp
index 853bd2b7ea2..fe9c1f5f45a 100644
--- a/TAO/tao/PortableServer/PortableServer_Functions.cpp
+++ b/TAO/tao/PortableServer/PortableServer_Functions.cpp
@@ -9,6 +9,13 @@ namespace PortableServer
PortableServer::ObjectId *
string_to_ObjectId (const char *string)
{
+ // Passing in a nil pointer is illegal so throw an exception to
+ // indicate that
+ if (string == 0)
+ {
+ throw ::CORBA::BAD_PARAM ();
+ }
+
// Size of string
//
// We DO NOT include the zero terminator, as this is simply an
diff --git a/TAO/tao/Unbounded_Reference_Allocation_Traits_T.h b/TAO/tao/Unbounded_Reference_Allocation_Traits_T.h
index f4b45795f6a..518e876a26a 100644
--- a/TAO/tao/Unbounded_Reference_Allocation_Traits_T.h
+++ b/TAO/tao/Unbounded_Reference_Allocation_Traits_T.h
@@ -36,6 +36,10 @@ struct unbounded_reference_allocation_traits
inline static value_type * allocbuf(CORBA::ULong maximum)
{
+ if (maximum == ACE_UINT32_MAX)
+ {
+ return 0;
+ }
value_type * buffer = new value_type[maximum + 1];
reinterpret_cast<value_type**>(buffer)[0] = buffer + maximum + 1;
@@ -47,6 +51,10 @@ struct unbounded_reference_allocation_traits
inline static value_type * allocbuf_noinit(CORBA::ULong maximum)
{
+ if (maximum == ACE_UINT32_MAX)
+ {
+ return 0;
+ }
value_type * buffer = new value_type[maximum + 1];
reinterpret_cast<value_type**>(buffer)[0] = buffer + maximum + 1;
diff --git a/TAO/tests/DynAny_Test/test_dynany.cpp b/TAO/tests/DynAny_Test/test_dynany.cpp
index 25cf051ad54..5f68a153d78 100644
--- a/TAO/tests/DynAny_Test/test_dynany.cpp
+++ b/TAO/tests/DynAny_Test/test_dynany.cpp
@@ -72,7 +72,7 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var fa1 =
dynany_factory->create_dyn_any (in1);
- if (fa1->equal(fa1))
+ if (fa1->equal(fa1.in ()))
{
ACE_DEBUG ((LM_DEBUG,
"++ OK ++\n"));
@@ -138,7 +138,7 @@ Test_DynAny::run_test (void)
DynamicAny::DynAny_var fa1 =
dynany_factory->create_dyn_any (in1);
- if (fa1->equal(fa1))
+ if (fa1->equal(fa1.in ()))
{
ACE_DEBUG ((LM_DEBUG,
"++ OK ++\n"));
@@ -347,7 +347,7 @@ Test_DynAny::run_test (void)
dynany_factory->create_dyn_any (in4);
// is equal to self
- good = fa4->equal(fa4);
+ good = fa4->equal(fa4.in ());
CORBA::ShortSeq ss5;
ss5.length(1);
@@ -358,7 +358,7 @@ Test_DynAny::run_test (void)
dynany_factory->create_dyn_any (in5);
// is not equal for different lengths
- good = good && !fa4->equal(fa5);
+ good = good && !fa4->equal(fa5.in ());
CORBA::ShortSeq ss6(data.m_shortseq1);
ss6[0]++;
@@ -369,7 +369,7 @@ Test_DynAny::run_test (void)
dynany_factory->create_dyn_any (in6);
// is not equal for different values
- good = good && !fa4->equal(fa6);
+ good = good && !fa4->equal(fa6.in ());
CORBA::Any in7;
@@ -379,7 +379,7 @@ Test_DynAny::run_test (void)
// is equal to identical sequence, not self
- good = good && fa4->equal(fa7);
+ good = good && fa4->equal(fa7.in ());
if (good)